Background
Looking to generate an EPUB using Saxon 9 instead of xsltproc
with Java 1.7. The setup looks as follows:
- DocBook XSL is installed into
$HOME/docbook-xsl-1.78.1/
. - The saxon9he.jar archive is in the current working directory.
- The file
_ant4dbk_book.xml.jdom
contains a valid DocBook file.
The EPUB contents can be created using the following command:
xsltproc --output ./epub/ $HOME/docbook-xsl-1.78.1/epub3/chunk.xsl \
_ant4dbk_book.xml.jdom
Problem
The following command fails:
java -jar saxon9he.jar -xsl:$HOME/docbook-xsl-1.78.1/epub3/chunk.xsl \
_ant4dbk_book.xml.jdom
Error Message
Running Saxon fails with the following message:
Warning: at xsl:stylesheet on line 7 column 17 of chunk.xsl:
Running an XSLT 1 stylesheet with an XSLT 2 processor
Don't know how to chunk with Saxonica
Error at xsl:message on line 54 of chunker.xsl:
XTMM9000: Processing terminated by xsl:message at line 54 in chunker.xsl
at xsl:call-template name="make-relative-filename" (file:/home/username/docbook-xsl-1.78.1/xhtml/chunk-common.xsl#341)
at xsl:call-template name="make.lots" (file:/home/username/docbook-xsl-1.78.1/xhtml/division.xsl#84)
at xsl:call-template name="process-chunk-element" (file:/home/username/docbook-xsl-1.78.1/xhtml/chunk-code.xsl#522)
at xsl:apply-templates (file:/home/username/docbook-xsl-1.78.1/epub3/epub3-chunk-mods.xsl#32)
processing /book
in built-in template rule
at xsl:apply-templates (file:/home/username/docbook-xsl-1.78.1/xhtml/chunk-code.xsl#493)
processing /
Processing terminated by xsl:message at line 54 in chunker.xsl
Since xsltproc
is an XSLT 1.0 processor, I was under the impression Saxon 9 would work, as the documentation states:
However, even if your stylesheets only require XSLT 1.0, it is probably better to run them under Saxon 9.x
Question
Is it possible to use Saxon 9 to generate an EPUB file set using DocBook XSL 1.78.1, and if so, how?