XML technologies / DocBook / Generating (X)HTML / CSS formatting for (X)HTML
(Excerpt from "DocBook-XML: Media-neutral and platform-independent publishing" by Thomas Schraitle)
There are two ways to change the appearance of (X)HTML output:
modify the stylesheets directly
CSS ( Cascading Stylesheets)
The first method requires transforming the document again even when only its presentation changes.
This is why the recommended approach is Cascading Stylesheets, or CSS. These rules assign formatting to elements while preserving the underlying (X)HTML code. A reference to the CSS file is enough for the browser, although CSS can also be embedded. CSS has these advantages:
Data and layout are separate.
Apart from a reference, the (X)HTML code needs no changes.
Appearance can be changed quickly. CSS avoids another transformation; simply reload the (X)HTML file in the browser.
CSS separates responsibilities: designers focus on (X)HTML presentation while stylesheet developers focus on transformation.
For further information beyond the scope of this section, see, for example, the books by Helmut Herold and Eric Meyer.
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