Hi Marco,
[1] let $index := 1 + random:integer(count($domain))
[2] $domain[1 + random:integer(count($domain))]
please note that in [1] only one random integer is computed, wheras a new random value is computed in [2] for each evaluation of the predicate.
Cheers Christian