Generate the book in XHTML instead of HTML

Max Bowsher maxb at
Thu Mar 10 11:43:18 CST 2005

√ėyvind A. Holm wrote:
> Marcus Rueckert (darix) came with a solution on irc which makes xsltproc
> generate XHTML instead of HTML. This generates UTF-8 output instead of
> ISO-8859-1, which is a Good Thing in the long term when books in
> non-Western languages will be built. The HTML which is generated now
> also lacks a proper DOCTYPE declaration, which the XHTML version has. In
> addition, the XHTML version has proper indents in the header which makes
> it way more readable. The size doesn't increase much, less than 6k in
> the Norwegian single-page XHTML file. I have tested the patch with make
> all, and XHTML, PostScript and PDF generation works fine.
> [[[
> Change the xsl stylesheets in tools/ so xsltproc generates XHTML instead
> of HTML. Default character set is now UTF-8 instead of ISO-8859-1 and
> the XHTML is properly indented and contains a DOCTYPE declaration, which
> the previous HTML version lacked.
> * src/tools/html-stylesheet.xsl
>  Change <xsl:import href> to "xsl/xhtml/docbook.xsl".
> * src/tools/chunk-stylesheet.xsl
>  Change <xsl:import href> to "xsl/xhtml/chunk.xsl".
>  Add <xsl:param name="chunker.output.indent">yes</xsl:param> .
> Patch by Marcus Rueckert <darix at>.
> ]]]

I've no problems with UTF-8 and XHTML, but I'm extremely reluctant to add 
222kB of invisible whitespace to the chunked book.

+0.5 on changing to XHTML.
-0.99999 on turning on indentation (at least in the default build).


More information about the svnbook-dev mailing list