Check to see if your processor suppords the EXSLT random() function.
If not, you could try and call a random number generator as an extension function, or you could pass in a sequence of random numbers as a parameter.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference