Project

Profile

Help

Bug #2179

closed

err: variables undeclared within an AVT

Added by Michael Kay about 10 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XQuery conformance
Sprint/Milestone:
Start date:
2014-10-13
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.6
Fix Committed on Branch:
9.6
Fixed in Maintenance Release:
Platforms:

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

Actions #1

Updated by Michael Kay about 10 years ago

  • 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.

Actions #2

Updated by O'Neil Delpratt about 10 years ago

Bug fix applied in the Saxon 9.5.1.8 maintenance release.

Saxon 9.6 release pending.

Actions #3

Updated by O'Neil Delpratt about 10 years ago

  • 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

Actions #4

Updated by O'Neil Delpratt almost 9 years ago

  • 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