Development and Programming
Defining Page Layout in XSLT-FO
You use masters to create templates for pages, page sequences, and regions. The <fo:layout-master-set> element contains all the masters used in the document, including page sequence masters, page masters, and region masters, which you apply to create page sequences, pages, and regions.
The fo:layout-master-set is a wrapper around all masters used in the document. This includes page-sequence-masters, page-masters, and region-masters.
The fo:layout-master-set formatting object generates no area directly. The masters that are the children of the fo:layout-master-set are used by the fo:page-sequence to generate pages.
The value of the master-name trait on each child of the fo:layout-master-set must be unique within the set.
The fo:simple-page-master is used in the generation of pages and specifies the geometry of the page. The page may be subdivided into up to five regions: region-body, region-before, region-after, region-start, and region-end.
Each area has name. By default it corresponds to the name of element. The name can be set in the region-name parameter. The name of area is used that when forming the document to specify, in what area what this to display. For example, static data of fo:static-content are most often output in headlines or to fields.
Sizes of areas
Each of areas (except region-body) has the extent parameter determining the area size in the direction perpendicular to the relevant party of the page. For headlines — it is height, for fields — width. It is set in terms of length, or percentage of the corresponding page size (page-height and page-width parameters).
The sizes of the region-body area are defined otherwise. First, they are limited to the sizes of page fields. Secondly, it has 4 parameters: margin-top, margin-bottom, margin-left and margin-right which define region-body area border indents from the content rectangle of the page reference area area designated by stroke in the second drawing. These indents can be set in terms of length or percentage of the size of the content rectangle of the page reference area area.
Here it is necessary to draw rather significant conclusion that borders of the region-body area do not depend on the sizes and parameters of the next areas.
Indents of the region-body area are located according to orientation of the page. For example, if for the page orientation 90 is set, the upper indent is counted from this direction. If for region-body the orientation (reference-orientation parameter) is set, it does not influence arrangement of indents in any way. All of them are equally counted according to orientation of the page. Orientation of the region-body area influences only how child blocks will be located in it.
For the region-body area the quantity of columns in which document contents will be placed can be set. Two parameters are responsible for it: column-count — sets quantity of columns (has to be more or equally 1); column-gap — distance between the next columns.
Alignment in areas
The display-align parameter which can accept values is intended for alignment in areas: auto, before, center, after. It defines alignment of child blocks in area in the direction of their following which is specified in the writing-mode parameter.
And what with corners?
Two upper corners of the page can be occupied with either page header or left and right fields. Similarly, the lower corners — page footer or left and right fields. The precedence parameter specified for headlines is responsible for it. If parameter matters true, corners are occupied by headline (for what parameter is specified). If parameter matters false, corners occupy fields. By default parameter matters false.
The fo:simple-page-master element has the following parameters:
The fo:page-sequence-master is used to specify the constraints on and the order in which a given set of page-masters will be used in generating a sequence of pages. Pages are automatically generated when the fo:page-sequence-master is used in formatting an fo:page-sequence.
This element has three child entries:
Marking choice conditions in the fo:repeatable-page-master-alternatives element are set by means of child entries of fo:conditional-page-master-reference. Each condition may contain from one to three parameters in total defining the condition is satisfied or not. For fo:repeatable-page-master-alternatives the limit number of pages in the maximum-repeats parameter can be also set.
These are the following parameters:
© 2019 Digcode.com. All rights reserved.