Subject: RE: Adding a chekbox with XSL From: "Keith" <keith@xxxxxxxxxxxxx> Date: Tue, 3 Oct 2000 08:17:51 -0500 |
If you are 'inside' the value of statement, you can use <xsl:if test="{.} = 'Y'"><xsl:value-of select="."/><input type="checkbox align="center" checked="Y" value="Y"/></xsl:if> this checks the value of the current node against "Y" and builds the checkbox only if it evaluates to true. -----Original Message----- From: owner-xsl-list@xxxxxxxxxxxxxxxx [mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of Lewis Sent: Monday, October 02, 2000 4:48 PM To: XSL-List@xxxxxxxxxxxxxxxx Subject: Adding a chekbox with XSL 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="<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> 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 XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Adding a chekbox with XSL, Dylan Parker | Thread | Re: Adding a chekbox with XSL, Lewis |
RE: xsl structuring...., Kay Michael | Date | can't use xsl:variable or xsl:sort, Lewis |
Month |