This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
My results do not agree with the expected results of this test. modl:nested is a function defined in a module with no copy-namespaces declaration. Therefore it operates with the default of "inherit, preserve". declare function mod1:nested() as element() { element outer { namespace out { "http://out.zorba-xquery.com/" }, element inner { namespace in { "http://in.zorba-xquery.com/" } } } }; Starting from the outside in, element inner { namespace in { "http://in.zorba-xquery.com/" } } creates an element "inner" with namespace nodes for "xml" and "in". This element is then copied during the creation of element outer with copy-namespaces mode "inherit, preserve". The copy of inner has three namespaces nodes: "xml", "in" (preserved) and "out" (inherited from outer). Thus I believe a call to modl:nested() will return <outer xmlns:out="http://out.zorba-xquery.com/"> <inner xmlns:in="http://in.zorba-xquery.com/"/> </outer> in which outer has namespace nodes for "out" and "xml", and inner has namespaces nodes for "in", "out" (which it inherits at the from outer at the point it is copied) and "xml". In the main module, the test has: import module namespace mod1="http://www.w3.org/TestModules/cnc-module"; declare copy-namespaces preserve, no-inherit; let $nested := mod1:nested(), $elem := element e { namespace new { "http://new.zorba-xquery.com/" }, $nested } return $elem/outer/inner When copied in element e, outer will not inherit "new" (by virtue of the specified copy-namespaces mode), but outer's namespace nodes "out" and "xml" will be preserved, as will inner's namespace nodes "in", "out" and "xml". Therefore the expected result should be <inner xmlns:in="http://in.zorba-xquery.com/" xmlns:out="http://out.zorba-xquery.com/"/> and not <inner xmlns:in="http://in.zorba-xquery.com/"/> as given.
Test assigned to Matthias to review
The expected result was fixed as described by Tim (see rev. 1.7 of prod/CompNamespaceConstructor.xml)
Confirmed fixed. Thanks.