Exclude topics from numbering by their title
Posted: Wed Sep 15, 2021 6:57 am
I use:
*.ditamap
transformation scenario - "DITA Map PDF - based on XSL-FO",
For numbering topics, I use "generate numbers before the topic's title" plugin from raducoravu.
I use custom.xsl against css.
I need to exclude topics from numbering by their title.
For example - topics starting with title "Example".
I made the following edits to the file customization.xsl of "generate numbers before the topic's title" plugin:
<xsl:variable name="topicName" select="ancestor-or-self::*[contains(@class, ' topic/title ')]"/>
<!-- Normal topics -->
<xsl:when test="$depth lt (xs:integer($numbers-before-title-depth) + 1)">
<xsl:number count="*[contains(@class, ' map/topicref ') and not(starts-with($topicName, 'Example'))] [not(ancestor-or-self::*[contains(@class, ' bookmap/frontmatter ')])]" format="1.1" level="multiple"/>
</xsl:when>
In pdf on toc and on topic page the number for topics "Example ..." is not displayed, but they are taken into account when calculating numbers of the following topics.
I no need to taken into account topics "Example ..." when calculating numbers of the following topics
Need help, advice
.
Thanks in advance.
*.ditamap
transformation scenario - "DITA Map PDF - based on XSL-FO",
For numbering topics, I use "generate numbers before the topic's title" plugin from raducoravu.
I use custom.xsl against css.
I need to exclude topics from numbering by their title.
For example - topics starting with title "Example".
I made the following edits to the file customization.xsl of "generate numbers before the topic's title" plugin:
<xsl:variable name="topicName" select="ancestor-or-self::*[contains(@class, ' topic/title ')]"/>
<!-- Normal topics -->
<xsl:when test="$depth lt (xs:integer($numbers-before-title-depth) + 1)">
<xsl:number count="*[contains(@class, ' map/topicref ') and not(starts-with($topicName, 'Example'))] [not(ancestor-or-self::*[contains(@class, ' bookmap/frontmatter ')])]" format="1.1" level="multiple"/>
</xsl:when>
In pdf on toc and on topic page the number for topics "Example ..." is not displayed, but they are taken into account when calculating numbers of the following topics.
I no need to taken into account topics "Example ..." when calculating numbers of the following topics
Need help, advice

Thanks in advance.