<?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>1271</bug_id>
          
          <creation_ts>2005-04-26 13:20:04 +0000</creation_ts>
          <short_desc>[F&amp;O] What if $paramQName has colon, but $paramURI is empty?</short_desc>
          <delta_ts>2005-04-27 21:35:57 +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>Functions and Operators 1.0</component>
          <version>Last Call drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.w3.org/TR/xpath-functions/#func-QName</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="Jonathan Robie">jonathan.robie</reporter>
          <assigned_to name="Ashok Malhotra">ashok.malhotra</assigned_to>
          
          
          <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>3617</commentid>
    <comment_count>0</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2005-04-26 13:20:04 +0000</bug_when>
    <thetext>What should an implementation do if $paramQName has colon, but $paramURI is
empty? The spec does not say.

I think we should raise an error in this case. The part of the name before the
colon can&apos;t be a prefix, since we have no namespace URI to interpret it with.
The local name needs to conform to
http://www.w3.org/TR/REC-xml-names/#NT-NCName, so the local name doesn&apos;t contain
the colon either. So there&apos;s no useful way to interpret a name with a colon
unless there is a namespace URI to associate with it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3618</commentid>
    <comment_count>1</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2005-04-26 13:25:06 +0000</bug_when>
    <thetext>Here are some queries for which we need to define behavior:

fn:QName((),&quot;p:e&quot;)

element {fn:QName((),&quot;p:e&quot;)} {}

Note that the element constructor will want to take the namespace URI from the
QName:

     If the atomized value of the name expression is of type xs:QName,
     that expanded QName is used as the node-name property of the
     constructed element, retaining the prefix part of the QName.

If we raise an error, as I suggest, then the following query raises an error,
even though we could assign a reasonable interpretation to it:

&lt;e xmlns:p=uri&gt;{ fn:QName((),&quot;p:e&quot;)}&lt;/e&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3630</commentid>
    <comment_count>2</comment_count>
    <who name="Jim Melton">jim.melton</who>
    <bug_when>2005-04-27 20:07:03 +0000</bug_when>
    <thetext>The WG thinks that an error should be raised in this case. The part of the name
before the colon can&apos;t be a prefix, since we have no namespace URI to interpret
it with. The local name needs to conform to
http://www.w3.org/TR/REC-xml-names/#NT-NCName, so the local name doesn&apos;t contain
the colon either. So there&apos;s no useful way to interpret a name with a colon
unless there is a namespace URI to associate with it.

The resolution is to change fn:QName such that if first parameter is the
zero-length string or the empty sequence, then the second parameter can&apos;t have a
prefix in it.  If the second parameter does have a prefix, an error is raised. 

Please let us know if you agree with this resolution of your issue, by adding a
comment to the issue record and changing the Status of the issue to Closed. Or,
if you do not agree with this resolution, please add a comment explaining why.
If you wish to appeal the WG&apos;s decision to the Director, then also change the
Status of the record to Reopened. If you wish to record your dissent, but do not
wish to appeal the decision to the Director, then change the status of the
record to Closed. If we do not hear from you in the next two weeks, we will
assume you agree with the WG decision.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3634</commentid>
    <comment_count>3</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2005-04-27 21:35:57 +0000</bug_when>
    <thetext>Yes, I&apos;m completely satisfied with this resolution.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>