Modifying header title size for topics in HTML output
Posted: Tue Feb 10, 2009 11:49 pm
At my worksplace we are using an alternate version of dita2html.xsl that puts all the content on a single page - instead of generating a main page with the TOC which you then click on various links to get to the individual topics on their own page - so now the default sizing of the topic header titles has become a problem in that they are all the same size (huge to say the least), and do not refelect the hierarchy in the ditamap. I was trying to investigate a way to alter this by looking for any relevant section in dita2htmlImpl.xsl and found a section from lines 277-294 that mention the heading size, but I'm not sure if this can be modified for our purposes.
In its comments section it says:
and also has a modifiable section here (lines 283-286):
But I am unsure what the 6 refers to. Is it checking the nesting depth? Aside from that though, am I even barking up the right tree? Is there any way you can think of to specify to DITA that topic headings should be sized differently based on their hierarchical position in the ditamap?
Thanks for your input.
~Josh
In its comments section it says:
Code: Select all
<!-- NESTED TOPIC TITLES (sensitive to nesting depth, but are still processed for contained markup) -->
<!-- 1st level - topic/title -->
<!-- Condensed topic title into single template without priorities; use $headinglevel to set heading.
If desired, somebody could pass in the value to manually set the heading level -->
Code: Select all
<xsl:choose>
<xsl:when test="count(ancestor::*[contains(@class,' topic/topic ')]) > 6">6</xsl:when>
<xsl:otherwise><xsl:value-of select="count(ancestor::*[contains(@class,' topic/topic ')])"/></xsl:otherwise>
</xsl:choose>
Thanks for your input.
~Josh