[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Random number

Subject: Re: Random number
From: sudheshna iyer <sudheshnaiyer@xxxxxxxxx>
Date: Tue, 5 Oct 2010 08:19:29 -0700 (PDT)
Re:  Random number
Team,

Do you know why the following is not working?



--- On Mon, 10/4/10,
sudheshna iyer <sudheshnaiyer@xxxxxxxxx> wrote:

> From: sudheshna iyer
<sudheshnaiyer@xxxxxxxxx>
> Subject:  Random number
> To:
xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Date: Monday, October 4, 2010, 4:51 PM
> I
have the following for random
> number generator. But it is not working. 
> 
>
<?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:java="http://xml.apache.org/xalan/java">
>     <xsl:output method="xml"
> version="1.0" encoding="UTF-8" indent="yes"/>
>     <xsl:template match="/">
>     <xsl:text>aa</xsl:text>
>     <xsl:variable name="rnd">
>    
<xsl:value-of
> select="java:java.lang.Math.random()"
xmlns:java="http://xml.apache.org/xalan/java"/>
>     </xsl:variable>
>    
<xsl:value-of select="$rnd"/>
>     </xsl:template>
> </xsl:stylesheet>
> 
> I
am receiving the following error message: 
> Error in XPath expression
>
Unknown function - Name and number of arguments do not
> match any function
signature in the static context -
'http://xml.apache.org/xalan/java:java.lang.Math.random'
> 
> 
> 
>       
>
> --~------------------------------------------------------------------
>
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@xxxxxxxxxxxxxxxxxxxxxx>
> --~--

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.