Created
November 30, 2016 18:29
-
-
Save robsilva/0ef32e7d18803548677ed18da1b63e54 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