RE: [xsl] position within same nodes

Subject: RE: [xsl] position within same nodes
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Fri, 20 Jul 2001 07:09:03 +0100
> 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


Current Thread