OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: preceding/following sibling



Mattio,
 
> The problem is that my code works only within the context node
 
This is a result of using the preceding-sibling:: and following-sibling::
axes which only return nodes with the same parent (chapter) as the current
node.
 
Try including a test to check for the first and last sections of a chapter
and then specifically reference the previous and next chapters or select all
section nodes and use the position() function to reference the previous and
next sections.

Regards, 
Craig Patterson 
WAPS Application Architect 
(08) 9212 5095 
mailto:craig.patterson@police.wa.gov.au
<mailto:craig.patterson@police.wa.gov.au>  



************************************************************************************************
This email message and any attached files may contain information that is 
confidential and subject of legal privilege intended only for use by the individual 
or entity to whom they are addressed. If you are not the intended recipient or the 
person responsible for delivering the message to the intended recipient be 
advised that you have received this message in error and that any use, copying, 
circulation, forwarding, printing or publication of this message or attached files is 
strictly forbidden, as is the disclosure of the information contained therein.
If you have received this message in error, please notify the sender immediately 
and delete it from your Inbox.
************************************************************************************************
Mattio,
 
> The problem is that my code works only within the context node
 
This is a result of using the preceding-sibling:: and following-sibling:: axes which only return nodes with the same parent (chapter) as the current node.
 
Try including a test to check for the first and last sections of a chapter and then specifically reference the previous and next chapters or select all section nodes and use the position() function to reference the previous and next sections.

Regards,
Craig Patterson
WAPS Application Architect
(08) 9212 5095
mailto:craig.patterson@police.wa.gov.au