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 5325 - [UPD] Namespace inheritance for Insert/Replace
Summary: [UPD] Namespace inheritance for Insert/Replace
Status: CLOSED INVALID
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Update Facility (show other bugs)
Version: Recommendation
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Andrew Eisenberg
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-19 13:55 UTC by Michael Kay
Modified: 2008-01-15 18:34 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2007-12-19 13:55:52 UTC
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.
Comment 1 Don Chamberlin 2008-01-14 23:54:21 UTC
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

Comment 2 Don Chamberlin 2008-01-15 18:34:35 UTC
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)