Project

Profile

Help

Bug #2993

closed

Saxon does not allow multiple annotations (on an XQuery function/variable) that have the same name.

Added by Michael Kay about 8 years ago. Updated over 7 years ago.

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

100%

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

Description

There appears to be nothing in the XQuery spec that disallows multiple annotations with the same name. But Saxon rejects it with XPST0003.

If we do allow multiple annotations with the same name, it complicates any API we might provide to access this information. Currently there is no support for annotations in the data model, so it's hard to work out what was intended.

I have created QT3 test cases annotation-37, annotation-38, and annotation-assertion-19 to test this situation.

Actions #1

Updated by Michael Kay about 8 years ago

  • Status changed from New to Resolved
  • Applies to branch 9.7, 9.8 added
  • Fix Committed on Branch 9.7, 9.8 added

I have changed the parser to allow multiple annotations with the same name (while continuing to implement the special rules for private/public/updating/simple).

The XQueryFunction and UserFunction objects now have a public method getAnnotations() which returns a list of Annotation objects.

For 9.8 I have gone considerably further - for example a saxon:function-annotations() extension is now available. See the change log for details.

Actions #2

Updated by O'Neil Delpratt about 8 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in Maintenance Release 9.7.0.10 added

Bug fix applied in the Saxon 9.7.0.10 maintenance release

Actions #3

Updated by O'Neil Delpratt over 7 years ago

  • Applies to branch deleted (9.8)
  • Fix Committed on Branch trunk added
  • Fix Committed on Branch deleted (9.8)

Please register to edit this issue

Also available in: Atom PDF