Subject: Re: [xsl] Random number From: Michael Kay <mike@xxxxxxxxxxxx> Date: Tue, 05 Oct 2010 17:05:17 +0100 |
Team,In one of your other messages you said you were using xsltproc. But you're using an extension mechanism here that's specific to Xalan. Perhaps that's the reason.
Do you know why the following is not working?
Michael Kay Saxonica
From: sudheshna iyer<sudheshnaiyer@xxxxxxxxx> Subject: [xsl] 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'
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Random number, sudheshna iyer | Thread | Re: [xsl] Random number, Mukul Gandhi |
Re: [xsl] Create an end element - p, Wendell Piez | Date | [xsl] Efficient XSLT range lookups , Hermann Stamm-Wilbra |
Month |