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 July 26th, 2007, 01:19 AM
Authorized User
 
Join Date: Apr 2007
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default date functions in xslt1.0

How do i get current date and time in xslt1.0

Thanks in advance
Pradeep

 
Old July 26th, 2007, 02:24 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

You can't. You can either pass it in as a global parameter or call out to an external library. For example using MSXML you can use JavaScript from within the XSLT, if using .NET's built-in transformer then you can use any .NET library.

--

Joe (Microsoft MVP - XML)
 
Old July 26th, 2007, 03:27 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

You call an extension function, or you pass the values into your stylesheet as a parameter, or you move to XSLT 2.0.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
 
Old July 26th, 2007, 03:56 AM
Authorized User
 
Join Date: Apr 2007
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

can you give me one example with extension function,
i have not use them till now.
it will be help full for me to solve the problem

 
Old July 26th, 2007, 04:28 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

The way to use extension functions depends very much on your XSLT processor and the language you want to write them in. However, you should be able to find examples in the documentation for your chosen processor, or in any good XSLT textbook.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
Date functions Gandalf_the_Grey Classic ASP Basics 2 December 20th, 2006 02:39 AM
SQL date functions frankb522 Other Programming Languages 2 June 24th, 2006 09:04 AM
A problem with predicate in XSLT1.0:( sureshk XSLT 1 March 8th, 2006 01:13 PM
DATE FUNCTIONS DARSIN General .NET 1 January 14th, 2005 09:11 AM
Date functions and statements Thomas82 Classic ASP Professional 3 June 29th, 2004 10:09 AM





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