> From: Juan Carlos Gonzalez [mailto:jcgonz@xxxxxxxxx]
> Sent: Tuesday, October 22, 2002 11:37 AM
> Subject: 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.martinez@xxxxxxxx |
| 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
| Current Thread |
- Dropdown
- Juan Carlos Gonzalez - Tue, 22 Oct 2002 13:33:01 -0400 (EDT)
- <Possible follow-ups>
- Martinez, Brian - Tue, 22 Oct 2002 13:50:06 -0400 (EDT) <=
- Passin, Tom - Tue, 22 Oct 2002 13:55:30 -0400 (EDT)
- Passin, Tom - Tue, 22 Oct 2002 15:13:12 -0400 (EDT)
|
|