From: Werner Donné (werner.donne@re.be)
Date: Wed Sep 29 2004 - 01:38:13 PDT
Kenneth,
This is what I use. Note that the actual TOC-lines that are generated
are meant for processing with CSSToXSLFO, but you can easily replace it
with whatever you want.
Regards,
Werner.
Kenneth Aitken wrote:
> Has anyone successfully created a Table of Contents (TOC) using XSLT to transform HTML files to FO files (and, ultimately, to PDF, e.g. with XEP), with the HTML structure:
> <h1>Chapter 1</h1>
> <h2>Section 1</h2>
> <h3>Paragraph 1</h3>
> <p>...........</p>
> <h3>Paragraph 2</h3>
> <p>...........</p>
> <h3>Paragraph 3</h3>
> <p>...........</p>
> <h2>Section 2</h2>
> <h3>Paragraph 1</h3>
> <p>...........</p>
> <h3>Paragraph 2</h3>
> <h2>Section 3</h2>
> <p>...........</p>
> <h2>Section 4</h2>
> <p>...........</p>
>
> <h1>Chapter 2</h1>
> <h2>Section 1</h2>
> <h3>Paragraph 1</h3>
> <p>...........</p>
> <h3>Paragraph 2</h3>
> <p>...........</p>
> <h3>Paragraph 3</h3>
> <p>...........</p>
> <h2>Section 2</h2>
> <h3>Paragraph 1</h3>
> <p>...........</p>
> <h3>Paragraph 2</h3>
> <h2>Section 3</h2>
> ...........
> <h2>Section 4</h2>
> ..........
> <h1>Chapter 3</h1>
> ...........
>
> This should generate a TOC structure in PDF via XSL-FO as follows:
> Chapter 1..................................1
> Section 1..................................1
> Paragraph 1
> Paragraph 2
> Paragraph 3
> Section 2..................................3
> Paragraph 1
> Paragraph 2
> Section 3..................................5
> Section 4..................................5
> Chapter 2..................................7
> Section 1..................................7
> Paragraph 1
> Paragraph 2
> Paragraph 3
> Section 2..................................9
> Paragraph 1
> Paragraph 2
> Section 3..................................11
> ..........
> Section 4..................................12
> .........
> Chapter 3..................................14
> We have already tried using <div class="first">...</div> to create a nested structure in HTML, and this succeeded in creating a TOC with 2 levels (i.e. h1, h2), but we need help with three levels (i.e. also with h3).Can anyone give us an example with some XSLT code?
>
>
>
> -------------------
> (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
> in the body of the message to majordomo@renderx.com from the address
> you are subscribed from.
> (*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html
>
>
-- Werner Donné -- Re BVBA Engelbeekstraat 8 B-3300 Tienen tel: (+32) 486 425803 e-mail: werner.donne@re.be
-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html
This archive was generated by hypermail 2.1.5 : Wed Sep 29 2004 - 01:54:56 PDT