XSL-FO rootObject
XSL-FO Reference Manual
Definition and Usage
The <fo:root> object is the root (top-level) node of an XSL-FO document.
The children of the <fo:root> object are a single <fo:layout-master-set> object (which holds all page masters used in the document), an optional <fo:declarations> object, and one or more <fo:page-sequence> objects.
Note:An XSL-FO document can contain multiple <fo:page-sequence> objects (for example, each chapter of a document can be an independent <fo:page-sequence> object - it allows the use of chapter-specific content, such as chapter titles, which can be placed in headers or footers).
Syntax
<fo:root>
<!--
Children:layout-master-set,declarations?,
page-sequence+
-->
</fo:root>
<!--
Children:layout-master-set,declarations?,
page-sequence+
-->
</fo:root>
Attributes
| Attributes |
|---|
| media-usage |
Example 1
The structure of an 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>
<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>
XSL-FO Reference Manual Other Extensions