xsl-list
[Top] [All Lists]

Re: [xsl] randomly selecting a node from a node set

2013-01-06 13:31:42
On Sun, Jan 06, 2013 at 01:33:15AM +0100, Imsieke, Gerrit, le-tex scripsit:
With Saxon-PE or -EE, you can use the following EXSLT functions out
of the box:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
  xmlns:xs="http://www.w3.org/2001/XMLSchema";
  xmlns:random="http://exslt.org/random";
  xmlns:math="http://exslt.org/math";
  exclude-result-prefixes="xs"
  version="2.0">
  <xsl:output method="text"/>
  <xsl:template name="main">
    math:random: <xsl:sequence select="math:random()"/>
    random:random-sequence: <xsl:sequence
select="random:random-sequence(3)"/>
  </xsl:template>
</xsl:stylesheet>

So I can!

Thank you; that will solve the problem.

-- Graydon

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