XSLT allows you to create formatting structures which interpret and modify the existing XML elements. Learn about the syntax of XSLT elements, how the namespace attribute differs depending on the browser in use, and how to transform original XML elements.
An Introduction to XSLT - Page Masters (Page 5 of 6 )
In addition to this, there is the Formatting-Objects language, XSL (formerly know as XSL-FO) that we have not yet explored. These are reserved XML elements that are defined in the FO namespace. XSL documents contain an fo:root element which acts as the document root:
XSL-FO documents position content on a page according to the following hierarchy of areas:
Area Containers contain either additional Area Containers or Block Areas. Block Areas contain either additional Block Areas or Line Areas. Area containers define the basic structure in which your XML is displayed. Block Areas are used to define paragraphs and lists, and they can contain text. Line Areas contain Inline Areas and Inline Spaces. Line Areas are used to contain elements for graphics, mathematical equations or links. Inline Areas are rectangular areas used to format and contain content such as graphics, text and horizontal rules. The page-masters that we examined a moment ago are constructed using area containers in the following way:
<fo:region-start extent="0.5in"/> Left edge of the page <fo:region-before extent="0.5in"/> Top edge of the page <fo:region-body/> Main body of the page <fo:region-end extent="0.5in"/> Right edge of the page <fo:region-after extent="0.5in"/> Bottom edge of the page
These region elements also have attributes to set properties, including:
Text orientation and direction
Page-masters can be applied to the content of your document using the page-sequence element:
This element can then contain a further two elements:
<fo:static content> <fo:flow>
The static content element is optional and can be used to display content that appears on every page in a sequence, such as headings. The fo:flow element contains a list of the elements that appear in your document, in the order in which they appear.
If your page is not big enough to contain all of the elements, additional pages are created. This is how the overflow of elements is handled as fo:static elements cannot overflow.