File: Data.xml
A
B
USA
C
D
UK
File: Transform.xslt
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
header 3
group-by="Country">
:
select="current-grouping-key()" />
select="current-group()">
,
Output:
header 3
:
UK
- D
,
C
:
USA
- B
,
A