[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Dropdown

Subject: RE: Dropdown
From: "Martinez, Brian" <brian.martinez@xxxxxxxx>
Date: Tue, 22 Oct 2002 11:50:26 -0600
dropdown in xslt
> 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 &lt; and
> &gt; 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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.