Precedence of Side Region Corners

This section provides tutorial example to demonstrate that the 'start' or 'end' region wins the corner area against the 'before' or 'after' region when two adjacent 'side' regions are declared by default. If the 'start' or 'end' region wants to win, it must have precedence='true' specified.

Another common issue of using "side" regions in a simple-page-master layout is to know how to control the corner area of two adjacent "side" regions. Here are rules that may be helpful to you in designing "side" regions:

1. By default, the "start" or "end" region wins the corner area against the "before" or "after" region when two adjacent "side" regions are declared.

2. If the "start" or "end" region wants to win the corner area, it must have precedence="true" specified when two adjacent "side" regions are declared.

To demonstrate these rules, I wrote the following XSL-FO document:

<?xml version="1.1" encoding="utf-8"?>
 - Copyright (c) 2016,, All Rights Reserved.
<fo:root xmlns:fo="">
  <fo:simple-page-master master-name="my_page" margin="0.5in" 
   page-height="11in" page-width="8.5in"
   reference-orientation="0" writing-mode="lr-tb">
   <fo:region-body region-name="my_body" background-color="#eeeeee"
   margin="1.2in" reference-orientation="0" writing-mode="lr-tb"/>
   <fo:region-before region-name="my_header" background-color="#ffeeee"
   extent="1.5in" reference-orientation="0" writing-mode="lr-tb"
   <fo:region-start region-name="my_sidebar" background-color="#eeffff"
   extent="1.5in" reference-orientation="-90" writing-mode="lr-tb"/>
 <fo:page-sequence master-reference="my_page">
  <fo:static-content flow-name="my_header">
   <fo:block><region-before extent="1.5in" ...></fo:block>
  <fo:static-content flow-name="my_sidebar">
   <fo:block>< region-start</fo:block>
   <fo:block>extent="1.5in" ...</fo:block>
  <fo:flow flow-name="my_body">
   <fo:block><region-body margin="1.2in" ...></fo:block>

You can process this example XSL-FO document with Apache FOP tool on the AWT window:

C:\herong>\fop\fop -fo -awt

You should see a page displaying the "before" region in pink, the "start" region in light blue, and the "body" region in gray as shown below:

Corner Precedence of Adjacent "side" Regions

Note that the "start" region wins the top left corner area adjacent to "start" and "before" regions, because <fo:region-before precedence="false" ...> is specified. This is also the default behavior.

Last update: 2016.

Table of Contents

 About This XSL-FO Tutorial Book

 Introduction of XSL-FO

 Apache™ FOP (Formatting Objects Processor)

 RenderX XEP as an XSL-FO Tool

 Introduction of Area Model

 XSL-FO Document Basics and Examples

Page Layout Masters

 Layout Declarations

 simple-page-master - Simple Page Layout

 simple-page-master Attributes and Sub Elements

 simple-page-master/region-body Sub Element

 region-before and region-after Sub Elements

 region-start and region-end Sub Elements

 "Body" Region Margin and "Side" Region Extent

Precedence of Side Region Corners

 Page Layout and Page Sequence Mapping

 What Is "page-sequence-master"?

 Layout Sequence Example - Cover and Content

 Wheat Is "repeatable-page-master-alternatives"?

 Layout Sequence Example - Odd and Even Pages

 Block-Level Formatting Objects

 Inline-Level Formatting Objects

 Including Graphics in XSL-FO document

 Table of Rows and Columns

 List, Item, Label, and Body

 Floating Blocks - "float" and "footnote"

 Hyperlinks, Table of Contents and Indexes

 Headers and Footers using "static-content"

 Font Attributes and Font Families

 Apache FOP Font Configurations

 RenderX XEP Font Configurations


 PDF Printing Version