[Accessibility conventions are described at the bottom of the page]
*** This is a free preview excerpt of a commercial publication. ***

4. Area and page basics
[> 5.][< 3.4.6][^^^]
4.0 Area and page overview
[> 4.0.1][> 5.][< 4.][^^][^^^]
Understanding areas and pages is critical to writing successful XSL-FO instances
[[1] - the rendering process renders the area tree created by formatting objects
 [1] - to get the desired rendered result, one must know how to position and nest areas of content and set their traits
[[2] - formatting objects are chosen to give the desired layout result
 [2] - the names of formatting objects may be totally irrelevant to the reason they are used in an XSL-FO instance to get the particular areas desired
]]
Area model describes the nature of the areas of content that can be created
[[1] - XSL-FO 1 only defines rectangular areas (some of which may be square)
 [1] - areas of canvas arranged in hierarchical order in area tree (see [Processing model of formatting - Section 3.2.1 Processing model of formatting])
[[2] - child areas arranged inside the parent area's content-rectangle
 [2] - formatting objects may add areas to multiple branches of the hierarchy
 [2] - objects in a given branch of the area tree stack next to each other
][1] - many different rectangles define the formatter's behavior for the area's content
[[2] - area itself is spaced between its siblings and within parent using a transparent spacing specification
 [2] - rectangles of an opaque border around content may be specified
[[3] - with a border thickness described by the differences between respective edges of two rectangles and a pattern with transparent background
][2] - rectangles of transparent perimeter spacing around rendered child content within the inside edge of the border (the padding rectangle)
][1] - the number of rectangles in play and their nuances can be overwhelming
[[2] - it is not necessary to know all the rectangles to get simple good-quality results
 [2] - it is important to be aware of the different rectangles to better understand the interplay of areas and the controls available in XSL-FO properties
]]
[Figure 4.1: The rectangles describing an area
The image shows a set of nested rectangles with the rectangle labeled "Area content" at the center.
The outermost rectangle is a spacing rectangle whose content is transparent, within which is a border rectangle whose content is opaque, except within which is found a padding rectangle whose content is transparent, within which is the area's content.
]
Writing direction and reference orientation govern visual placement of areas on a page
[[1] - these values define the block-progression and inline-progression directions for an area
 [1] - supports natural directions of common writing systems of the world
 [1] - orientation can be overridden to produce special effects in the rendered result
 [1] - values also define the before- and after-sides in the block-progression direction and the start- and end-sides in the inline-progression direction
]
Areas on the page are not mutually exclusive
[[1] - areas can be formatted to overlap other areas in whole or in part
[[2] - transparent backgrounds show other areas behind
][1] - sibling areas in a given branch of the area tree typically do not overlap
 [1] - common formatting problems occur when areas from different branches of the tree occupy the same real estate on the page
[[2] - must plan ahead so the stacking of areas in one branch doesn't interfere with the stacking of areas on other branches
]]
4.0.1 Page geometry
[> 4.0.2][> 5.][< 4.0][^][^^][^^^]
A page is described by the geometry of its size and various regions
[[1] - every page has a <[region-body]> with the initial name xsl-region-body
[[2] - content flowed in this region goes is in the main reference area
][1] - possible incursion into the body by four perimeter regions on the four edges
[[2] - <[region-before]> with the initial name "xsl-region-before"
 [2] - <[region-after]> with the initial name "xsl-region-after"
 [2] - <[region-start]> with the initial name "xsl-region-start"
 [2] - <[region-end]> with the initial name "xsl-region-end"
 [2] - precedence controls which regions occupy the corners of the perimeter
[[3] - default precedence given to <[region-start]> and <[region-end]>
 [3] - overridden only by [precedence]= property on <[region-before]> and <[region-after]>
]][1] - regions are referenced in XSL-FO by using their name
[[2] - regions can be custom-named
]]
[Figure 4.2: Regions of a page
Three pages are shown. The page on the left shows the majority of the page occupied by a solid-lined rectangle representing the main content region of the page and named "xsl-region-body".
The middle and right pages show four perimeter rectangles incurring into main content region. In the middle page the topmost "xsl-region-before" region and the bottommost "xsl-region-after" region each occupy the entire width of the page. The leftmost "xsl-region-start" and the rightmost "xsl-region-end" occupy as much of the page between the topmost and bottommost regions. The middle region is labeled "xsl-region-body".
In the right page, the leftmost "xsl-region-start" and the rightmost "xsl-region-end" occupy the entire height of the page. The topmost "xsl-region-before" region and the bottommost "xsl-region-after" region each occupy as much of the page between the leftmost and rightmost regions.
]
Of note:
[[1] - the middle page shows the start and end regions have precedence for the corners of the page over the before and after regions (the default)
 [1] - the [precedence]= property is used to give precedence individually to the before and after regions when needed
]
Page regions are targets for either paginated flow or static content
[[1] - paginated flow triggers as many pages as needed by the amount of flowed content
[[2] - when a page's region accepting flow overflows, a new page in the page sequence is triggered
 [2] - different regions on separate pages can accept paginated flow (but not on the same page)
 [2] - the flow indicates the name of the target region for the content
][1] - static content for reproduction on every page triggered by pagination
[[2] - the static definition indications the name of the target region for the content
[[3] - only if the new page includes the named region does a given region's static content get rendered
][2] - components of static content may be dynamically populated with the page number and the content of user-defined markers appearing on the page being formatted
]]
The formatting objects in each region create descendant areas in that region's branch in the area tree
[[1] - the sibling areas in each branch stack separately from the sibling areas in other branches
 [1] - without proper body region margins, the perimeter region areas will overlap on top of the body region areas
]
4.0.2 Area and page constructs
[> 5.][< 4.0.1][^][^^][^^^]
The XSL-FO objects covered in this chapter are summarized as follows.
Content-oriented formatting objects:
[[1] - <[wrapper]> ([6.13.4])
[[2] - a neutral construct for specifying inherited properties for descendent constructs
][1] - <[block]> ([6.5.2])
[[2] - the description of canvas content that is distinct from its preceding area content
][1] - <[initial-property-set]> ([6.6.4])
[[2] - an auxiliary construct for specifying properties applied to the first line of the parent
][1] - <[inline]> ([6.6.7])
[[2] - a description of canvas content that is distinct from its preceding content within a line generated in a block
][1] - <[page-number-citation]> ([6.6.11])
[[2] - an inline-level place holder replaced with the page number of the first normal area of the cited formatting object
][1] - [F1.1]<[page-number-citation-last]> ([6.6.12])
[[2] - an inline-level place holder replaced with the page number of the last normal area of a sequence of pages
]]
Page-oriented formatting objects:
[[1] - <[simple-page-master]> ([6.4.13])
[[2] - the specification of a given page's physical geometry
][1] - <[region-body]> ([6.4.14])
[[2] - the definition of the middle area inside any perimeter defined for the page
][1] - <[title]> ([6.4.21])
[[2] - a page sequence's ancillary description not rendered on the page canvas
]]

