exslt-math:random

Returns a random number from 0 to 1.

random() ➔ xs:number

There are no arguments

Result

xs:number

Namespace

http://exslt.org/math

Links to specifications

EXSLT Math Module

Saxon availability

Requires Saxon-PE or Saxon-EE. Available for Java and C/C++ only (not .NET).

Notes on the Saxon implementation

The function is implemented, but it doesn't work well: since it is not a pure function, Saxon sometimes optimizes it so that successive calls all return the same value. The random:random-sequence() function is preferable.