This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 9432 - The definition of upd:propagateNamespace needs special treatment for default namespaces
Summary: The definition of upd:propagateNamespace needs special treatment for default ...
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Update Facility (show other bugs)
Version: Candidate Recommendation
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Jonathan Robie
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-06 15:43 UTC by Josh Spiegel
Modified: 2010-09-14 14:35 UTC (History)
5 users (show)

See Also:


Attachments

Description Josh Spiegel 2010-04-06 15:43:31 UTC
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 := <a><b/></a>
  modify rename node $a as QName("foo", "a")
  return $a

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

One can imagine a slightly more complicated example where one rename expression results in many QNames changing during namespace propagation.
Comment 1 Jim Melton 2010-08-31 20:37:28 UTC
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 "if $inherit-namespaces is true,... marked for namespace propagation," except for namespace bindings associated with the empty prefix
Comment 2 Jonathan Robie 2010-09-07 22:59:49 UTC
This was fixed with the following change in wording:


If $inherit-namespaces is true, then
upd:propagateNamespace</loc>($element,$prefix, $uri) is invoked
for each namespace binding that was marked for namespace
propagation, <add>except for namespace bindings associated with
the empty prefix</add>, 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.