RE: [xep-support] Using markers for headers

From: Ettinger, Christian <Christian.Ettinger@3SOFT.de>
Date: Mon Sep 18 2006 - 06:41:22 PDT

Hi David,
 
in my Docbook customization layer I use <fo:retrieve-marker> for this purpose. Following is the template that prints chapter titles on the left and section titles on the right page header. The titles on the right hand side are always the title of the last section heading that occurred. Is this what you are trying to do?

<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="''"/>
 
  <!-- pageclass can be titlepage, lot, front, body, back, index -->
  <!-- sequence can be first, odd, even, blank -->
  <!-- position can be left, center, right -->
  
  <fo:block font-style="italic">
    <xsl:choose>
      <xsl:when test="$pageclass = 'titlepage'"/>
      <xsl:when test="$sequence = 'first' or $sequence = 'blank'"/>
      <xsl:when test="$position = 'center'">
        <xsl:choose>
          <xsl:when test="ancestor::book and ($double.sided != 0)
                          and $sequence = 'odd'">
            <fo:retrieve-marker retrieve-class-name="section.head.marker"
                                retrieve-position="first-including-carryover"
                                retrieve-boundary="page-sequence"/>
          </xsl:when>
          <xsl:otherwise>
            <xsl:apply-templates select="." mode="titleabbrev.markup"/>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:when>
      <xsl:when test="$position='left' and $double.sided != 0
                      and $sequence = 'even'">
        <fo:page-number/>
      </xsl:when>
      <xsl:when test="$position='right' and $double.sided != 0
                      and $sequence = 'odd'">
        <fo:page-number/>
      </xsl:when>
      <xsl:when test="$position='right' and $double.sided = 0">
        <fo:page-number/>
      </xsl:when>
    </xsl:choose>
  </fo:block>
</xsl:template>

Hope this helps you, it works for me.

Christian

--
Dipl.-Ing. (FH) Christian Ettinger, Business Unit PD-36
3SOFT GmbH - Member of the Elektrobit Group,
Frauenweiherstraße 14, 91058 Erlangen, Germany
Phone: +49 (9131) 7701-249  mailto:christian.ettinger@3SOFT.de
Fax: +49 (9131) 7701-333  http://www.3SOFT.de
-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html
Received on Mon Sep 18 06:49:27 2006

This archive was generated by hypermail 2.1.8 : Mon Sep 18 2006 - 06:49:27 PDT