W3C home > Mailing lists > Public > www-xsl-fo@w3.org > June 2005

Predictability of rendering regions on the page

From: G. Ken Holman <gkholman@CraneSoftwrights.com>
Date: Fri, 03 Jun 2005 10:16:48 -0400
Message-Id: <6.2.1.2.2.20050603095845.02e215d0@pop.storm.ca>
To: XSL Editors <xsl-editors@w3.org>, XSL-FO W3C <www-xsl-fo@w3.org>, XSL-FO-Yahoo List <XSL-FO@YahooGroups.com>

To XSL-FO vendors and specification writers,

c/o: XSL Editors, W3C XSL List, Yahoo XSL List

I'm seeing inconsistent implementation of the order of the rendering of 
regions on the page, and I'm looking for predictability.

As part of the UBL stylesheets for the past two years I've been painting 
the background of a printed form using XSL-FO in the before region whose 
extent is the length of the page, then flowing my form content in the body 
region whose margin-top is 0pt, thus composing a completed form and content 
in the resulting page image.  This technique allows me to have continuation 
pages with different XSL-FO-based backgrounds and have the line items in 
the flow trigger the pagination.

It has worked well because my form box drawing and form content never 
collide ... it is just black on nothing and the nothing shows the "other" 
black without a problem.

I'm now looking at using this successful technique for more elaborate 
backgrounds drawn with shading and images, and then overlapping flowed 
content using coloured text to achieve certain effects.

What I would like is to be guaranteed that I can draw the background 
formatting objects before drawing the flowed formatting objects.

Does XSL-FO 1.0 dictate that the perimeter regions are rendered before the 
body region?

Does XSL-FO 1.0 dictate that the static content is rendered before the 
flowed content?

Either will do what I need.

I cannot, however, find any predictability in the XSL-FO 1.0 specification 
... perhaps I just cannot find it ... if it isn't there, can the XSL-FO 1.1 
specification dictate this?

Below is a test that shows Antenna House and RenderX producing different 
results.  Either one of these packages has a problem, or both are 
acceptable and the specification doesn't say one way or the other.

Thanks for any guidance anyone can give!

. . . . . . . . . . Ken

<?xml version="1.0" encoding="utf-8"?><!--region-overlap.fo-->
<!DOCTYPE root [ <!ENTITY % pages SYSTEM "pages.ent"> %pages; ]>
<root xmlns="http://www.w3.org/1999/XSL/Format">

<layout-master-set>
   <simple-page-master master-name="frame"
                         page-height="297mm" page-width="210mm"
                         margin-top="15mm" margin-bottom="15mm"
                         margin-left="15mm" margin-right="15mm">
     <region-body region-name="frame-body"/>
     <region-before region-name="before" extent="8in"/>
   </simple-page-master>
</layout-master-set>

<page-sequence master-reference="frame">
   <static-content flow-name="frame-body">
     <block font-size="20pt" font-weight="bold" color="black">
       XXXXXXXXXXXXXX
     </block>
   </static-content>

<flow xmlns="http://www.w3.org/1999/XSL/Format" flow-name="before"
       font-family="Times" font-size="20pt" font-weight="bold">

   <block color="white">This is a test</block>

   <block>AX: The before region, with the white flow, is being rendered 
second.</block>
   <block>XEP: The before region, with the white flow, is being rendered first,
the body region, with the black static content, is being rendered 
second.</block>

</flow>
</page-sequence>

<page-sequence master-reference="frame">
   <static-content flow-name="before">
     <block font-size="20pt" font-weight="bold" color="white">
       XXXXXXXXXXXXXX
     </block>
   </static-content>

<flow xmlns="http://www.w3.org/1999/XSL/Format" flow-name="frame-body"
       font-family="Times" font-size="20pt" font-weight="bold">

   <block color="black">This is a test</block>

   <block>AX and XEP: The before region, with the white static content, is 
being rendered second after the body region, with the black flowed content, 
rendered first.</block>

</flow>
</page-sequence>
<page-sequence master-reference="frame">
   <static-content flow-name="before">
     <block font-size="20pt" font-weight="bold">
       XXXXXXXXXXXXXX
     </block>
   </static-content>

<flow xmlns="http://www.w3.org/1999/XSL/Format" flow-name="frame-body"
       font-family="Times" font-size="20pt" font-weight="bold">

   <block>This is a test</block>

</flow>
</page-sequence>
</root>

--
World-wide on-site corporate, govt. & user group XML/XSL training.
G. Ken Holman                 mailto:gkholman@CraneSoftwrights.com
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/f/
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
Male Breast Cancer Awareness  http://www.CraneSoftwrights.com/f/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal
Received on Friday, 3 June 2005 19:57:47 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:06:13 GMT