[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] EXSLT/XALAN 2.5.1 Current Date not available?


Subject: Re: [xsl] EXSLT/XALAN 2.5.1 Current Date not available?
From: Mukul Gandhi <mukulw3@xxxxxxxxx>
Date: Sun, 24 Aug 2003 23:58:09 -0700 (PDT)

I tried the same XSL with xalan-j_2_5_1 and got the
result fine. I guess, the problem might be with the
JDK version you are using. JDK 1.4.x includes Xalan
built in, but that is an older version and might not
be supporting EXSL fully or partially. I ran the
example with JDK 1.3.1_07 and it executed all right.

To run latest Xalan version with JDK 1.4.x, you need
to follow the Endorsed standard override mechanism.
The details are at -- 
http://java.sun.com/j2se/1.4.1/docs/guide/standards/

Regards,
Mukul

--- Bita Jooon <bjooooooo2n@xxxxxxxxx> wrote:
> 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
> 


__________________________________
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



Current Thread
Keywords