<?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>29724</bug_id>
          
          <creation_ts>2016-07-07 15:44:34 +0000</creation_ts>
          <short_desc>[QT3TS] eqname-909</short_desc>
          <delta_ts>2016-08-10 15:20:01 +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 &amp; XPath 3 Test Suite</component>
          <version>Candidate Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Mac System 7.5</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>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tim Mills">tim</reporter>
          <assigned_to name="O&apos;Neil Delpratt">oneil</assigned_to>
          <cc>abel.braaksma</cc>
    
    <cc>mike</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>126912</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2016-07-07 15:44:34 +0000</bug_when>
    <thetext>This test needs to be split in two, for XP and XQ.

In XP31 we have the grammar

[118]   	BracedURILiteral	   ::=   	&quot;Q&quot; &quot;{&quot; [^{}]* &quot;}&quot;	/* ws: explicit */

while in XQ31 we have

[224]   	BracedURILiteral	   ::=   	&quot;Q&quot; &quot;{&quot; (PredefinedEntityRef | CharRef | [^&amp;{}])* &quot;}&quot;


   &lt;test-case name=&quot;eqname-909&quot;&gt;
      &lt;description&gt; EQName - braces cannot be escaped by using entity references&lt;/description&gt;
      &lt;created by=&quot;Abel Braaksma&quot; on=&quot;2016-06-27&quot;/&gt;
      &lt;dependency type=&quot;spec&quot; value=&quot;XP30+ XQ30+&quot;/&gt;
      &lt;test&gt;&lt;![CDATA[Q{&amp;#x7D;http://www.w3.org/2005/xpath-functions/math}pi()]]&gt;&lt;/test&gt;
      &lt;result&gt;
         &lt;error code=&quot;XPST0003&quot;/&gt;
      &lt;/result&gt;
   &lt;/test-case&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127077</commentid>
    <comment_count>1</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2016-07-29 10:01:26 +0000</bug_when>
    <thetext>Test eqname-029 is similarly affected.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127081</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-07-29 10:24:52 +0000</bug_when>
    <thetext>I agree.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127084</commentid>
    <comment_count>3</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2016-07-29 12:56:13 +0000</bug_when>
    <thetext>I&apos;m not convinced that eqname-909 is at all correct.

It says &quot;braces cannot be escaped by using entity references&quot;.

Why not?  It appears to be valid according to the XQuery grammar.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127093</commentid>
    <comment_count>4</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2016-07-31 14:19:34 +0000</bug_when>
    <thetext>(In reply to Tim Mills from comment #3)
&gt; It says &quot;braces cannot be escaped by using entity references&quot;.
I honestly wouldn&apos;t know. The entity reference is in XML (the source of the test), gets parsed into &quot;}&quot;, and then doesn&apos;t fit the production &quot;Q&quot; &quot;{&quot; [^{}]* &quot;}&quot;.

But I see it is written in a CDATA section. Which counters my suggestion above. It will result in a literal &quot;&amp;#x7D;&quot;, which is indeed *not* illegal, but that may not have been the intent of the test when I wrote it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127095</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-07-31 21:29:33 +0000</bug_when>
    <thetext>Because it&apos;s in a CDATA section, the characters &amp; # x 7 D ; appear literally as part of the XPath/XQuery. 

The XQUery spec isn&apos;t 100% explicit about what a CharRef within a BracedURILiteral means, but it&apos;s hard to avoid the interpretation that &amp;#x7D; represents a brace within the namespace URI.

Equally, the XPath spec is pretty clear that &amp;#x7D; within a BracedURILiteral represents the sequence of characters &amp; # x 7 D ; within the namespace URI.

The meaning in XPath and XQuery is different, but in both cases it seems to be legal.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127112</commentid>
    <comment_count>6</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2016-08-10 15:19:50 +0000</bug_when>
    <thetext>I&apos;ve split eqname-909 into two and corrected each.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>