Subject: [xsl] Newbie needs help with sorting a filtered list From: "M. Casey" <mcasey@xxxxxxxxxxxxxxxxx> Date: Sun, 28 Jan 2007 23:54:19 -0500 |
<catalog> <entry> <word>orange</word> <category type="food" subcat="fruit"/> <info> <serving_size>...</serving_size> <preparation>...</preparation> </info> </entry> <entry> <word>spinach</word> <category type="food" subcat="vegetable"/> <info> <serving_size>...</serving_size> <preparation>...</preparation> </info> </entry> <entry> <word>apple</word> <category type="food" subcat="fruit"/> <info> <serving_size>...</serving_size> <preparation>...</preparation> </info> </entry> <entry> <word>kale</word> <category type="food" subcat="vegetable"/> <info> <serving_size>...</serving_size> <preparation>...</preparation> </info> </entry> <entry> <word>endive</word> <category type="food" subcat="vegetable"/> <info> <serving_size>...</serving_size> <preparation>...</preparation> </info> </entry> <entry> <word>banana</word> <category type="food" subcat="fruit"/> <info> <serving_size>...</serving_size> <preparation>...</preparation> </info> </entry> </catalog>
<xsl:param name="param1"/> <xsl:param name="param2"/>
<xsl:template match="catalog/entry"> <xsl:if test="category[@type=$param1] and category[@subcat=$param2]"> <xsl:for-each select="word"> <xsl:sort/> <xsl:apply-templates/><br/> </xsl:for-each> </xsl:if> </xsl:template>
orange apple banana
apple banana endive kale orange spinach
-- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.410 / Virus Database: 268.17.12/655 - Release Date: 1/28/2007
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] EXSLT support for firefox, Florent Georges | Thread | Re: [xsl] Newbie needs help with so, James A. Robinson |
Re: [xsl] EXSLT support for firefox, Florent Georges | Date | Re: [xsl] Newbie needs help with so, G. Ken Holman |
Month |