Some useful resources for DocBook
- The latest version of "DocBook - The Definitive Guide", the online version of the O'Reilly book of the same name. Essential reading if you plan to hack around with DocBook.
- The XML DTD for DocBook. As of now, the latest version is 4.1.2.
- XSL stylesheets to allow your XML DocBook mark up to be rendered by an XML-aware user agent (such as Gecko or Internet Explorer).
Once you're armed with the above three, writing a DocBook document is this easy:
<?xml version="1.0" standalone="no"?>
<?XML:stylesheet type="text/xsl" href=".../docbook/xhtml/docbook.xsl"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" ".../docbkx412/DOCBOOKX.DTD">
<title>My First Book</title>
<title>The main bit</title>
10 PRINT "HELLO WORLD"
20 GOTO 10
Remembering to replace the "..." in the pathnames with the locations you stored the files, of course.
There's also a simplified DocBook XML DTD (http://www.nwalsh.com/docbook/simple/index.html) for situations where the full-blown DTD is over-weight. Currently it uses the full DocBook XSL Stylesheet referenced above but the author plans to produce an equally lightweight version to complement the DTD. There's a rather cute online summary (http://www.nwalsh.com/docbook/simple/sdocbook/) that lets you browse the DTD, too.