[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: "Anil" <anilj@xxxxxxxxxxxxx>
Date: Thu, 10 Jul 2003 09:54:41 -0400
generating unique id
thnx Jeni for ur reply, how about calling the System.currentTimeMillis()
method in java, can i make that call from XSLT? Also, will generate-id
method give me a unique id everytime? i read somewhere it dosent. I need to
generate this id for a form.  So every time a new form is generated a new ID
should be generated.

thnx again!
Anil
----- Original Message -----
From: "Jeni Tennison" <jeni@xxxxxxxxxxxxxxxx>
To: "Anil" <anilj@xxxxxxxxxxxxx>
Cc: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Thursday, July 10, 2003 4:42 AM
Subject: 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



 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.