Self-publishing bound, hardcopy books plus free XML technology makes it pretty easy these days; I just did it.

My first book was a crash course in basic end user tasks for using the MVS, VM/CMS, OS/400, VMS, and Unix operating systems: logging in, navigating the file system, using e-mail, using the text editor, listing, creating, and deleting files, and so forth. I wanted to call it “Fake Your Way Through Minis and Mainframes” but the McGraw-Hill Professional Book Division decided that “The Operating Systems Handbook” sounded more, well, professional, especially for a $49.50 hardcover. It was published in 1994 and sold a few thousand copies.

[Operating Systems Handbook cover]

When it went out of print, I had McGraw-Hill revert the rights to me and put free Acrobat files of the book’s contents on its home page. I had used XyWrite to write the book, so a few perl scripts converted the XyWrite files to DocBook XML, and Norm Walsh’s DocBook stylesheets and FOP made it pretty easy to create the Acrobat files. People download them, and the MVS section is particularly popular—I get several e-mails a year, some from, thanking me for making it available.

I’ve had some fun with’s ability to put any image on a T-shirt, a coffee mug, a clock, a lunchbox… the list has grown over time, and when they added the ability to create books from PDF files, I started to think about making a new, inexpensive bound hardcopy version of “The Operating Systems Handbook” available. After some research, I discovered, which is more focused on book publishing than cafepress and makes it even less expensive. Like cafepress, you don’t spend a penny on anything unless you want to buy something you’ve designed for them to sell, and you can charge a little extra and keep the difference if you’re willing to do some extra paperwork. Of course their main clientele is people with novels and poetry that no publisher was interested in, but they’re handy for republishing out-of-print books about mainframes and minicomputers. (The fact that you can publish a single copy of a hardcover book with a color cover of your own design for $18 inspires the gag gift reflex in me, too.) I decided to do the whole book and a smaller, less expensive version with just the MVS part.

I had to revise the stylesheet a little and generate new PDF files, because a bound book needs a wider left margin on odd-numbered pages and a wider right margin on even-numbered pages. While I was at it, I tweaked various other font and margin settings. Customizing the DocBook stylesheets is the classic use case for the difference between xsl:include and xsl:import in XSLT: instead of revising the actual DocBook stylesheets, you’re better off creating a new stylesheet that uses xsl:import to import the main DocBook stylesheet, copying the parts that you want to revise into your new stylesheet, and then revising them there, where they’ll override the original DocBook stylesheet code. This way, when the DocBook stylesheets get upgraded, you can just import the new ones without worrying about losing your edits. (More on this in this column.)

[Fake Your Way Through Minis and Mainframes cover]

Here are three important hints if you embark on this yourself:

  • Get to know the param.xsl file that comes with the DocBook stylesheets. This gives you hooks to customize a lot of the stylesheet behavior without requiring you to dig deeply into the stylesheet code where the real programming logic is. For example, to reset the top margin of the printed pages, I just copied the xsl:param element that created a “” parameter from param.xsl into my new stylesheet and assigned the value that I wanted.

  • Bob Stayton’s book DocBook XSL: The Complete Guide lives up to its name and is an excellent reference for the tricky parts. You can buy it (Norm is quoted as saying “Buy this book”) and it’s also available online. The Printed Output section was invaluable for my stylesheet tweaking. It especially helped me with the embedding of fonts in the PDF files, which lulu requires. Once you know how to do this, you’re no longer limited to the Courier, Helvetica, and Times fonts that default FOP usage allows.

  • A -Xmx128m parameter on the java command lines boosts the default heap usage to 128 megs, which FOP needed to handle the full-sized version of my lulu book.

I didn’t get too fancy with the book covers, choosing to pick one of their built-in backgrounds and then playing with the font size and color a little for the cover and spine text. Some of the cover image choices are pretty funny, intended for a mystery novel or something—a photo of a human skull partially obscured by shadow? A shiny knife blade dripping blood on a white rose? You can upload your own cover image if you like.

So, if you wrote a cookbook, a mystery novel, some other kind of novel, or you just want to create a single copy of “The Wit and Wisdom of [name of testimonial dinner subject here],” look into If your content is stored in DocBook XML or something that can easily be converted to DocBook, most of the necessary work has already been done for you. If you’re interested in the basics of MVS, check out the free Acrobat version or the $9.98 paperback version of “Fake Your Way Through MVS,” or find out about all the mini and mainframe operating systems from the PDF file or from the $19.98 printed, bound book shown above. All these are available from the book’s home page.