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

https://www.w3.org/Bugs/Public/show_bug.cgi?id=28955

--- Comment #5 from Michael Kay <mike@saxonica.com> ---
There are two points here.

Firstly, xs:error() and fn:error() aren't any different from other type errors
and dynamic errors, except perhaps that they are deliberate rather than
accidental.

Secondly, errors occurring during the binding of a variable are within the
scope of a try/catch if and only if the variable declaration is within the
xsl:try. I think we make this clear, but if you think otherwise, I'm prepared
to try harder...

The XPath statement "A variable binding with a type declaration xs:error always
raises a type error." is perhaps unfortunate. It always raises a type error if
it is evaluated (or if the processor does static typing). I don't think it is
helpful to state that it is the variable reference that causes the error. Yes,
a common optimization is to evaluate variables lazily, and in this case the
evaluation of a variable reference will in some sense trigger the error, but if
the variable binding is outside the try/catch and the variable reference is
inside it, the try/catch will have no effect, for the simple reason that lazy
evaluation is only an optimization.

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

Received on Wednesday, 26 August 2015 21:49:53 UTC