Sagehill Enterprises
What is DocBook?
Home
Services
Publications
Contact Us
What is DocBook?

DocBook is a collection of standards and tools for technical publishing. DocBook was originally created by a consortium of software companies as a standard for computer documentation. But the basic "book" features of DocBook can be used for other kinds of content, so it has been adapted to many purposes.

The elements of a publishing system based on DocBook include:

  • DocBook Document Type Definition (DTD).
  • XML writing tools.
  • DocBook XSL stylesheets.
  • Processing tools.

The DocBook DTD

The core DocBook standard is the DocBook Document Type Definition (DTD) maintained by the DocBook Technical Committee in OASIS. The DTD defines the vocabulary of content elements that an author can use and how they relate to each other. For example, a book element can contain a title element, any number of para elements for paragraphs, and any number of chapter elements. The DTD is available in both XML and SGML versions. See DocBook: The Definitive Guide to learn more about the DocBook DTD.

XML writing tools

Using the DTD and XML syntax, authors mark up their text content with tag names enclosed in angle brackets like <chapter>. The markup is similar to HTML, but with more tags and tighter rules.As with HTML, you can use a plain text editor to write HTML. But it helps to use a writing program that keeps track of the XML tag names and rules. See the DocBook Wiki website for more information on writing tools.

DocBook XSL stylesheets

A DocBook file contains no information about how to format it. That information is kept in a separate stylesheet file. The most powerful and flexible stylesheets for DocBook are the DocBook XSL stylesheets written by Norman Walsh. These free stylesheets can produce HTML and print output from the same DocBook files. The Sagehill Enterprises' book DocBook XSL: the Complete Guide provides more information.

Processing tools

To apply an XSL stylesheet to a DocBook file, you use an XSLT processor such as Saxon or xsltproc. The XSLT processor can generate HTML directly. For print, it generates an intermediate XSL-FO (formatting objects) file. That file is then processed with an XSL-FO processor to product PDF or PostScript output for printing. The Sagehill Enterprises' book DocBook XSL: the Complete Guide also provides more information about processing tools.

Who uses DocBook?

  • IBM Linux Technology Center
  • Sun Microsystems, Inc.
  • Linux Documentation Project
  • Free BSD
  • GNOME
  • PHP
  • KDE
  • Hewlett Packard
  • and many more

When is DocBook appropriate?

  • Multiple output formats.
  • Multiple releases over time.
  • Large documentation sets.
  • Batch processing environment.
  • Shared authoring.

When is DocBook not appropriate?

  • Highly formatted documents like magazines.
  • Short documents.
  • Authors who know nothing of XML.
  • One-off documents.