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

RE: test equals fails

Subject: RE: test equals fails
From: "Gertjan Assies" <Gertjan.Assies@xxxxxxxxxxxxxx>
Date: Mon, 4 Nov 2002 15:29:34 +0100
xsl equals
You need to surround your strings with quotes for it to be recognized as
such

For example:
<xsl:when test="$month='JAN'">01</xsl:when>

Gertjan Assies
webdeveloper


-----Original Message-----
From: JWALLIS@xxxxxxxxxxxxxxx [mailto:JWALLIS@xxxxxxxxxxxxxxx] 
Sent: Monday, November 04, 2002 3:14 PM
To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
Subject:  test equals fails

To all,
Experiencing a problem with strings (I think).
Problem: I do not get a match on the assigned variable.

<td>
      <xsl:variable name="month">OCT</xsl:variable>
                <xsl:choose>
                        <xsl:when test="$month=JAN">01</xsl:when>
                        <xsl:when test="$month=FEB">02</xsl:when>
                        <xsl:when test="$month=MAR">03</xsl:when>
                        <xsl:when test="$month=APR">04</xsl:when>
                        <xsl:when test="$month=MAY">05</xsl:when>
                        <xsl:when test="$month=JUN">06</xsl:when>
                        <xsl:when test="$month=JUL">07</xsl:when>
                        <xsl:when test="$month=AUG">08</xsl:when>
                        <xsl:when test="$month=SEP">09</xsl:when>
                        <xsl:when test="$month=OCT">10</xsl:when>
                        <xsl:when test="$month=NOV">11</xsl:when>
                        <xsl:when test="$month=DEC">12</xsl:when>
                        <xsl:otherwise>???</xsl:otherwise>
                  </xsl:choose>

My answer is always ???. I have numerous combinations of braces without
any
luck.
Thank you in advance.



 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

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.