*** This is a free preview excerpt of a commercial publication. ***

This is an accessible version of Crane's commercial training material. The content has been specifically designed to assist screen reader software in viewing the entire textual content. Figures are replaced with text narratives.

Navigation hints are in square brackets:
[Tx.x] and [Fx.x] are textual representations of the applicability icons;
[digit] indicates list depth for nested lists;
[link [URL]] indicates the URL of a hyperlink if different than link;
[EXAMPLE] indicates an example listing of code;
[FIGURE] indicates the presence of a figure replaced by its description;
[>] jumps forward;
[<] jumps backward;
[^] jumps to start of the section;
[^^] jumps to the start of the chapter;
[^^^] jumps to the table of contents.
Suggestions for improvement are welcome: [info@CraneSoftwrights.com]
Book sales: [http://www.CraneSoftwrights.com/links/trn-acc.htm]
Information: [http://www.CraneSoftwrights.com/links/info-acc.htm]
This content is protected by copyright and, as there are no means to protect this accessible version from plagiarism, please do not make any commercial edition available to others.

+//ISBN 978-1-894049::CSL::Courses::PFUX//DOCUMENT Practical Formatting Using XSL-FO 2008-01-27 17:30UTC//EN
Practical Formatting Using XSL-FO
Seventh Edition - 2008-01-27
ISBN 978-1-894049-19-1
Copyright © Crane Softwrights Ltd.