Latest web development tutorials

XSL-FO page-sequence objects

XSL-FO Reference Manual XSL-FO Reference Manual

Definition and Usage

<Fo: page-sequence> object is a container as the page output element used.

Each page layout contains a <fo: page-sequence> object. <Fo: page-sequence> subclass object specifies the content of the page.

Each fo: page-sequence object references a <fo: page-sequence-master> or a <fo: simple-page-master>.


grammar

<fo:page-sequence>
<!--
Contents:title?,static-content*,flow
-->
</fo:page-sequence>

Attributes

属性
country
force-page-count
format
grouping-separator
grouping-size
id
initial-page-number
language
letter-value
master-reference

Example 1

XSL-FO document is structured as follows:

<?xml version="1.0" encoding="ISO-8859-1"?>

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">

<fo:layout-master-set>
<fo:simple-page-master master-name="A4">
<!-- Page template goes here -->
</fo:simple-page-master>
</fo:layout-master-set>

<fo:page-sequence master-reference="A4">
<!-- Page content goes here -->
</fo:page-sequence>

</fo:root>

Example 2

A "real" XSL-FO instances:

<?xml version="1.0" encoding="ISO-8859-1"?>

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">

<fo:layout-master-set>
<fo:simple-page-master master-name="A4">
</fo:simple-page-master>
</fo:layout-master-set>

<fo:page-sequence master-reference="A4">
<fo:flow flow-name="xsl-region-body">
<fo:block>Hello W3CSchool</fo:block>
</fo:flow>
</fo:page-sequence>

</fo:root>

The output of the code above is as follows:

Hello W3CSchool



XSL-FO Reference Manual XSL-FO Reference Manual