Re: [xsl] current() within a key element's @use

Subject: Re: [xsl] current() within a key element's @use
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Fri, 28 Dec 2012 19:06:15 +0100
Chris Maloney wrote:
As for a work-around, the following works with xsltproc, but
interestingly, not with Saxon.  Saxon complains "key() function cannot
be used here".  (This is a variant of the XSLT that Dimitre posted on
SO):

       <xsl:key name='kTagUsage' match='tagUsage' use='@render'/>
       <xsl:key name="kRendByUsageGi" match="rendition"
         use="key('kTagUsage', @xml:id)/@gi"/>

Saxon (6.5?) is right to complain as the errata E13 (http://www.w3.org/1999/11/REC-xslt-19991116-errata/) to the XSLT 1.0 spec says "It is an error for the value of either the use attribute or the match attribute to contain a VariableReference, or a call to the key function.".



--


	Martin Honnen --- MVP Data Platform Development
	http://msmvps.com/blogs/martin_honnen/

Current Thread