doubt in XSLT -- very urgent

I have a xslt code snippet as below:

<td valign="top" width="14%" class="bodytextbold" >
<select name="selectMedium" class="bodytext" onChange="changeOption(selectedIndex)">
<option value="">-- Select --</option>
<option value="T">Phone</option>
<option value="F">Fax</option>
<option value="M">Mail</option>
<option value="V">Verbal</option>
</select>
</td>

This will give me a drop down box with the values listed above and I could select what ever value I want to select.

But here my problem is that...I will get a xml string from other components and based on the value for the node "medium" the value should be automatically selected. If xml node "medium" doesn't
contain any value the default value "-- select --" should be selected. And at the same I should be able to change the
value at anytime.

Please suggest me in this regard as I am not familiar with XSLT.

Thanks,
Subbu.
[1093 byte] By [subbukns] at [2007-11-20 7:59:47]
# 1 Re: doubt in XSLT -- very urgent
You could use several <xsl:if>'s
<td valign="top" width="14%" class="bodytextbold" >
<select name="selectMedium" class="bodytext" onChange="changeOption(selectedIndex)">
<option value=""><xsl:if test="medium = ''"><xsl:attribute name="selected">selected</xsl:attribute>-- Select --</option>
<option value="T"><xsl:if test="medium = 'T'"><xsl:attribute name="selected">selected</xsl:attribute>Phone</option>
<option value="F"><xsl:if test="medium = 'F'"><xsl:attribute name="selected">selected</xsl:attribute>Fax</option>
<option value="M"><xsl:if test="medium = 'M'"><xsl:attribute name="selected">selected</xsl:attribute>Mail</option>
<option value="V"><xsl:if test="medium = 'V'"><xsl:attribute name="selected">selected</xsl:attribute>Verbal</option>
</select>
</td>
jkmyoung at 2007-11-10 3:26:54 >