XSL-FO root objects
Definition and Usage
<Fo: root> object is the root XSL-FO document (top) node.
<Fo: root> subclass object is a separate <fo: layout-master-set> object (which retains all the pages in the document master [master]), an optional <fo: declarations> objects, and one or more <fo: page-sequence> object.
Note: An XSL-FO document can contain multiple <fo: page-sequences> objects (Example: each chapter of the document can be used as a stand-alone <fo: page-sequence> Objects - it allows the use of chapter-specific [specific chapters] content, such as: the title of the chapter, it can be placed in the header or footer).
grammar
<fo:root>
<!--
Children:layout-master-set,declarations?,
page-sequence+
-->
</fo:root>
<!--
Children:layout-master-set,declarations?,
page-sequence+
-->
</fo:root>
Attributes
属性 |
---|
media-usage |
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>
<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