testing strings

Subject: testing strings
From: Bill Abbas <babbas@xxxxxxxxxx>
Date: Tue, 16 Nov 1999 14:08:07 -0800
Hi, 

Pretty basic question about how to handle strings.  If I have an element in
XML like so

         	<Whatever>
                <Choice>
                    true
                </Choice>
	</Whatever>
            
And I want to output one of two values, depending on whether the Choice
element is true or false.  

The following transform doesn't seem to do the trick.

	<xsl:template match="Whatever">
	        <xsl:choose>
            	    <xsl:when test="{Choice}='true')">
	                        Choice is true
            	    </xsl:when>
	                <xsl:otherwise>
            	            Choice is false
	                </xsl:otherwise>
	        </xsl:choose>
	</xsl:template>

What is the proper syntax for a test to compare strings?  Thanks.

-Bill


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread