reg. sample code for getting current date

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

reg. sample code for getting current date

n.srividya
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.


_______________________________________________
dev-tech-xslt mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xslt
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: reg. sample code for getting current date

Martin Honnen-3
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/
_______________________________________________
dev-tech-xslt mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xslt
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: reg. sample code for getting current date

Julian F. Reschke
On 30.07.2010 14:17, Martin Honnen wrote:

> 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.

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
_______________________________________________
dev-tech-xslt mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xslt
Loading...