Re: Random Number Generator

That said, if you have a paid version of Saxon 9.2 available, you
should be able to point Calabash to it using the classpath and access
the java: bindings as before. (I haven't tried this myself.)

-James

On Mon, Nov 29, 2010 at 2:20 PM, David Lee <dlee@calldei.com> wrote:
> Saxon HE 9.2 no longer exposes the java:  bindings.
> Calabash is using Saxon HE 9.2
>
>
> ----------------------------------------
> David A. Lee
> dlee@calldei.com
> http://www.xmlsh.org
>
> -----Original Message-----
> From: xproc-dev-request@w3.org [mailto:xproc-dev-request@w3.org] On Behalf
> Of Betty Harvey
> Sent: Monday, November 29, 2010 3:38 PM
> To: XProc Dev
> Subject: Random Number Generator
>
>
> 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"
>                xmlns:math="java:java.lang.Math"/>
>  </xsl:variable>
>
> 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() *
> 1000}:
>    Cannot find a matching 0-argument function named
> {java:java.lang.Math}random()
>
> Are there any tricks of the trade in XProc to get a random number generator
> working in XSLT.
>
> TIA!
>
> Betty
>
> /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
> 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 20:51:43 UTC