Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 20th, 2007, 07:47 PM
Registered User
 
Join Date: Oct 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Show CURRENT DATE when transforming XML using XSLT

I have searched the internet for a very long time and I know you cannot get the current date in XSLT 1.0 but you can in XSLT 2.0. I found forums posting the function below:

<xsl:value-of select="current_date()"/>

But I get errors. Can someone tell me how to use the functions in XSLT 2.0? Am I missing something some declarations at the top of the XSL stylesheet? If you can post some sample code it will be very helpful since I cannot find any. What I want to do is get the current date and save it into a variable so that I can use it later in the transformation by comparing with dates in the XML. Someone suggested using javascript to retrieve the current date but how do I it.

Many thanks in advance.








Similar Threads
Thread Thread Starter Forum Replies Last Post
problem transforming XML using xslt micky3248 XSLT 7 August 18th, 2006 03:52 AM
Transforming XML data in an ASP file using XSLT hussainm Classic ASP XML 0 May 31st, 2006 03:21 PM
Please help, xml transforming using xslt !!! daula7 XSLT 0 May 11th, 2006 01:29 PM
current date in XSLT 1.0 pendyalap XSLT 1 April 18th, 2006 06:13 PM
Getting the Current Date in XSLT kwilliams XSLT 2 November 30th, 2005 03:23 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.