Skip to content

Instantly share code, notes, and snippets.

@erinxocon
Created September 18, 2015 03:05
Show Gist options
  • Save erinxocon/ae8f3d4ddb82661fcea9 to your computer and use it in GitHub Desktop.
Save erinxocon/ae8f3d4ddb82661fcea9 to your computer and use it in GitHub Desktop.
Distinct XSLT 1.0
<xsl:key name="product" match="/xpath/xpath/text()" use="." />
<xsl:template match="/">
<xsl:for-each select="/xpath/xpath/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