[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
RE: [xsl] Date Format in XSLT
Subject: RE: [xsl] Date Format in XSLT From: "Stenson, Bob" <Bob.Stenson@xxxxxxxxxxxxxxx> Date: Thu, 4 Sep 2003 08:09:35 -0500 |
Here is a piece of code that is working to do the same thing, but for a different purpose: <tr> <td>Housing Type*</td> <td colspan="3" align="center"> <xsl:choose> <xsl:when test="@HousingTypeId='4'"> <nobr>Single family house<input type="checkbox" /></nobr> <nobr>Mobile Home<input type="checkbox" /></nobr> <nobr>2 to 4 Unit<input type="checkbox" /></nobr> <nobr>Apartment (5+)<input type="checkbox" checked="checked" /></nobr> </xsl:when> <xsl:when test="@HousingTypeId='3'"> <nobr>Single family house<input type="checkbox" /></nobr> <nobr>Mobile Home<input type="checkbox" /></nobr> <nobr>2 to 4 Unit<input type="checkbox" checked="checked" /></nobr> <nobr>Apartment (5+)<input type="checkbox" /></nobr> </xsl:when> <xsl:when test="@HousingTypeId='2'"> <nobr>Single family house<input type="checkbox" /></nobr> <nobr>Mobile Home<input type="checkbox" checked="checked" /></nobr> <nobr>2 to 4 Unit<input type="checkbox" /></nobr> <nobr>Apartment (5+)<input type="checkbox" /></nobr> </xsl:when> <xsl:when test="@HousingTypeId='1'"> <nobr>Single family house<input type="checkbox" checked="checked" /></nobr> <nobr>Mobile Home<input type="checkbox" /></nobr> <nobr>2 to 4 Unit<input type="checkbox" /></nobr> <nobr>Apartment (5+)<input type="checkbox" /></nobr> </xsl:when> <xsl:otherwise> <nobr>Single family house<input type="checkbox" /></nobr> <nobr>Mobile Home<input type="checkbox" /></nobr> <nobr>2 to 4 Unit<input type="checkbox" /></nobr> <nobr>Apartment (5+)<input type="checkbox" /></nobr> </xsl:otherwise> </xsl:choose> </td> </tr> Just modify it like so: <tr> <td>Housing Type*</td> <td colspan="3" align="center"> <xsl:choose> <xsl:when test="@Month='1'"> January </xsl:when> <xsl:when test="@HousingTypeId='2'"> February </xsl:when> and so forth. Service with a smile, Bob Stenson System Development Specialist Office of Computer Services Division of Administration, State of Wisconsin 101 E. Wilson Street, 9th Floor PO Box 7864 Madison, WI 53707-7864 608-266-0178 It's amazing how opinionated we can become concerning issues about which we know little, or even nothing at all. "In theory, there isn't any difference between theory and practice. In practice, there is." Yogi Berra -----Original Message----- From: michel geadah [mailto:m_ace_g@xxxxxxxxxxx] Sent: Thursday, September 04, 2003 7:47 AM To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx Subject: [xsl] Date Format in XSLT hi, I need to transform the month to words. For example, if i have '1' i need to output 'Jan', if i have '2' i need to output 'Feb', and so on... (That is to say if i have 1-12-2003 i need it to be transformed to 1-Dec-2003) Thanks... Michel _________________________________________________________________ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail 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: [xsl] Date Format in XSLT, Jarno . Elovirta | Thread | [xsl] Transformation of HTML input , Ramesh Ankam |
RE: [xsl] Date Format in XSLT, Jarno . Elovirta | Date | Re: [xsl] Size limit for input file, Dipesh Khakhkhar |
Month |
Keywords