Like xsl:for-each
, but orders elements differently
Works well with flat structures
Replaces Muenchian method
Basic syntax:
<xsl:for-each-group
select = expression
group-by = "string expression"
group-adjacent = "string expression"
group-starting-with = pattern>
<!-- Content: (xsl:sort*, content-constructor) -->
</xsl:for-each-group>
The select
attribute selects the population to be grouped.
The group-by
attribute calculates a string value for each node in the population.
Nodes with the same value are grouped together.
The group-adjacent
attribute
calculates a string value for each node in the population.
Every time the value changes, a new group is started.
The group-starting-with
starts a new group
every time its pattern is matched.
group-by
, group-adjacent
,
and group-starting-with
are mutually exclusive.