Re: What is the call-site of errors in sequences?

The error() calls happen outside the scope of either xsl:try, and they are not caught. Rule 1 bullet 3:

All dynamic errors occurring during the evaluation of the xsl:try <http://www.w3.org/XML/Group/qtspecs/specifications/xslt-30/html/Overview-diff.html#element-try> sequence constructor or select expression are caught (provided they match one of the xsl:catch <http://www.w3.org/XML/Group/qtspecs/specifications/xslt-30/html/Overview-diff.html#element-catch> elements).
[This] does not include errors that occur while evaluating references to variables whose declaration and initialization is outside the xsl:try <http://www.w3.org/XML/Group/qtspecs/specifications/xslt-30/html/Overview-diff.html#element-try>.
We've experimented with various ways of achieving this. At present we're forcing eager evaluation of local variables that are declared outside an xsl:try and referenced within it.

Michael Kay
Saxonica

Received on Thursday, 22 September 2016 13:44:44 UTC