Re: [xsl] Position() of parent node

Subject: Re: [xsl] Position() of parent node
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 6 Feb 2001 18:56:25 GMT
> Can anyone provide me with the syntax for getting the position() value of
> the current nodes' parent node 

A node does not, of itself, have a position() it only has a position in
a given node list (and the same node may be in many node lists).

so for example if you go
<xsl:apply-templates select="parent::xxx"/>

then the position() of the node will be 1.

Probably what you want is the sibling number of the parent node, which
<xsl:value-of select="count(1parent::*/preceding-sibling::*)"/>


 XSL-List info and archive:

Current Thread