| Modules | Implementer Page: set.distinct.html Function Syntaxnode-set set:distinct(node-set) Template Syntax<xsl:call-template name="set:distinct"> <xsl:with-param name="nodes" select="node-set" /> </xsl:call-template> 
         The  
         The  Implementations
                  The following XSLT processors support  
 
                  Implementations of  ExamplesFunctionThe following example shows how to use the  Source<doc>
   <city name="Paris"
         country="France" />
   <city name="Madrid"
         country="Spain" />
   <city name="Vienna"
         country="Austria" />
   <city name="Barcelona"
         country="Spain" />
   <city name="Salzburg"
         country="Austria" />
   <city name="Bonn"
         country="Germany" />
   <city name="Lyon"
         country="France" />
   <city name="Hannover"
         country="Germany" />
   <city name="Calais"
         country="France" />
   <city name="Berlin"
         country="Germany" />
</doc>Stylesheet<!--  Test exslt:distinct  -->
<xsl:template match="/">
   <out>
      <all-countries>
:
             <xsl:for-each select="//@country">
            <xsl:value-of select="." />
;
    
         </xsl:for-each>
      </all-countries>
:
        <distinct-countries>
:  
             <xsl:for-each select="set:distinct(//@country)">
            <xsl:value-of select="." />
;
    
         </xsl:for-each>
      </distinct-countries>
   </out>
</xsl:template>Result<out xmlns:set="http://exslt.org/sets">
   <all-countries>:
    France;
    Spain;
    Austria;
    Spain;
    Austria;
    Germany;
    France;
    Germany;
    France;
    Germany;
    </all-countries>
:
     <distinct-countries>:  
    France;
    Spain;
    Austria;
    Germany;
    </distinct-countries>
</out> | 
http://www.exslt.org/set/functions/distinct/index.html last modified 2002-11-12