XSL-FO Tutorials - Herong's Tutorial Examples - v2.25, by Herong Yang
Document Top Level Structure Rules
This section describes XSL-FO document top level structure rules. Root element must be 'root'. 'layout-master-set' is required to define page layouts. 'page-sequences' or 'page-sequences-wrapper' is required to define page contents.
If you want to write an XSL-FO (XSL Formatting Objects) document to define formatting objects for visual presentation, you need to follow the following XSL-FO document structure rules.
1. XSL-FO document must be valid XML document with "http://www.w3.org/1999/XSL/Format" as the namespace.
2. The root element must be "root" acting as the XSL-FO formatting objects container.
3. Sub elements of the "root" element are:
Here is an outline of an XSL-FO document structure:
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> <fo:layout-master-set> ... Required element to define page layouts </fo:layout-master-set> <fo:declarations> ... Optional element to hold global declarations </fo:layout-master-set> <fo:bookmark-tree> ... Optional element to hold bookmarks </fo:layout-master-set> <fo:page-sequence> ... Presentation objects to be formatted on a sequence of pages </fo:page-sequence> <fo:page-sequence-wrapper> ... Container of page-sequence and/or page-sequence-wrapper </fo:page-sequence-wrapper> ... Required at least one page-sequence or page-sequence-wrapper </fo:root>
Table of Contents
Apache™ FOP (Formatting Objects Processor)
►XSL-FO Document Basics and Examples
►Document Top Level Structure Rules
Example - Page-Break-with-Header.fo
Example - Cover-Page-and-Two-Columns.fo
Block-Level Formatting Objects
Inline-Level Formatting Objects
Including Graphics in XSL-FO document
Floating Blocks - "float" and "footnote"
Hyperlinks, Table of Contents and Indexes
Headers and Footers using "static-content"
Font Attributes and Font Families
Apache FOP Font Configurations