For me it's logical
When you use global variable, current node is root, so with the key ,it's the
same thing and position is calculated with the root as initial context
Whether it's logical or not, the specification is quite clear. In XSLT 1.0:
the expression specified in the use attribute of the xsl:key element is
evaluated with x as the current node and with a node list containing
just x as the current node list
So position() in the use expression returns 1.
Michael Kay
Saxonica
--~------------------------------------------------------------------
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>
--~--