Design proceeds in these stages:
Python is a good open-source language perfectly suited to all the tasks here.
For parsing the input DocBook-XML 5.0 file, we'll use Python's
lxml module, as described in Python XML processing with
There are many routes to PDF, but the author has some experience with the XSL-FO standard, the eXtensible Stylesheet Language Formatting Objects. The author recommends this book on the subject:
Because an XSL-FO is an XML document, we will use the
etbuilder.py module described in Python XML processing
lxml, which is
well-suited for building an XML document from scratch.
lxml module is also suitable for
parsing the input DocBook document.
We also use
XSL-FO helper functions for Python, a module to assist in building
XSL-FO files. This module is built on top of
lxml and supplies the overall structure. Our
application then uses
etbuilder to add the