This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
When elements are added to a tree by an insert or replace expression, it's not clear whether the inserted elements inherit the in-scope namespaces of their new parent. Possible answers are (a) always inherit, (b) never inherit, (c) conditionally inherit based on the copy-namespaces mode in the static context. For consistency with element construction (c) seems the most logical, given that the mode exists.
I believe that (c) is the only possible interpretation of the existing spec. The insert expression and the replace expression both reference the rules for evaluating an enclosed expression in an element constructor [XQuery Section 3.7.1.3]. In the referenced section, Rule 1.e.ii.D specifies that the in-scope-namespaces property of the new node depends on copy-namespaces mode. I think the existing wording makes the intention sufficiently clear. The wording could be made more precise (and less readable) by making the following changes: (1) In the insert section, add the following phrase immediately after the reference to XQuery Section 3.7.1.3: "(interpreting 'the constructed node' as 'the new parent of the inserted node(s)'.)" (2) In the replace section, add the following phrase immediately after the reference to XQuery Section 3.7.1.3: "(interpreting 'the constructed node' as 'the parent of the replaced node'.)" --Don Chamberlin
On 15 Jan 2008, the working group decided to close this bug report with no changes, regarding the existing specification to be sufficiently clear. Michael, since you were present at the discussion, I am marking the bug report as Closed. --Don Chamberlin (for the Query working group)