|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] testing strings
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








