The step to Docbook 5

Jurjen Bokma

July 2010


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

  1. Working on a Debian Squeeze, I install...

    apprentice@machine:~$ sudo apt-get install -y docbook-xml docbook-xsl docbook-xsl-doc docbook-xsl-ns docbook-xsl-saxon docbook5-xml jing

  2. 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. 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. No ulink elements exist in DocBook 5. Here's how to replace them with link elements.

  5. 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. I now use SS-XHTML=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns/xhtml-1_1/chunk.xsl to convert to (multi-chunk) html.