Creating the Document Root: fo:root

Creating the Document Root: <fo:root>

The first formatting element to cover is <fo:root> , the document node of any XSL-FO document. The document node of the formatting object document must be <fo:root>.

The children of the <fo:root> formatting object are a single <fo:layout-master-set> and a sequence of one or more <fo:page-sequence> elements .

The <fo:layout-masterset> formatting object holds all masters used in the document, which you use to specify how each page will actually be built. Each <fo:pagesequence> represents a sequence of pages formatted the way you want them. For example, each chapter of a book could be made up of its own page sequence, and you can give each sequence the same header and footer such as Chapter 5:The Stranger Reappears.

As the first step in the XSLT stylesheet that transforms planets.xml, I match the document node in planets.xml, <PLANETS> , and replace it with an <fo:root> element that declares the fo namespace prefix:

 <?xml version="1.0"?>  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"      xmlns:fo="http://www.w3.org/1999/XSL/Format"      version="1.0">      <xsl:template match="PLANETS">          <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">          .          .          . 

The <fo:root> element can contain both master set layouts and page sequences. I take a look at the <fo:layout-masterset object first.



Inside XSLT
Inside Xslt
ISBN: B0031W8M4K
EAN: N/A
Year: 2005
Pages: 196

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net