Principles of Separating Content from Presentation

Steve Hoenisch

There are principles of separation that can be immensely useful in building well-engineered, text-based web pages with XML, XSLT, CSS, and HTML. An overarching objective is to use XML to structure content and XSLT and CSS to format it in a way that minimizes redundancy and maximizes flexibility, including the capability to repurpose content and publish it in various formats. Most of the principles listed below are best applied to narrative-oriented documents that will be published as white papers, technical manuals, help files, essays, and so forth. Keep in mind that these principles are merely a guide and that the list of exceptions is long: Your data, purpose, audience, delivery format, and other factors will influence how you engineer your system’s own matrix of structure, metainformation, parameters, content, and presentation.

In the examples that accompany this and later tutorials in the series, you’ll see some of these principles at work.

The tutorials in this series proceed as follows:

  1. An Introduction to XML
  2. Structuring Documents in XML
  3. Developing a Document Type Definition
  4. Attributes and Entities in DTDs
  5. An Introduction to XSL
  6. Using XSLT to Separate Content from Presentation