Subject: RE: Enumerating elements using a relative path
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Tue, 21 Nov 2006 20:35:05 -0000
|
The code you've shown us looks fine. This usually means that the error is in
the code you haven't shown us.
Michael Kay
http://www.saxonica.com/
> -----Original Message-----
> From: David Nesbitt [mailto:dnesbitt@xxxxxxxxxxxxxxxxx]
> Sent: 21 November 2006 20:09
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Enumerating elements using a relative path
>
> I am confused about how elements get accessed using a
> relative path from the context node.
>
> Suppose the following XML:
>
> <a>
> <b>
> <d>1</d>
> <d>2</d>
> <d>3</d>
> </b>
> <c/>
> </a>
>
> If element "c" is my context node, I try to do the following:
>
> <xsl:for-each select"../b/d">
>
> I see to get 1, 2, and then 1 again, instead of 1, 2, 3. Am
> I missing something with how to enumerate these "d" elements
> using a relative path?
>
> Regards,
> Dave
|