From: SourceForge.net <no...@so...> - 2005-09-28 06:41:06
|
Bugs item #1297741, was opened at 2005-09-21 06:52 Message generated for change (Settings changed) made by bobstayton You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=373747&aid=1297741&group_id=21935 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: DocBook XSL Group: HTML >Status: Closed >Resolution: Wont Fix Priority: 5 Submitted By: Joachim Schlosser (jschlosser) >Assigned to: Robert Stayton (bobstayton) Summary: Chapters receive same HTML heading level as their sections Initial Comment: When writing a DocBook of type book, and using sections, chapters get the same level (h2) in HTML as their subordinary sections. Example document: See attachment. In order to get this right, I patched as seen below. Advantage: chapter and section get different <hx> levels. Disadvantage: promotes chapter title to same level as book title. For me, this disadvantage is not relevant, because I do not generate the book title. For a clean solution, sections would have to be denoted. Ideal solution would be to make configurable at what level the sectioning (including chapter level) should start. This would mean kind of an offset parameter that would be used in both chapter and section XSL code. My diff: 'd:\Programme\cygwin\usr\share\docbook-xsl\html\component.xsl'` --- /cygdrive/d/docbook/docbook-xsl-1.69.1/html/component.xsl 2005-09-21 15:30 :55.385152000 +0200 +++ /usr/share/docbook-xsl/html/component.xsl 2005-09-21 15:48:32.104640000 +0 200 @@ -27,7 +27,7 @@ <xsl:when test="ancestor::sect3">4</xsl:when> <xsl:when test="ancestor::sect2">3</xsl:when> <xsl:when test="ancestor::sect1">2</xsl:when> - <xsl:otherwise>1</xsl:otherwise> + <xsl:otherwise>0</xsl:otherwise> </xsl:choose> </xsl:variable> ---------------------------------------------------------------------- Comment By: Robert Stayton (bobstayton) Date: 2005-09-24 17:39 Message: Logged In: YES user_id=193218 This compromise was made a long time ago by Norm Walsh simply because there are not enough h levels for the Docbook hierarchy. Most people rely on CSS to style their headings. They use the class="chapter" attribute in a CSS selector to differentiate it from the section h2. I would recommend the same for you. I don't think I will change the stylesheet now, because it would break the CSS stylesheets that people have written that are dependent on how h2 is used today. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=373747&aid=1297741&group_id=21935 |