[Bug 28955] [XSLT30] xsl:try should probably include xs:error in its enumeration


--- Comment #3 from Abel Braaksma <abel.braaksma@xs4all.nl> ---
Ok, I thought the bullets were trying to enumerate all situations that could
throw an error, but if that is just a list of examples to the text before it,
there's nothing that needs to be done.

But it still raises questions:

In XP31 we say:
> A variable binding with a type declaration xs:error always raises a type error.

But this is confusing. I think from an XSLT point of view, it is not the
binding that will raise an error. Instead, it is the reference.

This sentence suggests that the following always throws, but I think that is

<xsl:sequence select="
   let $t := xs:error()  (: variable binding, but should not raise, right? :)
   return if(foo eq '')  (: safe still :)
   then $t               (: raises error "if and only if" :)
   else foo              (: safe, no error :) " />

Also, perhaps we should even be less strict about the leniency with global
variables. We say that if a variable contains a type error, it *may* be raised
pro-actively, but may also be raised upon usage. Considering the current text,
if anybody has the following, it *may* always raise an error and prevent the
stylesheet from being processed in the first place:

<!-- global -->
   select="xs:error('err:ERR001', 'Handy placeholder for throwing errors')" 
   as="xs:error" />

But then again, making one exception on a type xs:error to prohibit early
evaluation does not sound like the best idea either. But what would a user

You are receiving this mail because:
You are the QA Contact for the bug.

Received on Friday, 21 August 2015 09:38:25 UTC