<?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>12554</bug_id>
          
          <creation_ts>2011-04-25 21:36:31 +0000</creation_ts>
          <short_desc>[F+O 3.0] Clarify terminology for default namespace</short_desc>
          <delta_ts>2011-06-08 09:54:38 +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 3.0</component>
          <version>Working drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>12553</dup_id>
          
          <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="Michael Kay">mike</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>47672</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2011-04-25 21:36:31 +0000</bug_when>
    <thetext>This arises from XQuery test suite bug #11590.

In fn:namespace-uri-for-prefix() there are two problems:

(a) The term &quot;default (unnamed) namespace&quot; is nonsense: every namespace has a namespace name. What is intended is &quot;default namespace&quot;.

(b) The sentence &quot;Otherwise, it returns the empty sequence.&quot; is preceded by two conditionals, and it&apos;s not clear which one the &quot;otherwise&quot; relates to. I believe the first is intended.

I propose to recast the rules as follows:

Rules

If $prefix is the empty sequence, the function behaves as if $prefix were the zero-length string.

If $element has an in-scope namespace whose namespace prefix is equal to $prefix, it returns the namespace URI of that namespace.

Otherwise, it returns the empty sequence.

Prefixes are equal only if their Unicode codepoints match exactly.

Note

If $prefix is the zero-length string or the empty sequence, then:

* if there is a default namespace, the namespace URI of the default namespace is returned

* if there is no default namespace (that is, if there is no declaration of the form xmlns=&quot;uri&quot;, or if there is a declaration of the form xmlns=&quot;&quot;), the function returns the empty sequence.

The rules for fn:in-scope-prefixes() are also open to misreading. It states &quot;For the default namespace, which has no prefix, it returns the zero-length string.&quot; This could be read as meaning that the result sequence always includes the zero-length string. In fact it includes the zero-length string only if the in-scope namespaces contains a binding for the zero-length string (that is, a default namespace), which will be true only if there is a namespace declaration of the form xmlns=&quot;non-empty-URI&quot; in force. I propose fixing this editorially.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47675</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2011-04-25 21:52:15 +0000</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 12553 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>49311</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2011-06-08 09:54:38 +0000</bug_when>
    <thetext>The resolution of this bug is recorded under the related bug #11590 (raised against the test suite.)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>