"EXT-Reddy, Swathi A" <[EMAIL PROTECTED]> wrote:
> When I started writing my xml file, I didn't have a <page> tag. I was
> depending on the <fo:flow> to do the page breaks.
> 
> <fo:flow flow-name="xsl-region-body">
>       <fo:table border-width="0.25pt">
... 
>       <fo:table-body font-size="8pt" color="black" font-family="Courier">
>               <xsl:apply-templates select="part"/>
>       </fo:table-body>
>       </fo:table>
> </fo:flow>
> 
> This worked fine when I had a 10 page document. I have to generate a 3000
> page document.
Do you mean you have *one* table spanning *3000* pages? Who
is going to be forced to read this?

Well, if there fits always a constant number N of rows on a page,
you can use the following:

  <xsl:stylesheet ... >
   <xsl:variable name="N" select="15"/> <!-- or whatever -->
   <xsl:template match="parent-of-your-part-element">
     <fo:root ... >
       <fo:layout-master-set>
         ...
       </fo:layout-master-set>    
       <xsl:for-each select="part[position() mod $N = 0]">
         <fo:page-sequence master-reference="your-master"
           initial-page-number="{position()}">
           <!-- static content etc. -->
           <fo:flow>
              <fo:table>
                <!-- your table details here -->
                <fo:table-body>
                  <xsl:apply-templates select=".|following-sibling::part[position &lt 
$N]"/>
                </fo:table-body>
              </fo:table>
           </fo:flow>
         </fo:page-sequence>
       </xsl:for-each>
   </xsl:template>
   <!-- more templates -->
  <xsl:stylesheet ... >

If the table rows are not of roughly the same height in general,
pages may overflow or only half filled, both a serious distortion
of the layout. You may enforce equal heigth by putting something
like height="2cm" on your fo:table-row elements.

> One of the messages in the discussion group mentioned that
> specifying section and page breaks would be faster in processing a large xml
> file.
Depending on your problem, it may be easier to try a fast machine
with a large memory and appropriate memory settings for the JVM first.

> BTW, is FOP useful in processing large files?
Depends heavily on the data. I produced a 350 page file on a 550MHz PIII
using 128MB RAM in roughly 3 min.

> Or, should I be looking at
> some other products for this purpose? Thanks.
It is said other products often have similar problems under similar
circumstances. You will have to try before you buy.

HTH
J.Pietschmann

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to