OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Want "Table of Contents" in HTML Chunked Headers

I want my headers on every html page (except the first) to show this:

row 1:                                             page title
row 2:            prev                            Table of Contents

I have successfully gotten the footer showing "Table of Contents"
instead of 'Home" by following Bob Stayton's instructions in his book.

I copied the header.navigation template from html/chunker-common.xsl
style sheet from 1.76.1 into my  customization layer and have modified
the second row middle cell so the parent title is not shown.  Then I
copied what I believe is the pertinent part of the
footer.navigation.template into the header, second row, center cell.

I haven't yet figured out how to tell reliably when I'm not on the first page.

I think the pertinent chunk is the code for the row 2 center cell
which is duplicated here:

              <td width="20%" align="center">
                  <xsl:when test="$home != . or $nav.context =
'toc'"><!-- I believe $home need to be something else -->
                    <a accesskey="h">
                      <xsl:attribute name="href">
                        <xsl:call-template name="href.target">
                          <xsl:with-param name="object" select="$home"/>
                      <xsl:call-template name="navig.content">
                        <xsl:with-param name="direction" select="'home'"/>
                    <xsl:if test="$chunk.tocs.and.lots != 0 and
$nav.context != 'toc'">

                <xsl:if test="$chunk.tocs.and.lots != 0 and
$nav.context != 'toc'">
                  <a accesskey="t">
                    <xsl:attribute name="href">
                      <xsl:apply-templates select="/*[1]"
                        <xsl:with-param name="recursive" select="true()"/>
                      <xsl:value-of select="$html.ext"/>
                    <xsl:call-template name="gentext">
                      <xsl:with-param name="key" select="'nav-toc'"/>

A gross solution I think is change $home to something else that
identifies the html from file "index.html" but haven't figured out
what yet.  I know I can put an id on the book element but don't know
how to reliably to tell whether that id is in scope or not.

By the way, I am using xhtml if that helps.  My document is a book.

When I use the chunk as is I get the TOC link on top sometimes (when
the file is a child of a chapter) and sometimes not (when the file is
the top of a chapter).

Ideas appreciated.


Thomas M. Browder, Jr.
Niceville, Florida

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]