This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
Re: [docbook] Table of Contents structure
- From: Bob Stayton <bobs at sco dot com>
- To: waldron dot Navix at canon dot co dot jp
- Cc: docbook at lists dot oasis-open dot org
- Date: Wed, 4 Jun 2003 14:49:43 -0700
- Subject: Re: [docbook] Table of Contents structure
- References: <49256D3B.000DCEFA.00@000mail04mta.canon.co.jp>
On Wed, Jun 04, 2003 at 11:32:13AM +0900, waldron.Navix@canon.co.jp wrote:
> Hi,
> New to the list, and this is my first question.
> I've been doing XML work for the last several years now, using my own structure
> designs for each job. This is the first time though I've tried marking up a doc
> using Docbook (customer requires it). My problem is in the TOC Preface section.
> There does not seem to be enough depth there to do what I need. I have a preface
> with multiple levels (sections). The Tocfront elements don't allow sublevels
> (children), and I don't want to use the Tocchap elements until I get into the
> main body (chapters) of the TOC. Tocpart seems to be limited to just Tocentry
> too...
> So may Preface would look something like this normally (by my own design...):
> <toc>
> <title>Contents</title>
> <preface>
> <tocA>A-title</tocA>
> <tocA>A-title
> <tocB>B-title</tocB>
> <tocB>B-title</tocB>
> </tocA>
> <tocA>A-title
> <tocB>B-title</tocB>
> <tocB>B-title</tocB>
> </tocA>
> </preface>
> <chapter value="1">
> ... and so on.
>
> Could someone offer a logical method of markup for a TOC preface with multiple
> levels?
Most people use the stylesheet to generate the TOC automatically.
That way you don't have to worry about keeping the TOC is sync
with the document. The DocBook DSSSL and XSL stylesheets
will create a TOC for a book, and the Preface entry in
the TOC will show multiple section levels.
If you have need to edit the TOC, then the XSL stylesheets
provide a tool to enable that. See:
http://www.sagehill.net/xml/docbookxsl/SolveProblems.html#GenerateTOC
But then I'm assuming you are using the DocBook XSL
stylesheets, which may be a bad assumption. Even if
you are not, the maketoc.xsl stylesheet described in the
above link can be used to generate a <toc> document from
your book. That <toc> document uses only nested <tocentry>
elements, which you can then write a stylesheet for.
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
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-help@lists.oasis-open.org