Bug #2179
closed
err: variables undeclared within an AVT
Category:
XQuery conformance
Fix Committed on Branch:
9.6
Fixed in Maintenance Release:
Description
From Gunther Rademacher on saxon-help list:
This XQuery
try {parse-xml("")} catch * {}
is rejected with a message of
XPST0008: Variable $err:code has not been declared
The following however works as expected:
try {parse-xml("")} catch * {{$err:code}
}
Tested on Saxon-HE 9.6.0.1, but also occurs with Saxon-EE 9.5.
Best regards,
Gunther
- Subject changed from err: prefix undeclared within an AVT to err: variables undeclared within an AVT
- Status changed from New to Resolved
Added test case try-catch-err-code-variable-13 to QT3 test suite.
The problem is that a new parser is instantiated to process expressions within "AVT"s (necessary because they can contain forwards references to namespace prefixes declared in later attributes), and the new parser doesn't know that it's processing something within a catch clause and that variables like $err:code are therefore in scope.
Patch produced and tested on the 9.7 branch, and retrofitted to 9.6 and 9.5.
Bug fix applied in the Saxon 9.5.1.8 maintenance release.
Saxon 9.6 release pending.
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in version set to 9.6.0.2
Bug fix applied to the maintenance release Saxon 9.6.0.2
- Sprint/Milestone set to 9.6.0.2
- Applies to branch 9.6 added
- Fix Committed on Branch 9.6 added
- Fixed in Maintenance Release 9.6.0.2 added
Please register to edit this issue
Also available in: Atom
PDF