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: Re: [docbook-apps] Single-file HTML TOC entry for all of the file?


Hi Steinar,
The template named component.toc in html/autotoc.xsl generates the TOC for 
an article (and chapter, etc.). It calls make.toc with a nodes parameter 
for the top level elements in the TOC.  Normally it selects all the child 
nodes, but you could customize it to select the article element itself as 
its content, and then the recursive process will select the sections below 
the article:

<xsl:template name="component.toc">
  <xsl:param name="toc-context" select="."/>
  <xsl:param name="toc.title.p" select="true()"/>

  <xsl:call-template name="make.toc">
    <xsl:with-param name="toc-context" select="$toc-context"/>
    <xsl:with-param name="toc.title.p" select="$toc.title.p"/>
    <xsl:with-param name="nodes" select="."/>
  </xsl:call-template>
</xsl:template>


Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net


----- Original Message ----- 
From: "Steinar Bang" <sb@dod.no>
To: <docbook-apps@lists.oasis-open.org>
Sent: Sunday, December 31, 2006 12:34 AM
Subject: [docbook-apps] Single-file HTML TOC entry for all of the file?


> Platform: Intel Pentium M,
>   Ubuntu Dapper,
>   docbook-xml 4.4-4, article document
>   docbook-xsl 1.70.1,
>   xsltproc 1.1.15-ubuntu1
>
> In a single-file HTML document, created from a DocBook XML <article>,
> I'm using CSS to position the TOC fixed on the left side of the body
> text in the article, to get a "floating" navigation menu already shown
> (on reasonable browsers, that is...).
>
> One issue with this navigation menu, is that there is no TOC entry for
> showing all of the document, including the article title, and
> articleinfo stuff.
>
> Is it possible to get a TOC entry for the start of the article?  I've
> been studying Bob's book without findin anything:
> http://www.sagehill.net/docbookxsl/TOCcontrol.html
>
> Thanx!
>
>
> - Steinar
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
>
>
> 




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