Davide
Davide

Reputation: 1

How to retrieve and use chapter numbers in AntennaHouse PDF generation with DITA Open Toolkit?

I am a novice in stylesheet development, and my approach is still very trial & error. At the moment I am trying to retrieve the number of the chapter (there's already a template in the stylesheet I am working on) to be able to use it in a when statement

<xsl:template match="*" mode="randomName">
  <fo:marker marker-class-name="current-chapter-number">
      ...
      ...
  </fo:marker>
</xsl:template>
<xsl:template name="randomName2">
  <xsl:param name="flow-part" select="'body'"/>
  <xsl:variable name="nr">
    <fo:retrieve-marker retrieve-class-name="current-chapter-number"/>
  </xsl:variable-->
  <fo:static-content flow-name="odd-{$flow-part}-tabs">
    <fo:block-container>
      <fo:block>      
        <xsl:value-of select="$nr"/>
      </fo:block>   
    </fo:block-container>
  </fo:static-content>
</xsl:template>

I tried in many different ways but I am probably ignoring the marker functioning and its correct use. Any help or pointers to good resources is much appreciated, thank you!

Upvotes: 0

Views: 47

Answers (1)

Jason Coleman
Jason Coleman

Reputation: 60

Try using: <fo:retrieve-marker retrieve-class-name="current-topic-number"/>. I think that is the name of the class that the DITA OT uses for the chapter numbers. It likely doesn't matter which rendering engine (Antennae House, FOP, etc.) as the DITA OT is generating the FO file and then passing that to the rendering engine.

Upvotes: 0

Related Questions