Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


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

From: Dimitre Novatchev <dnovatchev@-----.--->
To: xsl-list@-----.------------.---
Date: 10/2/2009 4:23:00 PM
On Fri, Oct 2, 2009 at 8:36 AM, Jesper Tverskov
<jesper.tverskov@g...> 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
>
> --~------------------------------------------------------------------
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
> or e-mail: <mailto:xsl-list-unsubscribe@l...>
> --~--
>
>

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe@l...>
--~--



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent