[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: generating unique random numbers
As an alternative to the already proposed solutions, consider looking up
the pseudo-random method to create GUIDs in XSLT, which I cooked up a
few years ago: http://markmail.org/message/4zxb654yeaf5twnv
It is random enough between runs (and sequential, yet non-repeating, in one run), but maybe not random enough for you. You can elaborate on the code, of course. But Dimitre's XSLT-only approach to pseudo-random numbers in FXSL, combined with distinct-values() will probably be a better course of action. Kind regards, Abel Braaksma Wolfgang Laun wrote: What you describe is not a sequence of random numbers; a rule such as "no duplicates" contradicts most definitions of "randomness". What you request is better described as "a random permutation of numbers". This could be produced by random draws from a set of numbers (without returning) provided that you can, somehow, define this set. Can you?
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|