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] section'ed qandaentry in toc


Hi Joshua,
This will require an XSLT customization, but you can use a lot of existing
templates to create it.

Start with html/autotoc.xsl, where tables of contents are generated.  If
your top-level element is an article, then the template named component.toc
is called to create its TOC.  That template selects its child nodes (section
elements mostly) and calls 'make.toc' to start the TOC and begin processing
its content recursively.  The make.toc template processes the selected nodes
in mode="toc".

In your case, you will want to change the template with match="section" and
mode="toc" so it also selects qandadiv as its child nodes to process.  It
calls 'subtoc' with those selected  nodes as a parameter, and subtoc
processes each in mode="toc".  But there isn't a template with
match="qandadiv" and mode="toc", so you should create one in your
customization.  It just needs to process the qandadiv in
mode="qandatoc.mode" from html/qandaset.xsl:

<xsl:template match="qandadiv" mode="toc">
  <xsl:apply-templates select="." mode="qandatoc.mode"/>
</xsl:template>

I haven't tested this, so you may need to adjust the nesting of list levels
so they match up, but basically that should generate a qandadiv TOC inside a
section.

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net


----- Original Message ----- 
From: "Joshua Daniel Franklin" <joshuadfranklin@yahoo.com>
To: <docbook-apps@lists.oasis-open.org>
Sent: Sunday, August 07, 2005 6:52 PM
Subject: [docbook-apps] section'ed qandaentry in toc


> Hello,
>
> I maintain a rather large FAQ (>100 questions) for the Cygwin
> project that I recently converted to DocBook. We want to have
> two versions: a huge one-file, and a multifile. The one-file
> was easy and I've got it just the way I want it at
> http://cygwin.com/faq/faq-nochunks.html
>
> >From searching the mailing list it looks like the recommended
> way of doing the multifile was to make a separate section and
> qandaset for each desired page--again, no problem. However, I
> would like the first page to be a toc that shows every section
> and every qandaentry and can't figure out how. Is there a way?
>
> Thanks,
>
> Joshua Daniel Franklin
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> 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]