[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: Wed, 6 Oct 2010 02:25:23 -0700 (PDT)
Re:  Random number
Yes,  do anybody know how to add extension elements and extension functions to 
xmlspy. I am trying to google for it and I am not getting proper information...



----- Original Message ----
From: Michael Kay <mike@xxxxxxxxxxxx>
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Sent: Wed, October 6, 2010 4:58:35 AM
Subject: Re:  Random number

  I think you can configure XMLSpy to run Xalan, but it certainly isn't 
its default XSLT processor - the failures you are seeing, as I mentioned 
earlier, are because you are using Xalan-specific extensions with a 
different XSLT processor.

Michael Kay
Saxonica

On 06/10/2010 9:46 AM, sudheshna iyer wrote:
> Hi Mukul,
>
> Thanks for the reply. I am using xmlSpy rel 2.0. I am sure jdk version is not
> associated to the xmlspy. I am trying to figure out where I can put jdk 
version
> in the classpath of its compilation....
>
>
>
>
> ----- Original Message ----
> From: Mukul Gandhi<gandhi.mukul@xxxxxxxxx>
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Sent: Wed, October 6, 2010 12:44:15 AM
> Subject: Re:  Random number
>
> Hi Sudheshna,
>      When I run your XSLT program below, with Xalan-J 2.7.1 (using JDK
> 1.6.x), I get a valid random number generated by Xalan engine.
>
> Assuming the name of your XSLT script was test.xsl, and I run Xalan
> from command line as follows:
>
> java org.apache.xalan.xslt.Process -in test.xsl -xsl test.xsl
>
> I get the expected output (i.e a random number) from the XSLT program.
>
> Thought I do suspect that, there *might* be an issue with JRE you are
> using (may be this is an older JRE? or may a java classpath issue).
>
> It would be interesting to know also, how you're invoking Xalan? Is it
> via command line, via TrAX/JAXP etc.
>
> PS: There's also following Xalan mailing list devoted to user
> discussions about Xalan, where you might like to take-up discussions
> about Xalan:
> http://xml.apache.org/xalan-j/contact_us.html#user-mailing-list
>
> On Tue, Oct 5, 2010 at 2:21 AM, sudheshna iyer<sudheshnaiyer@xxxxxxxxx>  
wrote:
>> 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'

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.