|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Writing a SELECT with each OPTION a unique value
On 4/11/07, Waters, Tyler S FOR:EX <Tyler.Waters@xxxxxxxxx> wrote:
This is a XSLT 1.0 technique to get unique values (known as Muenchian method): <xsl:for-each select="CATALOG/CD[generate-id() =
generate-id(key('KEY_COUNTRY', COUNTRY)[1])]">
<xsl:value-of select="COUNTRY" /><br/>
</xsl:for-each>With XSLT 2.0, you can use distinct-values function: <xsl:for-each select="distinct-values(CATALOG/CD/COUNTRY)"> <xsl:value-of select="." /><br/> </xsl:for-each> -- Regards, Mukul Gandhi
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






