0

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.

1
  • 1
    Perhaps a configuration/installation issue? Does xalan.apache.org/xalan-j/faq.html#faq-30 apply? Or is there some security setting enabled on the server that blocks Java reflexion? Commented Apr 24, 2022 at 13:17

1 Answer 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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.