W3C home > Mailing lists > Public > xproc-dev@w3.org > November 2010

Random Number Generator

From: Betty Harvey <harvey@eccnet.com>
Date: Mon, 29 Nov 2010 15:38:02 -0500 (EST)
Message-ID: <1331.>
To: "XProc Dev" <xproc-dev@w3.org>
I have included the following variable in my XSLT for generating a
random number:

  <xsl:variable name="seed">
            <xsl:value-of select="math:random() * 1000"

This is working well in the XSLT and Saxon 9.  However, when I call the
XSLT from Calabash I get the following error:

Description: XPath syntax error at char 14 on line 89 in {math:random() *
    Cannot find a matching 0-argument function named

Are there any tricks of the trade in XProc to get a random number generator
working in XSLT.



Betty Harvey                         | Phone:  410-787-9200  FAX: 9830
Electronic Commerce Connection, Inc. |
harvey@eccnet.com                    | Washington,DC XML Users Grp
URL:  http://www.eccnet.com          | http://www.eccnet.com/xmlug
Member of XML Guild (www.xmlguild.org)
Received on Monday, 29 November 2010 19:42:14 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:03:07 UTC