Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

XSL-FO page-sequence object


May 28, 2021 XSL-FO


Table of contents


XSL-FO page-sequence object

XSL-FO page-sequence object XSL-FO reference manual

This section describes the role that page-sequence objects play in XSL-FO.


Definitions and usages

The object is used as a container for page output elements.

Each page layout contains an object that is slt;fo:page-sequence. The sub-class objects of the page-sequence specify the content of the page.

Each fo:page-sequence object refers to a .lt;fo:page-sequence-master;or a .lt;fo:simple-page-master.gt;


Grammar

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

Property

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

Instance 1

The structure of the XSL-FO document is 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> 

Instance 2

A "real" XSL-FO instance:

<?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 looks like this:

Hello W3CSchool


XSL-FO page-sequence object XSL-FO reference manual