Thanks for the hint Michael.
I now do this for the first seed:
xs:integer(format-time(current-time(), '[s][f]'))
The sequence of positions returned is then kept in a variable x like this:
<xsl:variable name="x">
<xsl:call-template name="randomizeList">
<xsl:with-param name="pList" select="(1 to count(/items/item))[. != $num]"/>
<xsl:with-param name="pSeed" select="$pSeed" as="xs:integer"/>
</xsl:call-template>
</xsl:variable>
The second seed is then generated like this:
xs:integer(substring(string-join($x/el[position() < 6], ''), 1, 4))
Etc, and again for the third seed, etc, and it looks like it works well.
I'm now more confident that the pseudo-randomization is random!
Cheers,
Jesper
http://www.xmlplease.com
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--