The step to Docbook 5

July 2010


I started using DocBook when I started keeping these notes, see . That was version 4.4, now I'm stepping up to 5.0.

  1. Packages

    Working on a Debian Squeeze, I install...

  2. Automatic conversion

    As shown in the conversion document, there exists a way to convert DB4 to DB5:

    apprentice@machine:~$ xsltproc /usr/share/xml/docbook/stylesheet/docbook5/db4-upgrade.xsl ApprenticesNotes.xml > ApprenticesNotes5.xml

    This produces output that can be converted using xsltproc.

  3. Fixing the header

    Now that I'm at it, I try to produce XML that will not trigger jing warnings. I start with replacing the header with:

    <?xml version='1.0'?>
    <book xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
    	

  4. Fixing ulinks

    No ulink elements exist in DocBook 5. Here's how to replace them with link elements.

  5. Fixing some other things

    I also needed to replace linkend attributes on co tags. Jing is generally more strict than xslt. I also coulnd't keep the callout/co tagging I had in computeroutputs.

  6. Converting to xhtml

    I now use SS-XHTML=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns/xhtml-1_1/chunk.xsl to convert to (multi-chunk) html.