Some useful resources for DocBook:
http://docbook.org/
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.

http://www.oasis-open.org/docbook/xml/index.html
The XML DTD for DocBook. As of now, the latest version is 4.1.2.

http://www.nwalsh.com/docbook/xsl/
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">
<book>
<bookinfo>
<title>My First Book</title>
<author><firstname>Funny</firstname><surname>Toes</surname></author>
<copyright><year>2001</year><holder>Funnytoes</holder></copyright>
</bookinfo>
<chapter>
<title>The main bit</title>
<programlisting>
10 PRINT "HELLO WORLD"
20 GOTO 10
</programlisting>
</chapter>
</book>

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.