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

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.