This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: xsl:choose / xsl:when problems
- To: xsl-list at lists dot mulberrytech dot com
- Subject: RE: [xsl] xsl:choose / xsl:when problems
- From: "Clapham, Paul" <pclapham at core-mark dot com>
- Date: Wed, 21 Feb 2001 10:27:36 -0800
- Reply-To: xsl-list at lists dot mulberrytech dot com
Try this:
<xsl:when test="substring(@DateReceived,6,2) = '01'">January</xsl:when>
instead of what you had:
<xsl:when test="substring(@DateReceived,6,2) = '01'"/>January</xsl:when>
You have an empty xsl:when element, followed by a text element, followed by
</xsl:when>.
PC2
-----Original Message-----
From: Wayne Davis [mailto:quietman@home.com]
Sent: February 21, 2001 10:03
To: xsl-list@lists.mulberrytech.com
Subject: [xsl] xsl:choose / xsl:when problems
Hi...
I'm trying to come up with a solution (this hack is the best I seem capable
of at the moment) to converting
a date in the following format "YYYY-MM-DDTHH:NN:SS" to MMM dd, yyyy".
<TD>
<xsl:choose>
<xsl:when test="substring(@DateReceived,6,2) = '01'"/>January</xsl:when>
<xsl:when test="substring(@DateReceived,6,2) =
'02'"/>February</xsl:when>
</etc>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list