DocBook

DocBook (http://www.docbook.org/ ) is an SGML application designed for new documents, not old ones. It’s especially common in computer documentation. Several O’Reilly books have been written in DocBook, including Norm Walsh and Leonard Muellner’s DocBook: The Definitive Guide. No special tools are required to author it. Much of the Linux Documentation Project (LDP, http://www.linuxdoc.org/ ) corpus is written in DocBook. The current version of DocBook, 4.3, is available as both an SGML and an XML application. Example 6-2 shows a simple DocBook XML document based on the book you’re reading now. Needless to say, the full version of this document would be much longer.

Example 6-2. A DocBook document
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "docbook/docbookx.dtd"> <book> <title>XML in a Nutshell</title> <bookinfo> <author> <firstname>Elliotte Rusty</firstname> <surname>Harold</surname> </author> <author> <firstname>W. Scott</firstname> <surname>Means</surname> </author> </bookinfo> <toc> <tocchap><tocentry>Introducing XML</tocentry></tocchap> <tocchap><tocentry>XML as a Document Format</tocentry></tocchap> <tocchap><tocentry>XML as a "better" HTML</tocentry></tocchap> </toc> <chapter> <title>Introducing XML</title> <para></para> </chapter> <chapter> <title>XML as a Document Format</title> <para> XML is first and foremost a document format. It was always intended for web pages, books, scholarly articles, ...

Get XML in a Nutshell, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.