With Cocoon 2.0.2, I did this:

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                              xmlns:dt="java.util.Date"
                                  extension-element-prefixes="dt" >

And used this :

<xsl:value-of select="dt:new()" />


Graeme

-----Original Message-----
From: Malay Das [mailto:[EMAIL PROTECTED]]
Sent: 20 March 2002 19:46
To: [EMAIL PROTECTED]
Subject: Extension functions


Hi,

I am trying out the extension function to print out the current date - with
these.

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                xmlns:xlink="http://www.w3.org/1999/xlink";
                xmlns="http://www.brandsoft.com";
                xmlns:Date="java:java.util.Date"
                version="1.1">
<xsl:script language="java" implements-prefix="Date"
src="java:java.util.Date"/>
..
..

Today's Date :: <xsl:value-of select="Date:toString(Date:new())"/></td>

I am getting this error in component log -

javax.xml.transform.TransformerException:
javax.xml.transform.TransformerException: Instance method call to method new
requires an Object instance as first argument

is not new a special function interpreted as constructor..... whats wrong..

-md


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to