A puzzle for any DocBook gurus that may be lurking around:
I'm using DocBook XML (with an XSL stylesheet) for documenting a moderately large software project, containing several specialized components (tovid, link in my sig).
I want the DocBook structure to be a "book" containing several "chapter"s. I'm putting all of the documentation in a single .xml file, for now.
I use
xmlto to generate HTML output:
Code:
xmlto -m tovid_documentation.xsl html tovid_documentation.xml
I have this definition in my XSL:
Code:
<!-- Chunking (one chunk per chapter) -->
<xsl:param name="chunk.section.depth" select="0"/>
My HTML output looks good, but for some reason H2-level headings are being used for chapter titles. H2-level headings are also being used for sub-chapter section titles.
This is a known issue. Googling found
suggestions like this to
style the H2s with CSS. These suggestions imply "it looks the way you want without actually being correct" - they also note that you can customize the XSL to make it correct, but why bother.
Also a post from
Norman Walsh himself, from almost four years ago, that he thought it was a problem and should be fixed somehow. But again, no hint how to accomplish it. Further Googling has been essentially fruitless, except for a few groans that HTML heading levels aren't deep enough to fully support DocBook anyway. (Really, if you need more than 6-deep headings in a single HTML file, you should think about reorganizing).
It all boils down to this: Can anyone tell me how I can get my XSL stylesheet to cause
correct heading generation? I want chapter titles to generate H1s, instead of H2s that I have to kludge with CSS for correct appearance.
Thanks in advance!