[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: generating unique Id and System date in XSL

Subject: Re: generating unique Id and System date in XSL
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Thu, 10 Jul 2003 09:42:18 +0100
generating unique id
Hi Anil,

> I need to generate a unique id(based on date preferably..is there a
> better way to generate the unique id?) in XSL to show in a HTML
> form, also i need to show the date in another column in some
> format....any inputs/ideas abt how i can do this?

There's no way of getting hold of the current date from within basic
XSLT 1.0, unless you count passing it in as a parameter. Some
processors have extension functions that allow you to access the
current date, such as date:dateTime() from EXSLT; you should check
your processor's documentation to see if it has such.

But as far as generating a unique ID goes, you should use the
generate-id() function. It takes a node as an argument and generates a
unique identifier for that node, so as long as you call it with
different nodes each time, you'll get a different unique ID each time.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.