Wheat Is "repeatable-page-master-alternatives"?

This section describes 'repeatable-page-master-alternatives' which is a sub element of 'page-sequence-master' to declare a sub sequence of layouts by specifying a list of alternative layouts with a condition attached to each layouts.

Of the three sub elements of "page-sequence-master", the first two: "single-page-master-reference" and "repeatable-page-master-reference" are easier to understand. The third one, "repeatable-page-master-alternatives", requires more attention.

Wheat Is "repeatable-page-master-alternatives"? - "repeatable-page-master-alternatives" is sub element of "page-sequence-master". It is used to declare a sub sequence of layouts by specifying a list of alternative layouts with a condition attached to each layouts. When a page is mapped to "repeatable-page-master-alternatives", the first layout that satisfies the condition will be selected to generate the page.

"repeatable-page-master-alternatives" has one attribute and repeatable sub elements:

"conditional-page-master-reference" has these attributes:

Here is an example of "page-sequence-master" to illustrate how to "repeatable-page-master-alternatives" sub elements:

<fo:page-sequence-master master-name="chapter">
 <fo:repeatable-page-master-alternatives maximum-repeats="no-limit">
  <fo:conditional-page-master-reference master-reference="odd_first"
   odd-or-even="odd" page-position="first"/>
  <fo:conditional-page-master-reference master-reference="even_first"
   odd-or-even="even" page-position="first"/>
  <fo:conditional-page-master-reference master-reference="odd_other"
   odd-or-even="odd" page-position="rest"/>
  <fo:conditional-page-master-reference master-reference="even_other"
   odd-or-even="even" page-position="rest"/>
 </fo:repeatable-page-master-alternatives>
</fo:page-sequence-master>

The above layout sequence can be applied to a "page-sequence" to generate a single chapter of a book. If the first page of the chapter is an odd page, "odd_first" layout applies. If the first page of the chapter is an even page, "even_first" layout applies. For other odd pages, "odd_other" layout applies. For other even pages, "even_other" layout applies.

Table of Contents

 About This Book

 Introduction of XSL-FO

 Apache™ FOP (Formatting Objects Processor)

 RenderX XEP as an XSL-FO Tool

 Introduction of Area Model

 XSL-FO Document Basics and Examples

Page Layout Masters

 Layout Declarations

 simple-page-master - Simple Page Layout

 simple-page-master Attributes and Sub Elements

 simple-page-master/region-body Sub Element

 region-before and region-after Sub Elements

 region-start and region-end Sub Elements

 "Body" Region Margin and "Side" Region Extent

 Precedence of Side Region Corners

 Page Layout and Page Sequence Mapping

 What Is "page-sequence-master"

 Layout Sequence Example - Cover and Content

Wheat Is "repeatable-page-master-alternatives"?

 Layout Sequence Example - Odd and Even Pages

 Block-Level Formatting Objects

 Inline-Level Formatting Objects

 Including Graphics in XSL-FO document

 Table of Rows and Columns

 List, Item, Label, and Body

 Floating Blocks - "float" and "footnote"

 Hyperlinks, Table of Contents and Indexes

 Headers and Footers using "static-content"

 Font Attributes and Font Families

 Apache FOP Font Configurations

 RenderX XEP Font Configurations

 Converting HTML to PDF

 References

 Full Version in PDF/ePUB