[thelist] XPath Parent Position

Drew Shiel ashiel at sportsinteraction.com
Fri Nov 7 08:30:18 CST 2003


Hi;

This is more a question for the sake of curiousity than anything I need 
Right Now. I'm trying to determine (and output), while working in a given 
node, the position of the parent node. What seems to be working is:

<xsl:value-of select="count(../preceding-sibling::*) + 1"/>

I'm sure there must be a more elegant way to do this with position(), but I 
can't seem to get a grip on it. Anyone able to show me how else this could 
work?

Drew.




More information about the thelist mailing list