XML technologies / DocBook / Generating FO (PDF) / Editing headers and footers / Adding the author
(Excerpt from "DocBook-XML: Media-neutral and platform-independent publishing" by Thomas Schraitle)
The previous snippet is extended so that the document’s author appears on the left side of the footer on all even or odd pages:
<xsl:template name="header.content">
<!-- Leere Kopfzeile -->
</xsl:template>
<xsl:template name="footer.content">
<xsl:param name="pageclass" select="''"/>
<xsl:param name="sequence" select="''"/>
<xsl:param name="position" select="''"/>
<xsl:param name="gentext-key" select="''"/>
<xsl:choose>
<xsl:when test="$sequence ='odd' and $position='center'">
<fo:page-number/>
</xsl:when>
<xsl:when test="$sequence ='even' and $position='center'">
<fo:page-number/>
</xsl:when>
<xsl:when test="$sequence ='even' and $position='left'">
<xsl:apply-templates select="ancestor-or-self::book/bookinfo/author[1]"/>
</xsl:when>
<xsl:when test="$sequence ='odd' and $position='left'">
<xsl:apply-templates select="ancestor-or-self::book/bookinfo/author[1]"/>
</xsl:when>
</xsl:choose>
</xsl:template>
Copyright © 2009 Millin Verlag
You may print the online version for your private use.
Otherwise, this chapter from "DocBook-XML: Medienneutrales und plattformunabhängiges Publizieren" is subject to the same provisions as the printed edition: the work, including all its parts, is protected by copyright. All rights are reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
Millin Verlag, Siebengebirgsring 36, 53797 Lohmar, info(at)millin.de
back to top