Skip to content

Creating book XHTML from DocBook

Ever since Pro Web 2.0 Mashups came out, I've wanted to get the book on the web.  Publishing PDFs was a start — but I have envisioned developing a full-blown web application, a book that would could interact with my readers, be self-correcting and self-updating.  It's only appropriate that a book about APIs and mashups should itself embody the techniques that are describe in it!

Well, it's going to be a while until I get there — but I'm happy that I haven't taken the next step:  publishing a (X)HTML version of the book.   The canonical version of the book ended up being a series of QuarkXPress files.  I had written some Python appscript programs to convert the book to a simple homebrew XML representation but didn't have sufficient time to take it all the way to DocBook.  I hired Liza Daly's Threepress Consulting to do the bulk of the conversion to DocBook, leaving me some labor intensive details to fit my budget.  (BTW, Liza is a great person to work with, very  smart and responsive to my queries. )

With the book in DocBook, I have been using oXygen 11 to edit the files and transform them into XHTML. I was hunting around for CSS files for DocBook-derived XHTML, but found surprisingly few options.  The one I'm currently settling on to get me started is the stylesheet  for FreeBSD documentation (see the style in action on the FreeBSD site).   I'll definitely want to customize the stylesheet for the book to reflect the look and feel I desire — but I'm happy with the starting point.

{ 4 } Comments

  1. abdelazer | January 21, 2010 at 9:58 pm | Permalink

    You might be interested in reviewing the CSS for the O'Reilly OFPS sites like http://building-iphone-apps.labs.oreilly.com/

  2. utopiah | January 22, 2010 at 6:47 am | Permalink

    So "a book that would could interact with my readers, be self-correcting and self-updating." sounds a lot like a wiki. You might want to previous initiatives like Knowing Knowledge, Business Model Generation or Real World Haskell. They are not necessarily what you are looking for since it's, I think, mainly the reverse process : one book by a community generated from a collaborative website.
    Instead you might look at Wikipatterns which I think followed the same historical path that you did, meaning a book and then a community companion website.

    Good luck,
    Fabien Benetou aka Utopiah.

  3. raymond.yee | January 22, 2010 at 7:45 am | Permalink

    @abdelazer: Thanks for pointing me to the CSS associated with http://building-iphone-apps.labs.oreilly.com/ and
    http://labs.oreilly.com/ofps.html Liza had told me about
    http://bitbucket.org/bos/hgbook/src/93154fbaae9b/web/ — but I forgot to look there for stylesheets.

  4. raymond.yee | January 22, 2010 at 7:47 am | Permalink

    Fabien — thanks for reminding me of using wikis here. I had been thinking so much in terms of straight up publishing and then generating a custom web app to wrap the book that I overlook making a wiki.

Post a Comment

You must be logged in to post a comment.