Bug #2993
closed![Author: Michael Kay](https://www.gravatar.com/avatar/db6526d63053f09b62e52c2da8b2230a?rating=PG&size=50&default=https%3A%2F%2Fassets.plan.io%2Fimages%2Fdefault_avatar.png)
![Assignee: Michael Kay](https://www.gravatar.com/avatar/db6526d63053f09b62e52c2da8b2230a?rating=PG&size=22&default=https%3A%2F%2Fassets.plan.io%2Fimages%2Fdefault_avatar.png)
Saxon does not allow multiple annotations (on an XQuery function/variable) that have the same name.
100%
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.
Updated by Michael Kay almost 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.
Updated by O'Neil Delpratt almost 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
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