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 - also returns all 3 <Value> nodes (why is that ?) /Trade//Value - 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: