RE: [xsl] Re: Re: error in xsl:key

Subject: RE: [xsl] Re: Re: error in xsl:key
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 19 Sep 2008 20:36:26 +0100
> According to your description "it doesn't define which order 
> the conditions are applied in" the preceding stylesheet may 
> rightfully fail. However, in the more extreme case, when $doc 
> does not contain element b, but some other document available 
> (or will be available) do contains element b, egnine is 
> allowed to fail also.
> 
> This looks bizarre.

Yes. Unfortunately the error behaviour of XSLT and XPath have not really
been formalized in such a way as to guarantee interoperability. The same
applies to limits: there's nothing in the spec to stop an implementation
failing if a string is longer than 16 characters. In both cases, the spec
essentially leaves it to implementors and users to come to a consensus about
what behaviour is reasonable and what isn't.

In the case of xsl:key, I think it would be wise to make the use expression
error-free.

Michael Kay
http://www.saxonica.com/

Current Thread