Subject: Re: [xsl] generating unique Id and System date in XSL From: "Anil" <anilj@xxxxxxxxxxxxx> Date: Thu, 10 Jul 2003 09:54:41 -0400 |
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: [xsl] 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] generating unique Id and , Jeni Tennison | Thread | [xsl] Previous/Next element, James Cummings |
RE: [xsl] java Regex call, David . Pawson | Date | Re: [xsl] Counting elements with co, roman . musil |
Month |