xsl 中的 Java 方法不可用
我在XSL中使用了一些Java方法,如下所示:
<xsl:variable name="inSDF" select="SimpleDateFormat:new($datePattern)"/>
当我使用Xalan处理器从Eclipse执行XSL时,则可以。但是,当我在具有相同Xalan版本的软件中执行服务器时,我会收到以下错误:
xalanxpathexception:功能编号 'java.text.simpledateformat:new'不可用
为什么会发生此错误?我应该在服务器上检查什么?
谢谢。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Xalanxpathexception看起来像Xalan-C例外,而不是Xalan-J例外。您的服务器正在运行Xalan-C吗?您的代码看起来像是试图调用Java构造函数,但是在XalanC中无法使用。
如果您试图在Xalan-C上运行的XSLT 1.0中格式化日期,则该文档表示它支持EXSLT库。
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.