This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Result Tree Fragment Problem


> Now the problem is How do I get the second "Product" node in 
> the nodeset?
> I tried something like this
> $mynodeset/child::*[local-name()='Product']/self::node()[position()=2]
> where $mynodeset references the nodeset.
> But it does not return anything.
> 
> Am I doing something wrong?
> 
self::node() always returns one node, so [position()=2] will never be true.

You want:

 $mynodeset/Product[2]

Sometimes things are easier than they seem.

Mike Kay
Software AG

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]