'Java methods in xsl not available
I'm using some Java methods in xsl like below :
<xsl:variable name="inSDF" select="SimpleDateFormat:new($datePattern)"/>
When i'm executing xsl from Eclipse with Xalan processor, its ok. But when I'm executing on server within a software with the same Xalan version, I get the following error :
XalanXPathException: The function number 'java.text.SimpleDateFormat:new' is not available
Why does this error occur ? What should I check on the server ?
Thank you.
Solution 1:[1]
The XalanXPathException looks like a Xalan-C exception, not a Xalan-J exception. Is your server is running Xalan-C? Your code looks like it trying to call a Java constructor, but that won't be available in Xalan C.
If you're trying to format a date in XSLT 1.0 running on Xalan-C, the documentation indicates it supports the EXSLT library.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | user9712582 |