Re: reg. sample code for getting current date

Martin Honnen <[email protected]> Fri, 30 Jul 2010 14:17:57 +0200
Newsgroups gmane.comp.mozilla.devel.layout.xslt
Organization Liberty Development
Message-ID <[email protected]>
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/