I am trying to find a way to restart page number from 1 for each chapter in the PDF output, instead of using the default continuous page numbering that DITA-OT offers. I was trying to uncomment parts of this code in "commons.xsl":
Code: Select all
<!--BS: uncomment if you need reset page numbering at first chapter-->
<xsl:variable name="id" select="ancestor-or-self::*[contains(@class, ' topic/topic ')]/@id"/>
<xsl:variable name="mapTopic" select="key('map-id', $id)"/>
<xsl:if test="not(($mapTopic/preceding::*[contains(@class, ' bookmap/chapter ') or contains(@class, ' bookmap/part ')])
or ($mapTopic/ancestor::*[contains(@class, ' bookmap/chapter ') or contains(@class, ' bookmap/part ')]))">
But didn't seem to work at all, I was wondering where else could I have done to make this happen? Thanks for your help.