Re: How to arrange Pages in Fo
There really isn't a way to deal with the result try "after the
fact." However, depending on the organization of the XML, I'd think
something like a TOC could be "calculated" using XSLT.
Here's an example of what I mean. (Note that I omitted all the FO
stuff in order to clearly illustrate the point of ordered processing
<Book Title="Some Title">
<Chapter Title="First Chapter">
<P>Some text for the first ch.</P>
<Chapter Title="Second Chapter">
<P>Some text for the second ch.</P>
<Chapter Title="Third Chapter">
<P>Some text for the third ch.</P>
<Chapter Title="Fourth Chapter">
<P>Some text for the fourth ch.</P>
<!-- Create TOC -->
<xsl:with-param name="Book" select="Book"/>
<!-- Process the document as always -->
<!-- "Normal" template -->
<!-- Named template for TOC -->
Table Of Contents
What I do first is call a named template (i.e., "TOC") and pass it
the data I want it to deal with (the "Book" element and everything
under it) for the TOC. In that template, I iterate through
the "Chapter" elements and print out a TOC.
Then, after the call to the named template, I simply process the
document as always (i.e., using apply-templates or whatever). The
result isn't pretty, but I wasn't trying to format the output, just
get the output in the order I intended.
Hope this helps.
--- In XSL-FO@y..., "Anand" <a_pophale@y...> wrote:
> I am generating FO in a java program.I need to generate the 'table
> of Contents' page at last in my java program.
> But i want this page to appear as the first page in the PDF.
> Can i do so???I mean generating the table of contents in the
> at last but making this page appear as the first page????
> Help pls.....