|
Subject: Re: [xquery-talk] [xsl] Re: Random number generation : requirements From: "Olivier JEULIN olivier.jeulin@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Wed, 7 May 2014 17:37:04 -0000 |
HI, One use case we had during testing was to select random nodes: <xsl:variable name="num" select="test:random(count($ur)) + 1"/> <xsl:apply-templates mode="title-test" select="($ur)[position() = $num]"> If you haven't done so yet, I suggest you have a look at the way Haskell handles randomness and the different the type of data (integer, boolean, b&). - http://learnyouahaskell.com/input-and-output#randomness - https://www.fpcomplete.com/school/starting-with-haskell/libraries-and-framewo rks/randoms
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xquery-talk] [xsl] Re: Random , Dimitre Novatchev dn | Thread | Re: [xquery-talk] [xsl] Re: Random , Wolfgang Laun wolfga |
| Re: [xquery-talk] [xsl] Re: Random , Dimitre Novatchev dn | Date | Re: [xsl] Re: format-date() and neg, Liam R E Quin liam@x |
| Month |