[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] epub/chunking : why h1 tags for sections insteadof H2? (solved)
Good news. I think the answer lies in what you said. First, about that comment, it did not make much sense to me -- if only because epub/docbook.xsl also has the section.heading template in docbook.xsl file. Then I realized it is saying that epub/docbook.xsl is overriding what is in section.heading Second, I was confused about the hlevel vs. level variable. Third, I had gotten momentarily confused about which stylesheet I was referencing, but I figured that out. In epub/docbook.xsl I made this one line revision inside the section.heading template to add +1 to the level. By the way, perhaps this is a bug and should have always been +1? rj OLD <xsl:variable name="hlevel"> <xsl:choose> <!-- highest valid HTML H level is H6; so anything nested deeper than 7 levels down just becomes H6 --> <xsl:when test="$level > 6">6</xsl:when> <xsl:otherwise> <xsl:value-of select="$level"/> </xsl:otherwise> </xsl:choose> </xsl:variable> NEW: <xsl:variable name="hlevel"> <xsl:choose> <!-- highest valid HTML H level is H6; so anything nested deeper than 7 levels down just becomes H6 --> <xsl:when test="$level > 6">6</xsl:when> <xsl:otherwise> <xsl:value-of select="$level+1"/> *****************************my change </xsl:otherwise> </xsl:choose> </xsl:variable> The results: book = h1 chapter = h1 section = h2 section = h3 On Tue, Mar 15, 2011 at 10:55 AM, Keith Fahlgren <abdelazer@gmail.com> wrote: > Have you reviewed this template in epub/docbook.xsl? > > <!-- Change section.heading to improve SEO on generated HTML by doing > heading levels > "correctly". SEO rules are sometimes silly silly, but this does > actually create > a semantic improvement. > Note: This template needs to be manually maintained outside of > the html/sections.xsl > code, so make sure important changes get reintegrated. --> > <xsl:template name="section.heading"> > > > > Keith > On Tue, Mar 15, 2011 at 10:55 AM, Keith Fahlgren <abdelazer@gmail.com> wrote: > Have you reviewed this template in epub/docbook.xsl? > > <!-- Change section.heading to improve SEO on generated HTML by doing > heading levels > "correctly". SEO rules are sometimes silly silly, but this does > actually create > a semantic improvement. > Note: This template needs to be manually maintained outside of > the html/sections.xsl > code, so make sure important changes get reintegrated. --> > <xsl:template name="section.heading"> > > > > Keith > -- Robert Nagle 12777 Ashford Point Dr #1417 Houston, Texas 77082 713 893 3424 http://www.robertnagle.info
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]