Created
July 3, 2013 17:13
-
-
Save DiogoDoreto/5920630 to your computer and use it in GitHub Desktop.
Distinct values in XSLT 1.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xsl:key name="product" match="/items/item/products/product/text()" use="." /> | |
<xsl:template match="/"> | |
<xsl:for-each select="/items/item/products/product/text()[generate-id() | |
= generate-id(key('product',.)[1])]"> | |
<li> | |
<xsl:value-of select="."/> | |
</li> | |
</xsl:for-each> | |
</xsl:template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment