Cascading Stylesheet for DocBook XML


DocBook is an XML dialect for writing documentation.

The Cascading Stylesheet provided here allows you to directly view a styled XML document in software that supports XML styled with CSS2 (e.g. a recent Mozilla or Opera browser)


There are currently many Docbook elements that haven't had CSS written to style them yet.


(To view the XML versions, you need a capable browser)

Author Guide (from The Linux Documentation Project)

Documentation for CVSspam

Some docbook test cases.


To use, alter your XML file to include a stylesheet directive,

<?xml version="1.0"?>
<?xml-stylesheet href="docbook-css-0.3/driver.css" type="text/css"?>




2004-11-21 docbook-css-0.4.tar.gz ~8kB


2004-10-17 docbook-css-0.3.tar.gz ~7kB

2004-09-05 docbook-css-0.2.tar.gz ~6kB

2002-12-12 docbook-css-0.1.0.tar.gz ~3kB


The technology behind this stylesheet is fundamentally limited, and this limits the kind of presentation possible using it.

XML parsing
Browsers will not always feature fully capable XML parsers. Often, the external entities used to break up the structure of larger documents are simply not handled, or will cause processing errors: Assume this stylesheet will only work with single-source-file documents.
Restructuring Layout
If docbook perscribes an ordering for source elements that differs from the ordering in an ideal visual presentation, there's often no way to re-order content using CSS. For example the attribution comes first inside a blockquote, but should traditionally be presented after the quoted text.
Generated Content
While CSS allows for the generation of simple content before and after an existing element, generation of a table of contents, for instance, is totally outside its capabilities.


Browse a cross-referenced version of the stylesheet source.

Part of the stylesheet was generated from the source of DocBook: The Definitive Guide with this (slightly ugly) script,


Report bugs and make suggestions to the Docbook-CSS mailing list.