Subject: Re: [xsl] Selecting the first node set From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Mon, 14 Aug 2006 12:01:13 -0400 |
/Trade//Value - returns all 3 <Value> nodes /Trade//Value[1] - also returns all 3 <Value> nodes (why is that ?) /Trade//Value[2] - returns nothing (why is that ?)
A number of people have responded already, but from what I can tell, the two that have supplied suggested replacements haven't acknowledged that the <Value> elements are at different depths of the tree. I note that the third <Value> is at level 4 while the other two are at level 3.
So, I suggest that the following will get you the first <Value> in the document regardless of the depth of the element:
(//Value)[1]
Cheers, Wendell
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Selecting the first node , G. Ken Holman | Thread | RE: [xsl] Selecting the first node , Michael Kay |
[xsl] How do you remove namespace?, Arthur Maloney | Date | RE: [xsl] How do you remove namespa, Michael Kay |
Month |