I am trying to group the following so that it will group by the word "Sets" or "Individual Colors" and only show one of each based on the variable $VariantName:
Code:
<xsl:template name="VariantOptions">
<xsl:for-each select="/root/Variants/Variant">
<xsl:variable name="VariantName">
<xsl:choose>
<xsl:when test="contains(VariantName,'colors')">Sets</xsl:when>
<xsl:when test="contains(VariantName,'Set')">Sets</xsl:when>
<xsl:when test="contains(VariantName,'Dozen')">Individual Colors</xsl:when>
</xsl:choose>
</xsl:variable>
<option value="{VariantID}">
<xsl:value-of select="$VariantName" />
</option>
</xsl:for-each>
</xsl:template>
Any suggestions on how to group?