web analytics

Defining Page Layout in XSLT-FO

Options
@2019-11-11 13:30:39

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.

Comments

You must Sign In to comment on this topic.


© 2024 Digcode.com