471,075 Members | 667 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,075 software developers and data experts.

trying to get started with docbook/xml + xmlto/xsltproc

I am trying to get started with using Docbook/xml using free tools and
am stymied in generating printable documentation from even the simplest
source. I have attempted to generate a PDF using xmlto (which I guess is
a shell interface to xsltproc) for the docbook source on a variety of
platforms: Debian GNU/Linux stable, Gentoo GNU/Linux, FreeBSD, and Cygwin.
In no case have I been successful, and the error messages are certainly not
helpful.

Minimal docbook document:
-------------------------
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"/usr/share/xml/docbook/schema/dtd/4.2/docbookx.dtd">

<book>

<bookinfo>
<title>Hello, world</title>
</bookinfo>

<chapter>
<title>Hello, world</title>

<para>This is my first DocBook file.</para>

</chapter>
</book>
-------------------------

Debian GNU/Linux stable (sarge):
--------------------------------
10 isis$ xmlto pdf test.xml
Making portrait pages on letter paper (215.9 mm x 279.4 mm)
This is pdfeTeX, Version 3.14159-1.10b-2.1 (Web2C 7.4.5)
entering extended mode
(./tmp.fo{/usr/share/texmf/pdftex/config/pdftex.cfg}
LaTeX2e <2001/06/01>
Babel <v3.7h> and hyphenation patterns for american, french, german, ngerman, n
ohyphenation, basque, czech, icelandic, slovak, slovene, loaded.
xmltex version: 2002/06/25 v1.9 (Exp):
(/usr/share/texmf/tex/xmltex/config/xmltex.cfg)
No File: tmp.cfg (/usr/share/texmf/tex/xmltex/passivetex/fotex.xmt)
(/usr/share/texmf/tex/latex/base/article.cls
Document Class: article 2001/04/21 v1.4e Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size10.clo))
(/usr/share/texmf/tex/xmltex/passivetex/fotex.sty
)
No file tmp.aux.
(/usr/share/texmf/tex/latex/cyrillic/t2acmr.fd)

[more stuff snipped for brevity]

! LaTeX Error: Something's wrong--perhaps a missing \item.

See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...

l.304 ..." hyphenation-remain-character-count="2">
Chapter&#xA0;1.&#xA0;Hello...

?
! Emergency stop.
...

l.304 ..." hyphenation-remain-character-count="2">
Chapter&#xA0;1.&#xA0;Hello...

! ==> Fatal error occurred, the output PDF file is not finished!
Transcript written on tmp.log.
Gentoo GNU/Linux:
-----------------
203 nephthys$ xmlto pdf test.xml
Making portrait pages on A4 paper (210mmx297mm)
This is pdfTeX, Version 3.14159-1.10b (Web2C 7.4.5)
(./tmp.fo{/usr/share/texmf/pdftex/config/pdftex.cfg}
xmltex version: 2002/06/25 v1.9 (Exp):
(/usr/share/texmf/tex/xmltex/xmltex.cfg)
! I can't find file `tmp.cfg'.
\@filef@und ->\jobname .cfg

....
l.1
<?xml version="1.0"?>
Please type another input file name:
! Emergency stop.
\@filef@und ->\jobname .cfg

....
l.1
<?xml version="1.0"?>
No pages of output.
Transcript written on tmp.log.
FreeBSD:
---------------------------------------
nephthys% xmlto pdf test.xml
Making portrait pages on USletter paper (8.5inx11in)
/usr/local/share/xmlto/format/docbook/../fo/pdf: Can't open /usr/local/share/xmlto/format/docbook/../fo/pdf: No such file or directory
(I don't have a Windows machine handy at the moment, so I can't paste
the error messages Cygwin produces, but it doesn't work there either.)

So, is *anyone* using this toolchain to produce docbook documentation?
I want to stick with free tools and avoid Java if at all possible.

- Will
Apr 14 '06 #1
1 2493
I'm not familiar with the "xmlto" tool. You might want to try doing this
in separate stages -- use a standard xslt stylesheet for converting
docbook-xml to xsl-fo, then put that through an xsl-fo rendering tool
such as fop to obtain a pdf file. I think that would avoid the side
jaunt through LaTeX.

--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
Apr 14 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Dr. Laurence Leff | last post: by
2 posts views Thread by Simon Strandgaard | last post: by
reply views Thread by Dr. Laurence Leff | last post: by
2 posts views Thread by Yarco | last post: by
12 posts views Thread by Jim Anderson | last post: by
reply views Thread by Dubravko Gorupic | last post: by
5 posts views Thread by Darel Finkbeiner | last post: by
1 post views Thread by Arndt Jonasson | last post: by
reply views Thread by Tommy Nordgren | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.