Re: [xsl] question on EXSLT data partitioning

Subject: Re: [xsl] question on EXSLT data partitioning
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Wed, 20 Oct 2010 15:24:02 +0100
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

Current Thread