Set up DocBook

Note

This may no longer be necessary; default install seems to work circa ubuntu 25.04. For reasons I forget, we ¿used to? need at least two custom files to run DocBook xml to html.

  1. Local dir to hold files

    mkdir ~/.schema

  2. Get the latest schema

    Download Docbookxi.rnc version 5.2 to ~/.schema/docbookxi.rnc

  3. Copy the locating rules

    cp ~/Dropbox/Basic/new_machine/linux/docbook/schemas.xml ~/.schema

    Note

    linux/docbook/schemas.xml source

    <locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0">
      <namespace ns="http://projectmallard.org/1.0/" uri="mallard-1.0.rnc"/>
      <namespace ns="xi" uri="xiincludedummy.rnc"/>
      <documentElement prefix="" localName="article" typeId="DocBook"/>
      <documentElement prefix="" localName="book" typeId="DocBook"/>
      <typeId id="DocBook" uri="docbookxi.rnc"/>
    </locatingRules>
    
  4. Generating this document

    See To generate this document above

  5. Edit in nxml mode in emacs. If emacs hangs while saving, recover emacs with C-g and then turn off undo-mode.

  6. xsltproc --stringparam para.propagates.style 1 --stringparam html.stylesheet nm.css -o notes_newmachine.html /usr/share/xml/docbook/stylesheet/nwalsh/xhtml/docbook.xsl notes_newmachine.xml

    Note

    If this command doesn't match the Makefile, use what's in the Makefile. N.b. Makefile is not distributed with this document.