9.4 Spacing, conditionality, and precedence

9.4 Spacing, conditionality , and precedence

Many components of compound properties specify the space before or after formatting objects.

  • space-before and space-after are used for block-level constructs.

  • space-start and space-end are used for inline-level constructs.

  • Components offer fine- tuned control over behaviors.

    • space .optimum is used for the preferable amount of space;

      • the shorthand property without a sub-field sets the optimum to the shorthand value.

    • space .minimum and space .maximum are used for the limits to the actual amount of space;

      • not specifying the limits implies the limits do not vary from the optimum.

    • space .conditionality is used for the discarding of unwanted space

      • at the start or end of reference areas.

    • space .precedence is used for the arbitration of conflicting space

      • where abutted space specifications are not desired.

  • Spacing specifications are conditions to be met, not actions to be performed.

    • This makes stylesheet writing easier by allowing redundant specifications for adjacent areas.

You can prevent border, padding, and spacing from being used under certain conditions.

  • The pagination of flow may result in space specifications leading or trailing in reference areas;

    • e.g., the space specified before a paragraph is to be discarded when it is at the top of a page.

      • The stylesheet generating the blocks for paragraphs cannot know where the page breaks will occur in order to turn off the space specification.

      • The default is to discard spacing used at the start or end of a reference area.

  • It is often easy to write the stylesheet to always specify spacing and arbitrate between two coincident space specifications

    • e.g. between a space specified before paragraphs in a section and a space specified after the title of a section.

      • It may not be desirable to have the two spaces combine to too large a space before the first paragraph.

Conditionality dictates whether space specifications are discarded.

  • The value " retain " can be specified to change the initial value of " discard ".

  • All contiguous space specifications that can be discarded, if flowed to the start or end of a reference area, are suppressed.

    • Each such area's size in the tree is set to zero.

  • All space specifications after the first non-discarded area (either space, padding, border, or content) and before the last non-discarded area are not suppressed as a result of conditionality.

    • They may be suppressed as a result of precedence or optimum size.

Precedence dictates arbitration between adjacent space specifications.

  • For example, the space-after of a block may be adjacent to the space-before of the following block.

  • An integer value (default is zero) is used for arbitration of precedence between adjacent space specifications.

    • All unsuppressed areas whose precedence is less than the highest integer value of precedence are then suppressed.

  • The value " force " will protect an unsuppressed area from being suppressed due to precedence.

Optimum values are used for arbitration between the areas with equal precedence.

  • All unsuppressed areas whose optimum values are less than the greatest optimum value are then suppressed.

Resolved minimum and maximum are derived from all remaining unsuppressed areas.

  • By arbitration described above, all have the same (greatest) optimum value.

  • Resolved minimum is the greatest of all minimums.

  • Resolved maximum is the least of all maximums.

Figure 9-6 illustrates the interaction of the space specifications between adjacent blocks.

Figure 9-6. Optimum size and precedence arbitration

graphics/09fig06.gif



Definitive XSL-FO
Definitive XSL-FO
ISBN: 0131403745
EAN: 2147483647
Year: 2002
Pages: 99
Authors: G. Ken Holman

Similar book on Amazon

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