<?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>29700</bug_id>
          
          <creation_ts>2016-06-21 11:33:09 +0000</creation_ts>
          <short_desc>[XP31] ws:explicit wording on comments is a tad unfortunate</short_desc>
          <delta_ts>2016-07-20 14:02:46 +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>XPath 3.1</component>
          <version>Candidate Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</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="Abel Braaksma">abel.braaksma</reporter>
          <assigned_to name="Jonathan Robie">jonathan.robie</assigned_to>
          <cc>andrew_coleman</cc>
    
    <cc>jmdyck</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>126804</commentid>
    <comment_count>0</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2016-06-21 11:33:09 +0000</bug_when>
    <thetext>The current test on ws:explicit in production rules states:

&lt;quote&gt;

ws: explicit

   /* ws: explicit */ means that the EBNF notation explicitly notates, with S 
   or otherwise, where whitespace characters are allowed. In productions with the
   /* ws: explicit */ annotation, A.2.4.1 Default Whitespace Handling does not 
   apply. Comments are also not allowed in these productions.
&lt;/quote&gt;

The word &quot;Comments&quot; is underlined and points to the production rule for comments. This suggests that for instance the following is disallowed:

Q{http://(:comment:)/test}

But I think that&apos;s not true, in fact, I think the above EQName is valid and the whole string including the comment is part of it. That is, the URI is equal to &quot;http://(:comment:)/test&quot;, not &quot;http:///test&quot;, and it should not throw a syntax error. 

Essentially, such comment is not a comment. Perhaps a better wording would be to say:

&lt;proposal&gt;
   Comments are not recognized as comments in these productions and the
   characters &quot;(&quot;, &quot;:&quot; and &quot;)&quot; may or may not be allowed by the production rule.
&lt;/proposal&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126805</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2016-06-21 14:19:16 +0000</bug_when>
    <thetext>(In reply to Abel Braaksma from comment #0)
&gt; 
&gt; Essentially, such comment is not a comment.

Right. More precisely, that sequence of characters is not a Comment. So it is unaffected by rules about Comments. 

&gt; Perhaps a better wording would be to say:
&gt; 
&gt; &lt;proposal&gt;
&gt;    Comments are not recognized as comments in these productions

I don&apos;t think that&apos;s an improvement, as it implies that something can be a comment and yet not be &apos;recognized as&apos; a comment.

I agree that the &apos;ws: explicit&apos; blurb could probably be improved, but I don&apos;t think that&apos;s how to do it.

(Personally, I&apos;d be okay with removing the sentence &quot;Comments are also not allowed in these productions&quot;, since I believe that&apos;s covered by &quot;A.2.4.1 does not apply&quot;, but we probably added it for a reason. I&apos;ll look into that.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126807</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2016-06-21 14:58:24 +0000</bug_when>
    <thetext>(In reply to Michael Dyck from comment #1)
&gt;
&gt; (Personally, I&apos;d be okay with removing the sentence &quot;Comments are also not
&gt; allowed in these productions&quot;, since I believe that&apos;s covered by &quot;A.2.4.1
&gt; does not apply&quot;, but we probably added it for a reason. I&apos;ll look into that.)

The sentence was added to the XQuery 1.0 source on 2004-06-07, but the commit log doesn&apos;t say why (or give a reference to a decision or discussion). So far, I haven&apos;t been able to find any discussion in the archives.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126808</commentid>
    <comment_count>3</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2016-06-21 15:05:32 +0000</bug_when>
    <thetext>&gt;  but we probably added it for a reason. I&apos;ll look into that.
You may have to dig deep, the sentence was there when this section was first added in 2004, this is the first time I encountered it: https://www.w3.org/TR/2004/WD-xpath20-20040723/#ExplicitWhitespaceHandling

I&apos;d have to guess, but since comments are typically allowed where ignorable whitespace is allowed, this sentence may have been added with an intended meaning such as:

&quot;Comments are allowed between terminals, but not between terminals or anywhere within productions marked ws:explicit. Typically, comments are allowed where whitespace is allowed, but not were we use the explicit production S.&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126809</commentid>
    <comment_count>4</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2016-06-21 15:08:44 +0000</bug_when>
    <thetext>(apologies, cross-posted)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126932</commentid>
    <comment_count>5</comment_count>
    <who name="Andrew Coleman">andrew_coleman</who>
    <bug_when>2016-07-08 13:02:32 +0000</bug_when>
    <thetext>At the meeting on 2016-07-05, the WG agreed to resolve this as follows:

Decided: Adopt this text as the resolution of Bug 29700:
Comments are also not allowed in these productions except where the Comment non-terminal appears.

Action 649-02: Jonathan to add the text &quot;Comments are also not allowed in these productions except where the Comment non-terminal appears.&quot;
as the resolution of Bug 29700.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127007</commentid>
    <comment_count>6</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2016-07-20 14:02:46 +0000</bug_when>
    <thetext>This was resolved as per confirmation here: https://lists.w3.org/Archives/Public/public-xsl-query/2016Jul/0018.html.

Checked, looks good, thanks.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>