Slashdot Mirror


DocBook 5

frisket writes "Definitive guides by the authors or maintainers of software systems tend to have the edge over other documentation because of the insight they provide. DocBook 5 — The Definitive Guide comes well up to scratch. DocBook has long been the de facto standard for computer system documentation in XML (and SGML before that), and Norm Walsh has revised and updated both the language and the documentation in a concise and valuable form, usable both by beginners and by tech doc experts." Read on for the rest of frisket's review. DocBook 5: The Definitive Guide author Norman Walsh pages 560 publisher O'Reilly in conjunction with XML Press rating 9/10 reviewer frisket ISBN 9780596805029 summary Examines and catalogs the entirety of the DocBook specification. DocBook is a rich XML vocabulary, primarily for the documentation of software systems. It provides markup both for the structure of your documents and for the descriptive detail of your writing, to an extent that few other XML systems match. Like XML itself, DocBook's popularity rests on its robustness, scope, and extensibility; and Walsh makes it clear that the Technical Committee has tried hard to balance stability and adaptability in releasing a new major version which does have a few backward-incompatible changes.

This is a reference book, so the initial chapters (1-5) are short (70 pages) but full of clear explanations of how DocBook works, what it does, and how to use it. Part II is 400 pages, covering every element type in the language, with a detailed description of what it is for, how and where to use it, and how it interacts with everything else. Both for the beginner and the expert, these descriptions are the key to effective use, and Walsh's explanations are clear and comprehensive.

For those of you who have been using DocBook in earlier incarnations, the changes are not deal-breakers, and many of them are welcome rationalizations of the way things have grown organically over the years. It still walks like a duck and quacks like a duck (and the book still has a duck on the cover), so it immediately feels like the same format that you're used to — the changes to element types are relatively few. Chapter 1 (Getting Started) has a brief history, a summary of the changes, and an explanation of the namespace and availability.

If you've never used DocBook before, its structure will still be familiar: in Chapter 2 (Creating DocBook Documents) Walsh explains the division of reference material like books, articles, and manuals into chapters, sections, and subsections, with all the conventional features like lists, figures, tables, and references, as well as the technically-oriented features like equations, programming constructs, interface descriptions, and code samples.

There is help in Chapter 3 (Validation) for those who construct or generate DocBook documents without the use of an XML editor (or even with them: more on editors below). The most common problems with misplaced markup (and the error messages they create) are clearly explained with examples.

Chapter 4 (Publishing) very briefly explains the role of stylesheets (CSS, XSL, and XQuery) in displaying and transforming your documents to other formats, but as these all have their own books and manuals, this book doesn't go into them in any detail.

Customizing DocBook is fairly commonplace, either to avoid the need to commit tag abuse, or to extend its structure into other fields (I added a new element type for typographical examples for my book on LaTeX, and it only took a few minutes). Chapter 5 provides some rules and explanation of customization layers and modularity for those who design schemas and DTDs.

The five Appendixes cover Installation, Variants, Resources, Interchange, and the GNU Free Documentation License — yes, you can read the whole thing online at docbook.org, for which Tim, Norm, and many others are to be thanked. It is a rare publisher who groks the need to be able to point someone at a reference, or quote it in email or a tweet, where a paper copy doesn't cut the mustard.

There isn't anything here about actually using an XML editor or about how to choose one. Editors do of course all come with their own documentation (much of it written using DocBook) and editor selection can be a complex business. However, there is a list of some common tools in Appendix C (Resources). Editors are a minefield, as my own research into the usability of editing software for structured documents is showing, so I can understand the omission, but some pointers to editor resources would have been useful.

The chapter on Publishing is useful for those who haven't been in the publication process before, but it could have emphasized more the need for accuracy and consistency. Experienced technical authors know this, but many other writers don't see the need for it, assuming that the publisher (or some elf) will automagically heal everything before publication. DocBook 5 and this book will help enormously, but author-edited documents sometimes unwittingly misuse or abuse the markup, no matter how exhaustive the manuals.

If you write computer documentation, or anything related to it, from a conference paper to a thesis to a book, DocBook 5 is probably what you should use if you want the document to survive and to be usable and reusable; and this is the book to help you do it.

You can purchase DocBook 5: The Definitive Guide from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

5 of 68 comments (clear)

  1. Wait, what? by Anonymous Coward · · Score: 1, Insightful

    "I added a new element type for typographical examples for my book on LaTeX, and it only took a few minutes."

    Why are you using DocBook for a book on LaTeX?

    1. Re:Wait, what? by ta+bu+shi+da+yu · · Score: 3, Insightful

      Or "From the Frypan, into the Fire"?

      --
      XML is like violence. If it doesn't solve the problem, use more.
  2. Re:DocBook is horrible by ebuck · · Score: 5, Insightful

    My experiences are quite different; DocBook is simply awesome.

    If you start selecting tags to make the output look the way you want it to look, you don't understand XML (and subsequently shouldn't be using DocBook).

    Any sane documentation project separates the formatting from the content; because, when you need to update the look of the documentation, you don't want to spend days checking each individual document element to determine if it is the correct font, point, weight, etc. Only the novices create documentation that doesn't permit consistent formatting. Using something that goes half way there (inconsistently applied style sheets) eventually leaves you with the same amount of work to make sure your documentation shows as it should. Style sheets may be applied consistently, but you can't know for sure without paying the "verify the whole document" price.

    With XML, there is no formatting in the document. All of the formatting is done with the XSL document. If you didn't like the format, layout, font, italics, or whatever of the output documentation, the correct choice was to change the XSL document used to build the output, not to go on a happy hunting DocBook tag search for the tags that made it look how you wanted it.

    The fact that you couldn't find the <code> tag but could find the other tags you've mentioned is just depressing, especially when those tags are most often sub-tags of a code tag block.

    Just wait until you need to generate HTML help, Text file documentation, a web page manual, and a printed PDF of the same core documentation. The single-source design of DocBook will be much better appreciated then, if you learn how to use it.

  3. Re:DocBook - like HTML 1.0, only dumber by Anonymous Coward · · Score: 1, Insightful

    "HTML+CSS+CMS > My woefully inadequate understanding of DocBook"
    FTFY.

  4. Re:DocBook - like HTML 1.0, only dumber by frisket · · Score: 2, Insightful

    if you want rules-based automated processing, you can do that with html

    You can, the same way that you can write a book in PostScript.

    But if you want all the internal checks on consistency and effectivity that make a piece of documentation robust and persistent, you probably don't want to do it in HTML and CSS.