Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XSLT
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 20th, 2007, 07:47 PM
Registered User
 
Join Date: Oct 2007
Location: , , .
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.



Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 03:30 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.