cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Derek Hohls" <DHo...@csir.co.za>
Subject Extension functions in XSL (Saxon)
Date Fri, 19 Nov 2004 11:30:28 GMT
I am running Cocoon 2.1.5 under Windows XP, Java 1.4.2

I have the following test files:

math.xml
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <number>42</number>
</root>

math.xsl
<?xml version="1.0"?> 
<xsl:stylesheet
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:math="java:java.lang.Math"
  version="1.0">

<xsl:template match="/">
  <xsl:value-of  select="math:max(5,10)"/>
  *
  <xsl:value-of  select="math:cos(100)"/>
</xsl:template>
 
</xsl:stylesheet>  

when I run this through Saxon  on the command line,
I get :

test.xml
<?xml version="1.0" encoding="utf-8"?>10
*
0.8623188722876839

but when I try the same process under Cocoon, I get:

org.apache.cocoon.ProcessingException: Failed to execute pipeline.:
java.lang.RuntimeException: java.lang.NoSuchMethodException: For
extension function, could not find method
java.lang.Double.max([ExpressionContext,] #NUMBER).

Any ideas how to get extension functions like this to work?

Thanks
Derek

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message