Table of Contents
To implement changebars on certain DocBook elements, it was necessary
to override certain templates, rather than wrapping their output in an
<fo:block>
element. If your customisation layer
also overrides the same templates, your output format may not be used correctly. If this occurs,
it may be necessary to incorporate your customisation into the DeltaXML overrides in the
overridden-templates.xsl
.
DeltaXML Docbook Changes overrides the following templates:
<xsl:template match="bibliography">
(defined in biblio.xsl
)
<xsl:template match="colophon">
(defined in component.xsl
)
<xsl:template name="itemizedlist.label.markup">
(defined in lists.xsl
)
<xsl:template match="orderedlist/listitem" mode="item-number">
(defined in lists.xsl
)
<xsl:template name="format.footnote.mark">
(defined in footnote.xsl
)
<xsl:template match="ulink" name="ulink">
(defined in xref.xsl
)
Some customisations may rewrite templates to change the styling of a particular element. Let's imagine a slightly contrived example where you want to put a background image behind a section title. Your customisation may look like this (not necessarily correct, titles usually use different modes but it suffices as an example):
<xsl:template match="section/title"> <fo:block background-image="url(Images/spots.jpg)"> <xsl:value-of select="."/> </fo:block> </xsl:template>
This will output a block with a background image and include the text content of the title in the block.
However, if the text of the title had changed, no change highlighting would be present. This is
because of the use of <xsl:value-of>
instead of
<xsl:apply-templates>
. Using the latter would enable the contents
of the title to be processed with change highlighting should it be necessary. To fix this, the customised
template should read:
<xsl:template match="section/title"> <fo:block background-image="url(Images/spots.jpg)"> <xsl:apply-templates select="."/> </fo:block> </xsl:template>
As mentioned, this is just an example and may be a little contrived. However, it does explain a principle that should make customisations more flexible in general, not just when using DeltaXML Docbook Changes.