xsl-list
[Top] [All Lists]

selecting HTML Options

2005-01-17 21:52:01
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.
***********************************************************************************


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>