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

RE: [xsl] error in xsl:key


Subject: RE: [xsl] error in xsl:key
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 19 Sep 2008 17:51:53 +0100

It's a dynamic error like any other, and all dynamic errors are fatal.

The system has a lot of discretion in exactly how evaluation proceeds. For
example, if evaluating a global variable throws an error, but you never use
the variable, then it's processor-dependent whether your stylesheet will
fail or not. The same is true to an extent here - except that key() really
can't return a result until the use expression has been evaluated for every
node that matches the xsl:key/@match pattern.

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

> -----Original Message-----
> From: Vladimir Nesterovsky [mailto:vladimir@xxxxxxxxxxxxxxxxxxxx] 
> Sent: 19 September 2008 17:32
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] error in xsl:key
> 
> Hello!
> 
> I have an xsl:key like this:
> 
> <xsl:key
>   name="t:type-name"
>   match="type"
>   use="t:get-type-name(.)"/
> 
> Please don't bother with what function's really doing, except 
> that for a certain circumstances it may issue an error.
> 
> My question is what this should result into, when error occurs?
> 
> E.g. in Saxon 9.1 this results in error when I try to access 
> a key() function, with valid $key-value.
> --
> Vladimir Nesterovsky
> http://www.nesterovsky-bros.com/ 


Current Thread