[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: How to include a header on Part titlepage
Using Docbook 4.5 and fop 0.93, I’m trying to modify
the header.table template to include a header table on the Part titlepage, but
I don’t know how to choose the Part titlepage because it doesn’t
have a pageclass. I tried testing for $element = ‘part’, but that
didn’t work. The only reason I want a header on the part page is to
include a graphic over which I want to print the part number. <!-- Format running header content
--> <xsl:template name="header.content"> <xsl:param name="pageclass" select="''"/> <xsl:param name="sequence" select="''"/> <xsl:param name="position" select="''"/> <xsl:param name="gentext-key" select="''"/> <!-- Using images
in headers (without rules) --> <xsl:param name="left.page.header.image">../../shared/rsrc/graphics/left_dots.jpg</xsl:param> <xsl:param name="right.page.header.image">../../shared/rsrc/graphics/right_dots.jpg</xsl:param> <xsl:param name="right.title.page.header.image">../../shared/rsrc/graphics/dots_1.jpg</xsl:param> <xsl:variable name="candidate">
<!-- sequence can be odd, even, first, blank -->
<!-- position can be left, center, right -->
<xsl:choose>
<xsl:when test="($pageclass = 'body' or
$pageclass = 'back') and $sequence = 'first' and $position = 'right'">
<fo:block space-before.optimum="-0.42in" space-before.minimum="-0.42in" space-before.maximum="-0.42in"
space-before.conditionality="retain" space-after.optimum="0.25in" space-after.minimum="0.25in" space-after.maximum="0.25in">
<xsl:attribute name="text-align">right</xsl:attribute>
<fo:external-graphic>
<xsl:attribute name="src">
<xsl:value-of select="$right.title.page.header.image"/>
</xsl:attribute>
<xsl:attribute name="height">1.271in</xsl:attribute>
<xsl:attribute name="width">2.563in</xsl:attribute>
<xsl:attribute name="content-width">2.563in</xsl:attribute> </fo:external-graphic> </fo:block>
</xsl:when>
<xsl:when test="$pageclass != 'titlepage'
and ($sequence = 'odd' or $sequence='first') and $position = 'right'">
<fo:retrieve-marker retrieve-class-name="section.head.marker"
retrieve-position="first-including-carryover"
retrieve-boundary="page-sequence"/><xsl:text> </xsl:text><fo:external-graphic>
<xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
<xsl:attribute name="width">0.125in</xsl:attribute>
<xsl:attribute name="src">
<xsl:call-template name="fo-external-image">
<xsl:with-param name="filename" select="$right.page.header.image"
/>
</xsl:call-template>
</xsl:attribute>
</fo:external-graphic>
</xsl:when>
<xsl:when test="($sequence = 'even' or
$sequence='blank') and $position = 'left'">
<fo:external-graphic>
<xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
<xsl:attribute name="width">0.125in</xsl:attribute>
<xsl:attribute name="src">
<xsl:call-template name="fo-external-image">
<xsl:with-param name="filename" select="$left.page.header.image"
/>
</xsl:call-template>
</xsl:attribute>
</fo:external-graphic><xsl:text> </xsl:text><fo:retrieve-marker retrieve-class-name="section.head.marker"
retrieve-position="first-including-carryover"
retrieve-boundary="page-sequence"/>
</xsl:when>
</xsl:choose> </xsl:variable>
<!-- Does runtime parameter turn off blank page headers? -->
<xsl:choose>
<xsl:when test="$sequence='blank' and
$headers.on.blank.pages=0">
<!-- no output -->
</xsl:when>
<!-- titlepages have no headers, but Vocera puts a header over the
legal notice that follows the title page. -->
<xsl:when test="$pageclass = 'titlepage'
and $sequence = 'first'">
<!-- no output -->
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="$candidate"/>
</xsl:otherwise>
</xsl:choose> </xsl:template> |
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]