Introducing Docbook

The DocBook DTD defines a structure and element set for the creation of technical documentation, in particular documentation in the field of computing. It has evolved over a number of years to the point where the latest version, V4.1.2, has well over 300 separate elements which can be used to describe just about anything that might need to be included in computer documentation.

DocBook can be, and indeed is, used to mark up source code for Unix man pages, Windows Help files, user manuals, design and development documents, internal documentation inside companies and even textbooks. Much of the documentation for Free Software projects such as the Linux kernel and the Gnome desktop system, as well as countless HOWTOs, user guides and FAQs are written using DocBook. The DTD is attracting new users all the time, to the point where it may be one of the best-known and most widely used structured document types around. You may wonder why DocBook is defined using a DTD rather than a schema. The DTD has been around for a long time and works well with all generations of XML and SGML tools. Schémas are relatively new, several grammars exist for them and tool support is poor. A schema for DocBook is bound to appear at some point, probably once one schema language becomes a dominant force in the market-place.

DocBook originated in a collaboration between a company called HaL Computer Systems and the publishers O'Reilly and Associates back in 1991. They developed an SGML system which could be used to exchange Unix documentation written using nrof f. Early releases incorporated changes suggested by companies such as Digital and Novell which meant that the DTD grew in both purpose and scope. It was supported by SGML-aware editing tools such as FrameMaker and was widely used in both Novell and Sun. Following the release of version 3.0 in 1997, one of the most significant changes in the history of DocBook occurred. Until this point it had been a pure SGML system, but now efforts began to introduce an XML version. In July 1998 the Organization for the Advancement of Structured Information Standards, OASIS, formed a technical committee to guide the development of DocBook. OASIS continues to extend and improve DocBook while retaining backward compatability wherever possible, and now develops parallel SGML and XML versions.

The creation of an XML version of DocBook is important for a number of reasons. Although XML originated in the SGML community and SGML has been in use for far longer, many more people know about XML than know about SGML. Developers, authors and users are not going to use an SGML technology today if there is an XML alternative. SGML is overly-complicated, is not supported by modern Web-friendly tools and is perceived, rightly or wrongly, as yesterday's technology. XML is young, trendy and eye-catching which is why you're reading this book, isn't it? The XML version of DocBook can be used with the next generation of editing and transformation tools. XSL stylesheets are available for transformation into Web pages, XSLT, and print, XSL-FO, as described in Section 17.4.

When I started writing this book, I was going to use DocBook to structure it. After an abortive early effort I threw that idea away and instead went back to using ETgX. I tend to think that anyone writing about a technology should use it wherever possible. A textbook is a structured document, DocBook supports them so why not use it? The problem lies not with DocBook, but with the transformation to a printable version. The stylesheets provided with DocBook produce end-results which are either ugly, certainly compared to the output from ETgX, or can't be used. They can't be used because current transformation tools such as FOP 0.20.3, which transforms XSL to PDF, or PassiveTjgX which transforms to TgX, are beta quality at their best. The problem of ugly output could have been solved by customizing the DocBook stylesheets, which would have been time consuming and difficult since I'm not a book designer. The lack of support for tools can only be solved by getting involved in projects to develop better ones.

If the author of a book about XML can't use DocBook, what use is it? DocBook is readily transformed into HTML, manual pages and help documents. It can be used with some professional editing tools, and is used successfully by publishers such as O'Reilly and Associates. Even I use it in my work as an academic. Producing design documents or system specifications with DocBook is relatively simple and the printed results look OK. It's just that, at the moment, the quality of output required for professional publishing isn't generally available.

+1 0

Average user rating: 5 stars out of 1 votes

Post a comment

  • Receive news updates via email from this site