Referring to Figure 974, “Regions being defined in a page. ” we now want to add fixed headers and footers frequently being used for page numbers. In a textbook each page might have the actual chapter's name in its header. This name should not change as long as the text below fo:region-body still belongs to the same chapter. In FO this is achieved by:

The notion fo:static-content refers to the fact that the content is constant (static) within the given page sequence. The new version reads:

Defining the body region.

Defining two regions at the top and bottom of each page. The extent attribute denotes the height of these regions. Caveat: The attribute extent's value gets subtracted from the margin-top or margin-bottom value being defined in the corresponding <fo:region-body> element. So if we consider for example the fo:region-before we have to obey:

extent <= margin-top

Otherwise we may not even see any output.

A fo:static-content denotes text portions which are decoupled from the usual text flow. For example as a book's chapter advances over multiple pages we expect the constant chapter's title to appear on top of each page. In the current example the static string Headertext will appear on each page's top for the whole <fo:page-sequence> in which it is defined. Notice the flow-name="xsl-region-after" reference to the region being defined in ❷.

We do the same here for the page's footer. Instead of static text we output fo_page-number yielding the current page's number.

This time flow-name="xsl-region-after" references the region definition in ❸. Actually the attribute flow-name is restricted to the following five values corresponding to all possible region definitions within a layout:

  xsl-region-body  xsl-region-before  xsl-region-after  xsl-region-start  xsl-region-end

This results in two pages with page numbers 1 and 2:

The free chapter from [Harold2004] book contains additional information on extended layout definitions. The W3C as the holder of the FO standard defines the elements fo:layout-master-set, fo:simple-page-master and fo:page-sequence