NavheadUpper-right

This small, somewhat contrived website demonstrates the Website document type. Website provides a system for building static Websites from XML content.

[Note]Note

Though this "site" remains a good example of a Website instance, the how-to information here is no longer actively maintained. For more up-to-date information, see the Website chapter in Bob Stayton's book DocBook XSL: The Complete Guide.

Both tabular and non-tabular versions are available, demonstrating how multiple presentations can be derived from the same sources.

What is a Website?

A website is a collection of pages organized, for the purposes of navigation, into one or more hierarchies. In Website, each page is a separate XML document authored according to the Website schema/DTD, a customization of DocBook.

Website imposes the following additional constraints:

  • Each webpage must have an ID and the IDs must be unique across the entire website.

  • No page can occur in more than one location in the navigational hierarchy of the website. Note, however, that you can have pages, such as the about page, that don't appear in the navigational hierarchy at all.

Requirements

In order to build a website with DocBook Website, you must have, at a minimum:

  • The Website DTD (either website.dtd or website-full.dtd) OR the Website RELAX NG schema (website.rnc or website-full.rnc).

  • The DocBook XML V4.4 DTD (if you want to use website-full.dtd).

  • The Website XSL stylesheets.

  • The DocBook XSL Stylesheets (which are imported by the Website XSL stylesheets).

  • An XSLT engine such as Saxon or xsltproc.

Changes from Website 1.x

I've completely redesigned the way the Website doctype works for V2. In version 1, all of the pages in a website were part of a single, monolithic XML document.

Making all of the pages part of a single document had a number of drawbacks:

  1. It wasn't convenient to update only part of a website (only the pages that had been changed, for example).

  2. For very large websites, there were memory issues associated with parsing and formatting the whole thing.

  3. There was no practical way to publish the XML content of a site.

  4. It was difficult to share pages across different web sites.

  5. It was very tedious to setup a system that allowed the same content to be published with different navigational hierarchies.

Website overcomes all of these difficulties.

In fairness, the old style had some advantages:

  1. There was only a single source document to maintain.

  2. Navigation was derived automatically from the structure of the source document.

  3. Link checking was cheap and easy.

What's New

20 Mar 2001

Reworked using the Website paradigm.