<xsl:for-each
select="product[generate-id(.)=generate-id(key('products',region))]">
Goes through the set of product nodes that are the first in each region
<h3>Region <xsl:value-of select="region"/></h3>
<xsl:for-each select="key('products',region)">
Goes through the set of product nodes in each region in turn
</xsl:for-each>
</xsl:for-each>
Region SouthWest
| Product Name |
Price |
Region |
| Battery Pack |
$20 |
SouthWest |
| Rock n Roll Supercart |
$150 |
SouthWest |
Region NorthWest
| Product Name |
Price |
Region |
| CD Visor Organizer |
$19 |
NorthWest |
| Digital Tire Gauge |
$40 |
NorthWest |