This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
XQuery 3.0 states in 4.15 Annotations: "Implementations MAY define further annotations, whose behaviour is implementation-defined. For instance, if the eg prefix is bound to a namespace associated with a particular implementation, it could define an annotation like eg:sequential. Implementations MUST NOT define annotations in the following reserved namespaces; it is an error for users to create annotations in the following reserved namespaces [err:XQST0045]: http://www.w3.org/XML/1998/namespace http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2005/xpath-functions http://www.w3.org/2005/xpath-functions/math http://www.w3.org/2011/xquery-options" This isn't entirely the same as the later appendix definition of the error code, which seems to be at odds with the definition of %fn:private or %fn:public which are in http://www.w3.org/2005/xpath-functions. err:XQST0045 It is a static error if the name of an annotation or the function name in a function declaration is in one of the following namespaces: http://www.w3.org/XML/1998/namespace, http://www.w3.org/2001/XMLSchema, http://www.w3.org/2001/XMLSchema-instance, http://www.w3.org/2005/xpath-functions, http://www.w3.org/2005/xpath-functions/math, http://www.w3.org/2011/xquery-options. Whether these two agree hinges on whether "creating an annotation" is the same as using an annotation. The definition is also ambiguous: does it mean the name of an annotation in a function declaratio or the function name in a function declaratio or the name of an annotation in a function declaratio or function test or the function name in a function declaratio ? So I'm not clear whether the following (from QT3 test annotation-2) should expect XQST0045 (since it uses, but doesn't define an annotation is a reserved namespace). declare %fn:x function local:foo() { "bar" }; Similarly, I'm not clear whether the following (from QT£ test annotation-assertion-16) should expect XQST0045. () instance of %fn:x function(*)
(In reply to comment #0) > XQuery 3.0 states in 4.15 Annotations: > > !!! SNIP !!! it is an error for users to create annotations in the > following reserved namespaces [err:XQST0045]: We will change this to: "it is an error for a user to declare a function or a variable with an annotation in the following reserved namespaces, except for annotations defined in the XQuery family of specifications." > declare %fn:x function local:foo() { > "bar" > }; This is an error. > Similarly, I'm not clear whether the following (from QT£ test > annotation-assertion-16) should expect XQST0045. > > () instance of %fn:x function(*) We will say: "it is an error to use an annotation in the following reserved namespaces, except for annotations defined in the XQuery family of specifications."
(In reply to comment #1) > (In reply to comment #0) > > XQuery 3.0 states in 4.15 Annotations: > > > > !!! SNIP !!! it is an error for users to create annotations in the > > following reserved namespaces [err:XQST0045]: > > We will change this to: > > "it is an error for a user to declare a function or a variable with an > annotation in the following reserved namespaces, except for annotations defined > in the XQuery family of specifications." Ooops - that's oddly worded. "if a user declares a function or a variable with an annotation in the following reserved namespaces, the annotation must be defined in the XQuery family of specifications [err:TBD]. For instance, a function may be declared %fn:private, but not %fn:carrot. > > Similarly, I'm not clear whether the following (from QT£ test > > annotation-assertion-16) should expect XQST0045. > > > > () instance of %fn:x function(*) > > We will say: > > "it is an error to use an annotation in the following reserved namespaces, > except for annotations defined in the XQuery family of specifications." Make that: "it is an error to use an annotation assertion in the following reserved namespaces, except for annotation assertions defined in the XQuery family of specifications."
We should consider separate error codes for annotations on functions in the fn reserved namespace vs. the annotation assertions of annotations in the fn reserved namespace.
*** Bug 19089 has been marked as a duplicate of this bug. ***