Creating Page Sequences: fo:page-sequence

Creating Page Sequences: <fo:page-sequence>

Whats a page sequence? A page sequence is a run of pages that share the same characteristics, such as a chapter in a book, and you can format them in a similar way if you wish. The pages in a result document are actually created when the XSL-FO processor processes <fo:pagesequence> elements.

Each <fo:pagesequence> element refers to either an <fo:page-sequence-master> or a page master, and the actual layout of the pages is specified by those masters. You can get fairly involved here, creating sequences where the page number location alternates from side to side on the page, as when youre creating pages for a book.

The following properties apply to the <fo:pagesequence> object:

  • country

  • format

  • language

  • letter-value

  • grouping-separator

  • grouping- size

  • id

  • initial- page-number

  • force-page-count

  • master- name

In the current W3C XSL recommendation, you specify which page master you want to use for a page sequence with the <fo:page-sequence> elements master-name attribute. I named the simple page master I created page, and I set that attribute to that name here:

 <?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:simple-page-master master-name="page"                       page-height="400mm" page-width="300mm"                       margin-top="10mm" margin-bottom="10mm"                       margin-left="20mm" margin-right="20mm">                       <fo:region-body                         margin-top="0mm" margin-bottom="10mm"                         margin-left="0mm" margin-right="0mm"/>                       <fo:region-after extent="10mm"/>                   </fo:simple-page-master>              </fo:layout-master-set>              <fo:page-sequence master-name="page">                 .                 .                 .              </fo:page-sequence>                 .                 .                 . 

That specifies what page master I want to use for a page sequence. Next, I have to specify the content of the page sequence. And the content of these pages comes from flow children of the <fo:page-sequence .



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