Please disregard my previous suggestion as the following works much more nicely: <xsl:value-of select="preceding::section[1]/@ID" /> <xsl:value-of select="following::section/@ID" /> Regards, Craig Patterson WAPS Application Architect mailto:craig.patterson@police.wa.gov.au <mailto:craig.patterson@police.wa.gov.au> -----Original Message----- From: PATTERSON Craig [PD70754] Sent: Wednesday, 11 April 2001 11:02 To: 'Mattio Valentino'; xml-dev@lists.xml.org Subject: 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. ************************************************************************************************
Regards,
Craig
Patterson
WAPS Application Architect
mailto:craig.patterson@police.wa.gov.au
Regards,
Craig
Patterson
WAPS Application Architect
(08) 9212 5095
mailto:craig.patterson@police.wa.gov.au