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

xsl loop for display in drop-down box

Subject: xsl loop for display in drop-down box
From: "Seema Ramanathan" <sramanathan@xxxxxxxxxxxx>
Date: Wed, 22 Mar 2000 15:50:57 -0800
xsl drop down box
Hi
 
I have the following XML tag:
<TITLE>
<FIRST>Something</FIRST>
<FIRST>Everything</FIRST>
<FIRST Selected="Nothing"></FIRST>
</TITLE>
 
I want my XSL to display a drop down box with the first option to be the selected one - that is "Nothing" followed by the others (Something and Everything).
 
Here is the XSL i use:
<select name="FIRST">
<xsl:variable name="tmp"><xsl:value-of select="FIRST/@SELECTED"/></xsl:variable>
<xsl:if test="(normalize($tmp)=true())">
<option><xsl:value-of select="($tmp)"/></option>
<xsl:for-each select="MODEL">
<option><xsl:value-of select="."/></option>
</xsl:for-each>
</xsl:if>
</select>
 
When i use the above XSL loop I get a drop down with "Nothing" displayed followed by "Something", "Everything" and another blank option. How do i get rid of the blank? I realize its coming from this line "
<FIRST Selected="Nothing"></FIRST>".
 
Is there any way i can ignore it?
 
Any help??? Please and TIA
 
Seema
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.