I have checked from the production server,
No error, no warning message.. i am not sure whether ICU support is
enabled or not.. in my xslt processor.
Xalan-C_1_8_0-windows_2000-msvc_60 /xerces-c_2_5_0-windows_nt-msvc_60
XSL
<xsl:variable name="currentDate" select="date:date-time()"/>
<xsl:variable name="currentDateFormat">
<xsl:call-template name="date:format-date">
<xsl:with-param name="date-time" select="$currentDate"/>
<xsl:with-param name="pattern" select="'MMM dd,yyyy'"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="resultTest">
<xsl:call-template name="date:format-date">
<xsl:with-param name="date-time" select="2008-08-02"/>
<xsl:with-param name="pattern" select="'MMM dd,yyyy'"/>
</xsl:call-template>
</xsl:variable>
Date with user input format:<xsl:value-of select="$resultTest"/>
CurrentDate with format:<xsl:value-of select="$currentDateFormat"/>
Output:
Date with user input format:Jan 01,1998 <Output is not correct>
CurrentDate with format: <No output>
Any other alternative solution available, such as using extension
function... example ?
-----Original Message-----
From: Sathasivam, Elayaraja Sent: Wednesday, August 06, 2008 9:57 AM
To: [email protected]
Subject: RE: Xalan-C / XSL 1.0 : Curent date
Any XSL example without using ICU ?
_________________________________________________________________
-----Original Message-----
From: David Bertoni [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 29, 2008 7:57 PM
To: [email protected]
Subject: Re: Xalan-C / XSL 1.0 : Curent date
Sathasivam, Elayaraja wrote:
> I would like to print the current date with the format ('E yyyy MM
> dd hh:mm:ss' ) by using xsl 1.0. I am new to Xalan-C. I have worked
> only with Xalan-J.
>
> Any thing similar as below in Xalan-C ????????
No, Xalan-C has no facility for date formatting. You will need to
format the date, then pass it into the stylesheet as a parameter. Or,
you can write an extension function that you can call in your
stylesheet.
The ICU (International Components for Unicode) has support for date
formatting which is like the Java functionality you're using in Xalan-J.
Dave