0

i use Xalan as XLST-Processor inside the application server wildfly. Everything works fine so far, but when I try to use date and time functions from exlst, i got NoClassDefFoundError and I don't know why.

The definition is:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:datetime="http://exslt.org/dates-and-times" version="1.0"">

When I try to use the year-function datetime:year i got the error. Any Ideas why the class can not be found? Thank you!

Markus
  • 1,141
  • 1
  • 9
  • 25
  • I can use e.g. `` fine with the Xalan version in oXygen 19, gives ``. No idea what wildfly uses and how it configures Xalan, what do you get for `system-property('xsl:vendor')` in your app? Do you get the same error for any EXSLT function use?? – Martin Honnen Dec 04 '17 at 10:20
  • Thanks for your answer. I can use exlst:common without any problem. I will try which value the variable xsl:vendor have and wirte it down here soon. – Markus Dec 04 '17 at 11:02
  • I still got NoClassDefFoundError. The first part gives me : – Markus Dec 04 '17 at 15:12
  • 1
    Xalan has two XSLT processors, an interpreter and a compiler, perhaps the compiler XSLTC does not have such a broad EXSLT support so if you use a local installation of Xalan you can always instantiate the interpreter by using `TransformerFactory tf = new org.apache.xalan.processor.TransformerFactoryImpl();`. – Martin Honnen Dec 04 '17 at 20:53
  • Thanks a lot! Then i have to include org.apache.xalan and the corresponding serializer, but i can use the date functions! Some other things in my xsl doesn't work anymore but i think i perhaps can rewrite it. it was really a problem of the comiler. Thanks a lot again. Would not be able to solve this problem without your help. – Markus Dec 05 '17 at 10:27

1 Answers1

0
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date="http://exslt.org/dates-and-times"">

In the docs here they, are always using "date" and not "datetime"

MoshiMoshi
  • 81
  • 6