Page 1 of 1

Conversion from docbook to PDF or HTML

Posted: Fri May 13, 2011 4:25 pm
by couet
Hi,

I have a docbook book manual (600 pages) which I can convert to HTML or PDF using Oxygen. The <book> consist of a a collection of include as follow:

Code: Select all


<?xml version="1.0" encoding="UTF-8"?>
<book xmlns="http://docbook.org/ns/docbook"
xmlns:xi="http://www.w3.org/2001/XInclude" version="5.0">

<info>
<title>ROOT User's Guide</title>
<productname>ROOT, An Object Oriented Data Analysis Framework</productname>
<author><orgname>The ROOT team</orgname></author>
<editor><orgname>The ROOT team</orgname></editor>
<date>June 2011</date>
</info>

<xi:include href="Preface.xml"/>
<xi:include href="Introduction.xml"/>
<xi:include href="GettingStarted.xml"/>
<xi:include href="Histograms.xml"/>
<xi:include href="Graphs.xml"/>
<xi:include href="FittingHistograms.xml"/>
<xi:include href="ALittleC++.xml"/>
<xi:include href="CINT.xml"/>
<xi:include href="ObjectOwnership.xml"/>
<xi:include href="Graphics.xml"/>
<xi:include href="FoldersTasks.xml"/>
<xi:include href="InputOutput.xml"/>
<xi:include href="Trees.xml"/>
<xi:include href="MathLibraries.xml"/>
<xi:include href="LinearAlgebra.xml"/>
<xi:include href="AddingaClass.xml"/>
<xi:include href="CollectionClasses.xml"/>
<xi:include href="PhysicsVectors.xml"/>
<xi:include href="Geometry.xml"/>
<xi:include href="PythonRuby.xml"/>
<xi:include href="TutorialsandTests.xml"/>
<xi:include href="ExampleAnalysis.xml"/>
<xi:include href="Networking.xml"/>
<xi:include href="Threads.xml"/>
<xi:include href="PROOF.xml"/>
<xi:include href="WritingGUI.xml"/>
<xi:include href="ROOTandQt.xml"/>
<xi:include href="HTMLDoc.xml"/>
<xi:include href="InstallandBuild.xml"/>

<index/>
</book>
Now I would like to convert this file using a script file which I could run on the command line. I tried:

Code: Select all


set -x
xsltproc \
--html \
--output ROOTUsersGuide.html \
/Users/couet/Desktop/oxygen/frameworks/docbook/xsl/html/docbook.xsl \
ROOTUsersGuide.xml
or

Code: Select all


set -x
java -jar \
/Users/couet/Desktop/oxygen/lib/saxon.jar \
ROOTUsersGuide.xml \
/Users/couet/Desktop/oxygen/frameworks/docbook/xsl/html/docbook.xsl
But none of them work.
As Oxygen is able to do the conversion nicely I was wondering is there is a way to see what Oxygen is actually doing to perform the conversion ?

Thanks for any help
Olivier

Re: Conversion from docbook to PDF or HTML

Posted: Mon May 16, 2011 10:54 am
by couet
To complete my post, with xsltproc I get:
+ xsltproc --output ROOTUsersGuide.fo /Users/couet/Desktop/oxygen/frameworks/docbook/xsl/html/docbook.xsl ROOTUsersGuide.xml
Element include in namespace 'http://www.w3.org/2001/XInclude' encountered in book, but no template matches.
Element include in namespace 'http://www.w3.org/2001/XInclude' encountered in book, but no template matches.
Element include in namespace 'http://www.w3.org/2001/XInclude' encountered in book, but no template matches.
Element include in namespace 'http://www.w3.org/2001/XInclude' encountered in book, but no template matches.
Element include in namespace 'http://www.w3.org/2001/XInclude' encountered in book, but no template matches.
Element include in namespace 'http://www.w3.org/2001/XInclude' encountered in book, but no template matches.
Element include in namespace 'http://www.w3.org/2001/XInclude' encountered in book, but no template matches.
Element include in namespace 'http://www.w3.org/2001/XInclude' encountered in book, but no template matches.
Element include in namespace 'http://www.w3.org/2001/XInclude' encountered in book, but no template matches.
Element include in namespace 'http://www.w3.org/2001/XInclude' encountered in book, but no template matches.
Element include in namespace 'http://www.w3.org/2001/XInclude' encountered in book, but no template matches.
Element include in namespace 'http://www.w3.org/2001/XInclude' encountered in book, but no template matches.
Element include in namespace 'http://www.w3.org/2001/XInclude' encountered in book, but no template matches.
Element include in namespace 'http://www.w3.org/2001/XInclude' encountered in book, but no template matches.
Element include in namespace 'http://www.w3.org/2001/XInclude' encountered in book, but no template matches.
Element include in namespace 'http://www.w3.org/2001/XInclude' encountered in book, but no template matches.
Element include in namespace 'http://www.w3.org/2001/XInclude' encountered in book, but no template matches.
Element include in namespace 'http://www.w3.org/2001/XInclude' encountered in book, but no template matches.
Element include in namespace 'http://www.w3.org/2001/XInclude' encountered in book, but no template matches.
Element include in namespace 'http://www.w3.org/2001/XInclude' encountered in book, but no template matches.
Element include in namespace 'http://www.w3.org/2001/XInclude' encountered in book, but no template matches.
Element include in namespace 'http://www.w3.org/2001/XInclude' encountered in book, but no template matches.
Element include in namespace 'http://www.w3.org/2001/XInclude' encountered in book, but no template matches.
Element include in namespace 'http://www.w3.org/2001/XInclude' encountered in book, but no template matches.
Element include in namespace 'http://www.w3.org/2001/XInclude' encountered in book, but no template matches.
Element include in namespace 'http://www.w3.org/2001/XInclude' encountered in book, but no template matches.
Element include in namespace 'http://www.w3.org/2001/XInclude' encountered in book, but no template matches.
Element include in namespace 'http://www.w3.org/2001/XInclude' encountered in book, but no template matches.
Element include in namespace 'http://www.w3.org/2001/XInclude' encountered in book, but no template matches.

Re: Conversion from docbook to PDF or HTML

Posted: Fri May 20, 2011 12:34 pm
by Radu
Hi,

Transformations from inside Oxygen with Saxon 6 and 9 are not done by invoking command lines but by actually using their Java API.

About the "saxon.jar" approach, what are the reported errors?

The transformation with Xsltproc is also done by Oxygen by creating a command line.

About the xsltproc approach, please make sure to enable xinclude processing for the engine by setting the -xinclude flag in the command line.

You should also try to specify the path to the catalog file which will resolve Docbook system and public IDs to:

OXYGEN_INSTALL_DIR\frameworks\docbook\catalog.xml

Regards,
Radu