XML technologies / XSL-FO / Reference / Elements in XSL-FO / fo:page-sequence

(Excerpt from “XSL-FO ― The Reference” by Manuel Montero Pineda & Steffen Herkert, 2016, dpunkt.verlag)

A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z

Recommendation section: 6.4.5

Category: 6.4 Declarations and Pagination and Layout Formatting Objects

Description

This element defines how page sequences are used within a document. It also embeds the document content in the page sequence.

XSL-FO version: 1.0

Parent elements

<fo:page-sequence-wrapper>

This element specifies inherited properties for a group of fo:page-sequence formatting objects. It has no additional formatting semantics.

<fo:root>

The root element or document node of an XSL-FO document.

Child elements

<fo:flow>

Flow object; creates, within a page sequence (<fo:page-sequence>), the flowing area for the main text forming the document’s content.

<fo:folio-prefix>

This element provides a static prefix for folio numbers within a page sequence.

<fo:folio-suffix>

This element provides a static suffix for folio numbers within a page sequence.

<fo:static-content>

This element contains information about formatting objects that can be applied on every page or on a specific number of pages (for example, space for footnotes, running headings).

<fo:title>

This element specifies the title of a page sequence (<fo:page-sequence>).

Attributes

country

This attribute assigns a country code to a page sequence (fo:page-sequence), a block area (fo:block) or a character (fo:character). The output medium can use this code to account for language-specific features, such as hyphenation.

flow-map-reference

This attribute specifies which template defining the arrangement of (text) flow areas is to be referenced in a page sequence (fo:page-sequence).

force-page-count

This attribute specifies whether a page sequence (fo-page-sequence) should have an even (even) or odd (odd) number of pages, or end with an even (end-on-even) or odd (end-on-odd) page. The value auto also allows the ending of a page sequence to depend on the following page sequence.

format

This attribute assigns a format to page numbering in a fo:page-sequence. Besides numeric numbering, it allows lowercase letters (a,b,c,d,...), uppercase letters (A,B,C,D,...), lowercase Roman numerals (i,ii,iii,iv,...), uppercase Roman numerals (I,II,III,IV,...), or numerals from other languages. The attribute is defined in XSLT.

grouping-separator

This attribute defines a grouping separator for page numbering in a fo:page-sequence (for example, a thousands separator with groups of 3 digits). Attribute grouping-size must specify the number of digits between separators. The attribute is defined in XSLT.

grouping-size

This attribute defines the group size in digits between grouping separators for page numbering in a fo:page-sequence (for example, a thousands separator with groups of 3 digits). Attribute grouping-separator must define a grouping separator. The attribute is defined in XSLT.

id

This attribute uniquely identifies an object so that other objects can reference it.

index-class

This attribute defines an index class for individual index entries (index-key) or an entire area. All index entries in that area belong to the class. When referencing index entries (fo:index-key-reference) belonging to different classes, their page numbers are listed separately even if they are consecutive. For example, "1-8" becomes "1-4,5-8" if entries on pages 1-4 belong to one class and pages 5-8 to another. This is useful when pages are grouped into sections with different numbering systems. A range such as "I-14" can thus be avoided and replaced with "I-V,1-14".

index-key

This attribute defines an index entry. The supplied value is used as the entry’s identifier. An index entry reference (fo:index-key-reference) can reference all entries with this identifier and add their page numbers to a page citation list (fo:index-page-citation-list).

initial-page-number

For a page sequence created with fo:page-sequence, you can specify the number at which page numbering begins. By default, numbering follows the preceding page sequences. You can require the sequence to begin on an even or odd page, or specify the exact page number for the first page. For example, if an even page is required and the preceding sequence already ends on an even page, a blank page is added to it.

language

This attribute uses a language code, such as de for German or en for English, to specify the language whose hyphenation, line formation and line-breaking rules should be followed.

letter-value

This attribute concerns the implementation of letter-based numbering and is defined in XSLT.

master-reference

This attribute references individual page masters (fo:simple-page-master) or complete page sequence masters (fo:page-sequence-master). They receive a name in a master-name attribute, which must be specified in attribute master-reference. The name must have been used in at least one master-name attribute. If a page master and a page sequence master share a name, the page sequence master is referenced unless the reference is within a fo:simple-page-master element. If two page masters share a master-name, the first one defined is referenced.

reference-orientation

This attribute rotates an object in 90° increments only (0°, 90°, 180°, 270°).

writing-mode

This attribute sets writing direction. Applied to page masters (fo:simple-page-master), writing-mode affects placement of fo-region-body, fo-region-before, fo-region-after, fo-region-start and fo-region-end. On tables, writing-mode controls horizontal column/cell alignment or vertical row alignment, allowing landscape tables.

Support:

Conformance level

Antenna House

FOP

RenderX XEP

Altsoft XML2PDF

Compart DocBridge

Basic

J

J

J

J

J

XSL-FO example:

<fo:root font-family="Arial" font-size="10pt" line-height="1.2em" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:cpfo="http://www.compart.net/xmlns/cpfo" xmlns:svg="http://www.w3.org/2000/svg" xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions">
<fo:layout-master-set>
<fo:simple-page-master master-name="Inhalt-Seiten" margin="0mm 0mm 0mm
                      0mm" page-height="297mm" page-width="210mm">
