Cascading Stylesheets

Cascading stylesheets (CSS) are not exactly a full blown publishing framework. Instead, they are used in conjunction with XML documents to associate stylistic behavior with elements of the document. Instead of hard-coding a font element in an HTML or XHTML document, you can instead reference a stylesheet component via a style attribute that contains the font information. The following XML fragment demonstrates how you can point your XML document to a CSS:

<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="wml.css">

So, if this is all you can do with stylesheets, why am I even discussing them here? The answer is that stylesheets are an essential component in supporting even more loose coupling of content and presentation. ...

Get Enhydra XMLC™ Java™ Presentation Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.