XSL-FO region-end target
Definition and Usage
<Fo: region-end> object defines the right region of the page (right sidebar).
XSL-FO uses the following elements to define the area of the page:
- <Fo: region-body> defines the body region
- <Fo: region-before> defines the top region (header)
- <Fo: region-after> defines the bottom area (footer)
- <Fo: region-start> defines the left region (left column)
- <Fo: region-end> defines the right region (right column)
NOTE: region-before, region-after , region-start and region-end part is the region-body.To avoid the text within the region-body text overlays other areas, region-body padding must be at least the size of the four sub-regions of the same.
Note: Depending onthe version of XSL-FO 1.0 Recommendation, padding and border-width attribute must be zero.
grammar
<!--
Contents:EMPTY
-->
</fo:region-end>
Attributes
属性 [A-B] | 属性 [C-Z] |
---|---|
background-attachment | clip |
background-color | display-align |
background-image | extent |
background-repeat | overflow |
background-position-horizontal | padding-after |
background-position-vertical | padding-before |
border-after-color | padding-bottom |
border-after-style | padding-end |
border-after-width | padding-left |
border-before-color | padding-right |
border-before-style | padding-start |
border-before-width | padding-top |
border-bottom-color | region-name |
border-bottom-style | reference-orientation |
border-bottom-width | writing-mode |
border-end-color | |
border-end-style | |
border-end-width | |
border-left-color | |
border-left-style | |
border-left-width | |
border-right-color | |
border-right-style | |
border-right-width | |
border-start-color | |
border-start-style | |
border-start-width | |
border-top-color | |
border-top-style | |
border-top-width |
Example 1
XSL-FO uses page templates called "Page Masters" to define the layout of the page. Each template must have a unique name:
<fo:region-body margin="5in" />
</fo:simple-page-master>
<fo:simple-page-master master-name="left">
<fo:region-body margin-left="2in" margin-right="3in" />
</fo:simple-page-master>
<fo:simple-page-master master-name="right">
<fo:region-body margin-left="3in" margin-right="2in" />
</fo:simple-page-master>
In the example above, the three <fo: simple-page-master> element defines three different templates. Each template (page-master) has a different name.
The first template named "intro". It can be used as a template for introduction pages.
The second and third templates called "left" and "right". They can be as even and odd numbered pages template.
Example 2
This is a fragment extracted from an XSL-FO document:
page-width="297mm" page-height="210mm"
margin-top="1cm" margin-bottom="1cm"
margin-left="1cm" margin-right="1cm">
<fo:region-body margin="3cm"/>
<fo:region-before extent="2cm"/>
<fo:region-after extent="2cm"/>
<fo:region-start extent="2cm"/>
<fo:region-end extent="2cm"/>
</fo:simple-page-master>
The above code defines a name for the "A4" of "Simple Page Master Template".
Page width is 297 mm, height 210 mm.
Four page margins (margins on the bottom, left margin, right margin) is 1 cm.
Margins body is 3 cm (all four sides).
before the body, after, start and end zones are 2 cm.
The width of the main examples above may be reduced by about margins and the region-body margins calculated by the width of the page:
297mm - (2 x 1cm) - (2 x 3cm) = 297mm - 20mm - 60mm = 217mm
Please note, region (region-start and region-end) is not counted. As previously explained earlier, these zones (region) is an integral part of the body.
XSL-FO Reference Manual