"Practice what you preach." "Eat your own dogfood." One way or the other, this book itself uses many of the techniques it describes.
The text of the book was written directly in XML using a custom schema inspired by HTML, DocBook, and Charles F. Goldfarb's DTD that is used by many books in this Definitive XML Series. An XSLT transformation stylesheet written by Alina Kirsanova translated the source into XSL-FO and performed all necessary processing, such as importing code examples (stored separately), special character substitutions ( 126.96.36.199 ), compiling the Index and TOC, and generating cross-references.
The design for the book was also created by me, with elements borrowed from the other books in the series that we worked on using the same XML/XSLT/XSL-FO technology. The final rendering of XSL-FO into PDF was done by XEP  from RenderX.
Code examples (in a total of 11 different formats and XML vocabularies) were parsed by XEmacs + PSGML ( 188.8.131.52 ) with custom syntax coloring regexps and then saved into XHTML using htmlize.el  by Hrvoje Nik i . The resulting files were then translated by a simple stylesheet into a vocabulary understood by the book's main transformation stylesheet.