W3C home > Mailing lists > Public > public-qt-comments@w3.org > August 2015

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

From: <bugzilla@jessica.w3.org>
Date: Wed, 26 Aug 2015 21:49:51 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-28955-523-wQdAq4b3pU@http.www.w3.org/Bugs/Public/>
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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:55 UTC