Re: [xsl] FOP flow question

Subject: Re: [xsl] FOP flow question
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Mon, 26 Oct 2009 16:17:09 -0400
At 2009-10-26 10:36 -0700, mark bordelon wrote:
I will eventually learn all this at a class I am taking with Ken, but need this working before then, unfortunately.

Yes, all of this is covered in the classroom.

Note to others: there are still seats remaining for both the XSLT/XQuery class next week and the XSL-FO class the following week ... please see here for details:

1) (region-bfore) I am getting errors about having two flow tags.

Indeed. In XSL-FO 1.0 only one flow is allowed (any number are allowed in 1.1, but you only need one).

When I change the first to static-content, nothing appears at all in this region.

That surprises me. From your stylesheet I would have expected the content to show, but to be in conflict with the body content on the page.

How can you put text into two regions of the same page-sequence?

You use multiple <fo:static-content flow-name=""> elements, one for each of the perimeter regions you need content in, and then one <fo:flow> that triggers the pagination.

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

I'm unfamiliar with the use of "denominator" in publishing, and I don't see the word in your stylesheet fragment.

But I do note that your body-region doesn't have any margin to accommodate the after-region ... only the before and left margins are specified for the body-region. Your body-region should have a bottom margin at least the size of the extent of the page's after-region.

An error is not generated in the case of the overlap of regions, because there are some strategies where the overlap is very useful, as illustrated in the free UN Layout Key stylesheets for UBL on our web site: the background is painted with XSL-FO and the foreground is overlaid on top with more XSL-FO.

I hope this helps.

. . . . . . . . . . . Ken

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

<xsl:stylesheet version="1.1" xmlns:xsl=""; xmlns:fo=""; 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: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:page-sequence master-reference="cover_letter" force-page-count="no-force">

<fo:flow flow-name="xsl-region-before">
<fo:table table-layout="fixed">

<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:flow flow-name="xsl-region-body">




Upcoming:  hands-on XSLT, XQuery and XSL-FO Washington DC Nov 2009
Interested in other classes?
Crane Softwrights Ltd.
Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video
Video lesson:
Video overview:
G. Ken Holman                 mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Male Cancer Awareness Nov'07
Legal business disclaimers:

Current Thread