Next / Previous / Contents / NM Tech homepage

13. fo-titlepage.xml: PDF title page templates

Here is the fo-titlepage.xml template file. This file is a modified copy of file fo/titlepage.templates.xml in the stock DocBook-XSL Stylesheets distribution.

The template presented here is used as input to a transform that converts it to an XSLT file, fo-titlepage.xsl, that specifies how to lay out the overall document title. Refer to Section 6, “Title page customization: XSLT that builds XSLT” for an overview of this process.

This file is divided into four parts:

13.1. Prologue to fo-titlepage.xml

The fo-titlepage.xml file starts with the usual DOCTYPE declaration. This declaration contains a number of entity declarations that specify a series of font sizes, each 20% larger than the one before, and also a series of three-quarter-em spaces.

<!DOCTYPE t:templates [
<!ENTITY hsize0 "10pt">
<!ENTITY hsize1 "12pt">
<!ENTITY hsize2 "14.4pt">
<!ENTITY hsize3 "17.28pt">
<!ENTITY hsize4 "20.736pt">
<!ENTITY hsize5 "24.8832pt">
<!ENTITY hsize0space "7.5pt"> <!-- 0.75 * hsize0 -->
<!ENTITY hsize1space "9pt"> <!-- 0.75 * hsize1 -->
<!ENTITY hsize2space "10.8pt"> <!-- 0.75 * hsize2 -->
<!ENTITY hsize3space "12.96pt"> <!-- 0.75 * hsize3 -->
<!ENTITY hsize4space "15.552pt"> <!-- 0.75 * hsize4 -->
<!ENTITY hsize5space "18.6624pt"> <!-- 0.75 * hsize5 -->

Next comes the root element, which contains declarations for the various namespaces.

<!--File fo-titlepage.xml
 !   Do not edit this file directly.  It is extracted mechanically
 !   from the documentation:
<t:templates xmlns:t=""
    exclude-result-prefixes="date d">

Most of these namespaces are the same ones used in the HTML titlepage template (see Section 9, “html-titlepage.xml: HTML title page template”). The one new namespace, “fo:”, is the Formatting Objects namespace.