Saxon upgrade to saxon PE fails in DITA OT 3.7

52 views
Skip to first unread message

rahul...@gmail.com

unread,
May 5, 2022, 10:12:48 AM5/5/22
to DITA-OT Users
Hello Team,

Saxon upgrade is failing in DITA OT 3.7 with the below error.
build_preprocess2.xml:96: java.lang.BootstrapMethodError: java.lang.NoClassDefFoundError:  net/sf/saxon/s9api/xmlpreProcessingError

Regards
Rahul

Radu Coravu

unread,
May 6, 2022, 12:21:54 AM5/6/22
to rahul...@gmail.com, DITA-OT Users
Hi,

DITA OT 3.7 comes bundled with the Saxon 10.6 XSLT processor.
Did you attempt to change the Saxon libraries bundled with the DITA OT? The DITA OT code uses certain specific APIs from the Saxon 10.6 version so changing the Saxon libraries to some other ones will probably break the publishing engine's functionality.

Regards,
Radu

--
You received this message because you are subscribed to the Google Groups "DITA-OT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dita-ot-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/dita-ot-users/c4f86720-ac20-48cc-ae22-e0e3a0369621n%40googlegroups.com.

rahul...@gmail.com

unread,
May 10, 2022, 12:16:29 AM5/10/22
to DITA-OT Users
Hi Radu,

Yes, I have replaced Saxon 10 with saxon PE. What is the best way to implement the Saxon license versions in DITA OT. I am using java extensions in my plugin to access some metadata from server.

Regards
Rahul

Radu Coravu

unread,
May 10, 2022, 12:56:02 AM5/10/22
to rahul...@gmail.com, DITA-OT Users
Hi Rahul,

The DITA OT's own code uses new Saxon API and you simply cannot replace the Saxon libraries with older versions of themselves and expect for the publishing engine to work anymore.
With the new Saxon libraries, in order to call custom Java methods from the XSLT code you will need to create Saxon extension function definitions in your Java code.
As an example:


My plugin.xml contributes an extra JAR library. The JAR library contains inside a Saxon extension function class:

The "latexToSVG.jar" library also contains inside a META-INF/services folder with a file defining that class as a Saxon extension.
You can look inside the XSLTs to see how the class is further called.

Regards,
Radu

Reply all
Reply to author
Forward
0 new messages