I am generating a big PDF report comprising of hundreds of pages, and I get
outOfMemory messages. I am using no images, I have already adjusted the
-Xms and -Xmx vals to 256M/512M on my 512M NTmachine. I do not have any
"Page x of y" type of references. Based on apache's recommendation, one
big reason for continuing to get the outOfMemory is because of I have all
of my data based in a single table which in turn is inside a single
sequence.I can have multiple sequences in one of 2 ways:
- call for a fresh page sequence after, say every 20 records (preferable,
since the data volume varies for each record).
- call for a page sequence per new page, wherein I specify that the number
of records per page is, say, 5
Can anyone point out how I can re-code my XSL.
An simplified example of my XML is:
<ROWSET>
<ROW>
<SSN></SSN>
<NAME></NAME>
<ADDRESS></ADDRESS>
<INFO>This text could run into 1 or more sentences depending on
the record</INFO>
</ROW>
<ROW>
- - - - - - - - - - -
</ROW>
- - - - - - -
</ROWSET>
My XSL looks like this:
<fo:page-sequence master-reference="default-master">
<fo:static-content flow-name="xsl-region-before">
---------
</fo:static-content>
<fo:static-content flow-name="xsl-region-after">
----------
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<fo:table table-layout="fixed">
<fo:table-column column-width="20mm" background-color="white"/>
<fo:table-column column-width="43mm" background-color="white"/>
<fo:table-column column-width="20mm" background-color="white"/>
<fo:table-column column-width="43mm" background-color="white"/>
<fo:table-header>
- - - - - - - - -
</fo:table-header>
<fo:table-body>
<xsl:apply-templates select="document
('AllEmployees.xml')/ROWSET/ROW">
</xsl:apply-templates>
</fo:table-body>
</fo:table>
</fo:flow>
</fo:page-sequence>
<xsl:template match="ROW">
<fo:table-row keep-with-next="always">
<fo:table-cell>
<fo:block><xsl:value-of select="SSN"/></fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block><fo:block><xsl:value-of select="NAME"/></fo:block>
</fo:table-cell>
<fo:table-cell padding="1.0pt">
<fo:block><xsl:value-of select="ADDRESS"/></fo:block>
</fo:table-cell>
<fo:table-cell padding="1.0pt">
<fo:block><xsl:value-of select="INFO"/></fo:block>
</fo:table-cell>
</fo:table-row>
</template>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list