RE: [xsl] FOP : Grouping by position - Out Of Memory

Subject: RE: [xsl] FOP : Grouping by position - Out Of Memory
From: Jarno.Elovirta@xxxxxxxxx
Date: Thu, 19 Dec 2002 11:17:00 +0200
Hi,

> i've been looking in the archive for an example of grouping 
> by position with 
> Apache FOP, but i can not seem to find a working example. 
> I have a large xml-file, that i have to transform to a .pdf 
> report. It's about
> 200 pages (but it can get larger !). It's done with a 
> for-each for every record.
> And i need to have 2 records/page.
> I have to limit the amount of memory used by java to 128mb. 
> The result is that i get an "out of memory"-error.

Do you sort the records? Also, if you're using FOP, are you sure the memory doesn't run out in the FO processing, instead in XSLT phase?

> In the archive i've learned that "grouping by position" would 
> be the solution
> to the problem. How can i split up the for-each so that i 
> only have 2 records
> on one page, and that the memory does not get exhausted ?

Select only

  record[position() mod 2 = 1]

and there process the current record and the following one using the following or following-sibling axis.

--

Jarno - Covenant: Call The Ships To Port (Neon)

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread