1. Главная
  2. Функции XPath
  3. random:random-sequence()

random:random-sequence XPath

The random:random-sequence function returns a sequence of random numbers between 0 and 1.



number+ random:random-sequence(number?, number?)

Описание и примеры

function usage

  <xsl:call-template name="random:random-sequence">
     <xsl:with-param name="numberOfItems" select="number" />
     <xsl:with-param name="seed" select="number" />

You may supply the function with an arguement that defines the number of random numbers to generate, with the default value of 1. A seed number maybe provided to the function, with a default value directly related to the current time.