Creating Flows: fo:flows

Creating Flows: <fo:flows>

Flow objects have that name because the text in them flows and is arranged to fit the page by the displaying software. The content of a page is handled with flow objects.

There are two kinds of flow objects: <fo:staticcontent> and <fo:flow> . An <fo:staticcontent> flow object holds content, such as the text that goes into headers and footers, that will be repeated on the pages of the page sequence (as youll see in Chapter 12). The <fo:flow> flow object, on the other hand, holds the text itself that makes up the content of the document.

The following property applies <fo:flow> :

  • flow-name

I use a <fo:flow> element to handle the text content of planets.xml. To make sure the text content of planets.xml is transformed into that flow, I use an <xsl:applytemplates> element:

 <?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">              <fo:layout-master-set>                .                .                .              </fo:layout-master-set>              <fo:page-sequence master-name="page">                  <fo:flow flow-name="xsl-region-body">                      <xsl:apply-templates/>                  </fo:flow>              </fo:page-sequence>      .      .      . 

That completes the <fo:page-sequence> element; Ive specified a master to use for this sequence, and it provides the XSL-FO processor a way to format the content that is to go into the pages in the formatted document. Now that Ive outlined the geometry of the pages Im going to create, its finally time to turn to the content of those pages. The first element that will actually display that content is <fo:block> .



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

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