This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: position within same nodes
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] position within same nodes
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Fri, 20 Jul 2001 07:09:03 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
> What is the XPath to get the position of a given node relative to its
> siblings of the same name? Eg,
>
> <blah>
> <argh/>
> <meep/>
> <meep/>
> <stuff/>
> <meep/>
> </blah>
>
count(preceding-sibling::*[name()=name(current())]) + 1
Mike Kay
Software AG
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list