<?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>16104</bug_id>
          
          <creation_ts>2012-02-24 10:52:07 +0000</creation_ts>
          <short_desc>[XQ30] Distinct annotation names; and error XQST0116</short_desc>
          <delta_ts>2013-06-19 09:15:18 +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>Last Call drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Kay">mike</reporter>
          <assigned_to name="Jonathan Robie">jonathan.robie</assigned_to>
          <cc>jim.melton</cc>
    
    <cc>john.snelson</cc>
    
    <cc>josh.spiegel</cc>
          
          <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>64530</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2012-02-24 10:52:07 +0000</bug_when>
    <thetext>(1) I think there should be a rule that the annotations on a variable or function should have distinct names. Without such a rule, annotion assertions don&apos;t seem to make much sense. We don&apos;t seem to have such a rule at the moment.

(2) Quote:

 It is a static error [err:XQST0116] if a variable declaration&apos;s&apos;s annotations contain more than one annotation named %private or %public.

Three problems here.

(a) the doubled &quot;&apos;s&quot;

(b) the sentence is ambiguous, it doesn&apos;t really state clearly that you can&apos;t have one annotation named %private and another named %public. 

(c) there is no corresponding error for function annotations.

If we fix (1) above then we can write this as

It is a static error [err:XQST0116] if the set of annotations on a function declaration or variable declaration inlcudes both a %public and a %private annotation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65831</commentid>
    <comment_count>1</comment_count>
    <who name="Josh Spiegel">josh.spiegel</who>
    <bug_when>2012-03-20 14:41:21 +0000</bug_when>
    <thetext>With respect to (c), I think there is a corresponding error in section 4.18:

&quot;It is a static error [err:XQST0106] if a function&apos;s annotations contain more than one annotation named &quot;&quot;http://www.w3.org/2005/xpath-functions&quot;&quot;:private or &quot;&quot;http://www.w3.org/2005/xpath-functions&quot;&quot;:public.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66280</commentid>
    <comment_count>2</comment_count>
    <who name="John Snelson">john.snelson</who>
    <bug_when>2012-03-30 08:59:42 +0000</bug_when>
    <thetext>With respect to (1), I disagree. It&apos;s perfectly acceptable to have more than one annotation with the same name - what that means is defined by the implementation that understands the annotation. For instance, it seems perfectly reasonable for a given function to be made available at two different URLs using the (hypothetical) %rest:url annotation.

With respect to (2c), there is no annotation assertion error because %public and %private are not valid as a annotation assertions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68998</commentid>
    <comment_count>3</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2012-06-12 16:23:48 +0000</bug_when>
    <thetext>As Mary pointed out today, it may make sense to have two annotations with the same name and different parameters.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68999</commentid>
    <comment_count>4</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2012-06-12 16:27:32 +0000</bug_when>
    <thetext>(In reply to comment #0)
&gt; (1) I think there should be a rule that the annotations on a variable or
&gt; function should have distinct names. Without such a rule, annotion assertions
&gt; don&apos;t seem to make much sense. We don&apos;t seem to have such a rule at the moment.

The WG disagrees - it makes sense to allow multiple annotation assertions with the same name and different parameters.

&gt; (c) there is no corresponding error for function annotations.
&gt; 
&gt; If we fix (1) above then we can write this as
&gt; 
&gt; It is a static error [err:XQST0116] if the set of annotations on a function
&gt; declaration or variable declaration inlcudes both a %public and a %private
&gt; annotation.

The WG disagrees. There are no annotation assertions for %public and %private.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69000</commentid>
    <comment_count>5</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2012-06-12 16:28:15 +0000</bug_when>
    <thetext>I agree with this - it&apos;s editorial:

&gt; Three problems here.
&gt; 
&gt; (a) the doubled &quot;&apos;s&quot;
&gt; 
&gt; (b) the sentence is ambiguous, it doesn&apos;t really state clearly that you can&apos;t
&gt; have one annotation named %private and another named %public.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>