Hi Gabriela,
The problem is with your first xsl:when clause:

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

This test is true for any 'first' pages that are not index pages, and so it 
never reaches the test further down.

Bob Stayton
Sagehill Enterprises
[email protected]


From: Gabriela Simonka 
Sent: Wednesday, December 12, 2012 9:29 AM
To: [email protected] 
Subject: [docbook-apps] Trying to get page numbers on 'first' pages


Hello,

(This message was sent to the docbook list yesterday, I think it should have 
been sent to this one)
 
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 ...

-Gabriela
-- 
      Gabriela Simonka 
      Technical Writer 
      Rédactrice technique 
--------------------------------------------------------------------------
     
      INRO
      376 Victoria Avenue, Suite 200
      Westmount, Montréal QC Canada H3Z 1C3
      tel +1 514-369-2023 x233 
      fax +1 514-369-2026
      www.inrosoftware.com        

--------------------------------------------------------------------------

      DISCLAIMER: This message, including attachments, may contain confidential 
information for the sole use of the intended recipient(s). Any unauthorized 
use, disclosure, viewing, copying, alteration, or distribution of any 
information in this message is prohibited. If you have received this message in 
error please notify the sender immediately.
     
      AVIS DE CONFIDENTIALITÉ : Ce message, y compris les fichiers joints, 
pourrait contenir des renseignements confidentiels à l'intention exclusive du 
(des) destinataire(s) prévu(s). L'utilisation, la divulgation, la lecture, la 
reproduction, la modification ou la distribution non autorisées en tout ou en 
partie du contenu de ce message sont interdites. Si vous avez reçu ce message 
par erreur, veuillez communiquer avec l'expéditeur sans délai. 
     

<<inrosig.png>>

Reply via email to