Somehow, I understood that position() retrieves the position of the
context node relative to its siblings,
I'm not sure why, but this seems to be a common misunderstanding about
position(). position() has _no_ relationship to the position of a node
in a source document, it just relates to the position of a node in the
current node list (in xslt 1) or the current item in the current
sequence (in xslt2).
If you select a node with parent::* then it will have position()= 1
always as there is only one node in the node list and the selected node
is therefoe always the first in the list, even if it has 1001 earlier
siblings.
I'm not sure what number you want, probably
<xsl:number/> or count(preceding-sibling::*)+1
see also
http://www.dpawson.co.uk/xsl/sect2/N6099.html#d8191e311
David
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--