Использование:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:key name="s" match="product" use="supplier"/>
<xsl:key name="k" match="item" use="concat(../supplier, ',', name, ',', color)"/>
<xsl:template match="/products">
<xsl:copy>
<xsl:apply-templates select="product[generate-id()
= generate-id(key('s', supplier))]"/>
</xsl:copy>
</xsl:template>
<xsl:template match="product">
<xsl:copy>
<xsl:copy-of select="supplier"/>
<xsl:apply-templates select="../product/item[generate-id()
= generate-id(key('k', concat(current()/supplier, ',', name, ',', color)))]"/>
</xsl:copy>
</xsl:template>
<xsl:template match="item">
<xsl:for-each select="key('k', concat(../supplier, ',', name, ',', color))">
<xsl:sort select="price" data-type="number"/>
<xsl:if test="position() = 1">
<xsl:copy-of select="."/>
</xsl:if>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>