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

Adding a chekbox with XSL

Subject: Adding a chekbox with XSL
From: Lewis <lewis@xxxxxxxxxxx>
Date: Mon, 02 Oct 2000 17:47:43 -0400
chekbox
Hi.

I tried the faq and the archive but I can't seem to find what I'm
looking for.

I have an XML document that looks like this:

<DemoMenu>
  <option strValue="Setup" textValue="Y"/>
</ndsDemoMenu>

If the value of DemoMenu.option.textValue == 'Y' then I want to add a
checkbox to my page that is already checked.  If the value is not == to
'Y' then I want it to be unchecked.  Setup is the name of the checkbox.

I've figure out how to extract and display "Setup", what I can't figure
out is how to use xsl:if (I realize xsl:choose is really what I want but
I wanted to simplify until I get the basics figured out) to verify the
value of textValue.  I tried:

    <xsl:if test="&lt;xsl:value-of select=&quot;@textValue&quot;/&gt; =
&quot;Y&quot;">
            <p align="center"><xsl:value-of select="text"/><input
Type="Checkbox" align="center" checked="Y" value="Y"/></p>
    </xsl:if>
trying to say
    <xsl:if test="<xsl:value-of select="@textValue"/> = "Y"">
            <p align="center"><xsl:value-of select="text"/><input
Type="Checkbox" align="center" checked="Y" value="Y"/></p>
    </xsl:if>

but I get
  Unexpected token '<'. --><<--xsl:value-of select="@textValue"/> = "Y"

Am I totally looking at this the wrong way or am I missing something
obvious?  It seems like this should be easy but I think I'm looking at
this too procedurally.

Any help would be appreciated.


--
Lewis Cunningham
NDS Systems
Tel : 727-538-2250
Mail: lewis@xxxxxxxxxxx
Web : www.ndsapps.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.