← Prev in month ← Prev in thread
Next in thread → Next in month →

Trying to get page numbers in header of 'first' pages in a book

From
Gabriela Simonka <>
Date
2012-12-11T20:40:35+00:00
ID
CAHJE=b1F+gunFnY1omHwhH_=
Thread
Trying to get page numbers in header of 'first' pages in a book
Hello,

We have a customization layer for printing PDF files that 
customizes the header and footer of our documents. It worked fine until I
 changed my document from an article to a book. Now, I cannot seem to 
include page numbers in the header-content of the first pages the 
pageclasses that are included in my book: table of contents (lot), 
chapters (body), appendix (back), index - basically everything except 
the book titlepage.

Below is the code snippet from my customization stylesheet:

 <xsl:template name="header.content">
  <xsl:param name="pageclass"></xsl:param>
  <xsl:param name="sequence"></xsl:param>

  <xsl:param name="position"></xsl:param>
  <xsl:param name="gentext-key"></xsl:
param>
  <xsl:if test="$pageclass != 'titlepage'">

   <xsl:choose>

    <xsl:when test="(($sequence='first' and $pageclass!='index')
    or $pageclass='mybook-titlepage')">
    </xsl:when>
    <xsl:when test="($sequence='odd' and $position='left') or

      ($sequence='even' and $position='right')"></xsl:when>
    <xsl:when test="($sequence='even' and $position='center')">
     <xsl:apply-templates select="." mode="title.markup"/>

    </xsl:when>
    <xsl:when test="($sequence='odd' and $position='center')">
     <fo:retrieve-marker retrieve-class-name="section.head.marker"
                         retrieve-position="first-including-carryover"

                         retrieve-boundary="page-sequence"/>
    </xsl:when>
<!-- note the following only works for the index first page ... -->
    <xsl:when test="($sequence='odd' and $position='right') or

      ($sequence='even' and $position='left') or
      ($sequence='first' and $pageclass='index' and $position='right') or
      ($sequence='first' and $pageclass='lot' and $position='right') or

      ($sequence='first' and $pageclass='body' and $position='right') or
      ($sequence='first' and $pageclass='back' and $position='right')">
     <fo:page-number/>

    </xsl:when>
   </xsl:choose>
  </xsl:if>
 </xsl:template>

Any guidance would be greatly appreciated ...
← Prev in month ← Prev in thread
Next in thread → Next in month →