<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>15687</bug_id>
          
          <creation_ts>2012-01-24 10:19:13 +0000</creation_ts>
          <short_desc>[XQ30] Annotations and XQST0045</short_desc>
          <delta_ts>2012-09-27 08:40:55 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>XQuery 3.0</component>
          <version>Member-only Editors Drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tim Mills">tim</reporter>
          <assigned_to name="Jonathan Robie">jonathan.robie</assigned_to>
          
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>63044</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2012-01-24 10:19:13 +0000</bug_when>
    <thetext>XQuery 3.0 states in 4.15 Annotations:

&quot;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&quot;

This isn&apos;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 &quot;creating an annotation&quot; 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&apos;m not clear whether the following (from QT3 test annotation-2) should expect XQST0045 (since it uses, but doesn&apos;t define an annotation is a reserved namespace).

 declare %fn:x function local:foo() {
            &quot;bar&quot;
         };

Similarly, I&apos;m not clear whether the following (from QT£ test annotation-assertion-16) should expect XQST0045.

  () instance of %fn:x function(*)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64086</commentid>
    <comment_count>1</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2012-02-14 14:37:12 +0000</bug_when>
    <thetext>(In reply to comment #0)
&gt; XQuery 3.0 states in 4.15 Annotations:
&gt; 
&gt; !!! SNIP !!! it is an error for users to create annotations in the
&gt; following reserved namespaces [err:XQST0045]:

We will change this to:

&quot;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.&quot;

&gt;  declare %fn:x function local:foo() {
&gt;             &quot;bar&quot;
&gt;          };

This is an error.

&gt; Similarly, I&apos;m not clear whether the following (from QT£ test
&gt; annotation-assertion-16) should expect XQST0045.
&gt; 
&gt;   () instance of %fn:x function(*)

We will say:


&quot;it is an error to use an annotation in the following reserved namespaces, except for annotations defined in the XQuery family of specifications.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64087</commentid>
    <comment_count>2</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2012-02-14 14:42:49 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; (In reply to comment #0)
&gt; &gt; XQuery 3.0 states in 4.15 Annotations:
&gt; &gt; 
&gt; &gt; !!! SNIP !!! it is an error for users to create annotations in the
&gt; &gt; following reserved namespaces [err:XQST0045]:
&gt; 
&gt; We will change this to:
&gt; 
&gt; &quot;it is an error for a user to declare a function or a variable with an
&gt; annotation in the following reserved namespaces, except for annotations defined
&gt; in the XQuery family of specifications.&quot;
 
Ooops - that&apos;s oddly worded. 

&quot;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.

&gt; &gt; Similarly, I&apos;m not clear whether the following (from QT£ test
&gt; &gt; annotation-assertion-16) should expect XQST0045.
&gt; &gt; 
&gt; &gt;   () instance of %fn:x function(*)
&gt; 
&gt; We will say:
&gt; 
&gt; &quot;it is an error to use an annotation in the following reserved namespaces,
&gt; except for annotations defined in the XQuery family of specifications.&quot;

Make that:

&quot;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.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64088</commentid>
    <comment_count>3</comment_count>
    <who name="Adam Retter">adam</who>
    <bug_when>2012-02-14 14:51:48 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74631</commentid>
    <comment_count>4</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2012-09-27 08:40:55 +0000</bug_when>
    <thetext>*** Bug 19089 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>