<?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>29225</bug_id>
          
          <creation_ts>2015-10-22 08:52:46 +0000</creation_ts>
          <short_desc>[XQ31] Pragma in no namespace</short_desc>
          <delta_ts>2015-11-10 17:31:16 +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.1</component>
          <version>Last Call drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</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="Michael Kay">mike</reporter>
          <assigned_to name="Jonathan Robie">jonathan.robie</assigned_to>
          <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>123839</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-10-22 08:52:46 +0000</bug_when>
    <thetext>(A) We allow the name of a pragma to be an EQName, and this introduces the possibility that it is a name in no namespace.

But the text goes on to assume that the name will always have a namespace: &quot;If the namespace URI of a pragma&apos;s expanded QName is not recognized...&quot;

I would suggest as the simplest fix, changing: 

&quot;If the namespace URI of a pragma&apos;s expanded QName is not recognized by the implementation as a pragma namespace...&quot;

to:

&quot;If the namespace URI of a pragma&apos;s expanded QName is not recognized by the implementation as a pragma namespace, or if the name is in no namespace, ...&quot;


(B) We say in a Note in 3.22:

&quot;Since there is no default namespace for pragmas, a pragma&apos;s EQName must provide a BracedURILiteral or a namespace prefix.&quot;

This invites the reader to look for a normative statement that there is no default namespace for pragmas, but there is no such statement. Furthermore, the common rule in situations where there is no default namespace is that the name is assumed to be in no namespace: so the &quot;since&quot; is a non-sequitur. The Note appears to define a &quot;must&quot; condition, with no associated error code, that is not stated normatively anywhere else. 

I would be inclined to resolve this by wrapping it into the proposal above for handling of no-namespace names. Replace the Note by a (non-note) paragraph:

&quot;If the EQName is an unprefixed NCName, it is interpreted as a name in no namespace (and the pragma is therefore ignored).&quot;

(C) If the expression between the curly braces after a pragma is absent, and the pragma is ignored, we say this is an error (XQST0079). Should we bring this into line with other (new) uses of &quot;{Expr?}&quot; so that it is instead interpreted as an empty sequence?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>124118</commentid>
    <comment_count>1</comment_count>
    <who name="Josh Spiegel">josh.spiegel</who>
    <bug_when>2015-11-06 15:47:10 +0000</bug_when>
    <thetext>The working group decided to accept suggestion (C) in comment 0:

  ACTION A-622-08: JR to change the words of the XQuery spec to
  implement item (C) of bug 29225 [XQ31] Pragma in no namespace.

As a result, the following tests should no longer expect XQST0079:

  K-ExtensionExpression-7
  extexpr-2
  XQST0079 (in CombinedErrorCodes.xml)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>124146</commentid>
    <comment_count>2</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2015-11-09 22:39:06 +0000</bug_when>
    <thetext>This change has been made in the internal drafts.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>