O'Reilly logo

DocBook 5: The Definitive Guide by Richard L. Hamilton, Norman Walsh

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Roots: Starting Your DocBook Document

There’s one final detail of the physical and logical structures of DocBook that we’ve left out: where can your document begin? In other words, what are the valid document elements of DocBook documents? Naturally, you can start at set and book, but can you also start at chapter? What about para or personname?

If you come to DocBook from the DTD days, this question may seem odd. A DTD doesn’t provide any facility to impose constraints on where a document can begin. If the element occurs in the DTD, you can start with it.

RELAX NG does give us the ability to impose such constraints. In fact, it requires that we do. Of course, we could make the constraint vacuous by listing every possible element as a potential document element.

But, on reflection, that’s not necessarily the best choice. It’s valuable to have metadata associated with documents, so only elements with an info element can be root elements, but not every element with an info element is currently included. In DocBook V5.0 the following elements are available: acknowledgements, appendix, article, bibliography, book, chapter, colophon, dedication, glossary, index, para, part, preface, refentry, reference, refsect1, refsect2, refsect3, refsection, sect1, sect2, sect3, sect4, sect5, section, set, setindex, and toc.

With the next point release of DocBook, V5.1, the technical committee may take the position that any element that can contain an info wrapper can be a document element. This would ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required