Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

reg. sample code for getting current date

102 views
Skip to first unread message

srividhya

unread,
Jul 30, 2010, 5:35:49 AM7/30/10
to dev-te...@lists.mozilla.org
hi,
am working in xml technologies like xml, xslt, etc...
I have one doubt . Is it possible to get current date in xslt?
If possible means send some code...because i have tried many ways for this but i cant get a output....

With thanks and Regards,
N.Srividhya(J.R.F)
O.T.C,
Chennai.


Martin Honnen

unread,
Jul 30, 2010, 8:17:57 AM7/30/10
to
srividhya wrote:

> am working in xml technologies like xml, xslt, etc...
> I have one doubt . Is it possible to get current date in xslt?
> If possible means send some code...because i have tried many ways for this but i cant get a output....

This newsgroup is dedicated to Mozilla's XSLT implementation which is an
XSLT 1.0 implementation. With XSLT 1.0 all you can do is pass in a
parameter with the date.

Since 2007 however there is XSLT 2.0 and with XSLT 2.0 you make use of
XPath 2.0's current-date function
http://www.w3.org/TR/xpath-functions/#func-current-date
XSLT 2.0 is implemented by Saxon 9 from http://saxon.sourceforge.net/
and by AltovaXML Tools http://www.altova.com/altovaxml.html and by
Gestalt http://gestalt.sourceforge.net/ and by IBM I think as an add on
to websphere.

--

Martin Honnen
http://msmvps.com/blogs/martin_honnen/

Julian F. Reschke

unread,
Aug 25, 2010, 10:27:34 AM8/25/10
to Martin...@gmx.de, Martin Honnen

For XSLT 1.0, an alternative is to use
<http://exslt.org/date/index.html>, which is implemented in quite a few
XSLT 1.0 engines (unfortunately none of the ones in browsers).

Best regards, Julian

0 new messages