Re: changing from xsltproc to saxon
Bob Stayton <[email protected]>
| Newsgroups | gmane.text.docbook.apps |
|---|---|
| Message-ID | <[email protected]> |
I think the first error message is the most informative. This file: /home/nml/.docbook/docbook.custom.xsl is not part of the DocBook XSL distribution, and it does not seem to be mentioned in your Makefile. Have you examined that file to see what it is? I suspect the catalog resolver is mapping the stylesheet URL to that file. Bob Stayton [email protected] On 3/28/2020 11:14 AM, Niels Müller Larsen wrote: > When producing html output from my docbook I use the following fragment of a Makefile: > > html: > rm -rf site > mkdir site > cp css/* site > cp js/* site > xmllint --noent --xinclude \ > module.xml > /tmp/docbresolved.xml \ > 2>./errloglint > xsltproc \ > --output site/ \ > docbook.xsl \ > /tmp/docbresolved.xml \ > 2>./errlogxslt && \ > tar czf site.tgz site/* > echo "site.tgz ready for deployment" > > This works, and it has worked for a long time. I write about coding, so I have some need to change to using saxon for added functionality with respect to linenumbering and code highlighting. The first step would be a 1:1 change, and I have tried: > > html: > rm -rf site > mkdir site > cp css/* site > cp js/* site > xmllint --noent --xinclude \ > module.xml > /tmp/docbresolved.xml \ > 2>./errloglint > java com.icl.saxon.StyleSheet \ > -x org.apache.xml.resolver.tools.ResolvingXMLReader \ > -y org.apache.xml.resolver.tools.ResolvingXMLReader \ > -r org.apache.xml.resolver.tools.CatalogResolver \ > -u \ > -o site/index.xhtml \ > /tmp/docbresolved.xml \ > /usr/share/xml/docbook/xsl-stylesheets-1.79.2/xhtml5/chunk.xsl \ > base.dir="site" \ > use.extensions=1 \ > 2>./errlogxslt > tar czf site.tgz site/* > echo "site.tgz ready for deployment" > > This gives me errors: > > Error at xsl:import on line 16 of file:/home/nml/.docbook/docbook.custom.xsl: > A stylesheet cannot import itself > Error at xsl:when on line 25 of file:/usr/share/xml/docbook/xsl-stylesheets-1.79.2/xhtml/chunk-common.xsl: > Variable exsl.node.set.available has not been declared > Error at xsl:if on line 26 of file:/usr/share/xml/docbook/xsl-stylesheets-1.79.2/xhtml/chunk-common.xsl: > Variable chunk.quietly has not been declared > Error at xsl:apply-templates on line 29 of file:/usr/share/xml/docbook/xsl-stylesheets-1.79.2/xhtml/chunk-common.xsl: > Variable with.namespace has not been declared > Error at xsl:when on line 31 of file:/usr/share/xml/docbook/xsl-stylesheets-1.79.2/xhtml/chunk-common.xsl: > Variable exsl.node.set.available has not been declared > Error at xsl:if on line 32 of file:/usr/share/xml/docbook/xsl-stylesheets-1.79.2/xhtml/chunk-common. > ...... > > I have tried many variations and several stylesheets, this just changes the error messages I get. > > Does anyone have an example of a workflow that works? Chunked output is a must. > >