xsl-list
[Top] [All Lists]

Re: [xsl] Random number seed generation

2010-12-10 15:01:47
2010/12/10 Michel Hendriksen <michel(_dot_)hendriksen(_at_)kensas(_dot_)nl>:
Or:

 <with-param name="preliminary-seed"
 select="($preliminary-seed +
             10*string-length(
               substring-before($name-chars,substring($string,1,1))
             )
           ) mod $maximum-value"/>


No, this still creates the same value for ids that consist of the same
but differently ordered characters.  What you do is multiplying every
summand by 10.  This is the same as multiplying the whole sum by 10.

--~------------------------------------------------------------------
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>
--~--

<Prev in Thread] Current Thread [Next in Thread>