[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
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|