Hi, 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-column column-width="80pt"/> <fo:table-column column-width="180pt"/> <fo:table-column column-width="150pt"/> <fo:table-column column-width="30pt"/> <fo:table-column column-width="40pt"/> <fo:table-column column-width="20pt"/> <fo:table-column column-width="50pt"/> <fo:table-column column-width="150pt"/> <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. One of the messages in the discussion group mentioned that specifying section and page breaks would be faster in processing a large xml file. BTW, is FOP useful in processing large files? Or, should I be looking at some other products for this purpose? Thanks. Swathi Reddy -----Original Message----- From: Joerg Pietschmann [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 1:28 AM To: FOP Dev Subject: FW: FOP section and page breaks "EXT-Reddy, Swathi A" <[EMAIL PROTECTED]> wrote: > Can someone please post a sample XSLT file that does the section breaks and > page breaks depending on the XML file? I have a XML file that looks like > this - > > <PAGE number="1"> > ........ > </PAGE> > <PAGE number="2"> > ..... Page breaks can be achieved by placing a break-before="page" or a break-after="page" attribute on a block level FO. There are a lot of different possibilities how to do this, what's appropriate heavily depends an your context. Here is one example which will work with the XML above: <xsl:template match="PAGE"> <fo:block break-after="page"> <xsl:apply-templates/> </fo:block> </xsl:template> This will create a blank page after the last page, which could be easily avoided with some conditional processing. Another potential drawback is that the page numbers will be continuous and wont honor the number attributes on the XML elements. If you want to have the latter, you'll have to use page sequences: <xsl:template match="PAGE"> <fo:page-sequence master-reference="some-master" initial-page-number="{@number}"> <xsl:apply-templates/> </fo:page-sequence> </xsl:template> Last point: i hope you know what you are doing by expressing the page structure in the XML. Are you sure the content of all XML PAGE elements will always fit on the physical pages as defined be the FO page masters? > I can add SECTION tags to tell the XSL file where the section break is. What's your definition of a section? It could be quite different from mine. HTH J.Pietschmann --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]