On Jul 12, 2008, at 21:16, Marvin Wolfthal wrote:

Hi

I am generating a PDF that consists of a header and a data sequence,
each having a Category name and one or more Items, each with a result set table:
Category name
    Item(+)
        Result set table
        
I'm now running out of memory because the result sets are too large. My understanding is that the solution is use multiple page sequences, so that rendering will be done after each sequence is processed and memory freed up. Is there a way I can define a page sequence so that each Category and its group of Items will be processed as a single page? Currently all of my Categories and their items are being processed as a single huge sequence.

<fo:page-sequence master-reference="data">
    ...
    <fo:flow flow-name="data-region-body">
        <fo:block>
            <xsl:call-template name="Category" select="Category"/>

Just FYI: note that the 'select' attribute does nothing here. Either you 'call' templates by name, or you 'apply' matching templates to a set of nodes...


The processing involves an XSL transform of an XML file with more or less the following structure:

<snip />

Very roughly:

<xsl:template match="Report">
  <root xmlns="...">
    <layout-master-set>...</layout-master-set>
    <xsl:apply-templates select="Category" />
  </root>
</xsl:template>

<xsl:template match="Category">
  <page-sequence master-reference="data">
    <flow flow-name="data-region-body">
      <block><xsl:value-of select="@name" /></block>
      <block><xsl:apply-templates select="Item" /></block>
    </flow>
  </page-sequence>
</xsl:template>

<xsl:template match="Item">
  <table>
    ...

etc.


HTH!

Andreas

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

Reply via email to