RE: [xsl] FOP flow question

Subject: RE: [xsl] FOP flow question
From: "W Charlton" <XSLList@xxxxxxxxxx>
Date: Wed, 28 Oct 2009 11:49:12 -0000
Mark,

I also noticed you have no <fo:table-row> in your table. You may also be
having problems with the renderer handling your LinoType font. Try using a
generic font such as Helvetica and see if that helps.

Below is some code that should work although you need to get the indents
sorted on the before and after regions.

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
	<fo:layout-master-set>
		<fo:simple-page-master master-name="cover_letter"
page-width="8.5in" page-height="11in" margin-top="0.5in"
margin-bottom="0.5in" margin-left="0.5in" margin-right="1in">
			<fo:region-body margin-left="0.50in"
margin-top="1.25in"/>
			<fo:region-before extent="1in"/>
			<fo:region-after extent="0.5in"/>
		</fo:simple-page-master>
	</fo:layout-master-set>
	<fo:page-sequence master-reference="cover_letter"
force-page-count="no-force">
		<fo:static-content flow-name="xsl-region-before">
			<fo:table table-layout="fixed">
				<fo:table-column column-width="100%"
column-number="1"/>
				<fo:table-body>
					<fo:table-row>
						<fo:table-cell>
							<fo:block>Hello in
the header table!</fo:block>
						</fo:table-cell>
					</fo:table-row>
				</fo:table-body>
			</fo:table>
		</fo:static-content>
		<fo:static-content flow-name="xsl-region-after">
			<fo:table table-layout="fixed">
				<fo:table-column column-width="50%"
column-number="1"/>
				<fo:table-column column-width="50%"
column-number="2"/>
				<fo:table-body>
					<fo:table-row>
						<fo:table-cell>
							<fo:block>
</fo:block>
						</fo:table-cell>
						<fo:table-cell>
							<fo:block
text-align="right">
	
<fo:page-number format="1"/>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
				</fo:table-body>
			</fo:table>
		</fo:static-content>
		<fo:flow flow-name="xsl-region-body">
			<fo:block font-family="Helvetica"
font-size="8pt">Hello in the body.</fo:block>
		</fo:flow>
		<!-- for the body -->
	</fo:page-sequence>
</fo:root>


William Charlton
The yMonda team
yMonda Limited
w: www.ymonda.net


-----Original Message-----
From: mark bordelon [mailto:markcbordelon@xxxxxxxxx] 
Sent: 26 October 2009 17:36
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: [xsl] FOP flow question

Dear Members,

After a break from fop frustration, I have reduced my fop transform to the
simplest as I build it up, studying from ww3schools ftp xslt tutorial.
Unfortuantely, even here I am having mixed success that someone here might
be able to help with. I will eventually learn all this at a class I am
taking with Ken, but need this working before then, unfortunately. Any help
much appreciated!

1) (region-bfore) I am getting errors about having two flow tags. When I
change the first to static-content, nothing appears at all in this region.
How can you put text into two regions of the same page-sequence?

2) (region-after) The "denominator" of the page footer does not display. I
have looked through the documentation and cannot figure what is wrong.

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

<xsl:stylesheet version="1.1"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:fo="http://www.w3.org/1999/XSL/Format"; exclude-result-prefixes="fo">
<xsl:output method="xml" version="1.0" omit-xml-declaration="no"
indent="yes"/><xsl:strip-space elements="*"/>

<!--master template-->
<xsl:template match="TEAMS_ASSET_FILE">
<fo:root>
<fo:layout-master-set>
<fo:simple-page-master master-name="cover_letter" page-width="8.5in"
page-height="11in" margin-top="0.5in" margin-bottom=".5in"
margin-left="0.5in" margin-right="1in">
	<fo:region-body margin-left="0.50in" margin-top="1.25in" />
	<fo:region-before extent="1in"/>
	<fo:region-after extent="0.5in"/>
</fo:simple-page-master>
</fo:layout-master-set>
			
<fo:page-sequence master-reference="cover_letter"
force-page-count="no-force">
						
<fo:flow flow-name="xsl-region-before"> 
<fo:table table-layout="fixed">
</fo:table>
</fo:flow>
				
<fo:static-content flow-name="xsl-region-after">
<fo:block font-family="LinotypeSyntaxItalics" font-size="8pt"
text-align="right">
Page <fo:page-number/> of <fo:page-number-citation ref-id="last-page"/>
</fo:block>
</fo:static-content>

<fo:flow flow-name="xsl-region-body">
...content...
</fo:flow>

</fo:page-sequence>

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

Current Thread