web analytics

XSL Formating Object: fo:conditional-page-master-reference

Options

codeling 1599 - 6654
@2016-02-25 23:19:12

The fo:conditional-page-master-reference formating object is used to identify a page-master that is to be used when the conditions on its use are satisfied. This allows different page-masters to be used, for example, for even and odd pages, for the first page in a page-sequence, or for blank pages. This usage is typical in chapters of a book or report where the first page has a different layout than the rest of the chapter and the headings and footings on even and odd pages may be different as well.

Areas

The fo:conditional-page-master-reference formatting object generates no area directly. It is used by the fo:page-sequence formatting object to generate pages.

Constraints

The fo:conditional-page-master-reference has a reference to the fo:simple-page-master which has the same master-name as the master-reference trait on the fo:conditional-page-master-reference.

There are three traits, page-position, odd-or-even, and blank-or-not-blank that specify the sub-conditions on the use of the referenced page-master. All three sub-conditions must be true for the condition on the fo:conditional-page-master-reference to be true.

Note

Since the properties from which these traits are derived are not inherited and the initial value of all the properties makes the corresponding sub-condition true, only the subset of traits that are derived from properties with specified values must have their corresponding sub-condition be true.

The sub-condition corresponding to the page-position trait is true if the page generated using the fo:conditional-page-master-reference has the specified position in the sequence of pages generated by the referencing page-sequence; namely, "first", "last", "only" (both first and last), "rest" (not first nor last) or "any" (all of the previous). The referencing page-sequence is the fo:page-sequence that referenced the fo:page-sequence-master from which this fo:conditional-page-master-reference is a descendant.

The sub-condition corresponding to the odd-or-even trait is true if the value of the odd-or-even trait is "any" or if the value matches the parity of the page number of the page generated using the fo:conditional-page-master-reference.

The sub-condition corresponding to the blank-or-not-blank trait is true:

  • if (1) the value of the trait is "not-blank" and the page generated using the fo:conditional-page-master-reference has areas generated by descendants of the fo:flow formatting objects;
  • if (2) the value of the trait is "blank" and the page generated using the fo:conditional-page-master-reference is such that there are no areas from any fo:flow to be put on that page (e.g., (a) to maintain proper page parity due to (i) a break-after or break-before value of "even-page" or "odd-page" or (ii) at the start or end of the page-sequence or (b) because the constraints on the areas generated by descendants of the fo:flow formatting objects would not be satisfied if they were descendant from this page);
  • or if (3) the value of the trait is "any".

A "blank page" is a page generated under (2) of the sub-condition corresponding to "blank-or-not-blank" above. This has nothing to do with whether the page appears completely blank to the reader.

@2016-02-25 23:29:28

blank-or-not-blank

This property forms part of a selection rule to determine if the referenced page-master is eligible for selection at this point in the page-sequence.

The values have the following meanings:

blank This master is eligible for selection if a page must be generated (e.g., to maintain proper page parity at the start or end of the page-sequence) and there are no areas from any of the fo:flow flows within the containing fo:page-sequence to be put on that page.
not-blank This master is eligible for selection if this page contains areas from any of the fo:flow flows within the containing fo:page-sequence.
any This master is always eligible for selection.

Note that we are concerned with areas generated by the fo:flow, not by fo:static-content. So-called "blank" pages will often end up with headers and footers. If you do not yet know what page-master you will use, how can you make a determination of what, if any, the applicable static-contents are? But you can always determine whether the current page will contain ares from the fo:flow. So this condition concerns itself only with fo:flow, not all content on the page.

Comments

You must Sign In to comment on this topic.


© 2024 Digcode.com