W3C home > Mailing lists > Public > public-qt-comments@w3.org > January 2008

[Bug 4844] [FO] random() function

From: <bugzilla@wiggum.w3.org>
Date: Fri, 18 Jan 2008 20:59:37 +0000
To: public-qt-comments@w3.org
Message-Id: <E1JFyJN-0002n5-Cp@wiggum.w3.org>


------- Comment #3 from mike@saxonica.com  2008-01-18 20:59 -------
It's worth noting that EXSLT provides a random-sequence() function:


This returns a sequence (of specified length) containing random numbers between
zero and 1.

This serves a number of use cases that XSLT users have found useful, for
example generating test data. It's probably more general that the requested
function to produce a random permutation of a given input sequence; in fact it
could be used to underpin the requested function by writing

let $random := random:random-sequence(count($input))
for $item at $p in $inputSequence
order by $random[$p]
return $item
Received on Friday, 18 January 2008 20:59:45 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:35 UTC