This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: how to output elements in random order?
- From: Massimo Santini - mailing list address <mm14ss at yahoo dot it>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Fri, 1 Feb 2002 09:55:48 +0100 (CET)
- Subject: Re: [xsl] how to output elements in random order?
- Reply-to: xsl-list at lists dot mulberrytech dot com
> What about this: compute $seed divided by the string length of the node
> and pick some of the digits in the fraction part as sort key. If some
> nodes (questions) have the same length, you can also include the position
> in your computation.
Yes, I was thinking to something like that: a xor (or similar) between the
seed and some hash of the node contents. What you suggest is much easier
and should provide enough "randomness" to create permuted multiple-choiche
tests.
Thank you,
Massimo
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list