Trying to run xalan to do docbook stylesheets, get the following:

(Location of error unknown)XSLT Error (java.lang.NoClassDefFoundError): org/apache/xml/serializer/SerializerTrace

Here is the shell script, Lx.sh

!/bin/sh

export X=/home/leffstudent/docbook-xsl-1.79.1/tools/lib/


export CLASSPATH=$X/xmlresolver.jar:$X/xalan.jar:$X/xercesImpl.jar:$X/xml-apis.jar:/home/leffstudent/docbook-xsl-1.79.1/extensions/xalan27.jar:/home/leffstudent/xsl2/xsl/tools/lib/xalan/serializer.jar
java -Djava.endorsed.dirs=$X org.apache.xalan.xslt.Process -out $1.fo -in $1 -xsl stO.xsl -param use.extensions 1 -param default.table.width auto -param title.margin.left 0pc param insert.xref.page.number yes -param xref.with.number.and.title 0

When I run the script, I get the following error messages

Lx.sh test1.xml

Invalid option: param

Invalid option: insert.xref.page.number

Invalid option: yes



(Location of error unknown)XSLT Error (java.lang.NoClassDefFoundError): org/apache/xml/serializer/SerializerTrace

Exception in thread "main" java.lang.RuntimeException: org/apache/xml/serializer/SerializerTrace

    at org.apache.xalan.xslt.Process.doExit(Process.java:1155)

    at org.apache.xalan.xslt.Process.main(Process.java:1128)

I followed the instructions on page 25 to 26 of the wonderful book: DocBook XSL: The Complete Guide: Second Edition: Sagehill Enterprises

On page 22, that listed three needed jar files: xalan.jar, xml-apis.jar, xercesImpl.jar When that did not work and I got the above error message, I added serializer.jar That did not help.

Note: I originally used saxon to do the conversion of docbook xml to XSL-FO. Someone suggested I try one of the other processors. That is question number 55908387 Thus, I tried Xalan and have the above problem.

0

There are 0 best solutions below