[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] current() in xsl:key


Subject: Re: [xsl] current() in xsl:key
From: "Michael Kay mike@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 29 Oct 2015 21:31:45 -0000

No, I donbt think thatbs right. XSLT 1.0 allows the use of current()
within any XPath expression, and says that it returns the same value as the
context item for the outermost containing expression. So itbs perfectly OK
to use it within xsl:key/@use.

The main change between 1.0 and 2.0 was that 1.0 banned the use of current()
in a pattern, whereas XSLT 2.0 allows it, and defines it to return the node
being matched against the pattern. This affects the match attribute of
xsl:key, but not the use attribute.

Michael Kay
Saxonica


> On 29 Oct 2015, at 20:12, Ihe Onwuka ihe.onwuka@xxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> Would I be right in concluding that XSLT 1.0 restricts the availability of
current() to where apply-templates or for-each have been invoked, which would
mean it can't be invoked in the use attribute of xsl:key.
>
> Would it further be accurate to say this restriction is lifted in XSLT 2.0.
>
> ihe
>
>
>
>
>
>
> XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
> EasyUnsubscribe <-list/293509> (by email <>)


Current Thread
Keywords