4.4.1 Simple page layout definition Every different page layout to be rendered must be described separately. -
simple-page-master : -
It can be used to specify differences in reference orientations of regions . -
It can be used to specify differences in column progression directions. -
It can be used to specify differences in geometry, including -
page dimensions, -
region dimensions. A page's page viewport area's content rectangle defines the page dimensions. Every page layout has at least a "middle" body region (see Figure 4-2). Perimeter regions cut into the body region. -
They may be named differently from the default names using region-name . -
Renaming regions promotes good maintenance practice. -
region-before is named " xsl-region-before " by default. -
region-after is named " xsl-region-after " by default. -
region-start is named " xsl-region-start " by default. -
region-end is named " xsl-region-end " by default. -
If the body region doesn't have margins, then the perimeter region content will overlap the body content. -
Before and after regions can indicate they have precedence over the start and end regions. Regions may have different reference orientations and writing modes. There are important region name constraints on multiple page masters. -
Once a given custom name is used, it must be used for the same region position wherever else it is used on other page masters. -
The reserved names cannot be used by regions other than those that already use them per the Recommendation. -
For example, the region name " myheader ", when used for a region-before , can only be used for a region-before in other page masters. 4.4.2 Spans and columns in simple page geometry Hierarchy of reference areas within page includes spans and columns. -
Body region contains main reference area; -
main reference area contains span reference areas; -
span reference area contains normal-flow reference areas (columns); Only evenly- spaced columns are allowed. Only main reference area wide spans are allowed. Columns are balanced within each span reference area. -
A given span reference area accepts blocks in its normal-flow reference areas, until the number of columns spanned by a block changes; -
a new span reference area is then introduced on the page; -
all blocks flowed in the interrupted span reference area are re-flowed across all columns; -
the balancing depends not on the count of blocks, but on the content of each block and the contained lines. -
All blocks flowed into the last span reference area of the main reference area are balanced across all columns. Consider a before/after situation of a formatter flowing a mixture of spanned and un-spanned blocks shown in the two sides of Figure 4-11. -
Six un-spanned blocks flow into a normal-flow reference area as normal blocks; -
a seventh block spans all columns and triggers the generation of a new span reference area; -
the content of the first six blocks is flowed across all normal-flow reference areas of the first span reference area based on the length of the content in the sum total of the six blocks. -
The count of blocks is irrelevant; -
the total length of all blocks is balanced across the columns while accommodating keeps, widows, and orphans. Figure 4-11. Hierarchy of span areas 4.4.3 The simple-page-master object Purpose Content -
( 6.4.12 ) (region-body, region-before?, region-after?, region-start?, region-end?), -
child objects (listed alphabetically ): -
region-after ( 6.4.15 ; 197), -
region-before ( 6.4.14 ; 195), -
region-body ( 6.4.13 ; 114), -
region-end ( 6.4.17 ; 199), -
region-start ( 6.4.16 ; 198), -
referring object: Property sets Other required property Other optional properties -
page-height ( 7.25.13 ; 402), -
page-width ( 7.25.15 ; 403), -
reference-orientation ( 7.20.3 ; 407), -
writing-mode ( 7.27.7 ; 429). Shorthand influencing the above properties The use of the XSL-FO page description element is shown in Example 4-2. 4.4.4 The region-body object Purpose Example 4-2 The use of the XSL-FO page description element Line 01 <?xml version="1.0" encoding="utf-8"?> 02 <root xmlns="http://www.w3.org/1999/XSL/Format" font-size="16pt"> 03 <layout-master-set> 04 <simple-page-master master-name="bookpage" 05 page-height="297mm" page-width="210mm" 06 margin-top="15mm" margin-bottom="15mm" 07 margin-left="15mm" margin-right="15mm"> 08 <region-body region-name="bookpage-body" 09 margin-top="5mm" margin-bottom="5mm"/> 10 </simple-page-master> 11 </layout-master-set> 12 <page-sequence master-reference="bookpage"> 13 <title>Hello world example</title> 14 <flow flow-name="bookpage-body"> 15 <block>Hello XSL-FO!</block> 16 </flow> 17 </page-sequence> 18 </root> Content -
( 6.4.13 ) EMPTY , -
referring object: Property sets -
Common border, padding, and background properties ( 7.7 ; 328), -
common margin properties block ( 7.10 ; 332). Other required property Other optional properties -
clip ( 7.20.1 ; 368), -
column-count ( 7.25.2 ; 369) -
column-gap ( 7.25.3 ; 369), -
display-align ( 7.13.4 ; 373), -
overflow ( 7.20.2 ; 397), -
reference-orientation ( 7.20.3 ; 407), -
writing-mode ( 7.27.7 ; 429). Properties of note -
The region-name property is required, but the default name of " xsl-region-body " is used as this required property if a name is not supplied in the XSL-FO instance. -
Even though padding and border-width properties are indicated as available indirectly through the common property set, these values are fixed at " 0pt " in XSL-FO 1.0. -
display-align is used to keep the information in the region snug against the before edge, snug against the after edge, or centered in the middle of the two in the block-progression direction. The page body description element is shown in Example 4-3. Example 4-3 The page body description element Line 01 <?xml version="1.0" encoding="utf-8"?> 02 <root xmlns="http://www.w3.org/1999/XSL/Format" font-size="16pt"> 03 <layout-master-set> 04 <simple-page-master master-name="bookpage" 05 page-height="297mm" page-width="210mm" 06 margin-top="15mm" margin-bottom="15mm" 07 margin-left="15mm" margin-right="15mm"> 08 <region-body region-name="bookpage-body" 09 margin-top="5mm" margin-bottom="5mm"/> 10 </simple-page-master> 11 </layout-master-set> 12 <page-sequence master-reference="bookpage"> 13 <title>Hello world example</title> 14 <flow flow-name="bookpage-body"> 15 <block>Hello XSL-FO!</block> 16 </flow> 17 </page-sequence> 18 </root> 4.4.5 Page sequence titling A sequence of pages can be assigned a title This is a portability issue with respect to development. -
A stylesheet writer may be using a formatter that presents the title information outside of the page canvas. -
The user of a stylesheet may be using a formatter that presents the title information on the page canvas. 4.4.6 The title object Purpose Content -
( 6.4.20 ) (#PCDATA %inline;)* , -
child object: -
referring object: -
This object must not have a marker or out-of-line descendant, i.e.: Property sets -
Common accessibility properties ( 7.4 ; 326), -
common aural properties ( 7.6 ; 327), -
common border, padding, and background properties ( 7.7 ; 328), -
common font properties ( 7.8 ; 331), -
common margin properties inline ( 7.11 ; 333). Other optional properties Shorthand influencing the above properties The XSL-FO page body description element is shown in Example 4-4. Example 4-4 The XSL-FO page body description element Line 01 <?xml version="1.0" encoding="utf-8"?> 02 <root xmlns="http://www.w3.org/1999/XSL/Format" font-size="16pt"> 03 <layout-master-set> 04 <simple-page-master master-name="bookpage" 05 page-height="297mm" page-width="210mm" 06 margin-top="15mm" margin-bottom="15mm" 07 margin-left="15mm" margin-right="15mm"> 08 <region-body region-name="bookpage-body" 09 margin-top="5mm" margin-bottom="5mm"/> 10 </simple-page-master> 11 </layout-master-set> 12 <page-sequence master-reference="bookpage"> 13 <title>Hello world example</title> 14 <flow flow-name="bookpage-body"> 15 <block>Hello XSL-FO!</block> 16 </flow> 17 </page-sequence> 18 </root> |