<fo:region-body margin="26mm 55mm 41mm
                        55mm"/>
<fo:region-before extent="5mm"/>
<fo:region-after extent="30mm"/>
</fo:simple-page-master>
<fo:simple-page-master master-name="Inhalt-Seiten.ivz" margin="0mm 0mm 0mm
                      0mm" page-height="297mm" page-width="210mm">
<fo:region-body margin="26mm 55mm 41mm
                        55mm"/>
<fo:region-before region-name="ivz" extent="5mm"/>
<fo:region-after extent="30mm"/>
</fo:simple-page-master>
<fo:page-sequence-master master-name="Inhalt-Seiten.master">
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference master-reference="Inhalt-Seiten.ivz" page-position="first"/>
<fo:conditional-page-master-reference master-reference="Inhalt-Seiten" page-position="rest"/>
</fo:repeatable-page-master-alternatives>
</fo:page-sequence-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="Inhalt-Seiten.master">
<fo:static-content flow-name="xsl-region-after">
<fo:block text-align="center" margin="5mm
                    10mm">
- 
<fo:page-number/>
 -
</fo:block>
</fo:static-content>
<fo:static-content flow-name="xsl-region-before">
<fo:block text-align="right" margin="5mm
                    10mm">
Inhalt
</fo:block>
</fo:static-content>
<fo:static-content flow-name="ivz">
<fo:block text-align="right" margin="5mm
                    10mm">
InhaltsVZ
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<fo:table page-break-after="always" width="100%">
<fo:table-column width="90%"/>
<fo:table-column width="10%"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell number-columns-spanned="2">
<fo:block text-align="center">
Inhaltsverzeichnis
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>
Titel
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="right">
<fo:block>
Seite
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>
Als Gregor Samsa
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block text-align="right">
<fo:page-number-citation ref-id="AlsGregorSamsa"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>
Greogrs Blick
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block text-align="right">
<fo:page-number-citation ref-id="GreogrsBlick"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
<fo:block text-align="justify" hyphenate="true">
<fo:block space-after="1em" id="AlsGregorSamsa">
Als Gregor Samsa
                eines Morgens aus unruhigen Träumen erwachte, fand er sich in seinem Bett zu einem
                ungeheueren Ungeziefer verwandelt. Er lag auf seinem panzerartig harten Rücken und
                sah, wenn er den Kopf ein wenig hob, seinen gewölbten, braunen, von bogenförmigen
                Versteifungen geteilten Bauch, auf dessen Höhe sich die Bettdecke, zum gänzlichen
                Niedergleiten bereit, kaum noch erhalten konnte. Seine vielen, im Vergleich zu
                seinem sonstigen Umfang kläglich dünnen Beine flimmerten ihm hilflos vor den
                Augen.
</fo:block>
<fo:block space-after="1em" id="GreogrsBlick">
Gregors Blick richtete sich dann zum Fenster, und das trübe Wetter - man hörte
                Regentropfen auf das Fensterblech aufschlagen - machte ihn ganz melancholisch. »Wie
                wäre es, wenn ich noch ein wenig weiterschliefe und alle Narrheiten vergäße«, dachte
                er, aber das war gänzlich undurchführbar, denn er war gewöhnt, auf der rechten Seite
                zu schlafen, konnte sich aber in seinem gegenwärtigen Zustand nicht in diese Lage
                bringen. Mit welcher Kraft er sich auch auf die rechte Seite warf, immer wieder
                schaukelte er in die Rückenlage zurück. Er versuchte es wohl hundertmal, schloß die
                Augen, um die zappelnden Beine nicht sehen zu müssen, und ließ erst ab, als er in
                der Seite einen noch nie gefühlten, leichten, dumpfen Schmerz zu fühlen begann. »Ach
                Gott«, dachte er, »was für einen anstrengenden Beruf habe ich gewählt! Tag aus, Tag
                ein auf der Reise. Die geschäftlichen Aufregungen sind viel größer, als im
                eigentlichen Geschäft zu Hause, und außerdem ist mir noch diese Plage des Reisens
                auferlegt, die Sorgen um die Zuganschlüsse, das unregelmäßige, schlechte Essen, ein
                immer wechselnder, nie andauernder, nie herzlich werdender menschlicher Verkehr. Der
                Teufel soll das alles holen!« Er fühlte ein leichtes Jucken oben auf dem Bauch;
                schob sich auf dem Rücken langsam näher zum Bettpfosten, um den Kopf besser heben zu
                können; fand die juckende Stelle, die mit lauter kleinen weißen Pünktchen besetzt
                war, die er nicht zu beurteilen verstand; und wollte mit einem Bein die Stelle
                betasten, zog es aber gleich zurück, denn bei der Berührung umwehten ihn
                Kälteschauer.
</fo:block>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>

Download examples

More information online about

Introduction: "Page layout">

Practical example: "Page masters and simple page sequence masters">

Practical example: "Complex page sequence masters">

Practical example: "Multi-column pages with column rules">

Rendering of the element in the XSL-FO reference

In the output:

Page 2

Excerpt from the W3C Recommendation:

back to top