On Sat, 2004-05-08 at 01:33, Dave Pawson wrote:
At 20:17 06/05/2004, Karsten Wade wrote:
>Anyway ... I resolved it this way.
>
>https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=122665 includes a
>simple two line patch to fedora-docs/xsl/main-html.xsl:
>
>--- main-html.xsl 1 Oct 2003 19:02:56 -0000 1.2
>+++ main-html.xsl 6 May 2004 18:52:51 -0000
>@@ -24,6 +24,8 @@
> book toc
> article toc
> chapter nop
>+qandadiv toc
>+qandaset toc
> sect1 nop
> sect2 nop
> sect3 nop
>
>Then I added this one line to my XML:
>
> <qandaset defaultlabel="qanda" id="selinux-faq-list">
>+ <?dbhtml toc="1"?>
> <qandaentry>
>
>This generated the TOC. It could be prettier, but it works for me for
>now.
I've seen the pi's being used, but have you tried
<toc/>
> <qandaset defaultlabel="qanda" id="selinux-faq-list">
>+ <?dbhtml toc="1"?>
> <qandaentry>
instead? That normally causes the toc insertion.
Its not valid (the toc element) where you have the pi, must it be there?
I'm still not understanding completely. The processing instructions
(PIs) are a valid way of tackling this, yes? Or is the problem that
this one is only really good for HTML output?
I also didn't have success with the <toc />. In my <article>, the only
place I can validly insert a <toc></toc> block is inside of the
<sect1>. Doing so doesn't make it appear in the rendered HTML, probably
because of the stylesheet again, although I can't see why. 'sect1 nop'
in main-html.xsl disables ToCs for the sections, and a ToC is generated
and enabled via 'article toc'.
I also discovered that the mere inclusion of 'qandadiv toc' in the
<xsl:param name="generate.toc"> section of fedora-docs/xsl/main-html.xsl
is enough to generate the ToC that appear after the title of each
<qandadiv>. The only way I have successfully created the entire 'table
of questions' for the <qandaset> is with the PI <?dbhtml
toc="1"?>.
/me scratches his head
I'm happy with my hack for the moment, but I'm not happy with not fully
understanding _why_ it works as it does. Back to the books ...
- Karsten
--
Karsten Wade, Tech Writer
this .signature subject to random changes`
http://people.redhat.com/kwade/
gpg fingerprint: 2680 DBFD D968 3141 0115 5F1B D992 0E06 AD0E 0C41