<?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>9432</bug_id>
          
          <creation_ts>2010-04-06 15:43:31 +0000</creation_ts>
          <short_desc>The definition of upd:propagateNamespace needs special treatment for default namespaces</short_desc>
          <delta_ts>2010-09-14 14:35:46 +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>Update Facility</component>
          <version>Candidate Recommendation</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</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="Josh Spiegel">josh.spiegel</reporter>
          <assigned_to name="Jonathan Robie">jonathan.robie</assigned_to>
          <cc>dmitry.lychagin</cc>
    
    <cc>jim.melton</cc>
    
    <cc>john.snelson</cc>
    
    <cc>josh.spiegel</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>34606</commentid>
    <comment_count>0</comment_count>
    <who name="Josh Spiegel">josh.spiegel</who>
    <bug_when>2010-04-06 15:43:31 +0000</bug_when>
    <thetext>This bug is derived from bug 9312

I believe there is a problem in the definition of upd:propagateNamespaces when propagating a default namespace.  Consider the following example:

  declare copy-namespaces preserve, inherit;
  copy $a := &lt;a&gt;&lt;b/&gt;&lt;/a&gt;
  modify rename node $a as QName(&quot;foo&quot;, &quot;a&quot;)
  return $a

In this example, binding &quot;&quot;=&quot;foo&quot; will be propagated to element &lt;b/&gt; as &lt;b/&gt; does not have a binding for prefix &quot;&quot;.  Note &quot;&quot;=&quot;&quot; is not a binding in the namespaces property of &lt;b/&gt;.  In this situation, it would be necessary to
change the expanded QName of &lt;b/&gt; to have the new uri &quot;foo&quot; during propagation.

One can imagine a slightly more complicated example where one rename expression results in many QNames changing during namespace propagation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>38349</commentid>
    <comment_count>1</comment_count>
    <who name="Jim Melton">jim.melton</who>
    <bug_when>2010-08-31 20:37:28 +0000</bug_when>
    <thetext>At its face-to-face meeting in July 2010, recorded in the meeting minutes archived at the member-only URI http://lists.w3.org/Archives/Member/w3c-xsl-query/2010Jul/0202.html, the XML Query WG made the following decision that will resolve this bug.  It remains open until the owner of this bug records the precise text that will be used in the spec. 

DECISION: No longer propagate namespaces where the prefix is empty. E.g.: in xquery-update-10 section 3.2.2 upd:applyUpdates, clause 6 after &quot;if $inherit-namespaces is true,... marked for namespace propagation,&quot; except for namespace bindings associated with the empty prefix</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>38572</commentid>
    <comment_count>2</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2010-09-07 22:59:49 +0000</bug_when>
    <thetext>This was fixed with the following change in wording:


If $inherit-namespaces is true, then
upd:propagateNamespace&lt;/loc&gt;($element,$prefix, $uri) is invoked
for each namespace binding that was marked for namespace
propagation, &lt;add&gt;except for namespace bindings associated with
the empty prefix&lt;/add&gt;, where $element is the element node on
which the namespace binding appears, $prefix is the namespace
prefix, and $uri is the namespace URI. Each of these nodes is
then unmarked.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>