XML technologies / DocBook / Generating (X)HTML / Generating single (X)HTML files

(Excerpt from "DocBook-XML: Media-neutral and platform-independent publishing" by Thomas Schraitle)

For short documents, it is useful to have all the transformed content in a single (X)HTML file. The stylesheet html/docbook.xsl transforms a DocBook document into HTML (the same applies to XHTML). By default, an XSLT processor writes the generated HTML to standard output, so you must specify an additional option to redirect the output to a file. For the XSLT processors xsltproc or saxon the command is:

xsltproc --output ausgabe.html html/docbook.xsl XML-Datei saxon -o ausgabe.html XML-Datei html/docbook.xsl

To choose another location, also use the parameter base.dir:

xsltproc --stringparam base.dir /tmp/dbxml/ \      DB/html/docbook.xsl \     XML-Datei saxon XML-Datei \     DB/html/docbook.xsl \     base.dir="/tmp/dbxml/"

  

back to top