<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>4528</bug_id>
          
          <creation_ts>2007-05-04 23:25:02 +0000</creation_ts>
          <short_desc>[UPD] Sections 2.4.1 insert/3.1.4 upd:insertIntoAsFirst: inconsistent ordering rules</short_desc>
          <delta_ts>2008-05-15 19:40:30 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>Update Facility</component>
          <version>Working drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>critical</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>4527</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Rys">mrys</reporter>
          <assigned_to name="Andrew Eisenberg">andrew.eisenberg</assigned_to>
          
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>15004</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Rys">mrys</who>
    <bug_when>2007-05-04 23:25:02 +0000</bug_when>
    <thetext>as first/as last: 
same as bug 4527. 

Also note that 3.1.4 upd:insertIntoAsFirst and ff is preserving order... inconsistency in spec.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>15138</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Rys">mrys</who>
    <bug_when>2007-05-22 17:20:28 +0000</bug_when>
    <thetext>To clarify this bug:

2.4.1 currently says:
&quot;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.&quot;

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
&lt;z&gt;&lt;d/&gt;&lt;/z&gt;

do insert (&lt;a/&gt;,&lt;b/&gt;,&lt;c/&gt;) as first into /z

should be &lt;z&gt;&lt;a/&gt;&lt;b/&gt;&lt;c/&gt;&lt;d/&gt;&lt;/z&gt; only (no other order)

(do insert &lt;a/&gt; as first into /z),(do insert &lt;b/&gt; as first into /z)

could be &lt;z&gt;&lt;a/&gt;&lt;b/&gt;&lt;d/&gt;&lt;/z&gt; or &lt;z&gt;&lt;b/&gt;&lt;a/&gt;&lt;d/&gt;&lt;/z&gt;.

(do insert (&lt;a/&gt;,&lt;b id=&quot;1&quot;/&gt;) as first into /z),(do insert (&lt;b id=&quot;2&quot;/&gt;,&lt;c/&gt;) as first into /z)

could be &lt;z&gt;&lt;a/&gt;&lt;b id=&quot;1&quot;/&gt;&lt;b id=&quot;2&quot;/&gt;&lt;c/&gt;&lt;d/&gt;&lt;/z&gt; or &lt;z&gt;&lt;b=&quot;2&quot;/&gt;&lt;c/&gt;&lt;a/&gt;&lt;b id=&quot;1&quot;/&gt;&lt;d/&gt;&lt;/z&gt; but does not allow interleaving of the sequences.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>15365</commentid>
    <comment_count>2</comment_count>
    <who name="Don Chamberlin">chamberl</who>
    <bug_when>2007-06-11 23:22:39 +0000</bug_when>
    <thetext>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 &quot;Closed&quot; if you agree.
Regards,
Don Chamberlin (for the Query Working Group)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>