This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Result Tree Fragment Problem
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] Result Tree Fragment Problem
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Mon, 2 Jul 2001 23:39:34 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
> 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