This should all "work out of the box". Here is something that I use in babeldoc:
<xsl:stylesheet version="1.0" xmlns:xsl ="http://www.w3.org/1999/XSL/Transform" xmlns:java="http://xml.apache.org/xslt/java" xmlns:xalan="http://xml.apache.org/xalan" xmlns:my-ext="ext1" extension-element-prefixes="my-ext"> <xsl:output method="html"/> <xsl:param name="pipelinestage" select="pipelinestage"/> <xsl:variable name="date" select="java:java.util.Date.new()"/> <xsl:variable name="seconds" select="java:getTime($date)"/> <xsl:variable name="velocity" select="java:com.babeldoc.core.VelocityUtilityContext.new()"/> <xsl:variable name="datestr" select="java:getFormattedDate($velocity, 'd MMM yyyy HH:mm:ss', $seconds)"/> .... You can then access the variables using: <xsl:value-of select="$seconds"/> Another way to do it is to buy the O'Reilly XSLT Cookbook which has lots of very smart and complex tricks for XSLT. I highly recommend this book. Bruce. -----Original Message----- From: Oleg Dulin [mailto:[EMAIL PROTECTED] Sent: Thursday, October 23, 2003 10:32 AM To: [EMAIL PROTECTED] Subject: Xalan Extension functions not working in Cocoon This was probably discussed before, but I can't find a solution. I am trying to use extension functions in XSLT as described at http://xml.apache.org/xalan-j/extensions.html and I keep getting: Description: org.apache.cocoon.ProcessingException: Failed to execute pipeline.: java.lang.RuntimeException: java.lang.NoSuchMethodException: For extension function, could not find method java.lang.String.getdate([ExpressionContext,] ). Any ideas ? I am desperate! I need decent string manipulation in XSLT Regards, Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
