xsl-list
[Top] [All Lists]

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

2012-12-28 13:57:49
Dimitre wrote:

There is a "slight" difference: I didn't use key() inside the
expression in the "use"  attribute ....

That's why I used the word "variant".  I referred to your answer on SO
to provide context for the code snippet.

Martin Honnen <Martin(_dot_)Honnen(_at_)gmx(_dot_)de> wrote:

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.".


Nevertheless, this might be a useful work-around.  It was established
that xsltproc has a bug, and so the fact that xsltproc doesn't choke
on this non-standards-conforming expression doesn't really matter.
The original poster asked, "If this is a bug, is there a workaround?",
and I was trying to answer that question.

It seems odd to me that key-within-a-key isn't allowed.  If it's just
to prevent infinite recursion, as Dimitre suggested, then that seems a
little paternalistic:  other languages have no problem allowing coders
to shoot themselves in the foot that way.

Cheers!
Chris

--~------------------------------------------------------------------
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>
--~--

<Prev in Thread] Current Thread [Next in Thread>