[Bug 4528] [UPD] Sections 2.4.1 insert/3.1.4 upd:insertIntoAsFirst: inconsistent ordering rules

http://www.w3.org/Bugs/Public/show_bug.cgi?id=4528





------- Comment #1 from mrys@microsoft.com  2007-05-22 17:20 -------
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.

Received on Tuesday, 22 May 2007 17:20:33 UTC