[xsl] selecting HTML Options

Subject: [xsl] selecting HTML Options
From: Chris_Graham@xxxxxxxxxxx
Date: Tue, 18 Jan 2005 15:52:01 +1100
There has to be an easier way to select <option> elements inside a 
<select> element that this:

<!-- Generate the Month combo box -->
<xsl:template name="monthOptions">
        <xsl:param name="name"/>
        <xsl:param name="value"/>
<select name="{$name}">

    <xsl:if test="'00' = $value"><option value='00'></option></xsl:if>
    <xsl:if test="not('00' = $value)"><option value='00' selected=
"selected"></option></xsl:if>
    <xsl:if test="'01' = $value"><option value='01'>JAN</option></xsl:if>
    <xsl:if test="not('01' = $value)"><option value='01' selected=
"selected">JAN</option></xsl:if>
    <xsl:if test="'02' = $value"><option value='02'>FEB</option></xsl:if>
    <xsl:if test="not('02' = $value)"><option value='01' selected=
"selected">FEB</option></xsl:if>

    ...

</select>
</xsl:template>

Can anyone point me in the right direction? I'd rather avoid calling java 
directly... :-(

-Chris



***********************************************************************************
This email contains information confidential to AAMI Limited. If you are not the intended recipient, you must not disclose or use the information in it. If you have received this email in error, please notify us immediately by return email, and delete this email and any attached documents.
AAMI Limited is not responsible for any changes made to a document other than those made by AAMI Limited or for the effect of the changes on the document meaning.
***********************************************************************************

Current Thread