Re: [xsl] RandomList.xsl from FXSL-xslt2

Subject: Re: [xsl] RandomList.xsl from FXSL-xslt2
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Fri, 2 Oct 2009 09:22:37 -0700
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