xsl 中的 Java 方法不可用

发布于 2025-01-19 14:07:26 字数 348 浏览 3 评论 0原文

我在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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

稳稳的幸福 2025-01-26 14:07:26

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文