<?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>29734</bug_id>
          
          <creation_ts>2016-07-15 11:35:33 +0000</creation_ts>
          <short_desc>[xslt30ts] si-fork-110 and si-fork-111 are supposed to test composite key use but xsl:for-each-group lacks the composite=&quot;yes&quot; attribute</short_desc>
          <delta_ts>2017-01-28 22:01:11 +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 3.0 Test Suite</component>
          <version>Candidate Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</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="Martin Honnen">martin.honnen</reporter>
          <assigned_to name="Abel Braaksma">abel.online</assigned_to>
          <cc>mike</cc>
          
          <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>126959</commentid>
    <comment_count>0</comment_count>
    <who name="Martin Honnen">martin.honnen</who>
    <bug_when>2016-07-15 11:35:33 +0000</bug_when>
    <thetext>The file tests\strm\si-fork\_si-fork-test-set.xml has two tests si-fork-110 and si-fork-111 which are described as testing composite keys, however the code in the named templates g-010 and g-011 in the file si-fork-B.xsl does not have the setting &apos;composite=&quot;yes&quot;&apos; on the &apos;xsl:for-each-group&apos; elements:

  &lt;!-- streamed xsl:for-each-group with composite key --&gt;

  &lt;xsl:template name=&quot;g-010&quot; use-when=&quot;$RUN&quot;&gt;
    &lt;out&gt;
      &lt;xsl:stream href=&quot;../docs/books-atts.xml&quot;&gt;
        &lt;xsl:fork&gt;
          &lt;xsl:for-each-group select=&quot;/BOOKLIST/BOOKS/ITEM&quot; group-by=&quot;@PUB-DATE, @LANGUAGE&quot;&gt;
            &lt;CAT DATE=&quot;{current-grouping-key()[1]}&quot; LANG=&quot;{current-grouping-key()[2]}&quot;
              AVG-PRICE=&quot;{round(avg(current-group() / @PRICE), 3)}&quot;&gt;
            &lt;/CAT&gt;
          &lt;/xsl:for-each-group&gt;
        &lt;/xsl:fork&gt;
      &lt;/xsl:stream&gt;
    &lt;/out&gt;
  &lt;/xsl:template&gt;

  &lt;!-- streamed xsl:for-each-group with composite key (context item is first in group) --&gt;

  &lt;xsl:template name=&quot;g-011&quot; use-when=&quot;$RUN&quot;&gt;
    &lt;out&gt;
      &lt;xsl:stream href=&quot;../docs/books-atts.xml&quot;&gt;
        &lt;xsl:fork&gt;
          &lt;xsl:for-each-group select=&quot;/BOOKLIST/BOOKS/ITEM&quot; group-by=&quot;@AUTHOR, @PRICE&quot;&gt;
            &lt;xsl:variable name=&quot;group&quot; select=&quot;copy-of(current-group())&quot;/&gt;
            &lt;CAT ID=&quot;{distinct-values($group/@CAT)}&quot; AUTHOR=&quot;{@AUTHOR}&quot; PRICE=&quot;{@PRICE}&quot;
              COUNT=&quot;{count($group)}&quot;
              AVG-QTY=&quot;{round(avg($group / @QUANTITY), 3)}&quot;&gt;
            &lt;/CAT&gt;
          &lt;/xsl:for-each-group&gt;
        &lt;/xsl:fork&gt;
      &lt;/xsl:stream&gt;
    &lt;/out&gt;
  &lt;/xsl:template&gt;

So to make sense the code needs to be changed to

  &lt;!-- streamed xsl:for-each-group with composite key --&gt;

  &lt;xsl:template name=&quot;g-010&quot; use-when=&quot;$RUN&quot;&gt;
    &lt;out&gt;
      &lt;xsl:stream href=&quot;../docs/books-atts.xml&quot;&gt;
        &lt;xsl:fork&gt;
          &lt;xsl:for-each-group select=&quot;/BOOKLIST/BOOKS/ITEM&quot; group-by=&quot;@PUB-DATE, @LANGUAGE&quot; composite=&quot;yes&quot;&gt;
            &lt;CAT DATE=&quot;{current-grouping-key()[1]}&quot; LANG=&quot;{current-grouping-key()[2]}&quot;
              AVG-PRICE=&quot;{round(avg(current-group() / @PRICE), 3)}&quot;&gt;
            &lt;/CAT&gt;
          &lt;/xsl:for-each-group&gt;
        &lt;/xsl:fork&gt;
      &lt;/xsl:stream&gt;
    &lt;/out&gt;
  &lt;/xsl:template&gt;

  &lt;!-- streamed xsl:for-each-group with composite key (context item is first in group) --&gt;

  &lt;xsl:template name=&quot;g-011&quot; use-when=&quot;$RUN&quot;&gt;
    &lt;out&gt;
      &lt;xsl:stream href=&quot;../docs/books-atts.xml&quot;&gt;
        &lt;xsl:fork&gt;
          &lt;xsl:for-each-group select=&quot;/BOOKLIST/BOOKS/ITEM&quot; group-by=&quot;@AUTHOR, @PRICE&quot; composite=&quot;yes&quot;&gt;
            &lt;xsl:variable name=&quot;group&quot; select=&quot;copy-of(current-group())&quot;/&gt;
            &lt;CAT ID=&quot;{distinct-values($group/@CAT)}&quot; AUTHOR=&quot;{@AUTHOR}&quot; PRICE=&quot;{@PRICE}&quot;
              COUNT=&quot;{count($group)}&quot;
              AVG-QTY=&quot;{round(avg($group / @QUANTITY), 3)}&quot;&gt;
            &lt;/CAT&gt;
          &lt;/xsl:for-each-group&gt;
        &lt;/xsl:fork&gt;
      &lt;/xsl:stream&gt;
    &lt;/out&gt;
  &lt;/xsl:template&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128420</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2017-01-28 22:01:11 +0000</bug_when>
    <thetext>The suggested change was committed on 3 November, it seems without any acknowledgement in the test metadata or here in bugzilla.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>