Another newbie post

Justin Morgan <[email protected]>
Newsgroups gmane.text.xml.xslt.extensions
Message-ID <[email protected]>
I set up a test file because I want to use the math:random() function in 
an XSL document. I downloaded the math:random function package and wrote 
the XSL file below. With an XML document at hand, I ran this command 
(the Xalan processor): java org.apache.xalan.xslt.Process -in essay.xml 
-xsl test.xsl -out test.html. And I got this error:

(Location of error unknown)XSLT Error 
(javax.xml.transform.TransformerException): 
javax.xml.transform.TransformerException: Instance method call to method 
random requires an Object instance as first argument

Here's the XSL file:

<xsl:stylesheet version="1.0"
          xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
          xmlns:math="http://exslt.org/math"
          extension-element-prefixes="math">
<xsl:import href="math.random.xsl" />
<xsl:template match="/">
<html>
<head/>
<body>
<p>
<xsl:value-of select="math:random()"/>
</p>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

Can anyone please help me?

-- 
-- Corfizz, http://www.corfizz.com

I am not a horse.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.