So if I had done the semantically equivalent
<xsl:template match="*[key('maindoc','Sal',$doc2)]"
it would have been ok.
I would opine that the distinction warrants considering a clearer error message.
On Wed, Apr 25, 2012 at 9:22 AM, Michael Kay <mike(_at_)saxonica(_dot_)com>
wrote:
In this example your call to key() is in a predicate. In a predicate you can
use any XPath expression, with very few exceptions (for example, you can't
call current-group()).
In your previous example, the one that failed, the call to key() was outside
a predicate. That's subject to the restrictions applicable to XSLT patterns,
one of which is that the call must only have two arguments. (Another is that
the key name must be a literal.)
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>
--~--