|
Subject: Re: [xsl] Writing a SELECT with each OPTION a unique value From: "Mukul Gandhi" <gandhi.mukul@xxxxxxxxx> Date: Wed, 11 Apr 2007 07:30:52 +0530 |
<?xml version="1.0" encoding="ISO8859-1" ?>
<CATALOG>
<CD>
<TITLE>Empire Burlesque</TITLE>
<ARTIST>Bob Dylan</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>Columbia</COMPANY>
<PRICE>10.90</PRICE>
<YEAR>1985</YEAR>
</CD>
<CD>
<TITLE>Hide your heart</TITLE>
<ARTIST>Bonnie Tylor</ARTIST>
<COUNTRY>UK</COUNTRY>
<COMPANY>CBS Records</COMPANY>
<PRICE>9.90</PRICE>
<YEAR>1988</YEAR>
</CD>
</CATALOG>
<xsl:key name="KEY_COUNTRY" match="CD" use="COUNTRY" />
-- indexes all the items based on country
<xsl:for-each select="CATALOG/CD[generate-id() =
generate-id(key('KEY_COUNTRY', COUNTRY)[1])]">
<xsl:value-of select="COUNTRY" /><br/>
</xsl:for-each><xsl:for-each select="distinct-values(CATALOG/CD/COUNTRY)"> <xsl:value-of select="." /><br/> </xsl:for-each>
-- Regards, Mukul Gandhi
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] Writing a SELECT with each OP, Waters, Tyler S FOR: | Thread | [xsl] Is there a way to avoid Empty, binu.idicula |
| [xsl] Writing a SELECT with each OP, Waters, Tyler S FOR: | Date | [xsl] Selecting content via attribu, Ben Trafford |
| Month |