8
XML to HTML
That was a surprise to me - that people were prepared to painstakingly write HTML
Tim Berners-Lee

# Using XSLT as a Styling Language

## Problem

You want to use XSLT to stylize a XML document for dissemination via HTML.

## Solution

Here we show an example for publishing a snippet of a DocBook document in HTML using a XSLT stylesheet. The document source is a portion of this chapter.

## Discussion

DocBook is an example of a document centric DTD that enables you to author and store document content in a presentation-neutral form that captures the logical structure of the content. The beauty of authoring documents (especially technical ones) in a this form is that one can use XSLT to transform a single content specification into multiple delivery vehicles such as HTML, PDF, Microsoft Help files and Unix man pages. Although we present this recipe in terms of DocBook, the techniques are applicable to other public domain document schema or documents of your own creation.

Copyright O'Reilly 2002. All rights reserved.