Limiting levels of chapter numbering in ditamaps
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 86
- Joined: Wed Feb 09, 2011 10:43 pm
Limiting levels of chapter numbering in ditamaps
Hello,
I work with ditamaps and I am able to number all the levels of my ditamap in my pdf output. I would like to limit the numbering to the 2 first levels of the ditamap.
In the customs.xsl file ( under xsl) I added
[/code]
And I got the exact same result: all levels are numbered.
I tried adding but with no success.
Is there something equivalent to the for chapter numbering? Is there a way to limit the levels included in the numbering?
Regards
Carole
I work with ditamaps and I am able to number all the levels of my ditamap in my pdf output. I would like to limit the numbering to the 2 first levels of the ditamap.
In the customs.xsl file ( under xsl) I added
Code: Select all
<xsl:number count="*[contains(@class, ' map/topicref ')] [not(ancestor-or-self::*[contains(@class, ' bookmap/frontmatter ')])]" format="1.1" level="multiple" />
And it numbered all the levels.
the I replaced the previous code by
[code]
<xsl:number format="1" count="topicref|topicref" level="multiple" />
And I got the exact same result: all levels are numbered.
I tried adding
Code: Select all
<xsl:for-each select="topicref [position()< 2]"/>
Is there something equivalent to the
Code: Select all
<xsl:variable name="tocMaximumLevel">4</xsl:variable>
Regards
Carole
-
- Posts: 9449
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Limiting levels of chapter numbering in ditamaps
Hi Carole,
I do not have enough information about what template you overwrote in your custom.xsl.
If you have a DITA PDF customization folder which I could test please send it to support@oxygenxml.com and I will try to take some time to look into this.
You could also post about this issue on the DITA Users List, maybe they have some suggestions for you.
Regards,
Radu
I do not have enough information about what template you overwrote in your custom.xsl.
If you have a DITA PDF customization folder which I could test please send it to support@oxygenxml.com and I will try to take some time to look into this.
You could also post about this issue on the DITA Users List, maybe they have some suggestions for you.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 86
- Joined: Wed Feb 09, 2011 10:43 pm
Re: Limiting levels of chapter numbering in ditamaps
Hello,
I guess I needed to post the question to be able to get the 'Radu' inspiration.
well in one of the users group I found part of a solution.
This is my solution. In the customs.xsl file, add:
And the result is that only the first two levels of the dita map are numbered.
If you use the following values instead, only levels 2 and 3 are numbered
<xsl:when test="$level = 2 or $level = 3">
But I did not find how to limit to 3 levels
but for now,this solves my problem.
Regards
Carole
I guess I needed to post the question to be able to get the 'Radu' inspiration.

well in one of the users group I found part of a solution.
This is my solution. In the customs.xsl file, add:
Code: Select all
<xsl:template match="*" mode="getTitle">
<xsl:variable name="topic" select="ancestor-or-self::*[contains(@class, ' topic/topic ')[1]" />
<xsl:variable name="id" select="$topic/@id" />
<xsl:variable name="mapTopics" select="key('map-id', $id)" />
<xsl:variable name="level" select="count(ancestor::*[contains(@class,' topic/topic ')])"/>
<fo:inline>
<xsl:choose>
<xsl:when test="//othermeta[@name='ChapterNumbering'][@content='yes']">
<xsl:for-each select="$mapTopics[1]">
<xsl:choose>
<xsl:when test="$level = 1 or $level = 2">
<xsl:number count="*[contains(@class, ' map/topicref ')] [not(ancestor or-self::*[contains(@class, ' bookmap/frontmatter ')])]" format="1.1" level="multiple"/>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
</xsl:choose>
</fo:inline>
<xsl:text> </xsl:text>
<xsl:apply-templates />
</xsl:template>
And the result is that only the first two levels of the dita map are numbered.
If you use the following values instead, only levels 2 and 3 are numbered
<xsl:when test="$level = 2 or $level = 3">
But I did not find how to limit to 3 levels

Regards
Carole
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service