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 30072 - [XSLT30]Grouping example lacks parentheses in current-group call
Summary: [XSLT30]Grouping example lacks parentheses in current-group call
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 (show other bugs)
Version: Candidate Recommendation
Hardware: PC Windows NT
: P2 editorial
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-05 20:03 UTC by Martin Honnen
Modified: 2017-04-03 18:21 UTC (History)
1 user (show)

See Also:


Attachments

Description Martin Honnen 2017-03-05 20:03:08 UTC
The example "A Composite Grouping Key" in https://www.w3.org/TR/xslt-30/#grouping-examples is as follows:

<xsl:for-each-group select="cities/city" 
                    group-by="@name, @country" 
                    composite="yes">
  <p>
    <xsl:value-of select="current-grouping-key()[1] || ', ' ||
                          current-grouping-key()[2] || ': ' || 
                          avg(current-group/@pop)"/>
  </p>
</xsl:for-each-group>

The expression
  avg(current-group/@pop)
in there lacks parentheses in the current-group call, it should be
  avg(current-group()/@pop)
.
Comment 1 Michael Kay 2017-03-23 11:01:52 UTC
Thanks for pointing this out. The example has now been corrected.