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

RE: using <xsl:if> inside the select menu

Subject: RE: using <xsl:if> inside the select menu
From: "Chris Bayes" <Chris@xxxxxxxxxxx>
Date: Tue, 1 Aug 2000 01:16:45 +0100
xsl if selected
Try
      <option value="K">
		<xsl:if test="$G ='K'">
		    <xsl:attribute name="selected">selected</xsl:attribute>
        	</xsl:if>
	K</option>
No quotes on $G


>Please help me to set up code that will work. I am trying to set up
>selected item in the select menu from the XML.
>Without <xsl:if> it works, but otherwise not.
>
><xsl:variable name='G' select='1'/>
>	<xsl:value-of select='$G' />
>	
> <select name = "res_level" >
>       <option value="K">
>		<xsl:if test="'$G' ='K'">
>		    <xsl:attribute name="selected">selected</xsl:attribute>
>        	</xsl:if>
>	K</option>
>	<option vaule="1">
>		<xsl:if test="'$G' ='1'">
>         		 <xsl:attribute
>name="selected">selected</xsl:attribute>
>        	</xsl:if>
>	1</option>
>      <option value="2">
>		<xsl:if test="'$G' ='2'">
>		   <xsl:attribute name="selected">selected</xsl:attribute>
>		</xsl:if>
>	2</option>
></select>
>
>
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 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.