Chapter 14. DocBook
DocBook is a DTD designed for marking up computer-related documents. The DTD has been evolving for more than a decade and its roots stem from the O'Reilly publishers, the publishers of many com- puter-related manuals. Like XHTML and TEI, DocBook is intended to mark up narrative texts, but Doc- Book includes a number of elements specific to its computer-related theme. Some of these elements in- clude things like screenshot, programlisting, and command.
There are a wide range of basic documents types in DocBook. The most commonly used are book and article. Book documents can contain things like a preface, chapters, and appendices. These things can be further subdivided into sections containing paragraphs, lists, figures, examples, and program listings. (This manual/workbook has been marked up as a DocBook book file.) Articles are very much like books but don't contain chapters.
In order to create a valid DocBook file, the file must contain a document type declaration identifying the version of DocBook being employed. Since the DocBook DTD is evolving, there are many different de- clarations. Here is a declaration for an article using version 4.2 of the DTD:
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
Here is a listing of some of the more commonly used elements in a DocBook article:
article - the root element
articleinfo - a container used to contain meta data about the article
author - a container for creator information
firstname - the first name of an author