The Document Root: fo:root

The Document Root: fo:root

The fo:root object is the top node of the formatting object tree that makes up a formatting object document. That is, 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-sequences . The fo:layout-master-set formatting object holds all "masters" used in the document, which you use to specify how each page will actually be built. Each fo:page-sequence 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 2: The Plot Thickens .

In ch14_01.xml, the document node is <PLANETS> ; however, the document node of a formatting object document is <fo:root> , which means we have to replace <PLANETS> with <fo:root> . That looks like this in ch14_02.xsl, the transformation stylesheet:

 <?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>  .         .         . 

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



Real World XML
Real World XML (2nd Edition)
ISBN: 0735712867
EAN: 2147483647
Year: 2005
Pages: 440
Authors: Steve Holzner

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