<?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>12056</bug_id>
          
          <creation_ts>2011-02-14 09:18:50 +0000</creation_ts>
          <short_desc>[XQuery] error for &quot;XML&quot; as PITarget</short_desc>
          <delta_ts>2011-02-16 02:49:03 +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 1.0</component>
          <version>2nd Edition Recommendation</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>INVALID</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="Michael Dyck">jmdyck</reporter>
          <assigned_to name="Jonathan Robie">jonathan.robie</assigned_to>
          <cc>liam</cc>
    
    <cc>mike</cc>
    
    <cc>zongaro</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>45463</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2011-02-14 09:18:50 +0000</bug_when>
    <thetext>3.7.2 Other Direct Constructors
&quot;The PITarget of a processing instruction may not consist of the characters &quot;XML&quot; in any combination of upper and lower case.&quot;

The spec should say what error to raise for violations of this requirement.

(This bug is similar to Bug 11609.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45469</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2011-02-14 10:56:10 +0000</bug_when>
    <thetext>It should also say &quot;must not&quot; rather than &quot;may not&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45488</commentid>
    <comment_count>2</comment_count>
    <who name="Liam R E Quin">liam</who>
    <bug_when>2011-02-14 18:14:22 +0000</bug_when>
    <thetext>There are other examples where the resulting document will not be well formed and it&apos;s not an error. I&apos;d rather that this was left as a SHOULD, possibly with a note about how &lt;?xml ...?&gt; will likely be interpreted as an XML declaration, and pointing to serialization options to control what goes there.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45556</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2011-02-15 06:27:20 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; It should also say &quot;must not&quot; rather than &quot;may not&quot;.

(Indeed: it&apos;s been changed to &quot;must not&quot; in 3.0.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45557</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2011-02-15 06:29:33 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; I&apos;d rather that this was left as a SHOULD,

You mean *changed to* a SHOULD? Or do you mean that the current wording is effectively a SHOULD?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45592</commentid>
    <comment_count>5</comment_count>
    <who name="Henry Zongaro">zongaro</who>
    <bug_when>2011-02-15 15:34:37 +0000</bug_when>
    <thetext>Section 3.7.3.5[1] makes it a dynamic error (err:XQDY0064) for the target of a computed processing instruction constructor &quot;if the NCName is equal to &quot;XML&quot; (in any combination of upper and lower case) [err:XQDY0064].&quot;

I submit that it was merely an oversight not to apply the same or a similar error for a direct processing instruction constructor.

[1] http://www.w3.org/TR/2010/REC-xquery-20101214/#id-computed-pis</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45596</commentid>
    <comment_count>6</comment_count>
    <who name="Henry Zongaro">zongaro</who>
    <bug_when>2011-02-15 16:05:28 +0000</bug_when>
    <thetext>Now that I think about it, I believe the error for the PITarget in 3.7.2 is XPST0003.  The definition of PITarget is, by reference to the appropriate version of XML,

PITarget	   ::=   	Name - ((&apos;X&apos; | &apos;x&apos;) (&apos;M&apos; | &apos;m&apos;) (&apos;L&apos; | &apos;l&apos;))

If the PITarget were XmL, say, that would not conform to the syntax of XQuery, so error XPST0003 results.  I believe the text in 3.7.2 is drawing attention to that restriction.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45643</commentid>
    <comment_count>7</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2011-02-16 02:48:39 +0000</bug_when>
    <thetext>(In reply to comment #6)
&gt; The definition of PITarget is, by reference to the appropriate
&gt; version of XML,
&gt; 
&gt; PITarget       ::=       Name - ((&apos;X&apos; | &apos;x&apos;) (&apos;M&apos; | &apos;m&apos;) (&apos;L&apos; | &apos;l&apos;))

Ah! I had been thinking PITarget was just NCName. XPST0003 it is then.

I&apos;ll mark this as resolved-invalid, then close it.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>