xsl-list
[Top] [All Lists]

EXSLT/XALAN 2.5.1 Current Date not available?

2003-08-24 15:07:14
Hi, 


I try to get the current date with exslt and
xalan-j_2_5_1. Unfortuately with the message:

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


Here are the steps I performed:

1. Create XSL below as foo.xsl

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:date="http://exslt.org/dates-and-times";
extension-element-prefixes="date">
        <xsl:template match="/">
                <html>
                        <head>
                                <title>Current Date Test</title>
                        </head>
                        <body>
                                <h1>It's now <xsl:value-of
select="date:date-time()"/>.</h1>
                        </body>
                </html>
        </xsl:template>
</xsl:stylesheet>


2. Create an XML of your own choice as foo.xml

3. Run xalan

java org.apache.xalan.xslt.Process -IN foo.xml -XSL
foo.xsl -OUT foo.html


Is that a bug or am I doing anything wrong? 

Any hints are very welcome.

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>