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

Re: RandomList.xsl from FXSL-xslt2

Subject: Re: RandomList.xsl from FXSL-xslt2
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Fri, 2 Oct 2009 09:22:37 -0700
Re:  RandomList.xsl from FXSL-xslt2
On Fri, Oct 2, 2009 at 8:36 AM, Jesper Tverskov
<jesper.tverskov@xxxxxxxxx> wrote:
> When I do this:
>
> <xsl:value-of select="format-time(current-time(), '[f][s]')" />
>
> 20.000 times in one transformation, it takes around 120 seconds on my
> computer, but all the "seeds" are the same!
>
> There are probably a good explanation...

Probably my answer was not clear enough:  you only use current-time()
once as a seed to generate a sequence of N (N = 100 in my answer)
random seeds. Then use each of these in order as a seed for the (next)
shuffle.



--
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
Never fight an inanimate object
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play
-------------------------------------
I enjoy the massacre of ads. This sentence will slaughter ads without
a messy bloodbath.





>
> Is there any way a can produce seeds on the run fast enough, or do I
> really have to take a day of making a long list of seeds I can pick
> from randomly (!) in order to feed the process?
>
> Cheers,
> Jesper

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-2011 All Rights Reserved.