Your new title page templates handle the content and sequence of elements on title pages, but don't alter the handling of the individual elements that are included. The way to change an individual element on title pages is to modify the template which uses the titlepage.mode
mode for that element. The original templates are in html/titlepage.xsl
. For example, here is the template for author
in that mode:
<xsl:template match="author" mode="titlepage.mode"> <div class="{name(.)}"> <h3 class="{name(.)}"><xsl:call-template name="person.name"/></h3> <xsl:apply-templates mode="titlepage.mode" select="./contrib"/> <xsl:apply-templates mode="titlepage.mode" select="./affiliation"/> </div> </xsl:template>
If you don't want your author names output as H3
headings, then copy this template to your customization layer and modify it as needed.
Perhaps you want author names on article
title pages to be different from author names on book
title pages. The DocBook XSL stylesheets are set up to use a more specific mode first. So instead of the above template, you would create two new templates, one using mode article.titlepage.recto.mode
and the other using book.titlepage.recto.mode
. Modify each according to your needs. If your author names are on the verso side (as specified in your title page spec file), you need to specify verso
in the mode name instead.
Following is the sequence of modes that are tried for each element on an article recto title page. The stylesheets go down this list until it finds a template that matches your element in that mode. You can see it moves from the most specific to the least specific, ending on the template that handles the element outside of title pages.
article.titlepage.recto.auto.mode Defined in the generated stylesheet article.titlepage.recto.mode Undefined titlepage.mode Defined in titlepage.xsl [no mode] Default handling of the element
In addition, the match
attribute of an XSL template can be more specific to give you even finer control. You'll want that for title
elements, which can be included in many *info
elements. So you might have one template matching bookinfo/title
and another template matching biblioset/title
, again using the appropriate mode.
This arrangement provides control of each element in any context on each side of each kind of title page. You can't ask for more control than that.
DocBook XSL: The Complete Guide - 3rd Edition | PDF version available | Copyright © 2002-2005 Sagehill Enterprises |