Connecting Tech Pros Worldwide Help | Site Map

sibling navigation

Newbie
 
Join Date: Nov 2008
Posts: 1
#1: Nov 21 '08
hello,

i have an xml doc that looks like

<invoice>
<invoice_line>
<invoice_project_details></invoice_project_details>
<line_notes> </line_notes>
</invoice_line>
</invoice>

in my code, the current node is "invoice_project_details". how do i get to line_notes with xpath?

I've tried using "following-sibling::line_notes" with no success. i've reached the point of frustration where i need to post on a board. please help.


thank you.
Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,642
#2: Nov 23 '08

re: sibling navigation


do you have any namespaces in your xml?
if
Quote:
parent::*/line_notes
doesn't work too, I definitely suspect some forgotten namespace.

regards
Moderator
 
Join Date: Mar 2006
Posts: 1,103
#3: Nov 26 '08

re: sibling navigation


I suggest using debugging statements like:
Current name of node = <xsl:value-of select="name()"/>

Which should give you both the namespace and local-name of the current node.
Reply