$Id: templates.xml,v 1.1 2002/05/15 17:22:24 isberg Exp $
Walsh
Norman
2000Norman Walsh
The Template System
Some parts of the DocBook XSL Stylesheets are actually generated
using XSL Stylesheets. In particular, the formatting of title pages
is generated using a special template system. The same template system
will eventually allow you to easily customize bibliography entries and
perhaps other parts of the system as well.
FIXME: there needs to be more introductory/explanatory text
here!
Changing the Article Title Page
In order to demonstrate how this system works, let's consider
how we can use it to change the format of article title pages.
By default, the stylesheets print the following elements on the
article title page, in this order:
title
subtitle
corpauthor
authorgroup
author
releaseinfo
copyright
legalnotice
pubdate
revision
revhistory
abstract
. Suppose we want to put only the
title, author, and
edition elements on the title page, in the order
that they appear in the articleinfo.
The hard
(and wrong!) way to do it would be to
edit titlepage.templates.xsl and make the changes
by hand.
The easy and right way is to construct a template document that
describes the order and sequence of elements that you want:
]]>
Then process this document with the
template/titlepage.xsl stylesheet. This will
produce the following somewhat cryptic stylesheet:
]]>
Despite its cryptic appearance, it has the desired result.
If you want to change how the titlepage elements
are formatted (as opposed to which ones are formatted), you have to
write your own customization layer that overrides the template for
the element in question in the titlepage.mode
mode.