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 4528 - [UPD] Sections 2.4.1 insert/3.1.4 upd:insertIntoAsFirst: inconsistent ordering rules
Summary: [UPD] Sections 2.4.1 insert/3.1.4 upd:insertIntoAsFirst: inconsistent orderin...
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Update Facility (show other bugs)
Version: Working drafts
Hardware: PC Windows XP
: P2 critical
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: 4527
Blocks:
  Show dependency treegraph
 
Reported: 2007-05-04 23:25 UTC by Michael Rys
Modified: 2008-05-15 19:40 UTC (History)
0 users

See Also:


Attachments

Description Michael Rys 2007-05-04 23:25:02 UTC
as first/as last: 
same as bug 4527. 

Also note that 3.1.4 upd:insertIntoAsFirst and ff is preserving order... inconsistency in spec.
Comment 1 Michael Rys 2007-05-22 17:20:28 UTC
To clarify this bug:

2.4.1 currently says:
"If as first (or as last) is specified, the inserted nodes become the first (or last) children of the target node. If multiple nodes are inserted as first (or as last) in the same snapshot, the ordering among these nodes is implementation-dependent."

As in bug 4527, this contradicts the wording in 3.1.4 and 3.1.5 where we correctly say:

The children property of $target is changed to include the nodes in $content as the first/last children, preserving their order.

Please clarify the meaning in 2.4.1 in a way that the behaviour of 3.1.4 and 3.1.5 is preserved.

Here are some examples:

let the context be
<z><d/></z>

do insert (<a/>,<b/>,<c/>) as first into /z

should be <z><a/><b/><c/><d/></z> only (no other order)

(do insert <a/> as first into /z),(do insert <b/> as first into /z)

could be <z><a/><b/><d/></z> or <z><b/><a/><d/></z>.

(do insert (<a/>,<b id="1"/>) as first into /z),(do insert (<b id="2"/>,<c/>) as first into /z)

could be <z><a/><b id="1"/><b id="2"/><c/><d/></z> or <z><b="2"/><c/><a/><b id="1"/><d/></z> but does not allow interleaving of the sequences.

Comment 2 Don Chamberlin 2007-06-11 23:22:39 UTC
Michael,
I believe that this bug has been resolved by the spec changes that were agreed upon to resolve Bug 4527. Please examine these changes and change the status of this bug report to "Closed" if you agree.
Regards,
Don Chamberlin (for the Query Working Group)