This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: xsl:choose / xsl:when problems


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]