-
Install LyX as well as the dependencies need to author docbook in LyX
- apt-get install docbook-dsssl sgmltools-lite jade docbook docbook-xml lyx jadetex
-
It is commonly written on the web to tell LyX where to find the docbook catalogs by explicitly exporting SGML_CATALOG_FILES. This turned out to be not needed on Ubuntu and in fact caused sgmltools to fail if set (IOError: Couldn't resolve pubid ["-//SGMLtools//DOCUMENT Docbook Style Sheet for w3m Text//EN"]).
-
Start LyX and hit Tools⇒Reconfigure followed by a LyX restart
-
At this stage create a new document foo.lyx and change the document class to “Docbook articel (SGML)”
- Document => Settings => Document class
-
Save the document and check the DVI preview (CTRL+R)
-
Export => Docbook (XML) exports foo.lyx to foo.xml which is valid docbook xml