Distinct Values in XSLT

How to get distinct attribute values:

   1: <xsl:variable name="rows" select="/some/path/@name" />
   2: <xsl:for-each select="$rows">
   3:       <xsl:if test="generate-id() = generate-id($rows[. = current()][1])">
   4:     <xsl:value-of select="." />
   5:     <br />
   6:   </xsl:if>
   7: </xsl:for-each>

                             

No Comments

Add a Comment

As it will appear on the website

Not displayed

Your website