cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Gow <c...@digitalfairway.net>
Subject Calling Java methods in XSL
Date Mon, 02 Oct 2000 16:35:06 GMT
Hi:

How do I call a Java method inside an XSL file?  I tried following the
examples in the 'XSLT Programmer's Reference' by Wrox press, but they
keep giving me Class Not Found errors.

Here's a partial stack trace

java.lang.NoClassDefFoundError: com/ibm/bsf/BSFException
                              at
org.apache.xalan.xpath.xml.XMLParserLiaisonDefault.extFunction(XMLParserLiaisonDefault.java:1828)

                              at
org.apache.xalan.xpath.XPath.extfunction(XPath.java:1015)

This is the XSL stylesheet I am using:

<xsl:stylesheet
        version="1.0"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:date="http://xsl.lotus.com/java">

<xsl:template match="/">
   <html xsl:exclude-result-prefixes="date">
   <body>
      <p><xsl:value-of
select="date:to-string(date:java.util.Date.new())"/></p>
   </body>
   </html>
</xsl:template>

</xsl:stylesheet>


I am assuming that the namespace has changed since the book has been
released, if so, what is the correct way to call a Java method inside
XSL.

Thanks

Chris Gow


Mime
View raw message