XML technologies / DocBook / Generating (X)HTML / Formatting (X)HTML with CSS / Adding a reference to a CSS file
(Excerpt from "DocBook-XML: Media-neutral and platform-independent publishing" by Thomas Schraitle)
To make your (X)HTML files use CSS, set the parameter html.stylesheet to your CSS file during transformation:
xsltproc --stringparam html.stylesheet css/book.cssThis creates the following element in the HTML file:
<link rel="stylesheet" href="css/book.css" type="text/css"/>You can pass more than one file to the parameter. Alternatively, use @import within the CSS file itself to reference other files. Enclose the file names in quotation marks, separated by spaces. For more specialized requirements, customize the template named output.html.stylesheets in the file docbook.xsl to suit your needs.
Copyright © 2009 Millin Verlag
You may print the online version for your private use.
Otherwise, this chapter from "DocBook-XML: Medienneutrales und plattformunabhängiges Publizieren" is subject to the same provisions as the printed edition: the work, including all its parts, is protected by copyright. All rights are reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
Millin Verlag, Siebengebirgsring 36, 53797 Lohmar, info(at)millin.de
back to top