Creating RegionsIn version 1.0 of the XSL recommendation, page masters have up to five regions. The central region, which corresponds to the body of the page, is called the body region. The top part of the page, the header, is called the before region; the bottom part of the page, the footer, is called the after region. In languages that read left to right, such as English, the left side of the page is called the start region and the right side is called the end region. In languages that read right to left, the start and end regions are reversed . You can think of start and end regions as sidebars that flank the body region. XSL formatting objects correspond to these regions:
You can use these properties with these formatting objects:
You can customize the regions of a page as you like, as in ch14_02.xsl, where I'm setting margins for the body region. The four outer regions (but not the body region) have an extent property that sets their size, and I'll use that here: <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version='1.0'> <xsl:template match="PLANETS"> <fo:root> <fo:layout-master-set> <fo:simple-page-master master-name="page" page-height="400mm" page-width="300mm" margin-top="10mm" margin-bottom="10mm" margin-left="20mm" margin-right="20mm"> <fo:region-body margin-top="0mm" margin-bottom="10mm" margin-left="0mm" margin-right="0mm"/> <fo:region-after extent="10mm"/> </fo:simple-page-master> </fo:layout-master-set> . . . That ends the only master I'll have in this document: the simple page master named page . That completes the fo:layout-master-set object. As mentioned, besides the fo:layout-master-set , a formatting object document usually also contains one or more fo:page-sequence objects that define page sequences using the masters you define in the fo:layout-master-set . |