From: Juan Carlos Gonzalez [mailto:jcgonz(_at_)yahoo(_dot_)com]
Sent: Tuesday, October 22, 2002 11:37 AM
Subject: [xsl] Dropdown
Hi:
I'm trying to create a drop down list box dynamically,
but I'm getting an error message cause the "select"
tag is not being closed within the "if" tag. I have
tried replacing the < and > sign with the < and
> but it's still not working. Any ideas?
<xsl:if test="some condition">
<select name="cat">
</xsl:if>
...the folowing template will create the options tag
amoung other things ...
<xsl:apply-templates select="cat"/>
<xsl:if test="some condition">
</select>
</xsl:if>
That isn't valid XSLT. The select element must be closed within the scope
of the first xsl:if element. Assuming that you have a template or templates
to create the options for the drop-down, your XSLT should probably look
like:
<xsl:if test="some condition">
<select name="cat">
<xsl:apply-templates select="cat"/>
</select>
</xsl:if>
cheers,
b.
| brian martinez
brian(_dot_)martinez(_at_)trip(_dot_)com |
| senior gui programmer 303.708.7248 |
| trip network, inc. fax 303.790.9350 |
| 6436 s. racine cir. englewood, co 80111 |
| http://www.cheaptickets.com/ http://www.trip.com/ |
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list