Bugzilla – Bug 20877
Last modified: 2013-11-19 00:17:22 UTC
The contextItemDecl permits the context item type to be declared as any sequence type. To be consistent with XQuery, it should only permit item types.
Indeed, you are correct. I note that this is mostly harmless, because the semantics of XQueryX are defined as the semantics of the XQuery that results from applying the XQueryX stylesheet to an XQueryX document. If a sequence type that is not simply an item type were specified in the XQueryX document as the type of the context item, the resulting XQuery would be syntactically invalid, meaning that the XQueryX was invalid.
However, at the cost of several hours, I was able to modify the definition of contextItemDecl in the XQueryX schema and stylesheet to accommodate your suggestion.
I am marking this bug RESOLVED/FIXED. If you agree, please mark it CLOSED.
Thanks. I'm happy that this resolves the problem.
The author of the original bug report agrees that it has been resolved to his satisfaction. The fact that it was not marked CLOSED at the time was accidental, so I am marking it CLOSED now.