xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fleetwood, Brett (SSABSA)" <bre...@ssabsa.sa.gov.au>
Subject using multiple page sequences
Date Fri, 12 Mar 2004 01:32:03 GMT
Hi all,

I am having out of memory issues when transforming my FO -> PDF using
fop-0.20.5rc2. I read that using multiple page sequences in the XSL and
therefore in the FO means that fop will release some memory. I don't see how
I can do this. My XML file is generated dynamically from a database so I
don't know how big it will be. Is there any solutions I can use that uses
multiple page sequences or possible change the xml structure, if not is
there another FOP transformer that isn't as memory intensive. Thanks in
advanced for any help. If I havn't provided enough info please ask and I can
get back to you.

<?xml version="1.0" encoding="UTF-8"?>
<report>
	<group name="body">
		<group name="school">
			<title><![CDATA[High School (001)]]></title>
			<group name="candidate">
				<group name="details">
					<record>
						<field
name="registration"><![CDATA[123456]]></field>
						<field
name="givens"><![CDATA[John Doel]]></field>
						<field
name="surname"><![CDATA[Smith]]></field>
						<field
name="gender"><![CDATA[M]]></field>
						<field name="date of
birth"><![CDATA[03 August 1985]]></field>
					</record>
					<record>
						<field
name="registration"><![CDATA[123456]]></field>
						<field
name="givens"><![CDATA[John Doel]]></field>
						<field
name="surname"><![CDATA[Smith]]></field>
						<field
name="gender"><![CDATA[M]]></field>
						<field name="date of
birth"><![CDATA[03 August 1985]]></field>
					</record>
					<record>
						<field
name="registration"><![CDATA[123456]]></field>
						<field
name="givens"><![CDATA[John Doel]]></field>
						<field
name="surname"><![CDATA[Smith]]></field>
						<field
name="gender"><![CDATA[M]]></field>
						<field name="date of
birth"><![CDATA[03 August 1985]]></field>
					</record>
					...
				</group>
			</group>
		</group>
	</group>
</report>

And the XSL looks like this.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
	<xsl:output indent="yes"/>
	<xsl:template match="text()|@*"/>
	<xsl:template match="*"/>

	<xsl:template match="/">
		<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
			
			<fo:layout-master-set>
				<fo:simple-page-master master-name="A4"
page-width="297mm" page-height="210mm" margin-top="5mm" margin-bottom="5mm"
margin-left="15mm" margin-right="15mm">
					<fo:region-before extent="95mm"/>
					<fo:region-body margin-top="5mm"
margin-bottom="5mm"/>
					<fo:region-after extent="10mm"/>
				</fo:simple-page-master>
				
			</fo:layout-master-set>
			
			<fo:page-sequence master-reference="contents">
				<fo:flow flow-name="xsl-region-body">
					<fo:block>this is some test
text</fo:block>
					<xsl:apply-templates/>
				</fo:flow>
			</fo:page-sequence>
			

		</fo:root>
	</xsl:template>

	<xsl:template match="report">
		<xsl:apply-templates select="group/group/group/group"/>
	</xsl:template>
	
	<xsl:template match="group">
		<xsl:apply-templates select="record"/>
	</xsl:template>
	
	<xsl:template match="record">
		<fo:block><xsl:value-of
select="field[@name='givens']"/></fo:block>
		<fo:block><xsl:value-of
select="field[@name='gender']"/></fo:block>
		<fo:block><xsl:value-of
select="field[@name='surname']"/></fo:block>
		<fo:block><xsl:value-of select="field[@name='date of
birth']"/></fo:block>
	</xsl:template>
</xsl:stylesheet>

---
BRETT FLEETWOOD
Analyst/Programmer


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Mime
View raw message