XQuery 3.1 err:additional not bound
For XQuery 3.1 try/catch, in comparison to XSLT 3.0 try/catch, there is an extra variable implicitly declared in the scope of the catch clause, namely err:additional.
https://www.w3.org/TR/xquery-31/#id-try-catch says that the value of err:additional is "Implementation-defined. This variable must be bound so that a query can reference it without raising an error. The purpose of this variable is to allow implementations to provide any additional information that might be useful."
But the variable is not bound in Saxon, and so references do raise an error.
There are tests that the other variables (err:line-number, etc.) are defined in QT3 prod/TryCatchExpr, but no tests for err:additional.
#1 Updated by Michael Kay over 2 years ago
- Category set to XQuery conformance
- Status changed from New to Resolved
- Assignee set to Michael Kay
- Applies to branch trunk added
- Fix Committed on Branch 9.9, trunk added
Added a test case try-021 to QT3 test suite.
Added the name to StandardNames.errorVariables; this turns out to be enough to ensure that a reference to the variable now succeeds, returning an empty sequence. (It also succeeds in XSLT; there's nothing in the XSLT spec to disallow this.)
Please register to edit this issue