Pages: 1
Print
Author Topic: First-level heading title on odd-page headers - PDF  (Read 2038 times)
txvia
Member

Posts: 44


« on: November 28, 2011, 02:21:25 PM »

Hi:
  I am trying to write a few lines of code to capture the first-level heading titles so that they can be included in odd-page headers. So far I've done the following:

1. In DITA_OT\demo\xmfo\Customization\fo\xsl\custom.xsl , I inserted the following code:

                                     <!--Header configuration-->
   <xsl:variable name="__body__even__header__col_3" select="$xmChapterTitle"/>
   <xsl:variable name="__body__odd__header__col_3" select="$xmTopicHeading1"/>

2. In DITA_OT\demo\xmfo\Customization\fo\xsl\xm_common_vars.xsl ,  I inserted the following code:

<!-- Topic title first level -->
   <xsl:param name="xmTopicHeading1">
       <xsl:choose>
         <xsl:when test="$map/descendant-or-self::topicref">
            <xsl:value-of
                    select="/descendant::*[contains(@class, ' bookmap/chapter ')][1] /descendant::*[contains(@class, ' map/topicref ')][1]/@navtitle"/>  
         </xsl:when>
         <xsl:otherwise><!-- nothing --></xsl:otherwise>
       </xsl:choose>
   </xsl:param>
   <!-- end Topic title first level -->

As you can see, the code in 2 above only grabs the first-level heading title from chapter 1 (navtitle). What I want is to have the first-level topic heading of each chapter appear on the odd-page header of their respective chapters, instead of just having the one for chapter 1 to appear throughout the document. Can anyone help? Thanks.

Logged
Pages: 1
Print
Jump to: