Set up DocBook
Note that Schema and stylesheet are different and … unrelated? Schema determines how emacs validates the document; stylesheet determines how xsltproc renders the document.
-
Get the latest schema
We can't be sure what version the distribution included, and emacs brings more stylesheets as well. So we keep the definitive one in the same backed-up directory as this document (notes_newmachine.xml). If missing or if we want to upgrade, go to docbook.org/schema and get the latest version, save it in the working directory, and symlink it as
docbookxi.rnc. Currently we are using docbookxi.rnc.5.2. -
Set up the locating rules
These are also stored in the working directory for this document, so this shouldn't be necessary if working from, uh, that directory.
cp ~/Dropbox/Basic/new_machine/linux/docbook/schemas.xml .Note
linux/docbook/schemas.xmlsource<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>
-
Generating this document
-
Edit in nxml mode in emacs. If emacs hangs while saving, recover emacs with
C-gand then turn off undo-mode. -
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.xmlNote
If this command doesn't match the Makefile, use what's in the Makefile. N.b. Makefile is not distributed with this document.