This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
Re: DocBook : <qandadiv< .vs. <sect1>
- From: Bob Stayton <bobs at caldera dot com>
- To: Alexander Voropay <a dot voropay at vmb-service dot ru>
- Cc: docbook at lists dot oasis-open dot org
- Date: Mon, 03 Feb 2003 10:43:37 -0800
- Subject: Re: DOCBOOK: DocBook : <qandadiv< .vs. <sect1>
- References: <NGEPINBGBOPDDDLEILPMGEOECNAA.a.voropay@vmb-service.ru>
On Mon, Feb 03, 2003 at 11:44:36AM +0300, Alexander Voropay wrote:
> Hi!
>
> I am maintaining a long FAQ list (RU.LINUX FAQ).
>
> It was done with DocBook XML + XSL.
>
> It is really big list, so, I use chunked-html to store
> all HTML parts separately. It works fine with <sect1>
> tags (one HTML per section).
>
> I've found special tags for FAQs : <qandadiv> <qandaentry>
> e.t.c. It looks very good for me.
>
> Unfortunately, I can't produce chunked-html for my FAQ
> with <qandadiv>. All XSL processors produces ONE BIG
> html.
>
> Does anyone know, Is there any way to produce chunked FAQ ?
>
>
> Old Style
> =====
> <sect1 id="p1">
> <title>Level_1</title>
> <para>...</para>
> <sect2 id="p1_1">
> <title>Level_2</title>
> <para>...</para>
> </sect2>
> </sect>
> =====
>
> New Style:
> =====
> <qandadiv id="p1">
> <title>Level_1</title>
> <qandaentry id="p1_1">
> <question>
> <para>Level_2</para>
> </question>
> <answer>
> <para>...</para
> </answer>
> </qandaentry>
> </qandadiv>
> =====
The chunking stylesheet does not chunk on qandadiv. That
is a block element, not a proper division in the
hierarchy. Let's say your document has a qandaset with
qandadivs in the middle of a section. If qandadivs are
chunked as well as section, then the section chunk will
contain everything before the qandadiv, including the
qandaset title, and everything after all the qandadivs, but
not the qandadivs. How does one reach the chunked
qandadivs? They aren't in the table of contents.
One would have to generate a TOC for the qandadivs
there in the middle of the section chunk.
It might be possible to chunk on qandadivs like you want,
but modifying the chunking stylesheets is, shall we say,
one of the more challenging customizations.
You can achieve something similar by using section with
qandaset (without a title) instead of qandadiv.
<section id="p1">
<title>Level_1</title>
<qandaset>
<qandaentry id="p1_1">
<question>
<para>Level_2</para>
</question>
<answer>
<para>...</para
</answer>
</qandaentry>
...
</qandaset>
</section>
These can nest as needed to form the question hierarchy.
This will properly chunk (if you turn on section chunking).
And they will appear in the table of contents. You
can even turn on section TOCs to list nested groups.
Bob Stayton 400 Encinal Street
Publications Architect Santa Cruz, CA 95060
Technical Publications voice: (831) 427-7796
The SCO Group fax: (831) 429-1887
email: bobs@sco.com