This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Position of a Child
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] Position of a Child
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Fri, 21 Sep 2001 08:14:00 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
> I reference the child by its name (stored in a variable), like this:
>
> <xsl:value-of select="*[name()=$NodeName]"/>
>
> What I would like to get is the position of that child inside
> the context
> node.
> I don't seem to find the correct syntax for this.
>
count(preceding-sibling::*)+1
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list