<?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>9140</bug_id>
          
          <creation_ts>2010-02-24 20:12:05 +0000</creation_ts>
          <short_desc>[XSLT 2.0] Order of items within current-group() is unclear</short_desc>
          <delta_ts>2010-07-20 10:35: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>XSLT 2.0</component>
          <version>Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</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>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Kay">mike</reporter>
          <assigned_to name="Michael Kay">mike</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>32628</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2010-02-24 20:12:05 +0000</bug_when>
    <thetext>Problem raised by Vladimir Nestorovsky today on the xsl-list at mulberrytech.

The specification of xsl:for-each-group is unclear as to the order of items in each group (that is, the result of current-group()).

The intent is that the procedural algorithm given for each of the four grouping methods defines this order. But this relies on understanding that when an item is &quot;added&quot; to a group, or &quot;assigned&quot; to a group, it is added at the end of the sequence, which isn&apos;t explicitly stated.

Suggestion: in the rules for the four grouping methods, change &quot;added&quot; and &quot;assigned&quot; to &quot;appended&quot;, and add a sentence at the end saying that the order in which items are added to each group determines the order of the items in the group as returned by the current-group() function.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>35676</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2010-05-13 16:54:11 +0000</bug_when>
    <thetext>The proposal in comment #0 has been approved in principle; an erratum will be drafted.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36890</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2010-07-15 08:56:37 +0000</bug_when>
    <thetext>Erratum E43 will be raised as proposed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37006</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2010-07-20 10:35:30 +0000</bug_when>
    <thetext>I chose what I think is a simpler but equivalent solution: adding the paragraph:

In all cases the items within a group remain in population order. That is, if items &lt;var&gt;A&lt;/var&gt; and &lt;var&gt;B&lt;/var&gt; are in the same group, then &lt;var&gt;A&lt;/var&gt; will precede &lt;var&gt;B&lt;/var&gt; in the group if &lt;var&gt;A&lt;/var&gt; preceded &lt;var&gt;B&lt;/var&gt; in the population.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>