[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Multi page pdf using fop-one page for each person

Subject: RE: Multi page pdf using fop-one page for each person tag
From: "Ferry, Jeremy" <Jeremy_Ferry@xxxxxxxxxxxx>
Date: Fri, 4 Apr 2008 09:23:31 -0500
RE:  Multi page pdf using fop-one page for each person
I do this exact thing for a bill of lading document where each
<SubShipment> is on it's own page. This is the basic FO I use...

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet exclude-result-prefixes="fo" version="1.1"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

	<xsl:output indent="yes" method="xml" omit-xml-declaration="no"
version="1.0"/>

	<xsl:template match="/">
		<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
			<fo:layout-master-set>
				<fo:simple-page-master
margin-bottom="1cm" margin-left=".5cm" margin-right=".5cm"
margin-top="1cm" master-name="main" page-height="29.7cm"
page-width="21cm">
					<fo:region-body/>
				</fo:simple-page-master>
			</fo:layout-master-set>
			<fo:page-sequence master-reference="main">
				<fo:flow flow-name="xsl-region-body">
					<xsl:apply-templates
select="//SubShipment"/>
				</fo:flow>
			</fo:page-sequence>
		</fo:root>
	</xsl:template>

	<xsl:template match="SubShipment">

		<!--- ***** put your per page template in here *****
--->

	</xsl:template>

</xsl:stylesheet>

Just change SubShipment to person and insert your template.

~Jeremy

-----Original Message-----
From: Khan, Atique (IT) [mailto:Atiqur.Khan@xxxxxxxxxxxxxxxxx]
Sent: Friday, April 04, 2008 5:02 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  Multi page pdf using fop-one page for each person tag

Hi All,
I need to convert my xml data using xsl-fo template into pdf using fop.
My XML data looks like

<resultset>
    <person>
    ...
    </person>
    <person>
    ...
    </person>
    <person>
    ...
    </person>
    .
    .
</resultset>

Each of the person tags need to go into a separate page in the pdf. Can
somebody please guide me with a sample xsl-fo template.

Thanks
Atique
--------------------------------------------------------

NOTICE: If received in error, please destroy and notify sender. Sender
does not intend to waive confidentiality or privilege. Use of this email
is prohibited when received in error.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.