Re: [dssslist] Location of toc

Subject: Re: [dssslist] Location of toc
From: Jany Quintard <jany.quintard@xxxxxxx>
Date: Fri, 22 Oct 2004 09:58:03 +0200
* Tuukka Mdkinen [Fri, 22/10/2004 at 10:32 +0300]
> Hi everyone
> I would like to insert some of the front matter before table of contents 
> in my document but I'm a complete newbie to dsssl and don't know how to 
> accomplish that. My document is composed as:
> <book>
>   <preface></preface>
>   <preface></preface>
>   <preface></preface> <---- toc after this
>   <chapter></chapter>
>   <chapter></chapter>
> ... more chapters
> </book>

You could try something like this:

(element book
    (process-node-list (select-elements (children) "preface"))

    (making of the toc)
    (process-node-list (select-elements (children) "chapter"))))
thus choosing to process the prefaces, the toc and then the chapters
with the help of select-elements.

I think (not tested), that you could do something like that too:

(element chapter
    (if (equal? (child-number) 1)
        (making of the toc)

if you are processing the first chapter (or the las preface), you insert
the building of vthe toc.


Current Thread