6 Formatting Objects

6.1 Introduction to Formatting Objects

The refined formatting object tree describes one or more intended presentations of the information within this tree. Formatting is the process which converts the description into a presentation. See 3 Introduction to Formatting. The presentation is represented, abstractly, by an area tree, as defined in the area model. See 4 Area Model. Each possible presentation is represented by one or more area trees in which the information in the refined formatting object tree is positioned on a two and one-half dimensional surface.

There are three kinds of formatting objects: (1) those that generate areas, (2) those that return areas, but do not generate them, and (3) those that are used in the generation of areas. The first and second kinds are typically called flow objects. The third kind is either a layout object or an auxiliary object. The kind of formatting object is indicated by the terminology used with the object. Formatting objects of the first kind are said to "generate one or more areas". Formatting objects of the second kind are said to "return one or more areas". Formatting objects of the first kind may both generate and return areas. Formatting objects of the third kind are "used in the generation of areas"; that is, they act like parameters to the generation process.

6.1.1 Definitions Common to Many Formatting Objects

This categorization leads to defining two traits which characterize the relationship between an area and the formatting objects which generate and return that area. These traits are generated-by and returned-by.

The value of the generated-by trait is a single formatting object. A formatting object F is defined to generate an area A if the semantics of F specify the generation of one or more areas and A is one of the areas thus generated, or is a substituted form of one of the areas thus generated, as specified in section 4.7.2 Line-building.

In the case of substituted glyph-areas, the generating formatting object is deemed to be the formatting object which generated the glyph-area which comes first in the sequence of substituted glyph-areas. In the case of an inserted glyph-area (e.g., an automatically-generated hyphen) the generating formatting object is deemed to be the generating formatting object of the last glyph-area preceding the inserted glyph-area in the pre-order traversal of the area tree.

The value of the returned-by trait is a set of pairs, where each pair consists of a formatting object and a positive integer. The integer represents the position of the area in the ordering of all areas returned by the formatting object.

A formatting object F is defined to return the sequence of areas A, B, C, ... if the pair (F,1) is a member of the returned-by trait of A, the pair (F,2) is a member of the returned-by trait of B, the pair (F,3) is a member of the returned-by trait of C, ...

If an area is a member of the sequence of areas returned by a formatting object, then either it was generated by the formatting object or it was a member of the sequence of areas returned by a child of that formatting object. Not all areas returned by a child of a formatting object need be returned by that formatting object. A formatting object may generate an area that has, as some of its children areas, areas returned by the children of that formatting object. These children (in the area tree) of the generated area are not returned by the formatting object to which they were returned.

A set of nodes in a tree is a lineage if:

  • there is a node N in the set such that all the nodes in the set are ancestors of N, and

  • for every node N in the set, if the set contains an ancestor of N, it also contains the parent of N.

The set of formatting objects that an area is returned by is a lineage.

Areas returned by a formatting object may be either normal or out-of-line. Normal areas represent areas in the "normal flow of text"; that is, they become area children of the areas generated by the formatting object to which they are returned. Normal areas have a returned-by lineage of size one. There is only one kind of normal area.

Out-of-line areas are areas used outside the normal flow of text either because they are absolutely positioned or they are part of a float or footnote. Out-of-line areas may have a returned-by lineage of size greater than one.

The area-class trait indicates which class, normal or out-of-line, an area belongs to. For out-of-line areas, it also indicates the subclass of out-of-line area. The values for this trait are: "xsl-normal", "xsl-absolute", "xsl-footnote", "xsl-side-float", or "xsl-before-float". An area is normal if and only if the value of the area-class trait is "xsl-normal"; otherwise, the area is an out-of-line area. (See section 4.2.5 Stacking Constraints.)

The areas returned-by a given formatting object are ordered as noted above. This ordering defines an ordering on the sub-sequence of areas that are of a given area-class, such as the sub-sequence of normal areas. An area A precedes an area B in the sub-sequence if and only if area A precedes area B in the areas returned-by the formatting objects.

A reference-area chain is defined as a sequence of reference-areas that is either generated by the same formatting object that is not a page-sequence formatting object, or that consists of the region reference-areas or normal-flow-reference-areas (see 6.4.14 fo:region-body) generated using region formatting objects assigned to the same flow (see 6.4.1.4 Flows and Flow Mapping). The reference-areas in the sequence are said to be "contained" by the reference-area chain, and they have the same ordering relative to each other in the sequence as they have in the area tree, using pre-order traversal order of the area tree.

6.2 Formatting Object Content

The content of a formatting object is described using XML content-model syntax. In some cases additional constraints, not expressible in XML content models, are given in prose.

The parameter entity, "%block;" in the content models below, contains the following formatting objects:

     block
     block-container
     table-and-caption
     table
     list-block

The parameter entity, "%inline;" in the content models below, contains the following formatting objects:

     bidi-override
     character
     external-graphic
     instream-foreign-object
     inline
     inline-container
     leader
     page-number
     page-number-citation
     page-number-citation-last
     scaling-value-citation
     basic-link
     multi-toggle
     index-page-citation-list

The following formatting objects are "neutral" containers and may be used, provided that the additional constraints listed under each formatting object are satisfied, anywhere where #PCDATA, %block;, or %inline; are allowed:

     multi-switch
     multi-properties
     index-range-begin
     index-range-end
     wrapper
     retrieve-marker

The following formatting objects are "neutral" containers that may be used as described by the constraints listed under each formatting object:

     retrieve-table-marker

The following formatting objects define "points" and may be used anywhere as a descendant of fo:flow or fo:static-content:

     change-bar-begin
     change-bar-end

The following "out-of-line" formatting objects may be used anywhere where #PCDATA, %block;, or %inline; are allowed (except as a descendant of any "out-of-line" formatting object):

     float

The following "out-of-line" formatting objects may be used anywhere where #PCDATA or %inline; are allowed (except as a descendant of any "out-of-line" formatting object):

     footnote

6.3 Formatting Objects Summary

basic-link

The fo:basic-link is used for representing the start resource of a simple link.

bidi-override

The fo:bidi-override inline formatting object is used where it is necessary to override the default Unicode-bidirectional-algorithm direction for different (or nested) inline scripts in mixed-language documents.

block

The fo:block formatting object is commonly used for formatting paragraphs, titles, headlines, figure and table captions, etc.

block-container

The fo:block-container flow object is used to generate a block-level reference-area.

bookmark

The fo:bookmark formatting object is used to identify an access point, by name, and to specify where that access point is within the current document or another external document. A given bookmark may be further subdivided into a sequence of (sub-)bookmarks to as many levels as the authors desire.

bookmark-title

The fo:bookmark-title formatting object is used to identify, in human readable form, an access point.

bookmark-tree

The fo:bookmark-tree formatting object is used to hold a list of access points within the document such as a table of contents, a list of figures or tables, etc. Each access point is represented by a bookmark.

change-bar-begin

The fo:change-bar-begin is used to indicate the beginning of a "change region" that is ended by its matching fo:change-bar-end. The change region is decorated with a change bar down either the start or end edge of the column. The style of the change bar is determined by the value of various change bar related properties.

change-bar-end

The fo:change-bar-end is used to indicate the end of a "change region" that is started by its matching fo:change-bar-begin.

character

The fo:character flow object represents a character that is mapped to a glyph for presentation.

color-profile

Used to declare a color profile for a stylesheet.

conditional-page-master-reference

The fo:conditional-page-master-reference is used to identify a page-master that is to be used when the conditions on its use are satisfied.

declarations

Used to group global declarations for a stylesheet.

external-graphic

The fo:external-graphic flow object is used for a graphic where the graphics data resides outside of the XML result tree in the fo namespace.

float

The fo:float serves two purposes. It can be used so that during the normal placement of content, some related content is formatted into a separate area at beginning of the page (or of some following page) where it is available to be read without immediately intruding on the reader. Alternatively, it can be used when an area is intended to float to one side, with normal content flowing alongside.

flow

The content of the fo:flow formatting object is a sequence of flow objects that provides the flowing text content that is distributed into pages.

flow-assignment

The fo:flow-assignment is used to specify the assignment of one sequence of flows to a sequence of regions.

flow-map

The fo:flow-map is used to specify the assignment of flows to regions.

flow-name-specifier

The fo:flow-name-specifier is used to specify one flow in a source-list.

flow-source-list

The fo:flow-source-list is used to specify the sequence of flows to assign in a particular fo:flow-assignment.

flow-target-list

The fo:flow-target-list is used to specify the sequence of regions to which flows are assigned in a particular fo:flow-assignment.

folio-prefix

The fo:folio-prefix formatting object specifies a static prefix for the folio numbers within a page-sequence.

folio-suffix

The fo:folio-suffix formatting object specifies a static suffix for the folio numbers within a page-sequence.

footnote

The fo:footnote is used to produce a footnote citation and the corresponding footnote.

footnote-body

The fo:footnote-body is used to generate the content of the footnote.

index-key-reference

The fo:index-key-reference formatting object is used to generate a set of cited page items for all the occurrences of the specified index-key.

index-page-citation-list

The fo:index-page-citation-list formatting object is used to group together the sets of cited page items generated by its fo:index-key-reference children. The ultimate effect of the fo:index-page-citation-list is to generate a formatted list of page numbers and ranges.

index-page-citation-list-separator

The fo:index-page-citation-list-separator formatting object specifies the formatting objects used to separate singleton page numbers or page number ranges in the generated list of page numbers.

index-page-citation-range-separator

The fo:index-page-citation-range-separator formatting object specifies the formatting objects used to separate two page numbers forming a range in the generated list of page numbers.

index-page-number-prefix

The fo:index-page-number-prefix formatting object specifies a static prefix for the cited page items created by fo:index-key-reference.

index-page-number-suffix

The fo:index-page-number-suffix formatting object specifies a static suffix for the cited page items created by fo:index-key-reference.

index-range-begin

The fo:index-range-begin formatting object is used to indicate the beginning of an "indexed range" associated with an index key. The index range is ended by a corresponding fo:index-range-end.

index-range-end

The fo:index-range-end is used to indicate the end of an "indexed range" that is started by its matching fo:index-range-begin.

initial-property-set

The fo:initial-property-set specifies formatting properties for the first line of an fo:block.

inline

The fo:inline formatting object is commonly used for formatting a portion of text with a background or enclosing it in a border.

inline-container

The fo:inline-container flow object is used to generate an inline reference-area.

instream-foreign-object

The fo:instream-foreign-object flow object is used for an inline graphic or other "generic" object where the object data resides as descendants of the fo:instream-foreign-object.

layout-master-set

The fo:layout-master-set is a wrapper around all masters used in the document.

leader

The fo:leader formatting object is used to generate leaders consisting either of a rule or of a row of a repeating character or cyclically repeating pattern of characters that may be used for connecting two text formatting objects.

list-block

The fo:list-block flow object is used to format a list.

list-item

The fo:list-item formatting object contains the label and the body of an item in a list.

list-item-body

The fo:list-item-body formatting object contains the content of the body of a list-item.

list-item-label

The fo:list-item-label formatting object contains the content of the label of a list-item; typically used to either enumerate, identify, or adorn the list-item's body.

marker

The fo:marker is used in conjunction with fo:retrieve-marker or fo:retrieve-table-marker to produce running headers or footers.

multi-case

The fo:multi-case is used to contain (within an fo:multi-switch) each alternative sub-tree of formatting objects among which the parent fo:multi-switch will choose one to show and will hide the rest.

multi-properties

The fo:multi-properties is used to switch between two or more property sets that are associated with a given portion of content.

multi-property-set

The fo:multi-property-set is used to specify an alternative set of formatting properties that, dependent on a User Agent state, are applied to the content.

multi-switch

The fo:multi-switch wraps the specification of alternative sub-trees of formatting objects (each sub-tree being within an fo:multi-case), and controls the switching (activated via fo:multi-toggle) from one alternative to another.

multi-toggle

The fo:multi-toggle is used within an fo:multi-case to switch to another fo:multi-case.

page-number

The fo:page-number formatting object is used to represent the current page-number.

page-number-citation

The fo:page-number-citation is used to reference the page-number for the page containing the first normal area returned by the cited formatting object.

page-number-citation-last

The fo:page-number-citation-last is used to reference the page-number for the last page containing the an area that is (a) returned by the cited formatting object and (b) has an area-class that is consistent with the specified page-citation-strategy.

page-sequence

The fo:page-sequence formatting object is used to specify how to create a (sub-)sequence of pages within a document; for example, a chapter of a report. The content of these pages comes from flow children of the fo:page-sequence.

page-sequence-master

The fo:page-sequence-master specifies sequences of page-masters that are used when generating a sequence of pages.

page-sequence-wrapper

The fo:page-sequence-wrapper formatting object is used to specify inherited properties for a group of fo:page-sequence formatting objects. It has no additional formatting semantics.

region-after

This region defines a viewport that is located on the "after" side of fo:region-body region.

region-before

This region defines a viewport that is located on the "before" side of fo:region-body region.

region-body

This region specifies a viewport/reference pair that is located in the "center" of the fo:simple-page-master.

region-end

This region defines a viewport that is located on the "end" side of fo:region-body region.

region-name-specifier

The fo:region-name-specifier is used to specify one region in a target-list.

region-start

This region defines a viewport that is located on the "start" side of fo:region-body region.

repeatable-page-master-alternatives

An fo:repeatable-page-master-alternatives specifies a sub-sequence consisting of repeated instances of a set of alternative page-masters. The number of repetitions may be bounded or potentially unbounded.

repeatable-page-master-reference

An fo:repeatable-page-master-reference specifies a sub-sequence consisting of repeated instances of a single page-master. The number of repetitions may be bounded or potentially unbounded.

retrieve-marker

The fo:retrieve-marker is used in conjunction with fo:marker to produce running headers or footers.

retrieve-table-marker

The fo:retrieve-table-marker is used in conjunction with fo:marker to produce table-headers and table-footers whose content can change over different pages, different regions or different columns.

root

The fo:root node is the top node of an XSL result tree. This tree is composed of formatting objects.

scaling-value-citation

The fo:scaling-value-citation is used to obtain the scale-factor applied to the cited fo:external-graphic.

simple-page-master

The fo:simple-page-master is used in the generation of pages and specifies the geometry of the page. The page is subdivided into regions.

single-page-master-reference

An fo:single-page-master-reference specifies a sub-sequence consisting of a single instance of a single page-master.

static-content

The fo:static-content formatting object holds a sequence or a tree of formatting objects that is to be presented in a single region or repeated in like-named regions on one or more pages in the page-sequence. Its common use is for repeating or running headers and footers.

table

The fo:table flow object is used for formatting the tabular material of a table.

table-and-caption

The fo:table-and-caption flow object is used for formatting a table together with its caption.

table-body

The fo:table-body formatting object is used to contain the content of the table body.

table-caption

The fo:table-caption formatting object is used to contain block-level formatting objects containing the caption for the table only when using the fo:table-and-caption.

table-cell

The fo:table-cell formatting object is used to group content to be placed in a table cell.

table-column

The fo:table-column formatting object specifies characteristics applicable to table cells that have the same column and span.

table-footer

The fo:table-footer formatting object is used to contain the content of the table footer.

table-header

The fo:table-header formatting object is used to contain the content of the table header.

table-row

The fo:table-row formatting object is used to group table-cells into rows.

title

The fo:title formatting object is used to associate a title with a given page-sequence. This title may be used by an interactive User Agent to identify the pages. For example, the content of the fo:title can be formatted and displayed in a "title" window or in a "tool tip".

wrapper

The fo:wrapper formatting object is used to specify inherited properties for a group of formatting objects. It has no additional formatting semantics.

6.4 Declarations and Pagination and Layout Formatting Objects

6.4.1 Introduction

The root node of the formatting object tree must be an fo:root formatting object. The children of the fo:root formatting object are a single fo:layout-master-set, an optional fo:declarations, an optional fo:bookmark-tree, and a sequence of one or more fo:page-sequences and/or fo:page-sequence-wrapper elements. The fo:layout-master-set defines the geometry and sequencing of the pages; the children of the fo:page-sequences, which are called flows (contained in fo:flow and fo:static-content), provide the content that is distributed into the pages. The fo:declarations object is a wrapper for formatting objects whose content is to be used as a resource to the formatting process. The process of generating the pages is done automatically by the XSL processor formatting the result tree.

The children of the fo:layout-master-set are the pagination and layout specifications and flow-map specifications. There are two types of pagination and layout specifications: page-masters and page-sequence-masters. Page-masters have the role of describing the intended subdivisions of a page and the geometry of these subdivisions. Page-sequence-masters have the role of describing the sequence of page-masters that will be used to generate pages during the formatting of an fo:page-sequence. Flow-maps have the role of assigning flows to regions.

6.4.1.1 Page-sequence-masters

Each fo:page-sequence-master characterizes a set of possible sequences of page-masters. For any given fo:page-sequence, only one of the possible set of sequences will be used. The sequence that is used is any sequence that satisfies the constraints determined by the individual page-masters, the flows which generate pages from the page-masters, and the fo:page-sequence-master itself.

The fo:page-sequence-master is used to determine which page-masters are used and in which order. The children of the fo:page-sequence-master are a sequence of sub-sequence specifications. The page-masters in a sub-sequence may be specified by a reference to a single page-master or as a repetition of one or more page-masters. For example, a sequence might begin with several explicit page-masters and continue with a repetition of some other page-master (or masters).

The fo:single-page-master-reference is used to specify a sub-sequence consisting of a single page-master.

There are two ways to specify a sub-sequence that is a repetition. The fo:repeatable-page-master-reference specifies a repetition of a single page-master. The fo:repeatable-page-master-alternatives specifies the repetition of a set of page-masters. Which of the alternative page-masters is used at a given point in the sub-sequence is conditional and may depend on whether the page number is odd or even, is the first page, is the last page, or is blank. The "maximum-repeats" property on the repetition specification controls the number of repetitions. If this property is not specified, there is no limit on the number of repetitions.

6.4.1.2 Page-masters

A page-master is a master that is used to generate a page. A page is a viewport/reference pair in which the viewport-area is a child of the area tree root. A page-viewport-area is defined to be the viewport-area of a page, and a page-area is defined to be the unique child of a page-viewport-area.

The page-viewport-area is defined by the output medium; the page-area holds the page contents and has the effect of positioning the page contents on the output medium.

A single page-master may be used multiple times. Each time it is used it generates a single page; for example, a page-master that is referenced from an fo:repeatable-page-master-reference will be used by the fo:page-sequence to generate one page for each occurrence of the reference in the specified sub-sequence.

Note:

When pages are used with a User Agent such as a Web browser, it is common that the each document has only one page. The viewport used to view the page determines the size of the page. When pages are placed on non-interactive media, such as sheets of paper, pages correspond to one or more of the surfaces of the paper. The size of the paper determines the size of the page.

In this specification, there is only one kind of page-master, the fo:simple-page-master. Future versions of this specification may add additional kinds of page-masters.

An fo:simple-page-master has, as children, specifications for one or more regions.

A region specification is used as a master, the region-master, in generating a viewport/reference pair consisting of a region-viewport-area and a region-reference-area. The region-viewport-area is always a child of a page-area generated using the parent of the region-master.

Note:

The regions on the page are analogous to "frames" in an HTML document. Typically, at least one of these regions is of indefinite length in one of its dimensions. For languages with a lr-tb (or rl-tb) writing-mode, this region is typically of indefinite length in the top-to-bottom direction. The viewport represents the visible part of the frame. The flows assigned to the region are viewed by scrolling the region reference-area through the viewport.

Each region is defined by a region formatting object. Each region formatting object has a name and a definite position. In addition, the region's height or width is fixed and the other dimension may be either fixed or indefinite. For example, a region that is the body of a Web page may have indefinite height.

The specification of the region determines the size and position of region-viewport-areas generated using the region formatting object. The positioning of the viewport is relative to its page-area parent.

For version 1.1 of this Recommendation, a page-master will consist of the following regions: "region-body" (one or more) and four other regions, one on each side of the body. To allow the side regions to correspond to the current writing-mode, these regions are named "region-before" (which corresponds to "header" in the "lr-tb" writing-mode), "region-after" (which corresponds to "footer" in the "lr-tb" writing-mode), "region-start" (which corresponds to a "left-sidebar" in the "lr-tb" writing-mode) and "region-end" (which corresponds to a "right-sidebar" in the "lr-tb" writing-mode). It is expected that a future version of the Recommendation will introduce a mechanism that allows a page-master to contain an arbitrary number of arbitrarily sized and positioned regions.

Some types of region have conditional sub-regions associated with them, and the associated region-reference-areas are divided up by having child areas corresponding to the sub-regions, including a "main-reference-area" for the region. For region-masters to which the column-count property applies, the main-reference-area is further subdivided by having child-areas designated as "span-reference-areas" whose number depends upon the number of spans (i.e. block-areas with span="all") occurring on the page. These in turn are subdivided by having child-areas designated as "normal-flow-reference-areas", whose number depends on the number of columns specified.

6.4.1.3 Page Generation

Pages are generated by the formatter's processing of fo:page-sequences. As noted above, each page is a viewport/reference pair in which the viewport-area is a child of the area tree root. Each page is generated using a page-master to define the region-viewport-areas and region-reference-areas that correspond to the regions specified by that page-master.

Each fo:page-sequence references either an fo:page-sequence-master or a page-master. If the reference is to a page-master, this is interpreted as if it were a reference to an fo:page-sequence-master that repeats the referenced page-master an unbounded number of times. An fo:page-sequence references a page-master if either the fo:page-sequence directly references the page-master via the "master-reference" property or that property references an fo:page-sequence-master that references the page-master.

6.4.1.4 Flows and Flow Mapping

There are two kinds of flows: fo:static-content and fo:flow. An fo:static-content flow holds content, such as the text that goes into headers and footers, that is repeated on many of the pages. An fo:flow flow holds content that is distributed across a sequence of pages. The processing of the fo:flow flows is what determines how many pages are generated to hold the fo:page-sequence. The fo:page-sequence-master is used as the generator of the sequence of page-masters into which the flow children content is distributed.

The children of a flow are a sequence of block-level flow objects. Each flow has a name that is given by its "flow-name" property. No two flows that are children of the same fo:page-sequence may have the same name.

The assignment of flows to regions on a page-master is determined by a flow-map. The flow-map is an association between the flow children of the fo:page-sequence and regions defined within the page-masters referenced by that fo:page-sequence.

Flow-maps are specified by fo:flow-map formatting objects. An fo:page-sequence uses the flow-map indicated by its flow-map-reference property when assigning its flows to regions. If the flow-map-reference property is not specified for the page-sequence then the implicit flow-map is used for that page-sequence, as in version 1.0 of this Recommendation. The "flow-name" property of a flow specifies to which region that flow is assigned. Each region has a "region-name" property. The flow-map assigns a flow to the region that has the same name.

To avoid requiring users to generate region-names, the regions all have default values for the "region-name" property. The region-body, region-before, region-after, region-start, and region-end have the default names "xsl-region-body", "xsl-region-before", "xsl-region-after", "xsl-region-start", and "xsl-region-end", respectively. It is an error for a page master to have two region-body descendants with the default region-name.

In addition, an fo:static-content formatting object may have a "flow-name" property value of "xsl-before-float-separator" or "xsl-footnote-separator". If a conditional sub-region of the region-body is used to generate a reference-area on a particular page, the fo:static-content whose name corresponds to the conditional sub-region shall be formatted into the reference-area associated with the sub-region, as specified in 6.12.1.3 Conditional Sub-Regions.

6.4.1.5 Constraints on Page Generation

The areas that are descendants of a page-area are constrained by the page-master used to generate the page-area and the flows that are assigned to the regions specified on the page-master. For fo:flow flows, the areas generated by the descendants of the flow are distributed across the pages in the sequence according to the flow-map in effect for that page-sequence. For fo:static-content flows, the processing of the flow is repeated for each page generated using a page-master having the region to which the flow is assigned with two exceptions: for an fo:static-content with a flow-name of xsl-before-float-separator, the processing is repeated only for those page-reference-areas which have descendant areas with an area-class of xsl-before-float, and for an fo:static-content with a flow-name of xsl-footnote-separator, the processing is repeated only for those page-reference-areas which have descendant areas with an area-class of xsl-footnote.

6.4.1.6 Pagination Tree Structure

The result tree structure is shown below.

Tree representation of the Formatting Objects for pagination   [D]

Tree Representation of the Formatting Objects for Pagination

6.4.1.7 Example Flow Maps

A typical use of flow maps are where there are two or more flows that each, independently of each other, flow into separate regions on the pages. Another one is when the flow is flowed from one region into another region on the same page and continuing onto further pages. A third use is when two or more flows are "concatenated"; each flow beginning where the previous one ends.

6.4.1.7.1 Two flows mapping into their own regions

A->R; B->S   [D]

Mapping flow A to region R, flow B to region S

In this case the flows are specified as:

<fo:flow flow-name="A">
  <fo:block>In the second century of
the Christian Aera, the empire of Rome ... </fo:block>
</fo:flow>

and

<fo:flow flow-name="B">
  <fo:block>Quo usque tandem abutere, Catilina, patientia nostra? ...
</fo:block>
</fo:flow>

The regions are specified with region-name="R" and region-name="S", respectively, and the flow map is specified as follows:

<fo:flow-map flow-map-name="E1">
  <fo:flow-assignment>
    <fo:flow-source-list>
      <fo:flow-name-specifier flow-name-reference="A"/>
    </fo:flow-source-list>
    <fo:flow-target-list>
      <fo:region-name-specifier region-name-reference="R"/>
    </fo:flow-target-list>
  </fo:flow-assignment>
  <fo:flow-assignment>
    <fo:flow-source-list>
      <fo:flow-name-specifier flow-name-reference="B"/>
    </fo:flow-source-list>
    <fo:flow-target-list>
      <fo:region-name-specifier region-name-reference="S"/>
    </fo:flow-target-list>
  </fo:flow-assignment>
</fo:flow-map>
6.4.1.7.2 A flow mapping into two regions

A->R1,R2   [D]

Mapping flow A to regions R1 and R2

In this case the flow map is specified as follows:

<fo:flow-map flow-map-name="E2">
  <fo:flow-assignment>
    <fo:flow-source-list>
      <fo:flow-name-specifier flow-name-reference="A"/>
    </fo:flow-source-list>
    <fo:flow-target-list>
      <fo:region-name-specifier region-name-reference="R1"/>
      <fo:region-name-specifier region-name-reference="R2"/>
    </fo:flow-target-list>
  </fo:flow-assignment>
</fo:flow-map>
6.4.1.7.3 Two flows mapping into a region

A,B->R   [D]

Mapping flows A and B to region R

In this case the flow map is specified as follows:

<fo:flow-map flow-map-name="E3">
  <fo:flow-assignment>
    <fo:flow-source-list>
      <fo:flow-name-specifier flow-name-reference="A"/>
      <fo:flow-name-specifier flow-name-reference="B"/>
    </fo:flow-source-list>
    <fo:flow-target-list>
      <fo:region-name-specifier region-name-reference="R"/>
    </fo:flow-target-list>
  </fo:flow-assignment>
</fo:flow-map>
6.4.1.7.4 Two flows mapping into two regions

A,B->R1,R2   [D]

Mapping flows A and B to regions R1 and R2

In this case the flow map is specified as follows:

<fo:flow-map flow-map-name="E4">
  <fo:flow-assignment>
    <fo:flow-source-list>
      <fo:flow-name-specifier flow-name-reference="A"/>
      <fo:flow-name-specifier flow-name-reference="B"/>
    </fo:flow-source-list>
    <fo:flow-target-list>
      <fo:region-name-specifier region-name-reference="R1"/>
      <fo:region-name-specifier region-name-reference="R2"/>
    </fo:flow-target-list>
  </fo:flow-assignment>
</fo:flow-map>

6.4.2 fo:root

Common Usage:

This is the top node of the formatting object tree. It holds an fo:layout-master-set formatting object (which holds all masters used in the document), an optional fo:declarations, an optional fo:bookmark-tree, and one or more fo:page-sequence or fo:page-sequence-wrapper objects. Each fo:page-sequence represents a sequence of pages that result from formatting the content children of the fo:page-sequence. An fo:page-sequence-wrapper can also occur as the child of fo:root. An fo:page-sequence-wrapper can contain zero or more fo:page-sequence objects or fo:page-sequence-wrappers. The fo:page-sequence-wrapper is used to specify inherited properties for the fo:page-sequence objects it wraps; it has no additional formatting semantics.

Note:

A document can contain multiple fo:page-sequences. For example, each chapter of a document could be a separate fo:page-sequence; this would allow chapter-specific content, such as the chapter title, to be placed within a header or footer.

Areas:

Page-viewport-areas are returned by the fo:page-sequence children of the fo:root formatting object. The fo:root does not generate any areas.

Constraints:

The children of the root of the area tree consist solely of, and totally of, the page-viewport-areas returned by the fo:page-sequence children of the fo:root. The set of all areas returned by the fo:page-sequence children is properly ordered. (See Section 4.7.1 General Ordering Constraints.)

Contents:

It is an error if there is not at least one fo:page-sequence descendant of fo:root.

The following properties apply to this formatting object:

7.5 Common Accessibility Properties
7.30.8 id
7.24.1 index-class
7.24.2 index-key
7.27.11 media-usage

6.4.3 fo:declarations

Common Usage:

The fo:declarations formatting object is used to group global declarations for a stylesheet.

Areas:

The fo:declarations formatting object does not generate or return any areas.

Constraints:

None.

Contents:

The fo:declarations formatting object may have additional child elements in a non-XSL namespace. Their presence does not, however, change the semantics of the XSL namespace objects and properties. The permitted structure of these non-XSL namespace elements is defined for their namespace(s).

6.4.4 fo:color-profile

Common Usage:

The fo:color-profile formatting object is used to declare an ICC Color Profile for a stylesheet. The color-profile is referenced again via the name specified in the "color-profile-name" property.

The color-profile is identified by the URI specified in the "src" property value. This URI may identify an internally recognized color-profile or it may point to a ICC Color Profile encoding that should be loaded and interpreted.

When the color-profile is referenced (e.g., via the rgb-icc function 5.10.2 Color Functions), the following rules are used:

  1. If the color-profile is available, the color value identified from the color-profile should be used.

  2. If the color-profile is not available, the sRGB ([sRGB]) fallback must be used.

Areas:

The fo:color-profile formatting object does not generate or return any areas.

Constraints:

None.

Contents:

EMPTY

The following properties apply to this formatting object:

7.30.16 src
7.18.2 color-profile-name
7.18.3 rendering-intent

6.4.5 fo:page-sequence

Common Usage:

The fo:page-sequence formatting object is used to specify how to create a (sub-)sequence of pages within a document; for example, a chapter of a report. The content of these pages comes from flow children of the fo:page-sequence as assigned by the flow-map in effect for that fo:page-sequence. The layout of these pages comes from the fo:page-sequence-master or page-master referenced by the master-reference trait on the fo:page-sequence. The sequence of areas returned by each of the flow-object children of the fo:page-sequence are made descendants of the generated pages as described below.

Areas:

The fo:page-sequence formatting object generates a sequence of viewport/reference pairs, and returns the page-viewport-areas. For each page-reference-area, and each region specified in the page-master used to generate that page-reference-area, the fo:page-sequence object also generates the viewport/reference pair for the occurrence of that region in that page-reference-area, and may generate a before-float-reference-area, footnote-reference-area, and main-reference-area, and one or more normal-flow-reference-areas. The generation of these further areas is described in the descriptions of the fo:simple-page-master, region-masters and fo:flow-map. It may also generate a title-area.

All areas generated by an fo:page-sequence have area-class "xsl-absolute".

The page-viewport-areas identify one of the sides as a page binding edge. This recommendation does not specify the mechanism for selecting which side is the page binding edge.

Note:

If the User Agent can determine that the result is to be bound, then the page binding edge of any given page is the edge on which that page is intended to be bound.

Commonly the page binding edge of a page with an odd folio-number is the start-edge of that page and the binding-edge of a page with an even folio-number is the end-edge of that page.

The binding can be a simple as stapling or may be as complex as producing a book using an imposition scheme.

For each formatting object descendant D under the change bar influence of a given fo:change-bar-begin object F (as defined in 6.13.2 fo:change-bar-begin), the fo:page-sequence generates a "change bar area" for each area A returned by D, as a child of the ancestor region-area of A. Each change bar area is of class xsl-absolute, with zero margin and padding, with border-end-color given by the change-bar-color of F, with border-end-style given by the change-bar-style of F, with border-end-width given by the change-bar-width of F, with inline progression-dimension equal to zero and block-progression-dimension equal to the dimension of A parallel to the block-progression-dimension of the region-area.

The change bar area is positioned to be adjacent to the nearest ancestor area C of A which is either a normal-flow-reference-area or region-reference-area. The change bar area is aligned with A and lies away from C by a distance given by the change-bar-offset of F, with respect to the start-edge or the end-edge of C as determined by the change-bar-placement trait of F.

Trait Derivation:

The reference-orientation and writing-mode of the region-viewport-areas are determined by the values of the "reference-orientation" and "writing-mode" properties of the fo:page-sequence.

Note:

The value may be given as an explicit value or the from-page-master-region function may be used to obtain the value specified on the layout formatting object being used to generate the region viewport/reference area pair.

Constraints:

Each page-viewport-area/page-reference-area pair is generated using a page-master that satisfies the constraints of the page-sequence-master identified by the master-reference trait of the fo:page-sequence or a page-master that was directly identified by the master-reference trait. The region-viewport-area children of such a page-reference-area must correspond to the regions that are children of that page-master.

The areas generated by the fo:page-sequence have as their descendants the areas returned by the flows that are children of the fo:page-sequence.

The areas returned to the fo:page-sequence by a flow must satisfy five types of constraints:

  • Completeness. All areas returned by formatting object descendants of the flow children of the fo:page-sequence become descendants of areas generated by the fo:page-sequence, with the exception of glyph-areas subject to deletion or substitution as in Sections 4.7.2 Line-building and 4.7.3 Inline-building.

  • Flow-map association. The areas returned from a flow child of the fo:page-sequence must be descendants of region-reference-areas generated using regions to which the flow is assigned by the flow-map in effect.

    Areas returned from an fo:static-content with a flow-name of xsl-before-float-separator become children of the before-float-reference-area of an area associated to an fo:region-body, following all sibling areas of area-class xsl-before-float. Areas returned from an fo:static-content with a flow-name of xsl-footnote-separator become children of the footnote-reference-area of an area associated to an fo:region-body, preceding all sibling areas of area-class xsl-footnote.

    If the flow-map-reference is specified, the flow-map in effect is the one described by the fo:flow-map child of the fo:layout-master-set having a flow-map-name matching the specified value of flow-map-reference on the fo:page-sequence. If the flow-map-reference is not specified, the flow-map in effect is the implicit flow-map shown in 6.4.22 fo:flow-map.

  • Area-class association. Areas returned by flow children of an fo:page-sequence are distributed as follows:

    • All areas of area-class xsl-footnote, and all areas returned from an fo:static-content with a flow-name of xsl-footnote-separator, must be descendants of a footnote-reference-area;

    • all areas of area-class xsl-before-float, and all areas returned from an fo:static-content with a flow-name of xsl-before-float-separator, must be descendants of a before-float-reference-area;

    all other areas must be descendants of a region-reference-area and further they must be descendants of a main-reference-area child of that region-reference-area if it has one.

  • Stacking. The stackable areas of a given class returned by children of each flow are properly stacked within the appropriate reference-area, as described above.

  • Flow-assignment ordering. The default ordering constraint of 4.7.1 General Ordering Constraints does not apply to the fo:page-sequence. The default ordering constraint applies to the flow object children inside each fo:flow; special ordering constraints apply to the child fo:static-content objects.

    If the flow-map in effect for a page-sequence has a flow-assignment child with flow-source-list S and flow-target-list T and the child flow-name-specifiers of S have flow-name-reference values F1,...,Fm, and the child region-name-specifiers of T have region-name-reference values R1,...,Rn, then for each area-class C, the areas returned to the page-sequence belonging to that class have the same order in the area tree (relative to the region ordering) as their generating formatting objects (relative to the flow ordering). That is, if A and B are areas of area-class C and either A and B are returned by the same flow with A returned prior to B, or A and B are returned by flows with flow-name values Fi and Fj, respectively, for some i and j such that i<j, then one of the following conditions must hold:

    • the ancestor page-reference-area of A precedes the ancestor page-reference-area of B, or

    • A and B share the same ancestor page-reference-area, A is a descendant of a region-reference-area generated using a region whose region-name value is Rk and B is a descendant of a region-reference-area generated using a region whose region-name value is Rl for some k and l such that k<l, or

    • A and B are descendants of the same region-reference-area and A precedes B in the pre-order-tree traversal of the area tree.

If a title-area is generated the following constraints must be satisfied:

  • Completeness. All areas returned by formatting object descendants of the fo:title child of the fo:page-sequence become descendants of the title-area generated by the fo:page-sequence, with the exception of glyph-areas subject to deletion or substitution as in Sections 4.7.2 Line-building and 4.7.3 Inline-building.

  • Stacking. The areas returned by children of the fo:title are properly stacked within the title-area.

The default ordering constraint of section 4.7.1 General Ordering Constraints does apply to the fo:title.

Contents:

The following properties apply to this formatting object:

7.10.1 country
7.27.19 flow-map-reference
7.26.1 format
7.10.2 language
7.26.4 letter-value
7.26.2 grouping-separator
7.26.3 grouping-size
7.30.8 id
7.24.1 index-class
7.24.2 index-key
7.27.7 initial-page-number
7.27.6 force-page-count
7.27.9 master-reference
7.21.3 reference-orientation
7.29.7 writing-mode

6.4.6 fo:page-sequence-wrapper

Common Usage:

The fo:page-sequence-wrapper formatting object is used to specify inherited properties for a group of fo:page-sequence formatting objects.

Areas:

The fo:page-sequence-wrapper formatting object does not generate any areas. The fo:page-sequence-wrapper formatting object returns the sequence of areas created by concatenating the sequences of areas returned by each of the children of the fo:page-sequence-wrapper.

Trait Derivation:

Except for "id", "index-class", and "index-key", the fo:page-sequence-wrapper has no properties that are directly used by it. However, it does serve as a carrier to hold inheritable properties that are utilized by its children.

Constraints:

The order of concatenation of the sequences of areas returned by the children of the fo:page-sequence-wrapper is the same order as the children are ordered under the fo:page-sequence-wrapper. An fo:page-sequence-wrapper that contains no fo:page-sequence objects as descendants returns no areas.

Note:

Because an fo:page-sequence-wrapper that contains no fo:page-sequence objects as descendants returns no areas, any id, index-key, or index-class property on such an fo:page-sequence-wrapper is ignored; the result would be as if they were not assigned on this FO. In particular, any attempt to refer to this id would result in the same action as if this id were never declared within the FO result tree.

Contents:

The following properties apply to this formatting object:

7.30.8 id
7.24.1 index-class
7.24.2 index-key

6.4.7 fo:layout-master-set

Common Usage:

The fo:layout-master-set is a wrapper around all masters used in the document. This includes page-sequence-masters, page-masters, and flow-maps.

Areas:

The fo:layout-master-set formatting object generates no area directly. The masters that are the children of the fo:layout-master-set are used by the fo:page-sequence to generate pages.

Constraints:

The value of the master-name trait on each child of the fo:layout-master-set must be unique within the set.

Contents:

6.4.8 fo:page-sequence-master

Common Usage:

The fo:page-sequence-master is used to specify the constraints on and the order in which a given set of page-masters will be used in generating a sequence of pages. Pages are automatically generated when the fo:page-sequence-master is used in formatting an fo:page-sequence.

Note:

There are several ways of specifying a potential sequence of pages. One can specify a sequence of references to particular page-masters. This yields a bounded sequence of potential pages. Alternatively, one can specify a repeating sub-sequence of one or more page-masters. This sub-sequence can be bounded or unbounded. Finally one can intermix the two kinds of sub-sequence-specifiers.

Areas:

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

Constraints:

The children of the fo:page-sequence-master are a sequence of sub-sequence-specifiers. A page-sequence satisfies the constraint determined by an fo:page-sequence-master if (a) it can be partitioned into a sequence of sub-sequences of pages that map one-to-one to an initial sub-sequence of the sequence of sub-sequence-specifiers that are the children of the fo:page-sequence-master and, (b) for each sub-sequence of pages in the partition, that sub-sequence satisfies the constraints of the corresponding sub-sequence-specifier. The sequence of sub-sequences of pages can be shorter than the sequence of sub-sequence-specifiers.

It is an error if the entire sequence of sub-sequence-specifiers children is exhausted while some areas returned by an fo:flow are not placed. Implementations may recover, if possible, by re-using the sub-sequence-specifier that was last used to generate a page.

Contents:

The following properties apply to this formatting object:

7.27.8 master-name

6.4.9 fo:single-page-master-reference

Common Usage:

An fo:single-page-master-reference is the simplest sub-sequence-specifier. It specifies a sub-sequence consisting of a single instance of a single page-master. It is used to specify the use of a particular page-master at a given point in the sequence of pages that would be generated using the fo:page-sequence-master that is the parent of the fo:single-page-master-reference.

Areas:

The fo:single-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:single-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:single-page-master-reference.

The sub-sequence of pages mapped to this sub-sequence-specifier satisfies the constraints of this sub-sequence-specifier if (a) the sub-sequence of pages consists of a single page and (b) that page is constrained to have been generated using the fo:simple-page-master referenced by the fo:single-page-master-reference.

Contents:

EMPTY

The following properties apply to this formatting object:

7.27.9 master-reference

6.4.10 fo:repeatable-page-master-reference

Common Usage:

An fo:repeatable-page-master-reference is the next simplest sub-sequence-specifier. It specifies a sub-sequence consisting of repeated instances of a single page-master. The number of repetitions may be bounded or potentially unbounded.

Areas:

The fo:repeatable-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:repeatable-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:repeatable-page-master-reference.

The sub-sequence of pages mapped to this sub-sequence-specifier satisfies the constraints of this sub-sequence-specifier if (a) the sub-sequence of pages consists of zero or more pages, (b) each page is generated using the fo:simple-page-master referenced by the fo:repeatable-page-master-reference, and (c) length of the sub-sequence is less than or equal to the value of maximum-repeats.

If no region-master child of the page-master referred to by this formatting object has a region-name associated to any flow in an fo:page-sequence, then the sub-sequence is constrained to have length zero.

Contents:

EMPTY

The following properties apply to this formatting object:

7.27.9 master-reference
7.27.10 maximum-repeats

6.4.11 fo:repeatable-page-master-alternatives

Common Usage:

The fo:repeatable-page-master-alternatives formatting object is the most complex sub-sequence-specifier. It specifies a sub-sequence consisting of repeated instances of a set of alternative page-masters. The number of repetitions may be bounded or potentially unbounded. Which of the alternative page-masters is used at any point in the sequence depends on the evaluation of a condition on the use of the alternative. Typical conditions include, testing whether the page which is generated using the alternative is the first or last page in a page-sequence or is the page blank. The full set of conditions allows different page-masters to be used for the first page, for odd and even pages, for blank pages, etc.

Note:

Because the conditions are tested in order from the beginning of the sequence of children, the last alternative in the sequence usually has a condition that is always true and this alternative references the page-master that is used for all pages that do not receive some specialized layout.

Areas:

The fo:repeatable-page-master-alternatives formatting object generates no area directly. This formatting object is used by the fo:page-sequence formatting object to generate pages.

Constraints:

The children of the fo:repeatable-page-master-alternatives are fo:conditional-page-master-references. These children are called alternatives.

The sub-sequence of pages mapped to this sub-sequence-specifier satisfies the constraints of this sub-sequence-specifier if (a) the sub-sequence of pages consists of zero or more pages, (b) each page is generated using the fo:simple-page-master referenced by the one of the alternatives that are the children of the fo:repeatable-page-master-alternatives, (c) the conditions on that alternative are true, (d) that alternative is the first alternative in the sequence of children for which all the conditions are true, and (e) the length of the sub-sequence is less than or equal to the value of maximum-repeats.

Contents:

The following properties apply to this formatting object:

7.27.10 maximum-repeats

6.4.12 fo:conditional-page-master-reference

Common Usage:

The fo:conditional-page-master-reference 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".

Note:

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.

Contents:

EMPTY

The following properties apply to this formatting object:

7.27.9 master-reference
7.27.14 page-position
7.27.12 odd-or-even
7.27.1 blank-or-not-blank

6.4.13 fo:simple-page-master

Common Usage:

The fo:simple-page-master is used in the generation of pages and specifies the geometry of the page. The page is subdivided into regions: one or more region-body, and up to four other regions: region-before, region-after, region-start, and region-end.

Note:

For example, if the writing-mode of the fo:simple-page-master is "lr-tb", then these regions correspond to the body of a document, the header, the footer, the left sidebar, and the right sidebar.

Note:

The simple-page-master is intended for systems that wish to provide a simple page layout facility. Future versions of this Recommendation may support more complex page layouts constructed using the fo:page-master formatting object.

Areas:

The fo:simple-page-master formatting object generates no area directly. It is used in the generation of pages by an fo:page-sequence.

When the fo:simple-page-master is used to generate a page, a viewport/reference pair is generated, consisting of a page-viewport-area and a page-reference-area. The page-viewport-area represents the physical bounds of the output medium. The page-reference-area represents the portion of the page on which content is intended to appear; that is, the area inside the page margins.

In addition, when the fo:simple-page-master is used to generate a page, viewport/reference pairs that correspond to the regions that are the children of the fo:simple-page-master are also generated. (See the formatting object specifications for the five regions (6.4.14 fo:region-body, 6.4.15 fo:region-before, 6.4.16 fo:region-after, 6.4.17 fo:region-start, and 6.4.18 fo:region-end) for the details on the generation of these areas.) The "writing-mode" of the page is used to determine the placement of the five regions on the master.

Region-viewport-areas   [D]

Region-viewport-areas

The spacing between the outer four regions and each fo:region-body is determined by subtracting the relevant extent trait on each outer region from the "margin-x" property on that fo:region-body.

Trait Derivation:

The reference-orientation of the page-reference-area and writing-mode of the page-viewport-area are determined by the formatting object that generates the area (see 6.4.5 fo:page-sequence). The writing-mode of the page-reference-area is set to the same value as that of the page-viewport-area. Reference-orientation does not affect the page-viewport-area and its reference-orientation is set to "0". Borders and padding are not allowed with a page-reference-area. The remaining traits on the page-reference-area are set according to the normal rules for determining the values of traits.

Constraints:

When a page-master is used in the generation of a page, the block-progression-dimension and inline-progression-dimension of the content-rectangle of the page-viewport-area are determined using the computed values of the "page-height" and "page-width" properties. For sheet media, the computed values of the "page-height" and "page-width" properties determine the orientation of the sheet; "page-height" is measured from "top" to "bottom". For display media, the display window is always upright; the top of the display screen is "top".

The traits derived from the "margin-top", "margin-bottom", "margin-left" and "margin-right" properties are used to indent the page-reference-area content-rectangle from the corresponding edge of the content-rectangle of the page-viewport-area.

Note:

The reference points for the page-viewport-area content-rectangle are in terms of the "top", "bottom", "left", and "right" rather than "before-edge", "after-edge", "start-edge", and "end-edge" because users see the media relative to its orientation and not relative to the writing-mode currently in use.

Margins of a page   [D]

The value of the folio-number trait on the first page returned by the fo:page-sequence is constrained to equal the value of the initial-page-number trait. The value of the folio-number trait on subsequent pages is constrained to be one greater than the value on the immediately preceding page.

The format, letter-value, grouping-separator, grouping-size, country, and language traits are used to format the number into a string form, as specified in [XSLT]. This formatted number is used by the fo:page-number flow object.

Constraints applicable to regions:

There are a number of constraints that apply to all the regions that are specified within a given fo:simple-page-master.

Two page model examples   [D]

If the block-progression-dimension of the properly stacked region-reference-area is greater than the block-progression-dimension of the region-viewport-area that is its parent, then the constraints on the relationship between the region-viewport-area and the region-reference-area depend on values of the overflow trait on the region-master and the kind of flows assigned to the region.

If all the flows assigned to the corresponding region are fo:static-content flow objects, then there is no constraint on the block-progression-dimension of the region-reference-area.

If all the flows assigned to the corresponding region are fo:flow formatting objects, then

  • If the value of the media-usage trait is paginate, or the value of the overflow trait is visible, hidden, or error-if-overflow, then the block-progression-dimension of the region-reference-area is constrained to be no greater than the block-progression-dimension of the region-viewport-area.

  • If the value of the media-usage trait is bounded-in-one-dimension or unbounded, and the value of the overflow trait is scroll or auto, then there is no constraint on the block-progression-dimension of the region-reference-area.

Contents:

The following properties apply to this formatting object:

7.11 Common Margin Properties-Block
7.27.8 master-name
7.27.13 page-height
7.27.15 page-width
7.21.3 reference-orientation
7.29.7 writing-mode

6.4.14 fo:region-body

Common Usage:

Used in constructing a simple-page-master. This region specifies a viewport/reference pair that is located in the "center" of the fo:simple-page-master. The overflow trait controls how much of the underlying region-reference-area is visible; that is, whether the region-reference-area is clipped by its parent region-viewport-area.

Note:

Typically, for paged media and when no explicit flow map is specified, the areas returned by the fo:flow formatting object in an fo:page-sequence are made to be descendants of a sequence of region-reference-areas that correspond to the region-body. These region-reference-areas are all area descendants of page-areas for which the page-master included an fo:region-body. If the fo:flow flow is assigned to some other region, then the areas returned by the fo:flow are constrained to be descendants of region-reference-areas generated using the assigned region-master.

Note:

The body region should be sized and positioned within the fo:simple-page-master so that there is room for the areas returned by the flow that is assigned to the fo:region-body and for any desired side regions, that is, fo:region-before, fo:region-after, fo:region-start and fo:region-end's that are to be placed on the same page. These side regions are positioned within the content-rectangle of the page-reference-area. The margins on the fo:region-body are used to position the region-viewport-area for the fo:region-body and to leave space for the other regions that surround the fo:region-body.

A close-up of the first case in the previous figure.   [D]

The spacing between the last four regions and the fo:region-body is determined by subtracting the relevant extent trait on the side regions from the trait that corresponds to the "margin-x" property on the fo:region-body.

The fo:region-body may be also be used to provide multiple columns. When the column-count trait is greater than one, then the region-body will be subdivided into multiple columns.

Areas:

The fo:region-body formatting object is used to generate one region-viewport-area and one region-reference-area whenever an fo:simple-page-master that has an fo:region-body as a child is used to generate a page. A scrolling mechanism shall be provided, in an implementation-defined manner, if the value of the overflow trait is "scroll".

The position and size of the region-viewport-area is specified relative to the content-rectangle of the page-reference-area generated by fo:simple-page-master. The content-rectangle of the region-viewport-area is indented from the content-rectangle of the page-reference-area by the values of the "margin-top", "margin-bottom", "margin-left" and "margin-right" properties. The values of the padding and border-width traits must be "0".

The region-reference-area generated using an fo:region-body is the child of the region-viewport-area. The "writing-mode" of the fo:region-body defines the column-progression within the region. The inline-progression-direction is used to determine the stacking direction for columns (and the default flow order of text from column-to-column).

In addition to the viewport/reference pair, when the region-body is used to generate areas, at least one and up to three additional reference-areas are generated. These reference-areas are the optional before-float-reference-area, the optional footnote-reference-area, and the main-reference-area. The latter reference-area comprises the space left after space is borrowed for the other two reference-areas. The main-reference-area has no padding, border, or space associated with it.

Note:

If there is no before-float-reference-area or footnote-reference-area child of the region-reference-area, then the content-rectangle of the main-reference-area is coterminous with the content-rectangle of the region-reference-area.

The main-reference-area has as its children a sequence of span-reference-areas. These are reference-area block-areas with zero border and padding, whose inline-progression-dimension is equal to that of the main-reference-area, and which are normally stacked within the main-reference-area.

Each span-reference-area has one or more reference-area children, designated as normal-flow-reference-areas. The number and placement of the children of a span-reference-area depends on the column-count trait of the span-reference-area. In turn, the formatter must generate precisely enough of these span-reference-areas, and so set their column-count traits, that block-areas returned from the flows with a span of "all" are children of span-reference-areas with column-count equal to 1, and block-areas returned from the flows with a span of "none" are children of span-reference-areas with column-count equal to the refined value of the column-count property of the associated region-reference-area.

For each span-reference-area, the number N of normal-flow-reference-area children is equal to the value of the column-count trait.

It is an error to specify a column-count other than 1 if the "overflow" property has the value "scroll". An implementation may recover by behaving as if "1" had been specified.

The inline-progression-dimension of each of these normal-flow-reference-areas is determined by subtracting (N-1) times the column-gap trait from the inline-progression-dimension of the main-reference-area and dividing that result by N. Using "body-in-size" for the name of the inline-progression-dimension of the span-reference-area and "column-in-size" for the name of the size of the normal-flow-reference-areas in the inline-progression-direction, the formula is:

column-in-size = (body-in-size - (N - 1)*column-gap)/N

The block-progression-dimension of the normal-flow-reference-areas is the same as that of the parent span-reference-area.

Note:

As noted above, the block-progression-dimension of the span-reference-area may be less than the size of the region-reference-area if a before-float-reference-area or footnote-reference-area are present, or if there is more than one span-reference-area child of the main-reference-area.

The normal-flow-reference-areas are positioned within the span-reference-area as follows: The first column is positioned with the before-edge and start-edge of its content-rectangle coincident with the before-edge and start-edge of the content-rectangle of the span-reference-area. The content-rectangle of the Jth normal-flow-reference-area child of the span-reference-area is positioned with its before-edge coincident with the before-edge of the content-rectangle of the span-reference-area and with is start-edge at ((J-1)*(column-in-size + column-gap)) in the inline-progression-direction. This results in the end-edge of the content-rectangle of the Nth normal-flow-reference-area being coincident with the end-edge of the content-rectangle of the span-reference-area.

Note:

If the writing-mode is "rl-tb", the above description means that the columns are ordered from right-to-left as would be expected. This follows because the start-edge is on the right in an "rl-tb" writing-mode.

All areas generated by using the fo:region-body are of area-class "xsl-absolute".

Trait Derivation:

The reference-orientation and writing-mode of the region-viewport-area are determined by the formatting object that generates the area (see 6.4.5 fo:page-sequence). The reference-orientation of the region-reference-area is set to "0" and is, therefore, the same as the orientation established by the region-viewport-area. The writing-mode of the region-reference-area is set to the same value as that of the region-viewport-area.

The remaining traits on the region-viewport-area and region-reference-area are set according to the normal rules for determining the values of traits.

The traits on the span-reference-areas and on the normal-flow-reference-areas are determined in the same manner as described in 5 Property Refinement / Resolution.

Constraints:

The constraints applicable to all regions (see 6.4.13 fo:simple-page-master) all apply.

The inline-progression-dimension of the region-viewport-area is determined by the inline-progression-dimension of the content-rectangle of the page-reference-area minus the values of the start-indent and end-indent traits of the region-master. The start-edge and end-edge of the content-rectangle of the region-viewport-area are determined by the reference-orientation trait on the page-master.

The block-progression-dimension of the region-viewport-area is determined by the block-progression-dimension of the content-rectangle for the page-reference-area minus the values of the space-before and space-after traits of the region-master. The before-edge and after-edge of the content-rectangle of the region-viewport-area are determined by the reference-orientation trait on the page-master.

The values of the space-before and start-indent traits are used to position the region-viewport-area relative to the before-edge and start-edge of the content-rectangle of the page-reference-area.

The constraints on the size and position of the region-reference-area generated using the fo:region-body are covered in the "Constraints applicable to regions" section of 6.4.13 fo:simple-page-master.

Contents:

EMPTY

The following properties apply to this formatting object:

7.8 Common Border, Padding, and Background Properties
7.11 Common Margin Properties-Block
7.21.1 clip
7.27.2 column-count
7.27.3 column-gap
7.14.4 display-align
7.21.2 overflow
7.27.17 region-name
7.21.3 reference-orientation
7.29.7 writing-mode

6.4.15 fo:region-before

Common Usage:

Used in constructing a simple-page-master. This region specifies a viewport/reference pair that is located on the "before" side of the page-reference-area. In lr-tb writing-mode, this region corresponds to the header region. The overflow trait controls how much of the underlying region-reference-area is visible; that is, whether the region-reference-area is clipped by its parent region-viewport-area.

Areas:

The fo:region-before formatting object is used to generate one region-viewport-area and one region-reference-area.

The values of the padding and border-width traits must be "0".

The before-edge of the content-rectangle of this region-viewport-area is positioned coincident with the before-edge of the content-rectangle of the page-reference-area generated using the parent fo:simple-page-master. The block-progression-dimension of the region-viewport-area is determined by the extent trait on the fo:region-before formatting object.

The inline-progression-dimension of the region-viewport-area is determined by the precedence trait on the fo:region-before. If the value of the precedence trait is true, then the inline-progression-dimension extends up to the start-edge and end-edge of the content-rectangle of the page-reference-area. In this case, the region-before region-viewport-area acts like a float into areas generated by the region-start and region-end. If the value of the precedence trait on the fo:region-before is false, then these adjacent regions float into the area generated by the fo:region-before and the extent of the fo:region-before is (effectively) reduced by the incursions of the adjacent regions.

The region-reference-area lies on a canvas underneath the region-viewport-area.

The size of the region-reference-area depends on the setting of the overflow trait on the region. If the value of that trait is "auto", "hidden", "error-if-overflow", "paginate", or "visible" then the size of the reference-area is the same as the size of the viewport. If the value of the overflow trait is "scroll", the size of the reference-area is equal to the size of the viewport in the inline-progression-direction in the writing-mode for the region and has no constraint in the block-progression-direction (which implies that it grows to hold the distribution of all the content bound to the region).

Trait Derivation:

The reference-orientation and writing-mode of the region-viewport-area are determined by the formatting object that generates the area (see 6.4.5 fo:page-sequence). The reference-orientation of the region-reference-area is set to "0" and is, therefore, the same as the orientation established by the region-viewport-area. The writing-mode of the region-reference-area is set to the same value as that of the region-viewport-area.

The remaining traits on the region-viewport-area and region-reference-area are set according to the normal rules for determining the values of traits.

Constraints:

The constraints on the size and position of the region-reference-area generated using the fo:region-before are covered in the "Constraints applicable to regions" section of 6.4.13 fo:simple-page-master.

Contents:

EMPTY

The following properties apply to this formatting object:

7.8 Common Border, Padding, and Background Properties
7.21.1 clip
7.14.4 display-align
7.27.4 extent
7.21.2 overflow
7.27.16 precedence
7.27.17 region-name
7.21.3 reference-orientation
7.29.7 writing-mode

6.4.16 fo:region-after

Common Usage:

Used in constructing a simple-page-master. This region specifies a viewport/reference pair that is located on the "after" side of the page-reference-area. In lr-tb writing-mode, this region corresponds to the footer region. The overflow trait controls how much of the underlying region-reference-area is visible; that is, whether the region-reference-area is clipped by its parent region-viewport-area.

Areas:

The fo:region-after formatting object is used to generate one region-viewport-area and one region-reference-area.

The values of the padding and border-width traits must be "0".

The after-edge of the content-rectangle of this region-viewport-area is positioned coincident with the after-edge of the content-rectangle of the page-reference-area generated using the parent fo:simple-page-master. The block-progression-dimension of the region-viewport-area is determined by the extent trait on the fo:region-after formatting object.

The inline-progression-dimension of the region-viewport-area is determined by the precedence trait on the fo:region-after. If the value of the precedence trait is true, then the inline-progression-dimension extends up to the start-edge and end-edge of the content-rectangle of the page-reference-area. In this case, the region-after region-viewport-area acts like a float into areas generated by the region-start and region-end. If the value of the precedence trait on the fo:region-after is false, then these adjacent regions float into the area generated by the fo:region-after and the extent of the fo:region-after is (effectively) reduced by the incursions of the adjacent regions.

The region-reference-area lies on a canvas underneath the region-viewport-area.

The size of the region-reference-area depends on the setting of the overflow trait on the region. If the value of that trait is "auto", "hidden", "error-if-overflow", "paginate", or "visible" then the size of the reference-area is the same as the size of the viewport. If the value of the overflow trait is "scroll", the size of the reference-area is equal to the size of the viewport in the inline-progression-direction in the writing-mode for the region and has no constraint in the block-progression-direction (which implies that it grows to hold the distribution of all the content bound to the region).

Trait Derivation:

The reference-orientation and writing-mode of the region-viewport-area are determined by the formatting object that generates the area (see 6.4.5 fo:page-sequence). The reference-orientation of the region-reference-area is set to "0" and is, therefore, the same as the orientation established by the region-viewport-area. The writing-mode of the region-reference-area is set to the same value as that of the region-viewport-area.

The remaining traits on the region-viewport-area and region-reference-area are set according to the normal rules for determining the values of traits.

Constraints:

The constraints on the size and position of the region-reference-area generated using the fo:region-after are covered in the "Constraints applicable to regions" section of 6.4.13 fo:simple-page-master.

Contents:

EMPTY

The following properties apply to this formatting object:

7.8 Common Border, Padding, and Background Properties
7.21.1 clip
7.14.4 display-align
7.27.4 extent
7.21.2 overflow
7.27.16 precedence
7.27.17 region-name
7.21.3 reference-orientation
7.29.7 writing-mode

6.4.17 fo:region-start

Common Usage:

Used in constructing a simple-page-master. This region specifies a viewport/reference pair that is located on the "start" side of the page-reference-area. In lr-tb writing-mode, this region corresponds to a left sidebar. The overflow trait controls how much of the underlying region-reference-area is visible; that is, whether the region-reference-area is clipped by its parent region-viewport-area.

Areas:

The fo:region-start formatting object is used to generate one region-viewport-area and one region-reference-area.

The values of the padding and border-width traits must be "0".

The start-edge of the content-rectangle of this region-viewport-area is positioned coincident with the start-edge of the content-rectangle of the page-reference-area generated using the parent fo:simple-page-master. The inline-progression-dimension of the region-viewport-area is determined by the extent trait on the fo:region-start formatting object.

The block-progression-dimension of the region-viewport-area is determined by the precedence trait on the adjacent fo:region-before and the fo:region-after, if these exist; otherwise it is determined as if the value of the precedence trait was false. If the value of the precedence trait of the fo:region-before (or, respectively, fo:region-after) is false, then the block-progression-dimension extends up to the before- (or, respectively, after-) edge of the content-rectangle of the page-reference-area. In this case, the region-start acts like a float into areas generated by the region-before (respectively, the region-after). If the value of the precedence trait on the adjacent regions is true, then these adjacent regions float into the area generated by the fo:region-start and the extent of the fo:region-start is (effectively) reduced by the incursions of the adjacent regions with the value of the precedence trait equal to true.

The region-reference-area lies on a canvas underneath the region-viewport-area.

The size of the region-reference-area depends on the setting of the overflow trait on the region. If the value of that trait is "auto", "hidden", "error-if-overflow", "paginate", or "visible" then the size of the reference-area is the same as the size of the viewport. If the value of the overflow trait is "scroll", the size of the reference-area is equal to the size of the viewport in the inline-progression-direction in the writing-mode for the region and has no constraint in the block-progression-direction (which implies that it grows to hold the distribution of all the content bound to the region).

Trait Derivation:

The reference-orientation and writing-mode of the region-viewport-area are determined by the formatting object that generates the area (see 6.4.5 fo:page-sequence). The reference-orientation of the region-reference-area is set to "0" and is, therefore, the same as the orientation established by the region-viewport-area. The writing-mode of the region-reference-area is set to the same value as that of the region-viewport-area.

The remaining traits on the region-viewport-area and region-reference-area are set according to the normal rules for determining the values of traits.

Constraints:

The constraints on the size and position of the region-reference-area generated using the fo:region-start are covered in the "Constraints applicable to regions" section of 6.4.13 fo:simple-page-master.

Contents:

EMPTY

The following properties apply to this formatting object:

7.8 Common Border, Padding, and Background Properties
7.21.1 clip
7.14.4 display-align
7.27.4 extent
7.21.2 overflow
7.27.17 region-name
7.21.3 reference-orientation
7.29.7 writing-mode

6.4.18 fo:region-end

Common Usage:

Used in constructing a simple-page-master. This region specifies a viewport/reference pair that is located on the "end" side of the page-reference-area. In lr-tb writing-mode, this region corresponds to a right sidebar. The overflow trait controls how much of the underlying region-reference-area is visible; that is, whether the region-reference-area is clipped by its parent region-viewport-area.

Areas:

The fo:region-end formatting object is used to generate one region-viewport-area and one region-reference-area.

The values of the padding and border-width traits must be "0".

The end-edge of the content-rectangle of this region-viewport-area is positioned coincident with the end-edge of the content-rectangle of the page-reference-area generated using the parent fo:simple-page-master. The inline-progression-dimension of the region-viewport-area is determined by the extent trait on the fo:region-end formatting object.

The block-progression-dimension of the region-viewport-area is determined by the precedence trait on the adjacent fo:region-before and the fo:region-after, if these exist; otherwise it is determined as if the value of the precedence trait was false. If the value of the precedence trait of the fo:region-before (or, respectively, fo:region-after) is false, then the block-progression-dimension extends up to the before- (or, respectively, after-) edge of the content-rectangle of the page-reference-area. In this case, the region-end acts like a float into areas generated by the region-before (respectively, the region-after). If the value of the precedence trait on the adjacent regions is true, then these adjacent regions float into the area generated by the fo:region-end and the extent of the fo:region-end is (effectively) reduced by the incursions of the adjacent regions with the value of the precedence trait equal to true.

The region-reference-area lies on a canvas underneath the region-viewport-area.

The size of the region-reference-area depends on the setting of the overflow trait on the region. If the value of that trait is "auto", "hidden", "error-if-overflow", "paginate", or "visible" then the size of the reference-area is the same as the size of the viewport. If the value of the overflow trait is "scroll", the size of the reference-area is equal to the size of the viewport in the inline-progression-direction in the writing-mode for the region and has no constraint in the block-progression-direction (which implies that it grows to hold the distribution of all the content bound to the region).

Trait Derivation:

The reference-orientation and writing-mode of the region-viewport-area are determined by the formatting object that generates the area (see 6.4.5 fo:page-sequence). The reference-orientation of the region-reference-area is set to "0" and is, therefore, the same as the orientation established by the region-viewport-area. The writing-mode of the region-reference-area is set to the same value as that of the region-viewport-area.

The remaining traits on the region-viewport-area and region-reference-area are set according to the normal rules for determining the values of traits.

Constraints:

The constraints on the size and position of the region-reference-area generated using the fo:region-end are covered in the "Constraints applicable to regions" section of 6.4.13 fo:simple-page-master.

Contents:

EMPTY

The following properties apply to this formatting object:

7.8 Common Border, Padding, and Background Properties
7.21.1 clip
7.14.4 display-align
7.27.4 extent
7.21.2 overflow
7.27.17 region-name
7.21.3 reference-orientation
7.29.7 writing-mode

6.4.19 fo:flow

Common Usage:

The content of the fo:flow formatting object is a sequence of flow objects that provides the flowing text content that is distributed into pages.

Areas:

The fo:flow formatting object does not generate any areas. The fo:flow formatting object returns a sequence of areas created by concatenating the sequences of areas returned by each of the children of the fo:flow. The order of concatenation is the same order as the children are ordered under the fo:flow.

Constraints:

The flow-map determines the assignment of the content of the fo:flow to a region.

Contents:

In addition this formatting object may have a sequence of zero or more fo:markers as its initial children.

The following properties apply to this formatting object:

7.30.8 id
7.24.1 index-class
7.24.2 index-key
7.27.5 flow-name

6.4.20 fo:static-content

Common Usage:

The fo:static-content formatting object holds a sequence or a tree of formatting objects that is to be presented in a single region or repeated in like-named regions on one or more pages in the page-sequence. Its common use is for repeating or running headers and footers.

This content is repeated, in its entirety, on every page to which it is assigned.

Areas:

The fo:static-content formatting object does not generate any areas. The fo:static-content formatting object returns the sequence of areas created by concatenating the sequences of areas returned by each of the children of the fo:static-content. The order of concatenation is the same order as the children are ordered under the fo:static-content.

Constraints:

The flow-map determines the assignment of the content of the fo:static-content to a region.

The fo:static-content may be processed multiple times and thus the default ordering constraint of section 4.7.1 General Ordering Constraints does not apply to the fo:static-content. Instead, it must satisfy the constraint on a per-page basis. Specifically, if P is a page-reference-area, C is an area-class, and S is the set of all descendants of P of area-class C returned to the fo:static-content descendant, then S must be properly ordered.

Contents:

The following properties apply to this formatting object:

7.30.8 id
7.24.1 index-class
7.24.2 index-key
7.27.5 flow-name

6.4.21 fo:title

Common Usage:

The fo:title formatting object is used to associate a title with a given page-sequence. This title may be used by an interactive User Agent to identify the pages. For example, the content of the fo:title can be formatted and displayed in a "title" window or in a "tool tip".

Areas:

This formatting object returns the sequence of areas returned by the children of this formatting object.

Constraints:

The sequence of returned areas must be the concatenation of the sub-sequences of areas returned by each of the flow children of the fo:title formatting object in the order in which the children occur.

Contents:

(#PCDATA|%inline;)*

An fo:title is not permitted to have an fo:float, fo:footnote or fo:marker as a descendant.

Additionally, an fo:title is not permitted to have as a descendant an fo:block-container that generates an absolutely positioned area.

The following properties apply to this formatting object:

7.5 Common Accessibility Properties
7.7 Common Aural Properties
7.8 Common Border, Padding, and Background Properties
7.9 Common Font Properties
7.12 Common Margin Properties-Inline
7.18.1 color
7.16.4 line-height
7.30.17 visibility

6.4.22 fo:flow-map

Common Usage:

The fo:flow-map is used to specify the assignment of flows to regions.

Areas:

The fo:flow-map formatting object generates no area directly. It is used by the fo:page-sequence formatting object to assign flows to regions.

Each fo:flow-assignment child of the fo:flow map defines a source list and a target list. The source list is a sequence of flow names whose corresponding fo:flow objects (in the referring fo:page-sequence) are treated as a single fo:flow for composition purposes. The target list is a sequence of region-names which identify the region or regions on each page which are used for the source content.

Note:

This is independent of the actual sequence of pages, which is generated as it has always been generated using the fo:simple-page-master, and fo:page-sequence-master objects referred to by the master-reference property of the fo:page-sequence.

For each fo:flow-assignment child of the fo:flow-map, having an fo:flow-source-list child S and an fo:flow-target-list child T, we say that the fo:flow-map assigns each of the flows referenced by the fo:flow-name-specifier children of S to the regions referenced by the fo:region-name-specifier children of T.

Constraints:

Many of the constraints that a flow-map induces are expressed in 6.4.5 fo:page-sequence.

The children of the fo:flow-map are fo:flow-assignment objects containing parallel constraints for assigning flows to regions. It is an error for a flow-name to appear in the source list of more than one fo:flow-assignment child of a given fo:flow-map. It is also an error for a region-name to appear in the target list of more than one fo:flow-assignment child of a given fo:flow-map.

Implicit flow-map:

<fo:flow-map>
  <fo:flow-assignment>
    <fo:flow-source-list>
      <fo:flow-name-specifier
        flow-name-reference="xsl-region-body"/>
    </fo:flow-source-list>
    <fo:flow-target-list>
      <fo:region-name-specifier
        region-name-reference="xsl-region-body"/>
    </fo:flow-target-list>
  </fo:flow-assignment>
  <fo:flow-assignment>
    <fo:flow-source-list>
      <fo:flow-name-specifier
        flow-name-reference="xsl-region-before"/>
    </fo:flow-source-list>
    <fo:flow-target-list>
      <fo:region-name-specifier
        region-name-reference="xsl-region-before"/>
    </fo:flow-target-list>
  </fo:flow-assignment>
  <fo:flow-assignment>
    <fo:flow-source-list>
      <fo:flow-name-specifier
        flow-name-reference="xsl-region-after"/>
    </fo:flow-source-list>
    <fo:flow-target-list>
      <fo:region-name-specifier
        region-name-reference="xsl-region-after"/>
    </fo:flow-target-list>
  </fo:flow-assignment>
  <fo:flow-assignment>
    <fo:flow-source-list>
      <fo:flow-name-specifier
        flow-name-reference="xsl-region-start"/>
    </fo:flow-source-list>
    <fo:flow-target-list>
      <fo:region-name-specifier
        region-name-reference="xsl-region-start"/>
    </fo:flow-target-list>
  </fo:flow-assignment>
  <fo:flow-assignment>
    <fo:flow-source-list>
      <fo:flow-name-specifier
        flow-name-reference="xsl-region-end"/>
    </fo:flow-source-list>
    <fo:flow-target-list>
      <fo:region-name-specifier
        region-name-reference="xsl-region-end"/>
     </fo:flow-target-list>
  </fo:flow-assignment>
</fo:flow-map>

Contents:

The following properties apply to this formatting object:

7.27.18 flow-map-name

6.4.23 fo:flow-assignment

Common Usage:

The fo:flow-assignment is used to specify the assignment of one sequence of flows to a sequence of regions.

Areas:

The fo:flow-assignment formatting object generates no area directly. It is used by the fo:page-sequence formatting object to assign flows to regions.

Constraints:

The children of the fo:flow-assignment are a source-list and target-list containing constraints for assigning one sequence of flows to a sequence of regions.

Contents:

6.4.24 fo:flow-source-list

Common Usage:

The fo:flow-source-list is used to specify the sequence of flows to assign in a particular fo:flow-assignment.

Areas:

The fo:flow-source-list formatting object generates no area directly. It is used by the fo:page-sequence formatting object to assign flows to regions.

Constraints:

The children of the fo:flow-source-list are a sequence of flow-name-specifiers identifying flows of the sequence. These flows must be either all fo:flow formatting objects or all fo:static-content formatting objects. It is an error if they are a mixture.

Contents:

6.4.25 fo:flow-name-specifier

Common Usage:

The fo:flow-name-specifier is used to specify one flow in a source-list.

Areas:

The fo:flow-name-specifier formatting object generates no area directly. It is used by the fo:page-sequence formatting object to assign flows to regions.

Constraints:

The flow-name-reference property specifies the name of a flow in the source sequence.

Contents:

EMPTY

The following properties apply to this formatting object:

7.27.20 flow-name-reference

6.4.26 fo:flow-target-list

Common Usage:

The fo:flow-target-list is used to specify the sequence of regions to which flows are assigned in a particular fo:flow-assignment.

Areas:

The fo:flow-target-list formatting object generates no area directly. It is used by the fo:page-sequence formatting object to assign flows to regions.

Constraints:

The children of the fo:flow-target-list are a sequence of region-name-specifiers identifying regions in the sequence.

Contents:

6.4.27 fo:region-name-specifier

Common Usage:

The fo:region-name-specifier is used to specify one region in a target-list.

Areas:

The fo:region-name-specifier formatting object generates no area directly. It is used by the fo:page-sequence formatting object to assign flows to regions.

Constraints:

The region-name-reference property specifies the name of a region in the target sequence.

Contents:

EMPTY

The following properties apply to this formatting object:

7.27.21 region-name-reference

6.5 Block-level Formatting Objects

6.5.1 Introduction

The fo:block formatting object is used for formatting paragraphs, titles, figure captions, table titles, etc. The following example illustrates the usage of fo:block in a stylesheet.

6.5.1.1 Example

The following example shows the use of fo:block for chapter and section titles, and paragraphs.

Input sample:

<doc>
  <chapter>
    <title>Chapter title</title>
    <section>
      <title>First section title</title>
      <paragraph>Section one's first paragraph.</paragraph>
      <paragraph>Section one's second paragraph.</paragraph>
    </section>
    <section>
      <title>Second section title</title>
      <paragraph>Section two's only paragraph.</paragraph>
    </section>
  </chapter>
</doc>

In this example the chapter title appears at the top of the page (its "space-before" is discarded).

Space between chapter title and first section title is (8pt,8pt,8pt): the chapter title's "space-after" has a higher precedence than the section title's "space-before" (which takes on the initial value of zero), so the latter is discarded.

Space between the first section title and section one's first paragraph is (6pt,6pt,6pt): the section title's "space-after" has higher precedence than the paragraph's "space-before", so the latter is discarded.

Space between the two paragraphs is (6pt,8pt,10pt): the "space-after" the first paragraph is discarded because its precedence is equal to that of the "space-before" the next paragraph, and the optimum of the "space-after" of the first paragraph is greater than the optimum of the "space-before" of the second paragraph.

Space between the second paragraph of the first section and the title of the second section is (12pt,12pt,12pt): the "space-after" the paragraph is discarded because its precedence is equal to that of the "space-before" of the section title, and the optimum of the "space-after" of the paragraph is less than the optimum of the "space-before" of the section title.

The indent on the first line of the first paragraph in section one and the only paragraph in section two is zero; the indent on the first line of the second paragraph in section one is 2pc.

XSL Stylesheet:

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:fo="http://www.w3.org/1999/XSL/Format">

<xsl:template match="chapter">
  <fo:block break-before="page">
    <xsl:apply-templates/>
  </fo:block>
</xsl:template>

<xsl:template match="chapter/title">
  <fo:block text-align="center" space-after="8pt"
            space-before="16pt" space-after.precedence="3">
    <xsl:apply-templates/>
  </fo:block>
</xsl:template>

<xsl:template match="section">
  <xsl:apply-templates/>
</xsl:template>

<xsl:template match="section/title">
  <fo:block text-align="center" space-after="6pt"
            space-before="12pt" space-before.precedence="0"
            space-after.precedence="3">
    <xsl:apply-templates/>
  </fo:block>
</xsl:template>

<xsl:template match="paragraph[1]" priority="1">
  <fo:block text-indent="0pc" space-after="7pt"
            space-before.minimum="6pt" space-before.optimum="8pt"
            space-before.maximum="10pt">
    <xsl:apply-templates/>
  </fo:block>
</xsl:template>

<xsl:template match="paragraph">
  <fo:block text-indent="2pc" space-after="7pt"
            space-before.minimum="6pt" space-before.optimum="8pt"
            space-before.maximum="10pt">
    <xsl:apply-templates/>
  </fo:block>
</xsl:template>

</xsl:stylesheet>

Result Instance: elements and attributes in the fo: namespace

<fo:block break-before="page">

  <fo:block text-align="center" space-after="8pt"
    space-before="16pt"
    space-after.precedence="3">Chapter title
  </fo:block>

  <fo:block text-align="center" space-after="6pt"
    space-before="12pt" space-before.precedence="0"
    space-after.precedence="3">First section title
  </fo:block>

  <fo:block text-indent="0pc" space-after="7pt"
    space-before.minimum="6pt" space-before.optimum="8pt"
    space-before.maximum="10pt">Section one's first paragraph.
  </fo:block>

  <fo:block text-indent="2pc" space-after="7pt"
    space-before.minimum="6pt" space-before.optimum="8pt"
    space-before.maximum="10pt">Section one's second paragraph.
  </fo:block>

  <fo:block text-align="center" space-after="6pt"
    space-before="12pt" space-before.precedence="0"
    space-after.precedence="3">Second section title
  </fo:block>

  <fo:block text-indent="0pc" space-after="7pt"
    space-before.minimum="6pt" space-before.optimum="8pt"
    space-before.maximum="10pt">Section two's only paragraph.
  </fo:block>

</fo:block>

6.5.2 fo:block

Common Usage:

The fo:block formatting object is commonly used for formatting paragraphs, titles, headlines, figure and table captions, etc.

Areas:

The fo:block formatting object generates one or more normal block-areas. The fo:block returns these areas, any page-level-out-of-line areas, and any reference-level-out-of-line areas returned by the children of the fo:block. The fo:block also generates zero or more line-areas as children of the normal block-areas it returns, in accordance with 4.7.2 Line-building.

Trait Derivation:

The .minimum, .optimum, and .maximum components of the half-leading trait are set to 1/2 the difference of the computed value of the line-height property and the computed value of the sum of the text-altitude and text-depth properties. The .precedence and .conditionality components are copied from the line-height property.

Note:

The usage of the half-leading is described in 4.5 Line-areas.

Constraints:

No area may have more than one normal child area returned by the same fo:block formatting object.

The children of each normal area generated by an fo:block must satisfy the constraints specified in 4.7.2 Line-building.

In addition the constraints imposed by the traits derived from the properties applicable to this formatting object must be satisfied. The geometric constraints are rigorously defined in 4 Area Model.

Contents:

(#PCDATA|%inline;|%block;)*

In addition this formatting object may have a sequence of zero or more fo:markers as its initial children, optionally followed by an fo:initial-property-set.

The following properties apply to this formatting object:

7.5 Common Accessibility Properties
7.7 Common Aural Properties
7.8 Common Border, Padding, and Background Properties
7.9 Common Font Properties
7.10 Common Hyphenation Properties
7.11 Common Margin Properties-Block
7.13 Common Relative Position Properties
7.20.1 break-after
7.20.2 break-before
7.19.1 clear
7.18.1 color
7.29.5 text-depth
7.29.4 text-altitude
7.16.1 hyphenation-keep
7.16.2 hyphenation-ladder-count
7.30.8 id
7.24.1 index-class
7.24.2 index-key
7.19.3 intrusion-displace
7.20.3 keep-together
7.20.4 keep-with-next
7.20.5 keep-with-previous
7.16.3 last-line-end-indent
7.16.7 linefeed-treatment
7.16.4 line-height
7.16.5 line-height-shift-adjustment
7.16.6 line-stacking-strategy
7.20.6 orphans
7.16.8 white-space-treatment
7.21.4 span
7.16.9 text-align
7.16.10 text-align-last
7.16.11 text-indent
7.30.17 visibility
7.16.12 white-space-collapse
7.20.7 widows
7.16.13 wrap-option

6.5.3 fo:block-container

Common Usage:

The fo:block-container flow object is used to generate a block-level reference-area, typically containing text blocks with a different writing-mode. In addition, it can also be used with a different reference-orientation to rotate its content.

Note:

The use of this flow object is not required for changing the inline-progression-direction only; in that case the Unicode BIDI algorithm and the fo:bidi-override are sufficient.

Areas:

The fo:block-container formatting object generates one or more viewport/reference pairs. All generated viewport-areas are subject to the constraints given by the block-progression-dimension and inline-progression-dimension traits of the fo:block-container. The fo:block-container returns these areas and any page-level-out-of-line areas returned by the children of the fo:block-container.

Note:

In the case that the block-progression-dimension.maximum is other than "auto", then overflow processing may apply. The "repeat" value of overflow can be used to generate multiple viewport/reference pairs if this is desired rather than clipping or scrolling.

If the absolute-position trait is "auto", these areas all have an area-class of "xsl-normal". If the absolution-position trait is "absolute" or "fixed" then there is one viewport/reference pair, and its area-class is "xsl-absolute" or "xsl-fixed", respectively.

Trait Derivation:

The reference-orientation and writing-mode traits of the viewport-area and reference-area come from the fo:block-container. These determine the orientation of the start-edge, end-edge, before-edge and after-edge of the content-rectangle of the viewport-area, and of the padding-, border-, and content-rectangles of the reference-area. The reference-orientation of the reference-area is set to "0" and is, therefore, the same as the orientation established by the viewport-area. The inline-progression-dimension of the reference-area is the same as that of the viewport-area, and may not be "auto" if the inline-progression-direction is different from that of the parent of the fo:block-container. The block-progression-dimension of the reference-area is not constrained; thus the reference-area may be larger than the viewport-area and this may cause the "overflow" property to operate.

Note:

As a property value applies to each of the areas generated by this flow object the size can vary from instance to instance if the value is "auto" or a <length-range>.

Constraints:

The children of each reference-area generated by an fo:block-container formatting object must be normal block-areas returned by the children of the fo:block-container, must be properly stacked, and must be properly ordered.

Any reference-level-out-of-line areas returned by the children of the fo:block-container are handled as described in 6.12.2 fo:float.

Contents:

In addition an fo:block-container that does not generate an absolutely positioned area may have a sequence of zero or more fo:markers as its initial children.

The following properties apply to this formatting object:

7.6 Common Absolute Position Properties
7.8 Common Border, Padding, and Background Properties
7.11 Common Margin Properties-Block
7.15.3 block-progression-dimension
7.20.1 break-after
7.20.2 break-before
7.19.1 clear
7.21.1 clip
7.14.4 display-align
7.15.6 height
7.30.8 id
7.24.1 index-class
7.24.2 index-key
7.15.7 inline-progression-dimension
7.19.3 intrusion-displace
7.20.3 keep-together
7.20.4 keep-with-next
7.20.5 keep-with-previous
7.21.2 overflow
7.21.3 reference-orientation
7.21.4 span
7.15.14 width
7.29.7 writing-mode
7.30.18 z-index

6.6 Inline-level Formatting Objects

6.6.1 Introduction

Inline-level formatting objects are most commonly used to format a portion of text or for generating rules and leaders. There are many other uses. The following examples illustrate some of these uses of inline-level formatting objects.

  • putting the first line of a paragraph into small-caps,

  • turning a normally inline formatting object, fo:external-graphic, into a block by "wrapping" with an fo:block formatting object,

  • formatting a running footer containing the word "Page" followed by a page number.

6.6.1.1 Examples
6.6.1.1.1 First Line of Paragraph in Small-caps

Input sample:

<doc>
<p>This is the text of a paragraph that is going to be
presented with the first line in small-caps.</p>
</doc>

XSL Stylesheet:

<?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="p">
  <fo:block>
    <fo:initial-property-set font-variant="small-caps"/>
    <xsl:apply-templates/>
  </fo:block>
</xsl:template>

</xsl:stylesheet>

Result instance: elements and attributes in the fo: namespace

<fo:block>
  <fo:initial-property-set font-variant="small-caps">
  </fo:initial-property-set>This is the text of a paragraph that is going to be
presented with the first line in small-caps.
</fo:block>
6.6.1.1.2 Figure with a Photograph

Input sample:

<doc>
  <figure>
    <photo image="TH0317A.jpg"/>
    <caption>C'ieng Tamlung of C'ieng Mai</caption>
  </figure>
</doc>

In this example the image (an fo:external-graphic) is placed as a centered block-level object. The caption is centered with 10mm indents.

XSL Stylesheet:

<?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="figure">
  <fo:block>
    <xsl:apply-templates/>
  </fo:block>
</xsl:template>

<xsl:template match="photo">
  <fo:block text-align="center">
    <fo:external-graphic src="'url({@image})'"/>
  </fo:block>
</xsl:template>

<xsl:template match="caption">
  <fo:block space-before="3pt" text-align="center"
    start-indent="10mm" end-indent="10mm">
    <xsl:apply-templates/>
  </fo:block>
</xsl:template>

</xsl:stylesheet>

fo: element and attribute tree:

<fo:block>
  <fo:block text-align="center">
    <fo:external-graphic src="'url(TH0317A.jpg)'"/>
  </fo:block>

  <fo:block space-before="3pt" text-align="center" start-indent="10mm"
    end-indent="10mm">C'ieng Tamlung of C'ieng Mai</fo:block>
</fo:block>
6.6.1.1.3 Page numbering and page number reference

Input sample:

<!DOCTYPE doc SYSTEM "pgref.dtd">
<doc>
  <chapter id="x"><title>Chapter</title>
    <p>Text</p>
  </chapter>
  <chapter><title>Chapter</title>
    <p>For a description of X see <ref refid="x"/>.</p>
  </chapter>
</doc>

In this example each page has a running footer containing the word "Page" followed by the page number. The "ref" element generates the word "page" followed by the page number of the page on which the referenced by the "refid" attribute was placed.

XSL Stylesheet:

<?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="doc">
  <fo:root>
    <fo:layout-master-set>
      <fo:simple-page-master master-name="page"
        page-height="297mm" page-width="210mm"
        margin-top="20mm" margin-bottom="10mm"
        margin-left="25mm" margin-right="25mm">
        <fo:region-body
          margin-top="0mm" margin-bottom="15mm"
          margin-left="0mm" margin-right="0mm"/>
        <fo:region-after extent="10mm"/>
      </fo:simple-page-master>
    </fo:layout-master-set>
    <fo:page-sequence master-reference="page">
      <fo:static-content flow-name="xsl-region-after">
        <fo:block>
          <xsl:text>Page </xsl:text>
          <fo:page-number/>
        </fo:block>
      </fo:static-content>
      <fo:flow flow-name="xsl-region-body">
        <xsl:apply-templates/>
      </fo:flow>
    </fo:page-sequence>
  </fo:root>
</xsl:template>

<xsl:template match="chapter/title">
  <fo:block id="{generate-id(.)}">
    <xsl:number level="multiple" count="chapter" format="1. "/>
    <xsl:apply-templates/>
  </fo:block>
</xsl:template>

<xsl:template match="p">
  <fo:block>
    <xsl:apply-templates/>
  </fo:block>
</xsl:template>

<xsl:template match="ref">
  <xsl:text>page </xsl:text>
  <fo:page-number-citation refid="{generate-id(id(@refid)/title)}"/>
</xsl:template>

</xsl:stylesheet>

Result Instance: elements and attributes in the fo: namespace

<fo:root>
  <fo:layout-master-set>
    <fo:simple-page-master master-name="page"
      page-height="297mm" page-width="210mm"
      margin-top="20mm" margin-bottom="10mm"
      margin-left="25mm" margin-right="25mm">
      <fo:region-body margin-top="0mm" margin-bottom="15mm"
        margin-left="0mm" margin-right="0mm"/>
      <fo:region-after extent="10mm"/>
    </fo:simple-page-master>
  </fo:layout-master-set>
  <fo:page-sequence master-reference="page">
    <fo:static-content flow-name="xsl-region-after">
      <fo:block>Page <fo:page-number/>
      </fo:block>
    </fo:static-content>
    <fo:flow flow-name="xsl-region-body">
      <fo:block id="N5">1. Chapter</fo:block>
      <fo:block>Text</fo:block>
      <fo:block id="N13">2. Chapter</fo:block>
      <fo:block>For a description of X see page <fo:page-number-citation refid="N5"/>
      </fo:block>
    </fo:flow>
  </fo:page-sequence>
</fo:root>
6.6.1.1.4 Table of Contents with Leaders

Input sample:

<doc>
  <chapter><title>Chapter</title>
    <p>Text</p>
    <section><title>Section</title>
    <p>Text</p>
    </section>
    <section><title>Section</title>
    <p>Text</p>
    </section>
  </chapter>
  <chapter><title>Chapter</title>
    <p>Text</p>
    <section><title>Section</title>
    <p>Text</p>
    </section>
    <section><title>Section</title>
    <p>Text</p>
    </section>
  </chapter>
</doc>

In this example the table of contents is formatted with a dot leader between the heading text and the page number.

XSL Stylesheet:

<?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="doc">
  <!-- create the table of contents -->
  <xsl:apply-templates select="chapter/title" mode="toc"/>
  <!-- do the document -->
  <xsl:apply-templates/>
</xsl:template>

<xsl:template match="chapter/title" mode="toc">
  <fo:block text-align-last="justify">
    <fo:basic-link internal-destination="{generate-id(.)}">
      <xsl:number level="multiple" count="chapter" format="1. "/>
      <xsl:apply-templates/>
    </fo:basic-link>
    <xsl:text> </xsl:text>
    <fo:leader leader-length.minimum="12pt" leader-length.optimum="40pt"
               leader-length.maximum="100%" leader-pattern="dots"/>
    <xsl:text> </xsl:text>
    <fo:page-number-citation ref-id="{generate-id(.)}"/>
  </fo:block>
  <xsl:apply-templates select="../section/title" mode="toc"/>
</xsl:template>

<xsl:template match="section/title" mode="toc">
  <fo:block start-indent="10mm" text-align-last="justify">
    <fo:basic-link internal-destination="{generate-id(.)}">
      <xsl:number level="multiple" count="chapter|section" format="1.1 "/>
      <xsl:apply-templates/>
    </fo:basic-link>
    <xsl:text> </xsl:text>
    <fo:leader leader-length.minimum="12pt" leader-length.optimum="40pt"
               leader-length.maximum="100%" leader-pattern="dots"/>
    <xsl:text> </xsl:text>
    <fo:page-number-citation ref-id="{generate-id(.)}"/>
  </fo:block>
</xsl:template>

<xsl:template match="chapter/title">
  <fo:block id="{generate-id(.)}">
    <xsl:number level="multiple" count="chapter" format="1. "/>
    <xsl:apply-templates/>
  </fo:block>
</xsl:template>

<xsl:template match="section/title">
  <fo:block id="{generate-id(.)}">
    <xsl:number level="multiple" count="chapter|section" format="1.1 "/>
    <xsl:apply-templates/>
  </fo:block>
</xsl:template>

<xsl:template match="p">
  <fo:block>
    <xsl:apply-templates/>
  </fo:block>
</xsl:template>

</xsl:stylesheet>

Result Instance: elements and attributes in the fo: namespace

<fo:block text-align-last="justify">
  <fo:basic-link internal-destination="N4">1. Chapter
  </fo:basic-link>
  <fo:leader leader-length.minimum="12pt" leader-length.optimum="40pt"
    leader-length.maximum="100%" leader-pattern="dots">
  </fo:leader>
  <fo:page-number-citation ref-id="N4">
  </fo:page-number-citation>
</fo:block>
<fo:block start-indent="10mm" text-align-last="justify">
  <fo:basic-link internal-destination="N11">1.1 Section
  </fo:basic-link>
  <fo:leader leader-length.minimum="12pt" leader-length.optimum="40pt"
    leader-length.maximum="100%" leader-pattern="dots">
  </fo:leader>
  <fo:page-number-citation ref-id="N11">
  </fo:page-number-citation>
</fo:block>
<fo:block start-indent="10mm" text-align-last="justify">
  <fo:basic-link internal-destination="N19">1.2 Section
  </fo:basic-link>
  <fo:leader leader-length.minimum="12pt" leader-length.optimum="40pt"
    leader-length.maximum="100%" leader-pattern="dots">
  </fo:leader>
  <fo:page-number-citation ref-id="N19">
  </fo:page-number-citation>
</fo:block>
<fo:block text-align-last="justify">
  <fo:basic-link internal-destination="N28">2. Chapter
  </fo:basic-link>
  <fo:leader leader-length.minimum="12pt" leader-length.optimum="40pt"
    leader-length.maximum="100%" leader-pattern="dots">
  </fo:leader>
  <fo:page-number-citation ref-id="N28">
  </fo:page-number-citation>
</fo:block>
<fo:block start-indent="10mm" text-align-last="justify">
  <fo:basic-link internal-destination="N35">2.1 Section
  </fo:basic-link>
  <fo:leader leader-length.minimum="12pt" leader-length.optimum="40pt"
    leader-length.maximum="100%" leader-pattern="dots">
  </fo:leader>
  <fo:page-number-citation ref-id="N35">
  </fo:page-number-citation>
</fo:block>
<fo:block start-indent="10mm" text-align-last="justify">
  <fo:basic-link internal-destination="N43">2.2 Section
  </fo:basic-link>
  <fo:leader leader-length.minimum="12pt" leader-length.optimum="40pt"
    leader-length.maximum="100%" leader-pattern="dots">
  </fo:leader>
  <fo:page-number-citation ref-id="N43">
  </fo:page-number-citation>
</fo:block>

<fo:block id="N4">1. Chapter
</fo:block>

<fo:block>Text
</fo:block>

<fo:block id="N11">1.1 Section
</fo:block>

<fo:block>Text
</fo:block>

<fo:block id="N19">1.2 Section
</fo:block>

<fo:block>Text
</fo:block>

<fo:block id="N28">2. Chapter
</fo:block>

<fo:block>Text
</fo:block>

<fo:block id="N35">2.1 Section
</fo:block>

<fo:block>Text
</fo:block>

<fo:block id="N43">2.2 Section
</fo:block>

<fo:block>Text
</fo:block>

6.6.2 fo:bidi-override

Common Usage:

The fo:bidi-override formatting object is used when the Unicode BIDI algorithm fails. It forces a string of text to be written in a specific direction.

Areas:

The fo:bidi-override formatting object generates one or more normal inline-areas. The fo:bidi-override returns these areas, together with any normal block-areas, page-level-out-of-line areas, and reference-level-out-of-line areas returned by the children of the fo:bidi-override.

Trait Derivation:

The direction traits are derived from the "writing-mode", "direction", and "unicode-bidi" properties as described in 5.5.3 Writing-mode and Direction Properties.

Constraints:

No area may have more than one normal child area returned by the same fo:bidi-override formatting object.

The children of each normal area returned by an fo:bidi-override must satisfy the constraints specified in 4.7.3 Inline-building.

Contents:

(#PCDATA|%inline;|%block;)*

In addition this formatting object may have a sequence of zero or more fo:markers as its initial children.

An fo:bidi-override that is a descendant of an fo:leader or of the fo:inline child of an fo:footnote may not have block-level children, unless it has a nearer ancestor that is an fo:inline-container.

The following properties apply to this formatting object:

7.7 Common Aural Properties
7.9 Common Font Properties
7.13 Common Relative Position Properties
7.18.1 color
7.29.1 direction
7.30.8 id
7.24.1 index-class
7.24.2 index-key
7.17.2 letter-spacing
7.16.4 line-height
7.30.15 score-spaces
7.29.6 unicode-bidi
7.17.8 word-spacing

6.6.3 fo:character

Common Usage:

The fo:character flow object represents a character that is mapped to a glyph for presentation. It is an atomic unit to the formatter.

When the result tree is interpreted as a tree of formatting objects, a character in the result tree is treated as if it were an empty element of type fo:character with a character attribute equal to the Unicode representation of the character. The semantics of an "auto" value for character properties, which is typically their initial value, are based on the Unicode code point. Overrides may be specified in an implementation-specific manner.

Note:

In a stylesheet the explicit creation of an fo:character may be used to explicitly override the default mapping.

Unicode Tag Characters need not be supported.

Note:

Unicode Version 3.1, in fact, states that they are not to be used "with any protocols that provide alternate means for language tagging, such as HTML or XML.". Unicode TR20 ([UNICODE TR20]) also declares very clearly that they are not suitable together with markup.

Areas:

The fo:character formatting object generates and returns one or more normal inline-area.

Note:

Cases where more than one inline-area is generated are encountered in scripts where a single character generates both a prefix and a suffix glyph to some other character.

Constraints:

The dimensions of the areas are determined by the font metrics for the glyph.

When formatting an fo:character with a "treat-as-word-space" value of "true", the User Agent may use a different method for determining the inline-progression-dimension of the area.

Note:

Such methods typically make use of a word space value stored in the font, or a formatter defined word space value.

Contents:

EMPTY

The following properties apply to this formatting object:

7.7 Common Aural Properties
7.8 Common Border, Padding, and Background Properties
7.9 Common Font Properties
7.10 Common Hyphenation Properties
7.12 Common Margin Properties-Inline
7.13 Common Relative Position Properties
7.14.1 alignment-adjust
7.17.7 treat-as-word-space
7.14.2 alignment-baseline
7.14.3 baseline-shift
7.17.1 character
7.18.1 color
7.14.5 dominant-baseline
7.29.5 text-depth
7.29.4 text-altitude
7.29.2 glyph-orientation-horizontal
7.29.3 glyph-orientation-vertical
7.30.8 id
7.24.1 index-class
7.24.2 index-key
7.20.4 keep-with-next
7.20.5 keep-with-previous
7.17.2 letter-spacing
7.16.4 line-height
7.30.15 score-spaces
7.17.3 suppress-at-line-break
7.17.4 text-decoration
7.17.5 text-shadow
7.17.6 text-transform
7.30.17 visibility
7.17.8 word-spacing

6.6.4 fo:initial-property-set

Common Usage:

The fo:initial-property-set auxiliary formatting object specifies formatting properties for the first line of an fo:block.

Note:

It is analogous to the CSS first-line pseudo-element.

In future versions of this Recommendation a property controlling the number of lines, or the "depth" that these initial properties apply to may be added.

Areas:

The fo:initial-property-set formatting object does not generate or return any areas. It simply holds a set of traits that are applicable to the first line-area of the area that has a value of "true" for the is-first trait and that was generated by the parent fo:block of the fo:initial-property-set.

Trait Derivation:

The traits on the fo:initial-property-set are taken into account as traits constraining the first line as if the child inline formatting objects of the fo:block, or parts of them in the case of a line-break, that were used in formatting the first line were enclosed by an fo:inline, as a direct child of the fo:block, with those traits.

Constraints:

None.

Contents:

EMPTY

The following properties apply to this formatting object:

7.5 Common Accessibility Properties
7.7 Common Aural Properties
7.8 Common Border, Padding, and Background Properties
7.9 Common Font Properties
7.13 Common Relative Position Properties
7.18.1 color
7.17.2 letter-spacing
7.16.4 line-height
7.30.15 score-spaces
7.17.4 text-decoration
7.17.5 text-shadow
7.17.6 text-transform
7.17.8 word-spacing

6.6.5 fo:external-graphic

Common Usage:

The fo:external-graphic flow object is used for a graphic where the graphics data resides outside of the fo:element tree.

Areas:

The fo:external-graphic formatting object generates and returns one inline-level viewport-area and one reference-area containing the external graphic. The inline-level area uses the large-allocation-rectangle as defined in 4.2.3 Geometric Definitions.

Note:

An fo:external-graphic may be placed block-level by enclosing it in an fo:block.

A "line-stacking-strategy" of "max-height" or "line-height" is typically used for stacking one or more lines with fo:external-graphic content.

Constraints:

The viewport's size is determined by the block-progression-dimension and inline-progression-dimension traits. For values of "auto", the content size of the graphic is used.

The content size of a graphic is determined by taking the intrinsic size of the graphic and scaling as specified by the content-height, content-width, scaling, allowed-height-scale, and allowed-width-scale traits. If one of the content-height or content-width is not "auto", the same scale factor (as calculated from the specified non-auto value) is applied equally to both directions.

Once scaled, the reference-area is aligned with respect to the viewport-area using the text-align and display-align traits. If it is too large for the viewport-area, the graphic is aligned as if it would fit and the overflow trait controls the clipping, scroll bars, etc.

In the case when the graphics format does not specify an intrinsic size of the graphic the size is determined in an implementation-defined manner.

Note:

For example, a size of 1/96" as the size of one pixel for rasterized images may be used.

Contents:

EMPTY

The following properties apply to this formatting object:

7.5 Common Accessibility Properties
7.7 Common Aural Properties
7.8 Common Border, Padding, and Background Properties
7.12 Common Margin Properties-Inline
7.13 Common Relative Position Properties
7.14.1 alignment-adjust
7.14.2 alignment-baseline
7.15.1 allowed-height-scale
7.15.2 allowed-width-scale
7.14.3 baseline-shift
7.15.3 block-progression-dimension
7.21.1 clip
7.15.4 content-height
7.30.7 content-type
7.15.5 content-width
7.14.4 display-align
7.14.5 dominant-baseline
7.15.6 height
7.30.8 id
7.24.1 index-class
7.24.2 index-key
7.15.7 inline-progression-dimension
7.20.4 keep-with-next
7.20.5 keep-with-previous
7.16.4 line-height
7.21.2 overflow
7.15.12 scaling
7.15.13 scaling-method
7.30.16 src
7.16.9 text-align
7.15.14 width

6.6.6 fo:instream-foreign-object

Common Usage:

The fo:instream-foreign-object flow object is used for an inline graphic or other "generic" object where the object data resides as descendants of the fo:instream-foreign-object, typically as an XML element subtree in a non-XSL namespace.

Note:

A common format is SVG.

Areas:

The fo:instream-foreign-object formatting object generates and returns one inline viewport-area and one reference-area containing the instream-foreign-object. The inline-level area uses the large-allocation-rectangle as defined in 4.2.3 Geometric Definitions.

Constraints:

The viewport's size is determined by the block-progression-dimension and inline-progression-dimension traits. For values of "auto", the content size of the instream foreign object is used.

The content size of an instream-foreign-object is determined by taking the intrinsic size of the object and scaling as specified by the content-height, content-width, scaling, allowed-height-scale, and allowed-width-scale traits. If one of the content-height or content-width is not "auto", the same scale factor (as calculated from the specified non-auto value) is applied equally to both directions.

Once scaled, the reference-area is aligned with respect to the viewport-area using the text-align and display-align traits. If it is too large for the viewport-area, the instream-foreign-object is aligned as if it would fit and the overflow trait controls the clipping, scroll bars, etc.

In the case when the instream-foreign-object does not specify an intrinsic size of the object, the size is determined in an implementation defined manner.

Contents:

The fo:instream-foreign-object flow object has a child from a non-XSL namespace. The permitted structure of this child is that defined for that namespace.

The fo:instream-foreign-object flow object may have additional attributes in the non-XSL namespace. These, as well as the xsl defined properties, are made available to the processor of the content of the flow object. Their semantics are defined by that namespace.

The following properties apply to this formatting object:

7.5 Common Accessibility Properties
7.7 Common Aural Properties
7.8 Common Border, Padding, and Background Properties
7.12 Common Margin Properties-Inline
7.13 Common Relative Position Properties
7.14.1 alignment-adjust
7.14.2 alignment-baseline
7.15.1 allowed-height-scale
7.15.2 allowed-width-scale
7.14.3 baseline-shift
7.15.3 block-progression-dimension
7.21.1 clip
7.15.4 content-height
7.30.7 content-type
7.15.5 content-width
7.14.4 display-align
7.14.5 dominant-baseline
7.15.6 height
7.30.8 id
7.24.1 index-class
7.24.2 index-key
7.15.7 inline-progression-dimension
7.20.4 keep-with-next
7.20.5 keep-with-previous
7.16.4 line-height
7.21.2 overflow
7.15.12 scaling
7.15.13 scaling-method
7.16.9 text-align
7.15.14 width

6.6.7 fo:inline

Common Usage:

The fo:inline formatting object is commonly used for formatting a portion of text with a background or enclosing it in a border.

Areas:

The fo:inline formatting object generates one or more normal inline-areas. The fo:inline returns these areas, together with any normal block-areas, page-level-out-of-line areas, and reference-level-out-of-line areas returned by the children of the fo:inline.

Constraints:

No area may have more than one normal child area returned by the same fo:inline formatting object.

The children of each normal area returned by an fo:inline must satisfy the constraints specified in 4.7.3 Inline-building.

In addition the constraints imposed by the traits derived from the properties applicable to this formatting object must be satisfied. The geometric constraints are rigorously defined in 4 Area Model.

Contents:

(#PCDATA|%inline;|%block;)*

In addition this formatting object may have a sequence of zero or more fo:markers as its initial children.

An fo:inline that is a child of an fo:footnote may not have block-level children. An fo:inline that is a descendant of an fo:leader or of the fo:inline child of an fo:footnote may not have block-level children, unless it has a nearer ancestor that is an fo:inline-container.

The following properties apply to this formatting object:

7.5 Common Accessibility Properties
7.7 Common Aural Properties
7.8 Common Border, Padding, and Background Properties
7.9 Common Font Properties
7.12 Common Margin Properties-Inline
7.13 Common Relative Position Properties
7.14.1 alignment-adjust
7.14.2 alignment-baseline
7.14.3 baseline-shift
7.15.3 block-progression-dimension
7.18.1 color
7.14.5 dominant-baseline
7.15.6 height
7.30.8 id
7.24.1 index-class
7.24.2 index-key
7.15.7 inline-progression-dimension
7.20.3 keep-together
7.20.4 keep-with-next
7.20.5 keep-with-previous
7.16.4 line-height
7.17.4 text-decoration
7.30.17 visibility
7.15.14 width
7.16.13 wrap-option

6.6.8 fo:inline-container

Common Usage:

The fo:inline-container flow object is used to generate an inline reference-area, typically containing text blocks with a different writing-mode.

Note:

The use of this flow object is not required for bi-directional text; in this case the Unicode BIDI algorithm and the fo:bidi-override are sufficient.

Areas:

The fo:inline-container formatting object generates one or more viewport/reference pairs. All generated viewport-areas are subject to the constraints given by the block-progression-dimension and inline-progression-dimension traits of the fo:inline-container. The fo:inline-container returns these areas and any page-level-out-of-line areas returned by the children of the fo:inline-container.

Note:

In the case that the block-progression-dimension.maximum is other than "auto", then overflow processing may apply. The "repeat" value of overflow can be used to generate multiple viewport/reference pairs if this is desired rather than clipping or scrolling.

If the absolute-position trait is "auto", these areas all have an area-class of "xsl-normal". If the absolution-position trait is "absolute" or "fixed" then there is one viewport/reference pair, and its area-class is "xsl-absolute" or "xsl-fixed", respectively.

Trait Derivation:

The reference-orientation and writing-mode traits of the viewport-area and reference-area come from the fo:inline-container. These determine the orientation of the start-edge, end-edge, before-edge and after-edge of the content-rectangle of the viewport-area, and of the padding-, border-, and content-rectangles of the reference-area. The reference-orientation of the reference-area is set to "0" and is, therefore, the same as the orientation established by the viewport-area. The inline-progression-dimension of the reference-area is the same as that of the viewport-area, and may not be "auto" if the inline-progression-direction is different from that of the parent of the fo:inline-container. The block-progression-dimension of the reference-area is not constrained; thus the reference-area may be larger than the viewport-area and this may cause the "overflow" property to operate.

Note:

As a property value applies to each of the areas generated by this flow object the size can vary from instance to instance if the value is "auto" or a <length-range>.

The values in the baseline-table of this object are calculated as follows:

baseline

If the writing mode has a block-progression-direction that is parallel to the block-progression-direction of the parent: the alignment-point is at the position of the dominant-baseline of the first descendant line-area. If there is no such line-area the alignment-point is at the position of the after-edge of the allocation rectangle.

If the writing mode has a block-progression-direction that is not parallel to the block-progression-direction of the parent: the alignment-point is at the position that is half way between the before-edge and after-edge of the content rectangle.

before-edge

The alignment-point is at the position of the before-edge of the allocation rectangle.

text-before-edge

The alignment-point is at the position that is the closest to the before-edge of the allocation rectangle selected from the two candidate edges. If the writing mode has a block-progression-direction that is parallel to the block-progression-direction of the parent the candidate edges are the before-edge and the after-edge of the content rectangle; if it is not, the candidate edges are the start-edge and the end-edge of the content rectangle.

middle

The alignment-point is at the position that is half way between the before-edge and after-edge of the allocation rectangle.

after-edge

The alignment-point is at the position of the after-edge of the allocation rectangle.

text-after-edge

The alignment-point is at the position that is the closest to the after-edge of the allocation rectangle selected from the two candidate edges. If the writing mode has a block-progression-direction that is parallel to the block-progression-direction of the parent the candidate edges are the before-edge and the after-edge of the content rectangle; if it is not, the candidate edges are the start-edge and the end-edge of the content rectangle.

ideographic

The alignment-point is at the position that is 7/10 of the distance from the before-edge of the allocation rectangle to the after-edge of the allocation rectangle.

alphabetic

The alignment-point is at the position that is 6/10 of the distance from the before-edge of the allocation rectangle to the after-edge of the allocation rectangle.

hanging

The alignment-point is at the position that is 2/10 of the distance from the before-edge of the allocation rectangle to the after-edge of the allocation rectangle.

mathematical

The alignment-point is at the position that is 5/10 of the distance from the before-edge of the allocation rectangle to the after-edge of the allocation rectangle.

Constraints:

No area may have more than one normal child area returned by the same fo:inline-container formatting object.

The children of each reference-area generated by an fo:inline-container formatting object must be normal block-areas returned by the children of the fo:inline-container, must be properly stacked, and must be properly ordered.

Any reference-level-out-of-line areas returned by the children of the fo:inline-container are handled as described in 6.12.2 fo:float.

Contents:

In addition this formatting object may have a sequence of zero or more fo:markers as its initial children.

The following properties apply to this formatting object:

7.8 Common Border, Padding, and Background Properties
7.12 Common Margin Properties-Inline
7.13 Common Relative Position Properties
7.14.1 alignment-adjust
7.14.2 alignment-baseline
7.14.3 baseline-shift
7.15.3 block-progression-dimension
7.21.1 clip
7.14.4 display-align
7.14.5 dominant-baseline
7.15.6 height
7.30.8 id
7.24.1 index-class
7.24.2 index-key
7.15.7 inline-progression-dimension
7.20.3 keep-together
7.20.4 keep-with-next
7.20.5 keep-with-previous
7.16.4 line-height
7.21.2 overflow
7.21.3 reference-orientation
7.15.14 width
7.29.7 writing-mode

6.6.9 fo:leader

Common Usage:

The fo:leader formatting object is often used:

  • in table-of-contents to generate sequences of "." glyphs that separate titles from page numbers

  • to create entry fields in fill-in-the-blank forms

  • to create horizontal rules for use as separators

Areas:

The fo:leader formatting object generates and returns a single normal inline-area.

Trait Derivation:

If the value of the leader-pattern is "use-content" the block-progression-dimension of the content-rectangle is determined in the same manner as for inline-areas; otherwise it is determined by the rule-thickness trait.

Constraints:

If the leader's minimum length is too long to place in the line-area, the leader will begin a new line. If it is too long to be placed in a line by itself, it will overflow the line and potentially overflow the reference-area in accordance with that container's overflow trait.

The fo:leader formatting object can have any inline formatting objects and characters as its children, except that fo:leaders may not be nested. Its children are ignored unless the value of the leader-pattern trait is "use-content".

Note:

If the value of the leader-pattern trait is "use-content" and the fo:leader has no children, the leader shall be filled with blank space.

The inline-area generated by the fo:leader has a dimension in the inline-progression-direction which shall be at least the leader-length.minimum and at most the leader-length.maximum.

For lines-areas that have been specified to be justified, the justified line-area must honor the leader-alignment trait of any inline-areas generated by fo:leaders.

If the value of the leader-pattern trait is "dots" or "use-content", the following constraint applies:

The inline-area generated by the fo:leader has as its children the areas returned by children of the fo:leader, or obtained by formatting the pattern specified in the leader-pattern trait, repeated an integral number of times. If the width of even a single repetition is larger than the dimension of the inline-area in the inline-progression-direction, the inline-area shall be filled with blank space. The space-start and space-end of the child areas is set to account for the constraints specified in the leader-pattern-width and leader-alignment traits.

Note:

If it is desired that the leader should stretch to fill all available space on a line, the maximum length of the leader should be specified to be at least as large as the column width.

Note:

The alignment of the leader may be script specific and may require indicating what alignment point is required, because it is different from the default alignment for the script. For example, in some usage of Indic scripts the leader is aligned at the alphabetic baseline.

Note:

An fo:leader can be wrapped in an fo:block, yielding a block-area with a line-area containing the leader, to create a rule for separating or decorating block-areas.

Contents:

(#PCDATA|%inline;)*

The content must not contain an fo:leader, fo:inline-container, fo:block-container, fo:float, fo:footnote, or fo:marker either as a direct child or as a descendant.

The following properties apply to this formatting object:

7.5 Common Accessibility Properties
7.7 Common Aural Properties
7.8 Common Border, Padding, and Background Properties
7.9 Common Font Properties
7.12 Common Margin Properties-Inline
7.13 Common Relative Position Properties
7.14.1 alignment-adjust
7.14.2 alignment-baseline
7.14.3 baseline-shift
7.18.1 color
7.14.5 dominant-baseline
7.29.5 text-depth
7.29.4 text-altitude
7.30.8 id
7.24.1 index-class
7.24.2 index-key
7.20.4 keep-with-next
7.20.5 keep-with-previous
7.22.1 leader-alignment
7.22.4 leader-length
7.22.2 leader-pattern
7.22.3 leader-pattern-width
7.22.5 rule-style
7.22.6 rule-thickness
7.17.2 letter-spacing
7.16.4 line-height
7.17.5 text-shadow
7.30.17 visibility
7.17.8 word-spacing

6.6.10 fo:page-number

Common Usage:

The fo:page-number formatting object is used to obtain an inline-area whose content is the page-number for the page on which the inline-area is placed.

Areas:

The fo:page-number formatting object generates and returns a single normal inline-area.

Constraints:

The content of the inline-area depends on the reference-page and the reference-page-sequence. For the fo:page-number the reference-page is the page on which the inline-area is placed and the reference-page-sequence is the ancestor fo:page-sequence of the fo:page-number.

The child areas of this inline-area are the same as the result of formatting a result-tree fragment consisting of the content of any fo:folio-prefix child of the reference-page-sequence, followed by fo:character flow objects; one for each character in the folio-number string and with only the "character" property specified, followed by the content of any fo:folio-suffix child of the reference-page-sequence.

The folio-number string is obtained by converting the folio-number for the reference-page in accordance with the number to string conversion properties of the reference-page-sequence.

Contents:

EMPTY

The following properties apply to this formatting object:

7.5 Common Accessibility Properties
7.7 Common Aural Properties
7.8 Common Border, Padding, and Background Properties
7.9 Common Font Properties
7.12 Common Margin Properties-Inline
7.13 Common Relative Position Properties
7.14.1 alignment-adjust
7.14.2 alignment-baseline
7.14.3 baseline-shift
7.14.5 dominant-baseline
7.30.8 id
7.24.1 index-class
7.24.2 index-key
7.20.4 keep-with-next
7.20.5 keep-with-previous
7.17.2 letter-spacing
7.16.4 line-height
7.30.15 score-spaces
7.29.4 text-altitude
7.17.4 text-decoration
7.29.5 text-depth
7.17.5 text-shadow
7.17.6 text-transform
7.30.17 visibility
7.17.8 word-spacing
7.16.13 wrap-option

6.6.11 fo:page-number-citation

Common Usage:

The fo:page-number-citation is used to reference the page-number for the page containing the first normal area returned by the cited formatting object.

Note:

It may be used to provide the page-numbers in the table of contents, cross-references, and index entries.

Areas:

The fo:page-number-citation formatting object generates and returns a single normal inline-area.

Constraints:

The cited page is the page containing, as a descendant, the first normal area returned by the formatting object with an id trait matching the ref-id trait of the fo:page-number-citation (the referenced formatting object).

The child areas of the generated inline-area are the same as the result of formatting the result-tree fragment, defined in 6.6.10 fo:page-number, using the cited page as the reference-page, and the fo:page-sequence that generated the cited-page as the reference-page-sequence.

Contents:

EMPTY

The following properties apply to this formatting object:

7.5 Common Accessibility Properties
7.7 Common Aural Properties
7.8 Common Border, Padding, and Background Properties
7.9 Common Font Properties
7.12 Common Margin Properties-Inline
7.13 Common Relative Position Properties
7.14.1 alignment-adjust
7.14.2 alignment-baseline
7.14.3 baseline-shift
7.14.5 dominant-baseline
7.30.8 id
7.24.1 index-class
7.24.2 index-key
7.20.4 keep-with-next
7.20.5 keep-with-previous
7.17.2 letter-spacing
7.16.4 line-height
7.30.13 ref-id
7.30.15 score-spaces
7.29.4 text-altitude
7.17.4 text-decoration
7.29.5 text-depth
7.17.5 text-shadow
7.17.6 text-transform
7.30.17 visibility
7.17.8 word-spacing
7.16.13 wrap-option

6.6.12 fo:page-number-citation-last

Common Usage:

The fo:page-number-citation-last is used to reference the page-number for the last page containing an area that is (a) returned by the cited formatting object and (b) has an area-class that is consistent with the specified page-citation-strategy.

Note:

It may be used to provide the page-numbers in the table of contents, cross-references, and, when combined with fo:page-number-citation, for page range entries.

Areas:

The fo:page-number-citation-last formatting object generates and returns a single normal inline-area.

Constraints:

The cited page is the page of the last page area (in the pre-order traversal order of the area tree) that satisfies the constraints of the page-citation-strategy on this fo:page-number-citation-last.

The child areas of the generated inline-area are the same as the result of formatting the result-tree fragment, defined in 6.6.10 fo:page-number, using the cited page as the reference-page, and the fo:page-sequence that generated the cited-page as the reference-page-sequence.

Contents:

EMPTY

The following properties apply to this formatting object:

7.5 Common Accessibility Properties
7.7 Common Aural Properties
7.8 Common Border, Padding, and Background Properties
7.9 Common Font Properties
7.12 Common Margin Properties-Inline
7.13 Common Relative Position Properties
7.14.1 alignment-adjust
7.14.2 alignment-baseline
7.14.3 baseline-shift
7.14.5 dominant-baseline
7.30.8 id
7.24.1 index-class
7.24.2 index-key
7.20.4 keep-with-next
7.20.5 keep-with-previous
7.17.2 letter-spacing
7.16.4 line-height
7.30.10 page-citation-strategy
7.30.13 ref-id
7.30.15 score-spaces
7.29.4 text-altitude
7.17.4 text-decoration
7.29.5 text-depth
7.17.5 text-shadow
7.17.6 text-transform
7.30.17 visibility
7.17.8 word-spacing
7.16.13 wrap-option

6.6.13 fo:folio-prefix

Common Usage:

The fo:folio-prefix formatting object specifies a static prefix for the folio numbers within a page-sequence.

Areas:

The fo:folio-prefix formatting object does not directly produce any areas. Its children will be retrieved and used when formatting page numbers.

Constraints:

None.

Contents:

(#PCDATA|%inline;)*

An fo:folio-prefix is not permitted to have an fo:page-number, fo:page-number-citation, or fo:page-number-citation-last as a descendant.

6.6.14 fo:folio-suffix

Common Usage:

The fo:folio-suffix formatting object specifies a static suffix for the folio numbers within a page-sequence.

Areas:

The fo:folio-suffix formatting object does not directly produce any areas. Its children will be retrieved and used when formatting page numbers.

Constraints:

None.

Contents:

(#PCDATA|%inline;)*

An fo:folio-suffix is not permitted to have an fo:page-number, fo:page-number-citation, or fo:page-number-citation-last as a descendant.

6.6.15 fo:scaling-value-citation

Common Usage:

The fo:scaling-value-citation is used to obtain the scale-factor applied to the cited fo:external-graphic.

Note:

It may be used to provide the scale used in applications where a graphic is normally shown at true size, but is scaled down if it does not fit.

Areas:

The fo:scaling-value-citation formatting object generates and returns a single normal inline-area.

Constraints:

The cited fo:external-graphic is the fo:external-graphic with an id trait matching the ref-id trait of the fo:scaling-value-citation.

The applied scale-factor is the scale-factor that was applied to the intrinsic size of the cited fo:external-graphic multiplied by the value of the "intrinsic-scale-value" property. It is expressed as an integer percentage value. The "scale-option" property specifies if the scale-factor for the width or height should be used.

Note:

In the case when the graphics format does not specify an intrinsic size of the graphic and the size has been determined in an implementation-defined manner the scale factor obtained may not be meaningful.

The applied scale-factor string is obtained by converting the applied scale-factor in accordance with the number to string conversion properties.

The child areas of the generated inline-area are the same as the result of formatting a result-tree fragment consisting of fo:character flow objects; one for each character in the applied scale-factor string and with only the "character" property specified.

Contents:

EMPTY

The following properties apply to this formatting object:

7.5 Common Accessibility Properties
7.7 Common Aural Properties
7.8 Common Border, Padding, and Background Properties
7.9 Common Font Properties
7.12 Common Margin Properties-Inline
7.13 Common Relative Position Properties
7.14.1 alignment-adjust
7.14.2 alignment-baseline
7.14.3 baseline-shift
7.10.1 country
7.14.5 dominant-baseline
7.26.1 format
7.26.2 grouping-separator
7.26.3 grouping-size
7.30.8 id
7.24.1 index-class
7.24.2 index-key
7.20.4 keep-with-next
7.20.5 keep-with-previous
7.10.2 language
7.17.2 letter-spacing
7.26.4 letter-value
7.16.4 line-height
7.30.9 intrinsic-scale-value
7.30.13 ref-id
7.30.15 score-spaces
7.30.14 scale-option
7.29.4 text-altitude
7.17.4 text-decoration
7.29.5 text-depth
7.17.5 text-shadow
7.17.6 text-transform
7.30.17 visibility
7.17.8 word-spacing
7.16.13 wrap-option

6.7 Formatting Objects for Tables

6.7.1 Introduction

There are nine formatting objects used to construct tables: fo:table-and-caption, fo:table, fo:table-column, fo:table-caption, fo:table-header, fo:table-footer, fo:table-body, fo:table-row, and fo:table-cell. The result tree structure is shown below.

Tree representation of the Formatting Objects for tables   [D]

Tree Representation of the Formatting Objects for Tables

6.7.1.1 Examples
6.7.1.1.1 Simple Table, Centered and Indented

Input sample:

<doc>
<table>
<caption><p>Caption for this table</p></caption>
<tgroup cols="3" width="325pt">
<colspec colwidth="100pt"/>
<colspec colwidth="150pt"/>
<colspec colwidth="75pt"/>
<tbody>
<row>
<entry><p>Cell 1</p></entry>
<entry><p>Cell 2</p></entry>
<entry><p>Cell 3</p></entry>
</row>
</tbody>
</tgroup>
</table>
</doc>

The table and its caption is centered in the available space between the following indents: start-indent="100pt" and end-indent="0pt". The centering and indent is not desired for the content of the caption and the cells.

XSL Stylesheet:

<?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:attribute-set name="inside-table">
  <xsl:attribute name="start-indent">0pt</xsl:attribute>
  <xsl:attribute name="text-align">start</xsl:attribute>
</xsl:attribute-set>

<xsl:template match="p">
  <fo:block>
    <xsl:apply-templates/>
  </fo:block>
</xsl:template>

<xsl:template match="table">
  <fo:table-and-caption text-align="center" start-indent="100pt">
    <xsl:apply-templates/>
  </fo:table-and-caption>
</xsl:template>

<xsl:template match="caption">
  <fo:table-caption xsl:use-attribute-sets="inside-table">
    <xsl:apply-templates/>
  </fo:table-caption>
</xsl:template>

<xsl:template match="tgroup">
  <fo:table width="{@width}" table-layout="fixed">
    <xsl:apply-templates/>
  </fo:table>
</xsl:template>

<xsl:template match="colspec">
  <fo:table-column column-width="{@colwidth}">
    <xsl:attribute name="column-number">
      <xsl:number count="colspec"/>
    </xsl:attribute>
  </fo:table-column>
</xsl:template>

<xsl:template match="tbody">
  <fo:table-body xsl:use-attribute-sets="inside-table">
    <xsl:apply-templates/>
  </fo:table-body>
</xsl:template>

<xsl:template match="row">
  <fo:table-row>
    <xsl:apply-templates/>
  </fo:table-row>
</xsl:template>

<xsl:template match="entry">
  <fo:table-cell>
    <xsl:apply-templates/>
  </fo:table-cell>
</xsl:template>

</xsl:stylesheet>

Result Instance: elements and attributes in the fo: namespace

<fo:table-and-caption text-align="center" start-indent="100pt">

  <fo:table-caption start-indent="0pt" text-align="start">
    <fo:block>Caption for this table
    </fo:block>
  </fo:table-caption>

  <fo:table width="325pt" table-layout="fixed">

    <fo:table-column column-width="100pt" column-number="1">
    </fo:table-column>
    <fo:table-column column-width="150pt" column-number="2">
    </fo:table-column>
    <fo:table-column column-width="75pt" column-number="3">
    </fo:table-column>

    <fo:table-body start-indent="0pt" text-align="start">

    <fo:table-row>

    <fo:table-cell>
    <fo:block>Cell 1
    </fo:block>
    </fo:table-cell>
    <fo:table-cell>
    <fo:block>Cell 2
    </fo:block>
    </fo:table-cell>
    <fo:table-cell>
    <fo:block>Cell 3
    </fo:block>
    </fo:table-cell>

    </fo:table-row>

    </fo:table-body>

  </fo:table>

</fo:table-and-caption>
6.7.1.1.2 Simple Table with Relative Column-width Specifications

This example is using a simple, "Oasis-table-model-like", markup for the table elements. The column-widths are specified using full relative column-width specification.

Input sample:

<doc>
<table>
<tgroup cols="3">
<colspec colname="col1" colwidth="1*"/>
<colspec colname="col2" colwidth="2*+2pi"/>
<colspec colname="col3" colwidth="72"/>
<tbody>
<row>
<entry colnum="1" valign="top"><p>Cell 1</p></entry>
<entry colnum="2" valign="middle" align="center"><p>Cell 2</p></entry>
<entry colnum="3" align="center"><p>Cell 3</p></entry>
</row>
</tbody>
</tgroup>
</table>
</doc>

XSL Stylesheet:

<?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="p">
  <fo:block>
    <xsl:apply-templates/>
  </fo:block>
</xsl:template>

<xsl:template match="table">
  <fo:table width="12cm" table-layout="fixed">
    <xsl:apply-templates/>
  </fo:table>
</xsl:template>

<xsl:template match="colspec">
  <fo:table-column>
    <xsl:attribute name="column-number">
      <xsl:number count="colspec"/>
    </xsl:attribute>
    <xsl:attribute name="column-width">
      <xsl:call-template name="calc.column.width">
        <xsl:with-param name="colwidth">
          <xsl:value-of select="@colwidth"/>
        </xsl:with-param>
      </xsl:call-template>
    </xsl:attribute>
  </fo:table-column>
</xsl:template>

<xsl:template match="tbody">
  <fo:table-body>
    <xsl:apply-templates/>
  </fo:table-body>
</xsl:template>

<xsl:template match="row">
  <fo:table-row>
    <xsl:apply-templates/>
  </fo:table-row>
</xsl:template>

<xsl:template match="entry">
  <fo:table-cell column-number="{@colnum}">
    <xsl:if test="@valign">
      <xsl:choose>
        <xsl:when test="@valign='middle'">
          <xsl:attribute name="display-align">center</xsl:attribute>
        </xsl:when>
        <xsl:when test="@valign='top'">
          <xsl:attribute name="display-align">before</xsl:attribute>
        </xsl:when>
        <xsl:when test="@valign='bottom'">
          <xsl:attribute name="display-align">after</xsl:attribute>
        </xsl:when>
        <xsl:otherwise>
          <xsl:attribute name="display-align">before</xsl:attribute>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:if>
    <xsl:if test="@align">
      <xsl:attribute name="text-align">
        <xsl:value-of select="@align"/>
      </xsl:attribute>
    </xsl:if>
    <xsl:apply-templates/>
  </fo:table-cell>
</xsl:template>


<xsl:template name="calc.column.width">
<!-- **
     * <p>Calculate an XSL FO table column-width specification from a
     * full relative table column-width specification.</p>
     *
     * <p>Table column-widths are in the following basic
     * forms:</p>
     *
     * <ul>
     * <li><b>99.99units</b>, a fixed length-specifier.</li>
     * <li><b>99.99</b>, a fixed length-specifier without any units.</li>
     * <li><b>99.99*</b>, a relative length-specifier.</li>
     * <li><b>99.99*+99.99units</b>, a combination of both.</li>
     * </ul>
     *
     * <p>The units are points (pt), picas (pi), centimeters (cm),
     * millimeters (mm), and inches (in). These are the same units as XSL,
     * except that XSL abbreviates picas "pc" instead of "pi". If a length
     * specifier has no units, the default unit (pt) is assumed.</p>
     *
     * <p>Relative length-specifiers are represented in XSL with the
     * proportional-column-width() function.</p>
     *
     * <p>Here are some examples:</p>
     *
     * <ul>
     * <li>"36pt" becomes "36pt"</li>
     * <li>"3pi" becomes "3pc"</li>
     * <li>"36" becomes "36pt"</li>
     * <li>"3*" becomes "proportional-column-width(3)"</li>
     * <li>"3*+2pi" becomes "proportional-column-width(3)+2pc"</li>
     * <li>"1*+2" becomes "proportional-column-width(1)+2pt"</li>
     * </ul>
     *
     * @param colwidth The column width specification.
     *
     * @returns The XSL column width specification.
     * -->
  <xsl:param name="colwidth">1*</xsl:param>

  <!-- Ok, the colwidth could have any one of the following forms: -->
  <!--        1*       = proportional width -->
  <!--     1unit       = 1.0 units wide -->
  <!--         1       = 1pt wide -->
  <!--  1*+1unit       = proportional width + some fixed width -->
  <!--      1*+1       = proportional width + some fixed width -->

  <!-- If it has a proportional width, translate it to XSL -->
  <xsl:if test="contains($colwidth, '*')">
    <xsl:text>proportional-column-width(</xsl:text>
    <xsl:value-of select="substring-before($colwidth, '*')"/>
    <xsl:text>)</xsl:text>
  </xsl:if>

  <!-- Now get the non-proportional part of the specification -->
  <xsl:variable name="width-units">
    <xsl:choose>
      <xsl:when test="contains($colwidth, '*')">
        <xsl:value-of
             select="normalize-space(substring-after($colwidth, '*'))"/>
      </xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="normalize-space($colwidth)"/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:variable>

  <!-- Now the width-units could have any one of the following forms: -->
  <!--                 = <empty string> -->
  <!--     1unit       = 1.0 units wide -->
  <!--         1       = 1pt wide -->
  <!-- with an optional leading sign -->

  <!-- Get the width part by blanking out the units part and discarding -->
  <!-- white space. -->
  <xsl:variable name="width"
       select="normalize-space(translate($width-units,
                                         '+-0123456789.abcdefghijklmnopqrstuvwxyz',
                                         '+-0123456789.'))"/>

  <!-- Get the units part by blanking out the width part and discarding -->
  <!-- white space. -->
  <xsl:variable name="units"
       select="normalize-space(translate($width-units,
                                         'abcdefghijklmnopqrstuvwxyz+-0123456789.',
                                         'abcdefghijklmnopqrstuvwxyz'))"/>

  <!-- Output the width -->
  <xsl:value-of select="$width"/>

  <!-- Output the units, translated appropriately -->
  <xsl:choose>
    <xsl:when test="$units = 'pi'">pc</xsl:when>
    <xsl:when test="$units = '' and $width != ''">pt</xsl:when>
    <xsl:otherwise><xsl:value-of select="$units"/></xsl:otherwise>
  </xsl:choose>
</xsl:template>

</xsl:stylesheet>

Result Instance: elements and attributes in the fo: namespace

<fo:table width="12cm" table-layout="fixed">
  <fo:table-column column-number="1" column-width="proportional-column-width(1)">
  </fo:table-column>
  <fo:table-column column-number="2" column-width="proportional-column-width(2)+2pc">
  </fo:table-column>
  <fo:table-column column-number="3" column-width="72pt">
  </fo:table-column>
  <fo:table-body>
    <fo:table-row>
      <fo:table-cell column-number="1" display-align="before">
        <fo:block>Cell 1
        </fo:block>
      </fo:table-cell>
      <fo:table-cell column-number="2" display-align="center" text-align="center">
        <fo:block>Cell 2
        </fo:block>
      </fo:table-cell>
      <fo:table-cell column-number="3" text-align="center">
        <fo:block>Cell 3
        </fo:block>
      </fo:table-cell>
    </fo:table-row>
  </fo:table-body>
</fo:table>

6.7.2 fo:table-and-caption

Common Usage:

The fo:table-and-caption flow object is used for formatting a table together with its caption.

Note:

An fo:table-and-caption may be placed inline by enclosing it in an fo:inline-container.

Note:

This formatting object corresponds to the CSS anonymous box that encloses the table caption and the table.

Areas:

The fo:table-and-caption formatting object generates one or more normal block-areas. The fo:table-and-caption returns these areas, any page-level-out-of-line areas, and any reference-level-out-of-line areas returned by the children of the fo:table-and-caption.

Constraints:

No area may have more than one normal child area returned by the same fo:table-and-caption formatting object.

The children of the areas generated by the fo:table-and-caption are one or two areas; one for the table caption and one for the table itself. These are positioned relative to each other as specified by the caption-side trait. They are placed relative to the content-rectangle of the generated area as specified by the text-align trait.

Contents:

In addition this formatting object may have a sequence of zero or more fo:markers as its initial children.

The following properties apply to this formatting object:

7.5 Common Accessibility Properties
7.7 Common Aural Properties
7.8 Common Border, Padding, and Background Properties
7.11 Common Margin Properties-Block
7.13 Common Relative Position Properties
7.20.1 break-after
7.20.2 break-before
7.28.7 caption-side
7.19.1 clear
7.30.8 id
7.24.1 index-class
7.24.2 index-key
7.19.3 intrusion-displace
7.20.3 keep-together
7.20.4 keep-with-next
7.20.5 keep-with-previous
7.16.9 text-align

6.7.3 fo:table

Common Usage:

The fo:table flow object is used for formatting the tabular material of a table.

The fo:table flow object and its child flow objects model the visual layout of a table in a "row primary" manner. A complete table may be seen as consisting of a grid of rows and columns where each cell occupies one or more grid units in the row-progression-direction and column-progression-direction.

The table content is divided into a header (optional), footer (optional), and one or more bodies. Properties specify if the headers and footers should be repeated at a break in the table. Each of these parts occupies one or more rows in the table grid.

Areas:

The fo:table formatting object generates and returns one or more normal block-areas. These areas consist of the content of the fo:table-header (unless omitted as specified by the "table-omit-header-at-break" property), followed by some portion of the content of the fo:table-body(s), followed by the content of the fo:table-footer (unless omitted as specified by the "table-omit-footer-at-break" property). In addition the fo:table returns any page-level-out-of-line areas, and any reference-level-out-of-line areas returned by the children of the fo:table.

The areas generated and returned by the fo:table formatting object have as children:

  • Areas, with only background, corresponding to the table-header, table-footer, table-body, spanned columns, columns, and rows.

    Note:

    The spanned columns (fo:table-column with a "number-columns-spanned" value greater than 1) are used in the same way as the "column groups" in CSS2 for determining the background.

  • Areas returned by the fo:table-cell formatting objects.

These areas have a z-index controlling the rendering order determined in accordance with 17.5.1 of the CSS2 specification (http://www.w3.org/TR/REC-CSS2/tables.html#table-layers").

Note:

A cell that is spanned may have a different background in each of the grid units it occupies.

Trait Derivation:

The column-progression-direction and row-progression-direction are determined by the writing-mode trait. Columns use the inline-progression-direction, and rows use the block-progression-direction.

The method for deriving the border traits for a table is specified by the "border-collapse" property.

If the value of the "border-collapse" property is "separate" the border is composed of two components. The first, which is placed with the inside edge coincident with the outermost table grid boundary line, has the width of half the value for the "border-separation" property. It is filled in accordance with the "background" property of the fo:table. Second, outside the outermost table grid boundary line is placed, for each side of the table, a border based on a border specified on the table.

If the value of the "border-collapse" property is "collapse" or "collapse-with-precedence" the border is determined, for each segment, at the cell level.

Note:

By specifying "collapse-with-precedence" and an appropriately high precedence on the border specification for the fo:table one may ensure that this specification is the one used on all border segments.

Constraints:

No area may have more than one normal child area returned by the same fo:table formatting object.

The content of the fo:table-header and fo:table-footer, unless omitted as specified by the "table-omit-header-at-break" and "table-omit-footer-at-break" properties, shall be repeated for each normal block-area generated and returned by the fo:table formatting object.

The inline-progression-dimension of the content-rectangle of the table is the sum of the inline-progression-dimensions of the columns in the table grid. The method used to determine these inline-progression-dimensions is governed by the values of the table-layout and the inline-progression-dimension traits in the following manner:

inline-progression-dimension="auto" table-layout="auto"

The automatic table layout shall be used.

inline-progression-dimension="auto" table-layout="fixed"

The automatic table layout shall be used.

inline-progression-dimension=<length> or <percentage> table-layout="auto"

The automatic table layout shall be used.

inline-progression-dimension=<length> or <percentage> table-layout="fixed"

The fixed table layout shall be used.

The automatic table layout and fixed table layout is defined in 17.5.2 of the CSS2 specification (http://www.w3.org/TR/REC-CSS2/tables.html#width-layout").

The method for determining the block-progression-dimension of the table is governed by the block-progression-dimension trait.

Note:

The CSS2 specification explicitly does not specify what the behavior should be if there is a mismatch between an explicitly specified table block-progression-dimension and the block-progression-dimensions of the content.

Note:

The use of the "proportional-column-width()" function is only permitted when the fixed table layout is used.

If the use of proportional column widths are desired on a table of an unknown explicit width, the inline-progression-dimension cannot be specified to be "auto". Instead, the width must be specified as a percentage. For example, setting table-layout="fixed" and inline-progression-dimension="100%" would allow proportional column widths while simultaneously creating a table as wide as possible in the current context.

Note:

The result of using a percentage for the width may be unpredictable, especially when using the automatic table layout.

It is an error if two or more table-cells overlap, for example because two or more table-cells attempt to span rows or columns into the same cell position within the table grid. An implementation may recover from this error by repositioning the table-cells so that all of the content is shown.

Table-cells must each be entirely contained both horizontally and vertically in a single table-body, table-header or table-footer. It is therefore an error if table-cells attempt to span too far. This might for example happen in a table whose table-layout is fixed by having a number-rows-spanned or number-columns-spanned value larger than the number of available rows or columns in the spanned direction. An implementation may recover by behaving as if the table-cell spanned only as many rows or columns as are actually available.

Contents:

In addition this formatting object may have a sequence of zero or more fo:markers as its initial children.

The following properties apply to this formatting object:

7.5 Common Accessibility Properties
7.7 Common Aural Properties
7.8 Common Border, Padding, and Background Properties
7.11 Common Margin Properties-Block
7.13 Common Relative Position Properties
7.15.3 block-progression-dimension
7.28.1 border-after-precedence
7.28.2 border-before-precedence
7.28.3 border-collapse
7.28.4 border-end-precedence
7.28.5 border-separation
7.28.6 border-start-precedence
7.20.1 break-after
7.20.2 break-before
7.19.1 clear
7.30.8 id
7.24.1 index-class
7.24.2 index-key
7.15.7 inline-progression-dimension
7.19.3 intrusion-displace
7.15.6 height
7.20.3 keep-together
7.20.4 keep-with-next
7.20.5 keep-with-previous
7.28.16 table-layout
7.28.17 table-omit-footer-at-break
7.28.18 table-omit-header-at-break
7.15.14 width
7.29.7 writing-mode

6.7.4 fo:table-column

Common Usage:

The fo:table-column auxiliary formatting object specifies characteristics applicable to table cells that have the same column and span. The most important property is the "column-width" property.

Areas:

The fo:table-column formatting object does not generate or return any areas. It holds a set of traits that provide constraints on the column widths and a specification of some presentation characteristics, such as background which affects the areas generated by the fo:table (see 6.7.3 fo:table). Inheritable properties may also be specified on the fo:table-column. These can be referenced by the from-table-column() function in an expression.

Note:

More details, in particular the use of an fo:table-column with number-columns-spanned greater than 1, are given in the description of fo:table and of the from-table-column() function.

Constraints:

None.

Contents:

EMPTY

The following properties apply to this formatting object:

7.8 Common Border, Padding, and Background Properties
NOTE: Only the background properties: background-attachment, background-color, background-image, background-repeat, background-position-horizontal, and background-position-vertical from this set apply. If the value of border-collapse is "collapse" or "collapse-with-precedence" for the table the border properties: border-before-color, border-before-style, border-before-width, border-after-color, border-after-style, border-after-width, border-start-color, border-start-style, border-start-width, border-end-color, border-end-style, border-end-width, border-top-color, border-top-style, border-top-width, border-bottom-color, border-bottom-style, border-bottom-width, border-left-color, border-left-style, border-left-width, border-right-color, border-right-style, and border-right-width also apply.

7.28.1 border-after-precedence
7.28.2 border-before-precedence
7.28.4 border-end-precedence
7.28.6 border-start-precedence
7.28.8 column-number
7.28.9 column-width
7.28.12 number-columns-repeated
7.28.13 number-columns-spanned
7.30.17 visibility

6.7.5 fo:table-caption

Common Usage:

The fo:table-caption formatting object is used to contain block-level formatting objects containing the caption for the table only when using the fo:table-and-caption.

Areas:

The fo:table-caption formatting object generates one or more normal reference-areas. The fo:table-caption returns these reference-areas and any page-level-out-of-line areas returned by the children of the fo:table-caption.

Constraints:

For the case when the value of the caption-side trait is "before" or "after" the inline-progression-dimension of the content-rectangle of the generated reference-area is equal to the inline-progression-dimension of the content-rectangle of the reference-area that encloses it.

When the value is "start" or "end" the inline-progression-dimension of the generated reference-area is constrained by the value of the inline-progression-dimension trait.

When the value is "top", "bottom", "left", or "right" the value is mapped in the same way as for corresponding properties (see 5.3 Computing the Values of Corresponding Properties) and the property is then treated as if the corresponding value had been specified.

If the caption is to be positioned before the table, the areas generated by the fo:table-caption shall be placed in the area tree as though the fo:table-caption had a "keep-with-next" property with value "always".

If the caption is to be positioned after the table, the areas generated by the fo:table-caption shall be placed in the area tree as though the fo:table-caption had a "keep-with-previous" property with value "always".

No area may have more than one normal child area returned by the same fo:table-caption formatting object.

The children of each normal area returned by an fo:table-caption formatting object must be normal block-areas returned by the children of the fo:table-caption, must be properly stacked, and must be properly ordered.

Any reference-level-out-of-line areas returned by the children of the fo:table-caption are handled as described in 6.12.2 fo:float.

Contents:

In addition this formatting object may have a sequence of zero or more fo:markers as its initial children.

The following properties apply to this formatting object:

7.5 Common Accessibility Properties
7.7 Common Aural Properties
7.8 Common Border, Padding, and Background Properties
7.13 Common Relative Position Properties
7.15.3 block-progression-dimension
7.15.6 height
7.30.8 id
7.24.1 index-class
7.24.2 index-key
7.15.7 inline-progression-dimension
7.19.3 intrusion-displace
7.20.3 keep-together
7.15.14 width

6.7.6 fo:table-header

Common Usage:

The fo:table-header formatting object is used to contain the content of the table header.

Areas:

The fo:table-header formatting object does not generate any areas. The fo:table-header formatting object returns the sequence of areas created by concatenating the sequences of areas returned by each of the children of the fo:table-header.

Constraints:

The order of concatenation of the sequences of areas returned by the children of the fo:table-header is the same order as the children are ordered under the fo:table-header.

Contents:

The fo:table-header has fo:table-row (one or more) as its children, or alternatively fo:table-cell (one or more). In the latter case cells are grouped into rows using the starts-row and ends-row properties.

In addition this formatting object may have a sequence of zero or more fo:markers as its initial children.

The following properties apply to this formatting object:

7.5 Common Accessibility Properties
7.7 Common Aural Properties
7.8 Common Border, Padding, and Background Properties
NOTE: Only the background properties: background-attachment, background-color, background-image, background-repeat, background-position-horizontal, and background-position-vertical from this set apply. If the value of border-collapse is "collapse" or "collapse-with-precedence" for the table the border properties: border-before-color, border-before-style, border-before-width, border-after-color, border-after-style, border-after-width, border-start-color, border-start-style, border-start-width, border-end-color, border-end-style, border-end-width, border-top-color, border-top-style, border-top-width, border-bottom-color, border-bottom-style, border-bottom-width, border-left-color, border-left-style, border-left-width, border-right-color, border-right-style, and border-right-width also apply.

7.13 Common Relative Position Properties
7.28.1 border-after-precedence
7.28.2 border-before-precedence
7.28.4 border-end-precedence
7.28.6 border-start-precedence
7.30.8 id
7.24.1 index-class
7.24.2 index-key
7.30.17 visibility

6.7.7 fo:table-footer

Common Usage:

The fo:table-footer formatting object is used to contain the content of the table footer.

Areas:

The fo:table-footer formatting object does not generate any areas. The fo:table-footer formatting object returns the sequence of areas created by concatenating the sequences of areas returned by each of the children of the fo:table-footer.

Constraints:

The order of concatenation of the sequences of areas returned by the children of the fo:table-footer is the same order as the children are ordered under the fo:table-footer.

Contents:

The fo:table-footer has fo:table-row (one or more) as its children, or alternatively fo:table-cell (one or more). In the latter case cells are grouped into rows using the starts-row and ends-row properties.

In addition this formatting object may have a sequence of zero or more fo:markers as its initial children.

The following properties apply to this formatting object:

7.5 Common Accessibility Properties
7.7 Common Aural Properties
7.8 Common Border, Padding, and Background Properties
NOTE: Only the background properties: background-attachment, background-color, background-image, background-repeat, background-position-horizontal, and background-position-vertical from this set apply. If the value of border-collapse is "collapse" or "collapse-with-precedence" for the table the border properties: border-before-color, border-before-style, border-before-width, border-after-color, border-after-style, border-after-width, border-start-color, border-start-style, border-start-width, border-end-color, border-end-style, border-end-width, border-top-color, border-top-style, border-top-width, border-bottom-color, border-bottom-style, border-bottom-width, border-left-color, border-left-style, border-left-width, border-right-color, border-right-style, and border-right-width also apply.

7.13 Common Relative Position Properties
7.28.1 border-after-precedence
7.28.2 border-before-precedence
7.28.4 border-end-precedence
7.28.6 border-start-precedence
7.30.8 id
7.24.1 index-class
7.24.2 index-key
7.30.17 visibility

6.7.8 fo:table-body

Common Usage:

The fo:table-body formatting object is used to contain the content of the table body.

Areas:

The fo:table-body formatting object does not generate any areas. The fo:table-body formatting object returns the sequence of areas created by concatenating the sequences of areas returned by each of the children of the fo:table-body.

Constraints:

The order of concatenation of the sequences of areas returned by the children of the fo:table-body is the same order as the children are ordered under the fo:table-body.

Contents:

The fo:table-body has fo:table-row (one or more) as its children, or alternatively fo:table-cell (one or more). In the latter case cells are grouped into rows using the starts-row and ends-row properties.

In addition this formatting object may have a sequence of zero or more fo:markers as its initial children.

The following properties apply to this formatting object:

7.5 Common Accessibility Properties
7.7 Common Aural Properties
7.8 Common Border, Padding, and Background Properties
NOTE: Only the background properties: background-attachment, background-color, background-image, background-repeat, background-position-horizontal, and background-position-vertical from this set apply. If the value of border-collapse is "collapse" or "collapse-with-precedence" for the table the border properties: border-before-color, border-before-style, border-before-width, border-after-color, border-after-style, border-after-width, border-start-color, border-start-style, border-start-width, border-end-color, border-end-style, border-end-width, border-top-color, border-top-style, border-top-width, border-bottom-color, border-bottom-style, border-bottom-width, border-left-color, border-left-style, border-left-width, border-right-color, border-right-style, and border-right-width also apply.

7.13 Common Relative Position Properties
7.28.1 border-after-precedence
7.28.2 border-before-precedence
7.28.4 border-end-precedence
7.28.6 border-start-precedence
7.30.8 id
7.24.1 index-class
7.24.2 index-key
7.30.17 visibility

6.7.9 fo:table-row

Common Usage:

The fo:table-row formatting object is used to group table-cells into rows; all table-cells in a table-row start in the same geometric row on the table grid.

Areas:

The fo:table-row formatting object does not generate any areas. The fo:table-row formatting object returns the sequence of areas created by concatenating the sequences of areas returned by each of the children of the fo:table-row. The fo:table-row holds a specification of some presentation characteristics, such as background which affects the areas generated by the fo:table (see 6.7.3 fo:table).

Constraints:

The order of concatenation of the sequences of areas returned by the children of the fo:table-row is the same order as the children are ordered under the fo:table-row.

The method for determining the height of the row in the grid is governed by the row-height trait.

Contents:

In addition this formatting object may have a sequence of zero or more fo:markers as its initial children.

The following properties apply to this formatting object:

7.5 Common Accessibility Properties
7.15.3 block-progression-dimension
7.7 Common Aural Properties
7.8 Common Border, Padding, and Background Properties
NOTE: Only the background properties: background-attachment, background-color, background-image, background-repeat, background-position-horizontal, and background-position-vertical from this set apply. If the value of border-collapse is "collapse" or "collapse-with-precedence" for the table the border properties: border-before-color, border-before-style, border-before-width, border-after-color, border-after-style, border-after-width, border-start-color, border-start-style, border-start-width, border-end-color, border-end-style, border-end-width, border-top-color, border-top-style, border-top-width, border-bottom-color, border-bottom-style, border-bottom-width, border-left-color, border-left-style, border-left-width, border-right-color, border-right-style, and border-right-width also apply.

7.13 Common Relative Position Properties
7.28.1 border-after-precedence
7.28.2 border-before-precedence
7.28.4 border-end-precedence
7.28.6 border-start-precedence
7.20.1 break-after
7.20.2 break-before
7.30.8 id
7.24.1 index-class
7.24.2 index-key
7.15.6 height
7.20.3 keep-together
7.20.4 keep-with-next
7.20.5 keep-with-previous
7.30.17 visibility

6.7.10 fo:table-cell

Common Usage:

The fo:table-cell formatting object is used to group content to be placed in a table cell.

The "starts-row" and "ends-row" properties can be used when the input data does not have elements containing the cells in each row, but instead, for example, each row starts at elements of a particular type.

Areas:

The fo:table-cell formatting object generates one or more normal reference-areas. The fo:table-cell returns these reference-areas and any page-level-out-of-line areas returned by the children of the fo:table-cell.

Trait Derivation:

The method for deriving the border for a cell is specified by the border-collapse trait.

If the value of the border-collapse trait is "separate" the border is composed of two components. The first, which is placed with the outside edge coincident with the table grid boundary line, has the width of half the value for the border-separation trait. It is filled in accordance with the background trait of the fo:table. Inside this border is placed, for each side of the cell, a border based on a border specified on the cell or inherited.

If the value of the border-collapse trait is "collapse-with-precedence" the border for each side of the cell is determined by, for each segment of a border, selecting, from all border specifications for that segment, the border that has the highest precedence. It is an error if there are two such borders that have the same precedence but are not identical. An implementation may recover by selecting one of the borders. Each border segment is placed centered on the table grid boundary line. On devices that do not support sub-pixel rendering, if an effective border width is determined to be an odd number of pixels it is implementation defined on which side of the grid boundary line the odd pixel is placed.

If the value of the border-collapse trait is "collapse", the border for each side of the cell is determined by, for each segment of a border, selecting, from all border specifications for that segment, the border that has the most "eye catching" border style, see below for the details. Each border segment is placed centered on the table grid boundary line. On devices that do not support sub-pixel rendering, if an effective border width is determined to be an odd number of pixels it is implementation defined on which side of the grid boundary line the odd pixel is placed. Where there is a conflict between the styles of border segments that collapse, the following rules determine which border style "wins":

  1. Borders with the 'border-style' of 'hidden' take precedence over all other conflicting borders. Any border with this value suppresses all borders at this location.

  2. Borders with a style of 'none' have the lowest priority. Only if the border properties of all the elements meeting at this edge are 'none' will the border be omitted (but note that 'none' is the default value for the border style.)

  3. If none of the styles is 'hidden' and at least one of them is not 'none', then narrow borders are discarded in favor of wider ones.

  4. If the remaining border styles have the same 'border-width' than styles are preferred in this order: 'double', 'solid', 'dashed', 'dotted', 'ridge', 'outset', 'groove', and the lowest: 'inset'.

  5. If border styles differ only in color, then a style set on a cell wins over one on a row, which wins over a row group, column, column group and, lastly, table.

Constraints:

A table-cell occupies one or more grid units in the row-progression-direction and column-progression-direction. The content-rectangle of the cell is the size of the portion of the grid the cell occupies minus, for each of the four sides:

  • If the value of the border-collapse trait is "separate": half the value of the border-separation trait; otherwise 0.

  • If the value of the border-collapse trait is "separate": the thickness of the cell-border; otherwise half the thickness of the effective border.

  • The cell padding.

The method for determining the block-progression-dimension of the cell in the grid is governed by the row-height trait.

No area may have more than one normal child area returned by the same fo:table-cell formatting object.

The children of each normal area returned by an fo:table-cell formatting object must be normal block-areas returned by the children of the fo:table-cell, must be properly stacked, and must be properly ordered.

Any reference-level-out-of-line areas returned by the children of the fo:table-cell are handled as described in 6.12.2 fo:float.

Contents:

In addition this formatting object may have a sequence of zero or more fo:markers as its initial children.

The following properties apply to this formatting object:

7.5 Common Accessibility Properties
7.7 Common Aural Properties
7.8 Common Border, Padding, and Background Properties
7.13 Common Relative Position Properties
7.28.1 border-after-precedence
7.28.2 border-before-precedence
7.28.4 border-end-precedence
7.28.6 border-start-precedence
7.15.3 block-progression-dimension
7.28.8 column-number
7.14.4 display-align
7.14.6 relative-align
7.28.10 empty-cells
7.28.11 ends-row
7.15.6 height
7.30.8 id
7.24.1 index-class
7.24.2 index-key
7.15.7 inline-progression-dimension
7.28.13 number-columns-spanned
7.28.14 number-rows-spanned
7.28.15 starts-row
7.15.14 width

6.8 Formatting Objects for Lists

6.8.1 Introduction

There are four formatting objects used to construct lists: fo:list-block, fo:list-item, fo:list-item-label, and fo:list-item-body.

Tree representation of the Formatting Objects for lists   [D]

Tree representation of the formatting Objects for Lists.

The fo:list-block has the role of containing the complete list and of specifying values used for the list geometry in the inline-progression-direction (see details below).

The children of the fo:list-block are one or more fo:list-item, each containing a pair of fo:list-item-label and fo:list-item-body.

The fo:list-item has the role of containing each item in a list.

The fo:list-item-label has the role of containing the content, block-level formatting objects, of the label for the list-item; typically an fo:block containing a number, a dingbat character, or a term.

The fo:list-item-body has the role of containing the content, block-level formatting objects, of the body of the list-item; typically one or more fo:block.

The placement, in the block-progression-direction, of the label with respect to the body is made in accordance with the "vertical-align" property of the fo:list-item.

Areas generated by a list   [D]

The specification of the list geometry in the inline-progression-direction is achieved by:

  • Specifying appropriate values of the "provisional-distance-between-starts" and "provisional-label-separation" properties. The "provisional-distance-between-starts" specifies the desired distance between the start-indents of the label and the body of the list-item. The "provisional-label-separation" specifies the desired separation between the end-indent of the label and the start-indent of the body of the list-item.

  • Specifying end-indent="label-end()" on the fo:list-item-label.

    Specifying start-indent="body-start()" on the fo:list-item-body.

    Note:

    These list specific functions are defined in 7.30.11 provisional-label-separation and 7.30.12 provisional-distance-between-starts.

The start-indent of the list-item-label and end-indent of the list-item-body, if desired, are typically specified as a length.

6.8.1.1 Examples
6.8.1.1.1 Enumerated List

The list-items are contained in an "ol" element. The items are contained in "item" elements and contain text (as opposed to paragraphs).

The style is to enumerate the items alphabetically with a dot after the letter.

Input sample:

<ol>
<item>List item 1.</item>
<item>List item 2.</item>
<item>List item 3.</item>
</ol>

XSL Stylesheet:

<?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="ol">
  <fo:list-block provisional-distance-between-starts="15mm"
   provisional-label-separation="5mm">
    <xsl:apply-templates/>
  </fo:list-block>
</xsl:template>

<xsl:template match="ol/item">
  <fo:list-item>
    <fo:list-item-label start-indent="5mm" end-indent="label-end()">
      <fo:block>
        <xsl:number format="a."/>
      </fo:block>
    </fo:list-item-label>
    <fo:list-item-body start-indent="body-start()">
      <fo:block>
        <xsl:apply-templates/>
      </fo:block>
    </fo:list-item-body>
  </fo:list-item>
</xsl:template>

</xsl:stylesheet>

Result Instance: elements and attributes in the fo: namespace

<fo:list-block provisional-distance-between-starts="15mm"
  provisional-label-separation="5mm">

  <fo:list-item>
    <fo:list-item-label start-indent="5mm" end-indent="label-end()">
      <fo:block>a.
      </fo:block>
    </fo:list-item-label>
    <fo:list-item-body start-indent="body-start()">
      <fo:block>List item 1.
      </fo:block>
    </fo:list-item-body>
  </fo:list-item>

  <fo:list-item>
    <fo:list-item-label start-indent="5mm" end-indent="label-end()">
      <fo:block>b.
      </fo:block>
    </fo:list-item-label>
    <fo:list-item-body start-indent="body-start()">
      <fo:block>List item 2.
      </fo:block>
    </fo:list-item-body>
  </fo:list-item>

  <fo:list-item>
    <fo:list-item-label start-indent="5mm" end-indent="label-end()">
      <fo:block>c.
      </fo:block>
    </fo:list-item-label>
    <fo:list-item-body start-indent="body-start()">
      <fo:block>List item 3.
      </fo:block>
    </fo:list-item-body>
  </fo:list-item>

</fo:list-block>
6.8.1.1.2 HTML-style "dl" lists

In this example the stylesheet processes HTML-style "dl" lists, which contain unwrapped pairs of "dt" and "dd" elements, transforming them into fo:list-blocks.

Balanced pairs of "dt"/"dd"s are converted into fo:list-items. For unbalanced "dt"/"dd"s, the stylesheet makes the following assumptions:

  • Multiple "dt"s are grouped together into a single fo:list-item-label in a single list-item.

  • Multiple DDs are:

    • Output as individual FO list-items with an empty list-item-label if the stylesheet variable $allow-naked-dd is true.

    • Are grouped together into a single FO list-item-body if $allow-naked-dd is false.

In other words, given a structure like this:

<doc>
<dl>
  <dt>term</dt>
  <dd>definition</dd>
  <dt>term</dt>
  <dt>term</dt>
  <dd>definition</dd>
  <dt>term</dt>
  <dd>definition</dd>
  <dd>definition</dd>
</dl>
</doc>

If $allow-naked-dd is true, the result instance: elements and attributes in the fo: namespace is:

<fo:list-block provisional-distance-between-starts="35mm"
  provisional-label-separation="5mm">
  <fo:list-item>
    <fo:list-item-label end-indent="label-end()">
      <fo:block>term
      </fo:block>
    </fo:list-item-label>
    <fo:list-item-body start-indent="body-start()">
      <fo:block>definition
      </fo:block>
    </fo:list-item-body>
  </fo:list-item>
  <fo:list-item>
    <fo:list-item-label end-indent="label-end()">
      <fo:block>term
      </fo:block>
      <fo:block>term
      </fo:block>
    </fo:list-item-label>
    <fo:list-item-body start-indent="body-start()">
      <fo:block>definition
      </fo:block>
    </fo:list-item-body>
  </fo:list-item>
  <fo:list-item>
    <fo:list-item-label end-indent="label-end()">
      <fo:block>term
      </fo:block>
    </fo:list-item-label>
    <fo:list-item-body start-indent="body-start()">
      <fo:block>definition
      </fo:block>
    </fo:list-item-body>
  </fo:list-item>
  <fo:list-item>
    <fo:list-item-label end-indent="label-end()">
    </fo:list-item-label>
    <fo:list-item-body start-indent="body-start()">
      <fo:block>definition
      </fo:block>
    </fo:list-item-body>
  </fo:list-item>
</fo:list-block>

If $allow-naked-dd is false, the result instance: elements and attributes in the fo: namespace is:

<fo:list-block provisional-distance-between-starts="35mm"
  provisional-label-separation="5mm">
  <fo:list-item>
    <fo:list-item-label end-indent="label-end()">
      <fo:block>term
      </fo:block>
    </fo:list-item-label>
    <fo:list-item-body start-indent="body-start()">
      <fo:block>definition
      </fo:block>
    </fo:list-item-body>
  </fo:list-item>
  <fo:list-item>
    <fo:list-item-label end-indent="label-end()">
      <fo:block>term
      </fo:block>
      <fo:block>term
      </fo:block>
    </fo:list-item-label>
    <fo:list-item-body start-indent="body-start()">
      <fo:block>definition
      </fo:block>
    </fo:list-item-body>
  </fo:list-item>
  <fo:list-item>
    <fo:list-item-label end-indent="label-end()">
      <fo:block>term
      </fo:block>
    </fo:list-item-label>
    <fo:list-item-body start-indent="body-start()">
      <fo:block>definition
      </fo:block>
      <fo:block>definition
      </fo:block>
    </fo:list-item-body>
  </fo:list-item>
</fo:list-block>

XSL Stylesheet:

<?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:include href="dtdd.xsl"/>

<xsl:template match="doc">
  <xsl:apply-templates/>
</xsl:template>

<xsl:template match="dl">
  <xsl:call-template name="process.dl"/>
</xsl:template>

<xsl:template match="dt|dd">
  <fo:block>
    <xsl:apply-templates/>
  </fo:block>
</xsl:template>

</xsl:stylesheet>

Included stylesheet "dtdd.xsl"

<?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:variable name="allow-naked-dd" select="true()"/>

<xsl:template name="process.dl">
  <fo:list-block provisional-distance-between-starts="35mm"
   provisional-label-separation="5mm">
    <xsl:choose>
      <xsl:when test="$allow-naked-dd">
        <xsl:call-template name="process.dl.content.with.naked.dd"/>
      </xsl:when>
      <xsl:otherwise>
        <xsl:call-template name="process.dl.content"/>
      </xsl:otherwise>
    </xsl:choose>
  </fo:list-block>
</xsl:template>

<xsl:template name="process.dl.content.with.naked.dd">
  <xsl:param name="dts" select="./force-list-to-be-empty"/>
  <xsl:param name="nodes" select="*"/>

  <xsl:choose>
    <xsl:when test="count($nodes)=0">
      <!-- Out of nodes, output any pending DTs -->
      <xsl:if test="count($dts)>0">
        <fo:list-item>
          <fo:list-item-label end-indent="label-end()">
            <xsl:apply-templates select="$dts"/>
          </fo:list-item-label>
          <fo:list-item-body start-indent="body-start()"/>
        </fo:list-item>
      </xsl:if>
    </xsl:when>

    <xsl:when test="name($nodes[1])='dd'">
      <!-- We found a DD, output the DTs and the DD -->
      <fo:list-item>
        <fo:list-item-label end-indent="label-end()">
          <xsl:apply-templates select="$dts"/>
        </fo:list-item-label>
        <fo:list-item-body start-indent="body-start()">
          <xsl:apply-templates select="$nodes[1]"/>
        </fo:list-item-body>
      </fo:list-item>
      <xsl:call-template name="process.dl.content.with.naked.dd">
        <xsl:with-param name="nodes" select="$nodes[position()>1]"/>
      </xsl:call-template>
    </xsl:when>

    <xsl:when test="name($nodes[1])='dt'">
      <!-- We found a DT, add it to the list of DTs and loop -->
      <xsl:call-template name="process.dl.content.with.naked.dd">
        <xsl:with-param name="dts" select="$dts|$nodes[1]"/>
        <xsl:with-param name="nodes" select="$nodes[position()>1]"/>
      </xsl:call-template>
    </xsl:when>

    <xsl:otherwise>
      <!-- This shouldn't happen -->
      <xsl:message>
        <xsl:text>DT/DD list contained something bogus (</xsl:text>
        <xsl:value-of select="name($nodes[1])"/>
        <xsl:text>).</xsl:text>
      </xsl:message>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>

<xsl:template name="process.dl.content">
  <xsl:param name="dts" select="./force-list-to-be-empty"/>
  <xsl:param name="dds" select="./force-list-to-be-empty"/>
  <xsl:param name="output-on"></xsl:param>
  <xsl:param name="nodes" select="*"/>

  <!-- The algorithm here is to build up a list of DTs and DDs, -->
  <!-- outputing them only on the transition from DD back to DT -->

  <xsl:choose>
    <xsl:when test="count($nodes)=0">
      <!-- Out of nodes, output any pending elements -->
      <xsl:if test="count($dts)>0 or count($dds)>0">
        <fo:list-item>
          <fo:list-item-label end-indent="label-end()">
            <xsl:apply-templates select="$dts"/>
          </fo:list-item-label>
          <fo:list-item-body start-indent="body-start()">
            <xsl:apply-templates select="$dds"/>
          </fo:list-item-body>
        </fo:list-item>
      </xsl:if>
    </xsl:when>

    <xsl:when test="name($nodes[1])=$output-on">
      <!-- We're making the transition from DD back to DT -->
      <fo:list-item>
        <fo:list-item-label end-indent="label-end()">
          <xsl:apply-templates select="$dts"/>
        </fo:list-item-label>
        <fo:list-item-body start-indent="body-start()">
          <xsl:apply-templates select="$dds"/>
        </fo:list-item-body>
      </fo:list-item>

      <!-- Reprocess this node (and the rest of the node list) -->
      <!-- resetting the output-on state to nil -->
      <xsl:call-template name="process.dl.content">
        <xsl:with-param name="nodes" select="$nodes"/>
      </xsl:call-template>
    </xsl:when>

    <xsl:when test="name($nodes[1])='dt'">
      <!-- We found a DT, add it to the list and loop -->
      <xsl:call-template name="process.dl.content">
        <xsl:with-param name="dts" select="$dts|$nodes[1]"/>
        <xsl:with-param name="dds" select="$dds"/>
        <xsl:with-param name="nodes" select="$nodes[position()>1]"/>
      </xsl:call-template>
    </xsl:when>

    <xsl:when test="name($nodes[1])='dd'">
      <!-- We found a DD, add it to the list and loop, noting that -->
      <!-- the next time we cross back to DT's, we need to output the -->
      <!-- current DT/DDs. -->
      <xsl:call-template name="process.dl.content">
        <xsl:with-param name="dts" select="$dts"/>
        <xsl:with-param name="dds" select="$dds|$nodes[1]"/>
        <xsl:with-param name="output-on">dt</xsl:with-param>
        <xsl:with-param name="nodes" select="$nodes[position()>1]"/>
      </xsl:call-template>
    </xsl:when>

    <xsl:otherwise>
      <!-- This shouldn't happen -->
      <xsl:message>
        <xsl:text>DT/DD list contained something bogus (</xsl:text>
        <xsl:value-of select="name($nodes[1])"/>
        <xsl:text>).</xsl:text>
      </xsl:message>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>

</xsl:stylesheet>

The "dtdd.xsl" stylesheet may be customized in the following ways:

  • Set the value of $allow-naked-dd to control the processing of unbalanced "dd"s.

  • Change "dt" to the name of the element which is a term in the list.

  • Change "dd" to the name of the element which is a definition in the list.

  • In the, perhaps unlikely, event that the documents may contain an element named "force-list-to-be-empty", that element name should be changed to a name that is not used in the documents.

In the stylesheet using the "dtdd.xsl" stylesheet change the "dl" to the name of the element which is the wrapper for the list.

6.8.2 fo:list-block

Common Usage:

The fo:list-block flow object is used to format a list.

Areas:

The fo:list-block formatting object generates one or more normal block-areas. The fo:list-block returns these areas, any page-level-out-of-line areas, and any reference-level-out-of-line areas returned by the children of the fo:list-block.

Constraints:

No area may have more than one normal child area returned by the same fo:list-block formatting object.

The children of each normal area returned by an fo:list-block formatting object must be normal block-areas returned by the children of the fo:list-block, must be properly stacked, and must be properly ordered.

Contents:

In addition this formatting object may have a sequence of zero or more fo:markers as its initial children.

The following properties apply to this formatting object:

7.5 Common Accessibility Properties
7.7 Common Aural Properties
7.8 Common Border, Padding, and Background Properties
7.11 Common Margin Properties-Block
7.13 Common Relative Position Properties
7.20.1 break-after
7.20.2 break-before
7.19.1 clear
7.30.8 id
7.24.1 index-class
7.24.2 index-key
7.19.3 intrusion-displace
7.20.3 keep-together
7.20.4 keep-with-next
7.20.5 keep-with-previous
7.30.12 provisional-distance-between-starts
7.30.11 provisional-label-separation

6.8.3 fo:list-item

Common Usage:

The fo:list-item formatting object contains the label and the body of an item in a list.

Areas:

The fo:list-item formatting object generates one or more normal block-areas. The fo:list-item returns these areas, any page-level-out-of-line areas, and any reference-level-out-of-line areas returned by the children of the fo:list-item.

Constraints:

No area may have more than one normal child area returned by the same fo:list-item formatting object.

The children of each normal area returned by an fo:list-item formatting object must be normal block-areas returned by the fo:list-item-label and the fo:list-item-body flow objects and must be properly ordered. Those returned by the fo:list-item-label must be properly stacked and those returned by the fo:list-item-body must be properly stacked.

The children of each normal area returned by an fo:list-item formatting object returned by the fo:list-item-label and fo:list-item-body objects are positioned in the block-progression-direction with respect to each other according to the relative-align trait.

In the inline-progression-direction these areas are positioned in the usual manner for properly stacked areas. It is an error if the content-rectangles of the areas overlap.

The block-progression-dimension of the content-rectangle of an area generated by the fo:list-item is just large enough so that the allocation-rectangles of all its child areas are contained in it. In particular, the space-before and space-after of the child areas have no effect on the spacing of the list item. For purposes of the block-stacking constraints the areas generated by fo:list-item are treated as if there they have a fence preceding and a fence following them.

Note:

These areas are not reference-areas, hence the indents on all objects within them are measured relative to the reference-area that holds the content of the fo:list-block.

Contents:

In addition this formatting object may have a sequence of zero or more fo:markers as its initial children.

The following properties apply to this formatting object:

7.5 Common Accessibility Properties
7.7 Common Aural Properties
7.8 Common Border, Padding, and Background Properties
7.11 Common Margin Properties-Block
7.13 Common Relative Position Properties
7.20.1 break-after
7.20.2 break-before
7.30.8 id
7.24.1 index-class
7.24.2 index-key
7.19.3 intrusion-displace
7.20.3 keep-together
7.20.4 keep-with-next
7.20.5 keep-with-previous
7.14.6 relative-align

6.8.4 fo:list-item-body

Common Usage:

The fo:list-item-body formatting object contains the content of the body of a list-item.

Areas:

The fo:list-item-body formatting object does not generate any areas. The fo:list-item-body formatting object returns the sequence of areas created by concatenating the sequences of areas returned by each of the children of the fo:list-item-body.

Constraints:

The order of concatenation of the sequences of areas returned by the children of the fo:list-item-body is the same order as the children are ordered under the fo:list-item-body.

Contents:

In addition this formatting object may have a sequence of zero or more fo:markers as its initial children.

The following properties apply to this formatting object:

7.5 Common Accessibility Properties
7.30.8 id
7.24.1 index-class
7.24.2 index-key
7.20.3 keep-together

6.8.5 fo:list-item-label

Common Usage:

The fo:list-item-label formatting object contains the content of the label of a list-item, typically used to either enumerate, identify, or adorn the list-item's body.

Areas:

The fo:list-item-label formatting object does not generate any areas. The fo:list-item-label formatting object returns the sequence of areas created by concatenating the sequences of areas returned by each of the children of the fo:list-item-label.

Constraints:

The order of concatenation of the sequences of areas returned by the children of the fo:list-item-label is the same order as the children are ordered under the fo:list-item-label.

Contents:

In addition this formatting object may have a sequence of zero or more fo:markers as its initial children.

The following properties apply to this formatting object:

7.5 Common Accessibility Properties
7.30.8 id
7.24.1 index-class
7.24.2 index-key
7.20.3 keep-together

6.9 Dynamic Effects: Link and Multi Formatting Objects

6.9.1 Introduction

Dynamic effects, whereby user actions (including User Agent state) can influence the behavior and/or representation of portions of a document, can be achieved through the use of the formatting objects included in this section:

  • One-directional single-target links.

  • The ability to switch between the display of two or more formatting object subtrees. This can be used for, e.g., expandable/collapsible table of contents, display of an icon or a full table or graphic.

  • The ability to switch between different property values, such as color or font-weight, depending on a User Agent state, such as "hover".

The switching between subtrees is achieved by using the following three formatting objects: fo:multi-switch, fo:multi-case, and fo:multi-toggle. The result tree structure is shown below.

Tree representation of the multi Formatting Objects   [D]

Tree Representation of the Multi Formatting Objects

The role of the fo:multi-switch is to wrap fo:multi-case formatting objects, each containing a subtree. Each subtree is given a name on the fo:multi-case formatting object. Activating, for example implemented as clicking on, an fo:multi-toggle causes a named subtree, the previous, the next, or "any" subtree to be displayed; controlled by the "switch-to" property. For "any", an implementation would typically present a list of choices each labeled using the "case-title" property of the fo:multi-case. The initial subtree displayed is controlled by the "starting-state" property on the fo:multi-case.

Switching between different property values is achieved by using the fo:multi-properties and fo:multi-property-set formatting objects, and the merge-property-values() function. For example, an fo:multi-property-set can be used to specify various properties for each of the possible values of the active-state property, and merge-property-values() can be used to apply them on a given formatting object.

6.9.1.1 Examples
6.9.1.1.1 Expandable/Collapsible Table of Contents

Input sample:

<doc>
  <chapter><title>Chapter</title>
    <p>Text</p>
    <section><title>Section</title>
    <p>Text</p>
    </section>
    <section><title>Section</title>
    <p>Text</p>
    </section>
  </chapter>
  <chapter><title>Chapter</title>
    <p>Text</p>
    <section><title>Section</title>
    <p>Text</p>
    </section>
    <section><title>Section</title>
    <p>Text</p>
    </section>
  </chapter>
</doc>

In this example the chapter and section titles are extracted into a table of contents placed at the front of the result. The chapter titles are preceded by an icon indicating either collapsed or expanded state. The section titles are only shown in the expanded state. Furthermore, there are links from the titles in the table of contents to the corresponding titles in the body of the document.

The two states are achieved by, for each chapter title, using an fo:multi-switch with a fo:multi-case for each state. The icon is contained in an fo:multi-toggle with the appropriate fo:multi-case "switch-to" property to select the other state.

The links in the table of contents are achieved by adding a unique id on the title text in the body of the document and wrapping the title text in the table of contents in an fo:basic-link referring to that id.

XSL Stylesheet:

<?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="doc">
  <!-- create the table of contents -->
  <xsl:apply-templates select="chapter/title" mode="toc"/>
  <!-- do the document -->
  <xsl:apply-templates/>
</xsl:template>

<xsl:template match="chapter/title" mode="toc">
  <fo:multi-switch>
    <fo:multi-case case-name="collapsed" case-title="collapsed"
    starting-state="show">
      <fo:block>
        <fo:multi-toggle switch-to="expanded">
          <fo:external-graphic href="plus-icon.gif"/>
        </fo:multi-toggle>
        <fo:basic-link internal-destination="{generate-id(.)}">
          <xsl:number level="multiple" count="chapter" format="1. "/>
          <xsl:apply-templates mode="toc"/>
        </fo:basic-link>
      </fo:block>
    </fo:multi-case>
    <fo:multi-case case-name="expanded" case-title="expanded"
    starting-state="hide">
      <fo:block>
        <fo:multi-toggle switch-to="collapsed">
          <fo:external-graphic href="minus-icon.gif"/>
        </fo:multi-toggle>
        <fo:basic-link internal-destination="{generate-id(.)}">
          <xsl:number level="multiple" count="chapter" format="1. "/>
          <xsl:apply-templates mode="toc"/>
        </fo:basic-link>
      </fo:block>
      <xsl:apply-templates select="../section/title" mode="toc"/>
    </fo:multi-case>
  </fo:multi-switch>
</xsl:template>

<xsl:template match="section/title" mode="toc">
  <fo:block start-indent="10mm">
    <fo:basic-link internal-destination="{generate-id(.)}">
      <xsl:number level="multiple" count="chapter|section" format="1.1 "/>
      <xsl:apply-templates/>
    </fo:basic-link>
  </fo:block>
</xsl:template>

<xsl:template match="chapter/title">
  <fo:block id="{generate-id(.)}">
    <xsl:number level="multiple" count="chapter" format="1. "/>
    <xsl:apply-templates/>
  </fo:block>
</xsl:template>

<xsl:template match="section/title">
  <fo:block id="{generate-id(.)}">
    <xsl:number level="multiple" count="chapter|section" format="1.1 "/>
    <xsl:apply-templates/>
  </fo:block>
</xsl:template>

<xsl:template match="p">
  <fo:block>
    <xsl:apply-templates/>
  </fo:block>
</xsl:template>

</xsl:stylesheet>

Result Instance: elements and attributes in the fo: namespace

<fo:multi-switch>
  <fo:multi-case case-name="collapsed" case-title="collapsed" starting-state="show">
    <fo:block>
      <fo:multi-toggle switch-to="expanded">
        <fo:external-graphic href="plus-icon.gif">
        </fo:external-graphic>
      </fo:multi-toggle>
      <fo:basic-link internal-destination="N4">1. Chapter
      </fo:basic-link>
    </fo:block>
  </fo:multi-case>
  <fo:multi-case case-name="expanded" case-title="expanded" starting-state="hide">
    <fo:block>
      <fo:multi-toggle switch-to="collapsed">
        <fo:external-graphic href="minus-icon.gif">
        </fo:external-graphic>
      </fo:multi-toggle>
      <fo:basic-link internal-destination="N4">1. Chapter
      </fo:basic-link>
    </fo:block>
    <fo:block start-indent="10mm">
      <fo:basic-link internal-destination="N11">1.1 Section
      </fo:basic-link>
    </fo:block>
    <fo:block start-indent="10mm">
      <fo:basic-link internal-destination="N19">1.2 Section
      </fo:basic-link>
    </fo:block>
  </fo:multi-case>
</fo:multi-switch>
<fo:multi-switch>
  <fo:multi-case case-name="collapsed" case-title="collapsed" starting-state="show">
    <fo:block>
      <fo:multi-toggle switch-to="expanded">
        <fo:external-graphic href="plus-icon.gif">
        </fo:external-graphic>
      </fo:multi-toggle>
      <fo:basic-link internal-destination="N28">2. Chapter
      </fo:basic-link>
    </fo:block>
  </fo:multi-case>
  <fo:multi-case case-name="expanded" case-title="expanded" starting-state="hide">
    <fo:block>
      <fo:multi-toggle switch-to="collapsed">
        <fo:external-graphic href="minus-icon.gif">
        </fo:external-graphic>
      </fo:multi-toggle>
      <fo:basic-link internal-destination="N28">2. Chapter
      </fo:basic-link>
    </fo:block>
    <fo:block start-indent="10mm">
      <fo:basic-link internal-destination="N35">2.1 Section
      </fo:basic-link>
    </fo:block>
    <fo:block start-indent="10mm">
      <fo:basic-link internal-destination="N43">2.2 Section
      </fo:basic-link>
    </fo:block>
  </fo:multi-case>
</fo:multi-switch>

<fo:block id="N4">1. Chapter
</fo:block>
<fo:block>Text
</fo:block>
<fo:block id="N11">1.1 Section
</fo:block>
<fo:block>Text
</fo:block>
<fo:block id="N19">1.2 Section
</fo:block>
<fo:block>Text
</fo:block>
<fo:block id="N28">2. Chapter
</fo:block>
<fo:block>Text
</fo:block>
<fo:block id="N35">2.1 Section
</fo:block>
<fo:block>Text
</fo:block>
<fo:block id="N43">2.2 Section
</fo:block>
<fo:block>Text
</fo:block>
6.9.1.1.2 Styling an XLink Based on the Active State

Input sample:

<p>Follow this <xlink:mylink xmlns:xlink="http://www.w3.org/1999/xlink"
        xlink:href="http://www.w3.org/TR"
        xlink:title="An Example"
        xlink:show="new"
        xlink:actuate="onRequest">link</xlink:mylink> to access all
TRs of the W3C.</p>

In this example an fo:basic-link contains a series of fo:multi-property-sets that specify various colors or text-decorations depending on the active state, and a wrapper around the fo:basic-link that allows for the merging of the properties of the fo:multi-properties with those of the appropriate fo:multi-property-sets.

XSL Stylesheet:

<?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="p">
    <fo:block>
        <xsl:apply-templates/>
    </fo:block>
</xsl:template>

<xsl:template match="xlink:mylink" xmlns:xlink="http://www.w3.org/1999/xlink">
    <xsl:variable name="show"><xsl:value-of select="@xlink:show"/>
    </xsl:variable>
     <fo:multi-properties text-decoration="underline">
        <fo:multi-property-set active-state="link" color="blue"/>
        <fo:multi-property-set active-state="visited" color="red"/>
        <fo:multi-property-set active-state="active" color="green"/>
        <fo:multi-property-set active-state="hover" text-decoration="blink"/>
        <fo:multi-property-set active-state="focus" color="yellow"/>
        <fo:wrapper color="merge-property-values()"
                    text-decoration="merge-property-values()">
              <fo:basic-link external-destination="http://www.w3.org/TR"
                              show-destination="{$show}">
                  <xsl:attribute name="role">
                      <xsl:value-of select="@xlink:title"/>
                  </xsl:attribute>
                  <xsl:apply-templates/>
              </fo:basic-link>
        </fo:wrapper>
      </fo:multi-properties>
</xsl:template>

</xsl:stylesheet>

Result Instance: elements and attributes in the fo: namespace

<fo:block>Follow this
  <fo:multi-properties text-decoration="underline">
    <fo:multi-property-set active-state="link" color="blue">
    </fo:multi-property-set>
    <fo:multi-property-set active-state="visited" color="red">
    </fo:multi-property-set>
    <fo:multi-property-set active-state="active" color="green">
    </fo:multi-property-set>
    <fo:multi-property-set active-state="hover" text-decoration="blink">
    </fo:multi-property-set>
    <fo:multi-property-set active-state="focus" color="yellow">
    </fo:multi-property-set>
    <fo:wrapper color="merge-property-values()"
      text-decoration="merge-property-values()">
      <fo:basic-link external-destination="http://www.w3.org/TR"
        show-destination="new" role="An Example">link
      </fo:basic-link>
    </fo:wrapper>
  </fo:multi-properties> to access all
TRs of the W3C.
</fo:block>

6.9.2 fo:basic-link

Common Usage:

The fo:basic-link is used for representing the start resource of a simple one-directional single-target link. The object allows for traversal to the destination resource, typically by clicking on any of the containing areas.

Areas:

The fo:basic-link formatting object generates one or more normal inline-areas. The fo:basic-link returns these areas, together with any normal block-areas, page-level-out-of-line areas, and reference-level-out-of-line areas returned by the children of the fo:basic-link.

Note:

An fo:basic-link can be enclosed in an fo:block to create a display area.

Constraints:

One of the external-destination and internal-destination properties should be specified. If both are specified, the system may either report it as an error, or use the internal-destination property.

No area may have more than one normal child area returned by the same fo:basic-link formatting object.

The children of each normal area returned by an fo:basic-link must satisfy the constraints specified in 4.7.3 Inline-building.

Contents:

(#PCDATA|%inline;|%block;)*

In addition this formatting object may have a sequence of zero or more fo:markers as its initial children.

The following properties apply to this formatting object:

7.5 Common Accessibility Properties
7.7 Common Aural Properties
7.8 Common Border, Padding, and Background Properties
7.12 Common Margin Properties-Inline
7.13 Common Relative Position Properties
7.14.1 alignment-adjust
7.14.2 alignment-baseline
7.14.3 baseline-shift
7.23.5 destination-placement-offset
7.14.5 dominant-baseline
7.23.6 external-destination
7.30.8 id
7.24.1 index-class
7.24.2 index-key
7.23.7 indicate-destination
7.23.8 internal-destination
7.20.3 keep-together
7.20.4 keep-with-next
7.20.5 keep-with-previous
7.16.4 line-height
7.23.9 show-destination
7.23.13 target-processing-context
7.23.12 target-presentation-context
7.23.14 target-stylesheet

6.9.3 fo:multi-switch

Common Usage:

The fo:multi-switch wraps the specification of alternative sub-trees of formatting objects (each sub-tree being within an fo:multi-case), and controls the switching (activated via fo:multi-toggle) from one alternative to another.

The direct children of an fo:multi-switch object are fo:multi-case objects. Only a single fo:multi-case may be visible at a single time. The user may switch between the available multi-cases.

Each fo:multi-case may contain one or more fo:multi-toggle objects, which controls the fo:multi-case switching of the fo:multi-switch.

Note:

An fo:multi-switch can be used for many interactive tasks, such as table-of-content views, embedding link targets, or generalized (even multi-layered hierarchical), next/previous views. The latter are today normally handled in HTML by next/previous links to other documents, forcing the whole document to be replaced whenever the users decides to move on.

Areas:

The fo:multi-switch formatting object does not generate any areas. The fo:multi-switch formatting object returns the sequence of areas returned by the currently visible fo:multi-case. If there is no currently visible fo:multi-case no areas are returned.

Trait Derivation:

The currently-visible-multi-case trait has as its initial value a reference to the first fo:multi-case child that has a value of "show" of the starting-state trait. If there is no such child, it has a value indicating that there is no currently visible fo:multi-case. When an fo:multi-toggle is actuated, its closest ancestral fo:multi-switch's currently-visible-multi-case trait value changes to refer to the fo:multi-case selected by the "switch-to" property value of the fo:multi-toggle. Once the currently-visible-multi-case trait gets a value indicating that there is no currently visible fo:multi-case, it becomes impossible to actuate an fo:multi-toggle in this fo:multi-switch.

Constraints:

The order of the sequence of areas returned by the fo:multi-switch is the same as the order of the areas returned by the currently visible fo:multi-case.

Note:

Any number of the fo:multi-case objects may assign "starting-state" to "show".

If no fo:multi-case has "starting-state" property value of "show", the contents of no fo:multi-case should be displayed.

Note:

If no multi-case is displayed, the entire fo:multi-switch will effectively be hidden.

Contents:

The following properties apply to this formatting object:

7.5 Common Accessibility Properties
7.23.2 auto-restore
7.30.8 id
7.24.1 index-class
7.24.2 index-key

6.9.4 fo:multi-case

Common Usage:

The fo:multi-case is used to contain (within an fo:multi-switch) each alternative sub-tree of formatting objects among which the parent fo:multi-switch will choose one to show and will hide the rest.

Areas:

The fo:multi-case formatting object does not generate any areas. The fo:multi-case formatting object returns the sequence of areas created by concatenating the sequences of areas returned by each of the children of the fo:multi-case.

Constraints:

The order of concatenation of the sequences of areas returned by the children of the fo:multi-case is the same order as the children are ordered under the fo:multi-case.

Contents:

(#PCDATA|%inline;|%block;)*

An fo:multi-case is only permitted to have children that would be permitted to be children of the parent of the fo:multi-switch that is the parent of the fo:multi-case, except that an fo:multi-case may not contain fo:marker children. In particular, it can contain fo:multi-toggle objects (at any depth), which controls the fo:multi-case switching.

This restriction applies recursively.

Note:

For example, an fo:multi-case whose parent fo:multi-switch is a child of another fo:multi-case may only have children that would be permitted in place of the outer fo:multi-case's parent fo:multi-switch.

The following properties apply to this formatting object:

7.5 Common Accessibility Properties
7.30.8 id
7.24.1 index-class
7.24.2 index-key
7.23.10 starting-state
7.23.3 case-name
7.23.4 case-title

6.9.5 fo:multi-toggle

Common Usage:

The fo:multi-toggle is typically used to establish an area that when actuated (for example implemented as "clicked"), has the effect of switching from one fo:multi-case to another. The "switch-to" property value of the fo:multi-toggle typically matches the "case-name" property value of the fo:multi-case to switch to.

Areas:

The fo:multi-toggle formatting object does not generate any areas. The fo:multi-toggle formatting object returns the sequence of areas created by concatenating the sequences of areas returned by each of the children of the fo:multi-toggle. Each of the areas returned by the fo:multi-toggle has a switch-to trait with the same value as on the returning fo:multi-toggle.

Constraints:

The order of concatenation of the sequences of areas returned by the children of the fo:multi-toggle is the same order as the children are ordered under the fo:multi-toggle.

Activating an area returned by an fo:multi-toggle causes a change to the value of the currently-visible-multi-case of the closest ancestor fo:multi-switch. (See 7.23.11 switch-to for how the switch-to value selects an fo:multi-case.)

Contents:

(#PCDATA|%inline;|%block;)*

An fo:multi-toggle is only permitted as a descendant of an fo:multi-case.

The following properties apply to this formatting object:

7.5 Common Accessibility Properties
7.30.8 id
7.24.1 index-class
7.24.2 index-key
7.23.11 switch-to

6.9.6 fo:multi-properties

Common Usage:

The fo:multi-properties is used to switch between two or more property sets that are associated with a given portion of content.

Note:

An fo:multi-properties formatting object can be used to give different appearances to a given portion of content. For example, when a link changes from the not-yet-visited state to the visited-state, this could change the set of properties that would be used to format the content. Designers should be careful in choosing which properties they change, because many property changes could cause reflowing of the text which may not be desired in many circumstances. Changing properties such as "color" or "text-decoration" should not require re-flowing the text.

The direct children of an fo:multi-properties formatting object is an ordered set of fo:multi-property-set formatting objects followed by a single fo:wrapper formatting object. The properties, specified on the fo:wrapper, that have been specified with a value of "merge-property-values()" will take a value that is a merger of the value on the fo:multi-properties and the specified values on the fo:multi-property-set formatting objects that apply.

Areas:

The fo:multi-properties formatting object does not generate any areas. The fo:multi-properties formatting object returns the sequence of areas created by concatenating the sequences of areas returned by each of the children of the fo:multi-properties.

Constraints:

The order of concatenation of the sequences of areas returned by the children of the fo:multi-properties is the same order as the children are ordered under the fo:multi-properties.

Contents:

The properties that should take a merged value shall be specified with a value of "merge-property-values()". This function, when applied on an fo:wrapper that is a direct child of an fo:multi-properties, merges the applicable property definitions on the fo:multi-property-set siblings.

The following properties apply to this formatting object:

7.5 Common Accessibility Properties

6.9.7 fo:multi-property-set

Common Usage:

The fo:multi-property-set auxiliary formatting object is used to specify an alternative set of formatting properties that can be used to provide an alternate presentation of the children flow objects of the fo:wrapper child of the parent of this fo:multi-property-set.

Areas:

The fo:multi-property-set formatting object does not generate or return any areas. It simply holds a set of traits that may be accessed by expressions.

Constraints:

None.

Contents:

EMPTY

The following properties apply to this formatting object:

7.30.8 id
7.24.1 index-class
7.24.2 index-key
7.23.1 active-state

6.10 Formatting Objects for Indexing

6.10.1 Introduction

The formatting objects and properties for indexing enable the generation of lists of page numbers associated with specific items in the formatting object tree, such as for use in back-of-the-book indexes. There are two kinds of such objects and properties: those that associate index keys with formatting objects throughout the tree and formatting objects that are used in the back-of-the-book index to assemble page references to the pages where the areas from formatting objects with a particular index key occur. Further formatting properties and objects control the way in which these page references are grouped and arranged into ranges.

There are two properties for associating index keys with formatting objects: "index-key" and "index-class". These two properties apply to almost all formatting objects. There are two formatting objects for associating explicit index key ranges, fo:index-range-begin and fo:index-range-end.

Cited page items associated with a particular index key are obtained using the fo:index-key-reference. Its parent, fo:index-page-citation-list, groups and arranges these. In addition, the form of the generated page number list can be defined and controlled using the formatting objects fo:index-page-number-prefix, fo:index-page-number-suffix, fo:index-page-citation-list-separator, and fo:index-page-citation-range-separator. For a back-of-the-book index each index term would have an index key that is used to identify each occurrence of that term within the document. In the back-of-the-book index there would be at least one fo:index-key-reference for each index key used. For example,

<fo:block>Eiffel Tower
  <fo:index-page-citation-list>
    <fo:index-key-reference ref-index-key="Eiffel Tower;;"/>
  </fo:index-page-citation-list>
</fo:block>

The structure and content of the generated list of page numbers can be further controlled through the use of index classes to distinguish different types of index entries or to distinguish entries present in different parts of the document. For example, different classes could be used to distinguish index entries for figures from normal entries or to distinguish entries within one section, e.g. the preface, of a document from entries from another section, e.g. the main body, in order to control the construction of page ranges. The fo:index-page-number-prefix and fo:index-page-number-suffix specify additional text, e.g. "[" and "]", to surround the page numbers in the index.

Note:

The formatting objects for indexing only provide facilities for generating the list of page numbers for individual index keys. Assembling the index entries; identifying all the entries, sorting them, and creating the formatting objects, e.g. fo:block, and text, e.g. "Eiffel Tower", for the entry and referencing the appropriate index key, e.g. "Eiffel Tower;;", is done by the general stylesheet mechanisms.

6.10.1.1 Example

The following example document is used throughout this section to describe the indexing process and how the various options change the presentation of the index.

The source document uses typical XML markup for representing back-of-the-book index entries. The document consists of a preface, four chapters, a glossary, and an index. The formatting style for this document specifies that the preface, body chapters, and glossary all use different page numbers as shown below.

ComponentNumbered pagesOrdinal page numbers
Title Page Recto/Verson/a1-2
Table of Contentsiii/iv3/4
List of Figuresv/vi5/6
Prefacevii/x7-10
Chapter 11-3/411-13/14
Chapter 25-12 (pg 4 is blank)15-22
Chapter 313-17/1823-27/28
Chapter 419-24 (pg 18 is blank)29-34
GlossaryG-1 to G-435-38
IndexI-1 to ...39-...

The composite page numbers (e.g., "G-1") used in the glossary are created using an fo:folio-prefix, e.g.

<fo:page-sequence id="glossary" initial-page-number="1">
  <fo:page-number-folio-prefix>
    <fo:inline>G-</fo:inline>
  </fo:page-number-folio-prefix>
  <fo:flow>...</fo:flow>
</fo:page-sequence>

Throughout the document, there are a number of index terms for the Eiffel Tower. This example uses explicit markup in the source document's vocabulary. Other mechanisms, such as external index documents, can also be supported as long as the correct formatting objects can be generated. In this example index terms may be primary, secondary, or tertiary, reflecting a typical multi-level index. Primary entries may have subordinate secondary entries. Secondary entries may have subordinate tertiary entries. For this document only the lowest-level entries are associated with page numbers (which means that each "indexterm" element can be simply translated into an index key value by concatenating the primary, secondary, and tertiary term values with some separator, ";" in this example, between them).

  • Each individual reference to the tower is identified:

    <indexterm><primary>Eiffel Tower</primary></indexterm>
    
  • Some of these terms identify a preferred description of the tower:

    <indexterm significance="preferred">
    <primary>Eiffel Tower</primary></indexterm>
    
  • For a long description of the tower, individual terms mark the beginning and end of the span:

    <indexterm id="ei.idx" class="startofrange">
    <primary>Eiffel Tower</primary></indexterm>
    ...
    <indexterm startref="ei.idx" class="endofrange"/>
    
  • Two of the terms occur inside figures:

    <figure id="tower1">
    <head>The Eiffel Tower</head>
    <indexterm><primary>Eiffel Tower</primary></indexterm>
    ...
    </figure>
    
6.10.1.1.1 Associating Index Keys with Formatting Objects

The first step in generating an index is to transfer the index term information from the source document into the formatting objects. It is the location of this information in the formatting object tree that will determine what pages appear in the index.

Any formatting object to which the "id" property applies can also have an "index-key" property. Any formatting object with an "index-key" specified defines a point or range of text that is associated with the corresponding index key.

To simplify this example, point anchors will be generated for each term (as opposed to placing "index-key" on formatting objects used for other purposes).

Consider the following templates:

<xsl:template match="indexterm[@significance='preferred']"
     priority="100">
  <fo:wrapper>
    <xsl:attribute name="index-key">
      <xsl:value-of select="primary"/>
      <xsl:text>;</xsl:text>
      <xsl:value-of select="secondary"/>
      <xsl:text>;</xsl:text>
      <xsl:value-of select="tertiary"/>
      <xsl:text>;preferred</xsl:text>
    </xsl:attribute>
  </fo:wrapper>
</xsl:template>

<xsl:template match="indexterm[@class='startofrange']"
     priority="75">
  <fo:index-range-begin id="{@id}"/>
    <xsl:attribute name="index-key">
      <xsl:value-of select="primary"/>
      <xsl:text>;</xsl:text>
      <xsl:value-of select="secondary"/>
      <xsl:text>;</xsl:text>
      <xsl:value-of select="tertiary"/>
    </xsl:attribute>
</xsl:template>

<xsl:template match="indexterm[@class='endofrange']"
     priority="75">
  <fo:index-range-end ref-id="{@startref}">
  </fo:index-range-end>
</xsl:template>

<xsl:template match="figure/indexterm" priority="50">
  <fo:wrapper>
    <xsl:attribute name="index-key">
      <xsl:value-of select="primary"/>
      <xsl:text>;</xsl:text>
      <xsl:value-of select="secondary"/>
      <xsl:text>;</xsl:text>
      <xsl:value-of select="tertiary"/>
      <xsl:text>;figure</xsl:text>
    </xsl:attribute>
  </fo:wrapper>
</xsl:template>

<xsl:template match="indexterm">
  <fo:wrapper>
    <xsl:attribute name="index-key">
      <xsl:value-of select="primary"/>
      <xsl:text>;</xsl:text>
      <xsl:value-of select="secondary"/>
      <xsl:text>;</xsl:text>
      <xsl:value-of select="tertiary"/>
    </xsl:attribute>
  </fo:wrapper>
</xsl:template>

Applied to the example index terms, these templates will produce a set of index key associations, e.g. (interspersed among the other formatting objects):

[E  9] <fo:wrapper index-key="Eiffel Tower;;"/>
[F 10] <fo:wrapper index-key="Eiffel Tower;;"/>
[G 11] <fo:wrapper index-key="Eiffel Tower;;"/>
[H 13] <fo:index-range-begin id="ei.idx" index-key="Eiffel Tower;;"/>
[Y 15] <fo:wrapper index-key="Eiffel Tower;;"/>
[C 15] <fo:wrapper index-key="Eiffel Tower;;;figure"/>
[K 16] <fo:index-range-end ref-id="ei.idx"/>
[L 18] <fo:index-range-begin id="ei2.idx" index-key="Eiffel Tower;;"/>
[A 19] <fo:wrapper index-key="Eiffel Tower;;;preferred"/>
[O 21] <fo:index-range-end ref-id="ei2.idx"/>
[B 23] <fo:wrapper index-key="Eiffel Tower;;;preferred"/>
[D 25] <fo:wrapper index-key="Eiffel Tower;;;figure"/>
[P 27] <fo:wrapper index-key="Eiffel Tower;;"/>
[Q 29] <fo:wrapper index-key="Eiffel Tower;;"/>
[R 30] <fo:wrapper index-key="Eiffel Tower;;"/>
[S 31] <fo:wrapper index-key="Eiffel Tower;;"/>
[T 32] <fo:wrapper index-key="Eiffel Tower;;"/>
[U 33] <fo:wrapper index-key="Eiffel Tower;;"/>
[V 34] <fo:wrapper index-key="Eiffel Tower;;"/>
[X 37] <fo:wrapper index-key="Eiffel Tower;;"/>

In the list above a label has been added for each formatting object consisting of a letter and the ordinal page number (see below). These are carried through below to make referencing and reading the example easier.

These formatting objects are spread throughout the document, appearing in the formatting object tree where each index page reference is desired. Naturally, in a real document, there would be many more of these formatting objects, one or more for each term that will appear in the index.

6.10.1.1.2 Building the Index

Assembling a properly collated and sorted index is accomplished using the general stylesheet mechanisms. These details are not considered here.

Note:

Index cross references ("see" and "see also" entries) are not associated with page numbers, so they do not use the indexing formatting objects.

This section describes the formatting objects used for collating and sorting the lists of page number citations associated with each entry in the index. The formatting objects referenced by index keys are used to generate sets of cited page items referencing sets of pages from the paginated area tree. These cited page items are then collated, sorted, and possibly collapsed into cited page item ranges, and then the final formatting processing is applied. That is, the index processing starts as references to formatting objects by index key, moves to the domain of real pages on which those formatting objects fall, and then, once the lists of pages have been reduced to sets and ranges, results in formatted lists of page numbers and ranges.

The fo:index-page-citation-list formatting object is used to group index key references together. Its ultimate effect is to produce a formatted list of page numbers and ranges. The starting set of cited page items is created using "fo:index-key-reference" formatting objects. Each fo:index-key-reference formatting object uses a single index key to generate cited page items for the pages on which the formatting objects with that key occur. The fo:index-key-reference also provides the formatting properties for these page numbers. All of the cited page items generated from a single fo:index-page-citation-list formatting object are sorted and collated together.

For this example, the formatting style is to distinguish pages that have the principal description of an item by using bold page numbers and to enclose in square brackets the page numbers where the index key occured in a figure. The following formatting objects accomplish this:

<fo:index-page-citation-list
   merge-sequential-page-numbers="merge"/>
  <fo:index-key-reference ref-index-key="Eiffel Tower;;;preferred"
         font-weight="bold"
         id="XB"/>
  <fo:index-key-reference ref-index-key="Eiffel Tower;;;figure"
         font-style="italic"
         id="XI">
    <fo:index-page-number-prefix>
      <fo:inline>[</fo:inline>
    </fo:index-page-number-prefix>
    <fo:index-page-number-suffix>
      <fo:inline>]</fo:inline>
    </fo:index-page-number-suffix>
  </fo:index-key-reference>
  <fo:index-key-reference ref-index-key="Eiffel Tower;;"
                 id="XX"/>
</fo:index-page-citation-list>

In this index page citation list, three different groups of page citations, represented by references to three different, but related, keys, are merged into a single result list of page citations.

Note:

The "id" values on the fo:index-key-reference formatting objects are for reference purposes in the text below. They are not necessary for index processing.

6.10.1.2 Processing the Example Index

This section describes how the index items in the example are processed to produce the final lists of formatted page numbers and page ranges.

For the purpose of the example, assume that the following index classes are used; the preface specifies index-class="preface", all the chapters specify index-class="chapter", and the glossary specifies index-class="glossary".

Each fo:index-key-reference references one or more pages or page ranges (that is, the page-viewport-areas in the area tree that has as descendants areas generated by the referenced formatting objects). Each page-viewport-area in the full area tree has an ordinal number which is called the ordinal page number.

In this example the following sets of pages are referenced by the three fo:index-key-reference objects:

KeyOrdinal page numbers
Eiffel Tower;;;preferred19, 23
Eiffel Tower;;;figure15, 25
Eiffel Tower;;9, 10, 11, 13-16, 15, 18-21, 27, 29, 30, 31, 32, 33, 34, 37

Note:

Formatting differences, e.g. ordinal page number 9 formats as "ix" and ordinal page number 37 formats as "G-3", will be considered later.

Within each fo:index-key-reference, page ranges are expanded to a sequence of individual pages and duplicate pages are removed as described in 6.10.6 fo:index-key-reference resulting in:

KeyOrdinal page numbers
Eiffel Tower;;;preferred19, 23
Eiffel Tower;;;figure15, 25
Eiffel Tower;;9, 10, 11, 13, 14, 15, 16, 18, 19, 20, 21, 27, 29, 30, 31, 32, 33, 34, 37

For the purpose of processing by the fo:index-page-citation-list each cited page item can be considered a tuple of four members: the ordinal page number, the formatting object that is referenced by the index-key-reference, the index class of the referenced formatting object, and the fo:index-key-reference that referenced the page (here represented by the ID values assigned in the example above).

[A] (19, fo:wrapper,           chapter,  XB)
[B] (23, fo:wrapper,           chapter,  XB)
[C] (15, fo:wrapper,           chapter,  XI)
[D] (25, fo:wrapper,           chapter,  XI)
[E] ( 9, fo:wrapper,           preface,  XX)
[F] (10, fo:wrapper,           preface,  XX)
[G] (11, fo:wrapper,           chapter,  XX)
[H] (13, fo:index-range-begin, chapter,  XX)
[I] (14, null,                 chapter,  XX)
[J] (15, null,                 chapter,  XX)
[K] (16, fo:index-range-end,   chapter,  XX)
[L] (18, fo:index-range-begin, chapter,  XX)
[M] (19, null,                 chapter,  XX)
[N] (20, null,                 chapter,  XX)
[O] (21, fo:index-range-end,   chapter,  XX)
[P] (27, fo:wrapper,           chapter,  XX)
[Q] (29, fo:wrapper,           chapter,  XX)
[R] (30, fo:wrapper,           chapter,  XX)
[S] (31, fo:wrapper,           chapter,  XX)
[T] (32, fo:wrapper,           chapter,  XX)
[U] (33, fo:wrapper,           chapter,  XX)
[V] (34, fo:wrapper,           chapter,  XX)
[X] (37, fo:wrapper,           glossary, XX)

Note:

In the case of ranges, the first page in the range is associated with the start of the range and the last page is associated with the end of the range. Intermediate pages don't refer to any particular location on the page, they just refer to that page as a whole.

The next section describes the abstract steps in processing an fo:index-page-citation-list when the merge-pages-across-index-key-references property has the value "leave-separate". 6.10.1.2.2 merge-pages-across-index-key-references="merge" describes the same steps when merge-pages-across-index-key-references has the value "merge".

6.10.1.2.1 merge-pages-across-index-key-references="leave-separate"

Step A in the processing of fo:index-page-citation-list (see 6.10.7 fo:index-page-citation-list) is collating and sorting the cited page items from all the child fo:index-key-reference formatting objects. The merge-pages-across-index-key-references controls whether multiple references to the same page are retained.

The following set of tuples represents the case when merge-pages-across-index-key-references has the value "leave-separate". For example, ordinal page number 19 is represented twice, once for each fo:index-key-reference that referenced it:

[E] ( 9, fo:wrapper,           preface,  XX)
[F] (10, fo:wrapper,           preface,  XX)
[G] (11, fo:wrapper,           chapter,  XX)
[H] (13, fo:index-range-begin, chapter,  XX)
[I] (14, null,                 chapter,  XX)
[J] (15, null,                 chapter,  XX)
[C] (15, fo:wrapper,           chapter,  XI)
[K] (16, fo:index-range-end,   chapter,  XX)
[L] (18, fo:index-range-begin, chapter,  XX)
[A] (19, fo:wrapper,           chapter,  XB)
[M] (19, null,                 chapter,  XX)
[N] (20, null,                 chapter,  XX)
[O] (21, fo:index-range-end,   chapter,  XX)
[B] (23, fo:wrapper,           chapter,  XB)
[D] (25, fo:wrapper,           chapter,  XI)
[P] (27, fo:wrapper,           chapter,  XX)
[Q] (29, fo:wrapper,           chapter,  XX)
[R] (30, fo:wrapper,           chapter,  XX)
[S] (31, fo:wrapper,           chapter,  XX)
[T] (32, fo:wrapper,           chapter,  XX)
[U] (33, fo:wrapper,           chapter,  XX)
[V] (34, fo:wrapper,           chapter,  XX)
[X] (37, fo:wrapper,           glossary, XX)

Step B is performed if merge-sequential-page-numbers has the value "merge". It consists of merging cited page items referring to three or more sequential pages (see 6.10.7 fo:index-page-citation-list) into a range.

If merge-ranges-across-index-key-references has the value "leave-separate", the ranges will be as shown below (ranges are represented by a pair of tuples, the first for the start of the range, the second for the end of the range):

[E] ( 9,   fo:wrapper,            preface,  XX)
[F] (10,   fo:wrapper,            preface,  XX)
[G] (11,   fo:wrapper,            chapter,  XX)
([H] (13,  fo:index-range-begin,  chapter,  XX),
  [K] (16, fo:index-range-end,    chapter,  XX))
[C] (15,   fo:wrapper,            chapter,  XI)
([L] (18,  fo:index-range-begin,  chapter,  XX),
  [O] (21, fo:index-range-end,    chapter,  XX))
[A] (19,   fo:wrapper,            chapter,  XB)
[B] (23,   fo:wrapper,            chapter,  XB)
[D] (25,   fo:wrapper,            chapter,  XI)
[P] (27,   fo:wrapper,            chapter,  XX)
([Q] (29,  fo:wrapper,            chapter,  XX),
  [V] (34, fo:wrapper,            chapter,  XX))
[X] (37,   fo:wrapper,            glossary, XX)

If merge-ranges-across-index-key-references has the value "merge", the ranges will be:

[E] ( 9,   fo:wrapper,            preface,  XX)
[F] (10,   fo:wrapper,            preface,  XX)
[G] (11,   fo:wrapper,            chapter,  XX)
([H] (13,  fo:index-range-begin,  chapter,  XX),
  [K] (16, fo:index-range-end,    chapter,  XX))
([L] (18,  fo:index-range-begin,  chapter,  XX),
  [O] (21, fo:index-range-end,    chapter,  XX))
[B] (23,   fo:wrapper,            chapter,  XB)
[D] (25,   fo:wrapper,            chapter,  XI)
[P] (27,   fo:wrapper,            chapter,  XX)
([Q] (29,  fo:wrapper,            chapter,  XX),
  [V] (34, fo:wrapper,            chapter,  XX))
[X] (37,   fo:wrapper,            glossary, XX)

Step C consists of formatting the cited page items and cited page item ranges as actual page numbers and ranges, taking into account any index page number prefix and suffix and using the appropriate index page citation list separator and index page citation range separator.

6.10.1.2.2 merge-pages-across-index-key-references="merge"

The following shows steps A and B when merge-pages-across-index-key-references has the value "merge".

In step A tuple [C] is merged with tuple [J] and tuple [M] is merged with tuple [A]:

[E] ( 9, fo:wrapper,           preface,  XX)
[F] (10, fo:wrapper,           preface,  XX)
[G] (11, fo:wrapper,           chapter,  XX)
[H] (13, fo:index-range-begin, chapter,  XX)
[I] (14, null,                 chapter,  XX)
[C] (15, fo:wrapper,           chapter,  XI)
[K] (16, fo:index-range-end,   chapter,  XX)
[L] (18, fo:index-range-begin, chapter,  XX)
[A] (19, fo:wrapper,           chapter,  XB)
[N] (20, null,                 chapter,  XX)
[O] (21, fo:index-range-end,   chapter,  XX)
[B] (23, fo:wrapper,           chapter,  XB)
[D] (25, fo:wrapper,           chapter,  XI)
[P] (27, fo:wrapper,           chapter,  XX)
[Q] (29, fo:wrapper,           chapter,  XX)
[R] (30, fo:wrapper,           chapter,  XX)
[S] (31, fo:wrapper,           chapter,  XX)
[T] (32, fo:wrapper,           chapter,  XX)
[U] (33, fo:wrapper,           chapter,  XX)
[V] (34, fo:wrapper,           chapter,  XX)
[X] (37, fo:wrapper,           glossary, XX)

In step B, if merge-ranges-across-index-key-references has the value "leave-separate", the ranges will be:

[E] ( 9,   fo:wrapper,           preface,  XX)
[F] (10,   fo:wrapper,           preface,  XX)
[G] (11,   fo:wrapper,           chapter,  XX)
[H] (13,   fo:index-range-begin, chapter,  XX)
[I] (14,   null,                 chapter,  XX)
[C] (15,   fo:wrapper,           chapter,  XI)
[K] (16,   fo:index-range-end,   chapter,  XX)
[L] (18,   fo:index-range-begin, chapter,  XX)
[A] (19,   fo:wrapper,           chapter,  XB)
[N] (20,   null,                 chapter,  XX)
[O] (21,   fo:index-range-end,   chapter,  XX)
[B] (23,   fo:wrapper,           chapter,  XB)
[D] (25,   fo:wrapper,           chapter,  XI)
[P] (27,   fo:wrapper,           chapter,  XX)
([Q] (29,  fo:wrapper,           chapter,  XX),
  [V] (34, fo:wrapper,           chapter,  XX))
[X] (37,   fo:wrapper,           glossary, XX)

If merge-ranges-across-index-key-references has the value "merge", the ranges will be:

[E] ( 9,   fo:wrapper,           preface,  XX)
[F] (10,   fo:wrapper,           preface,  XX)
[G] (11,   fo:wrapper,           chapter,  XX)
([H] (13,  fo:index-range-begin, chapter,  XX),
  [K] (16, fo:index-range-end,   chapter,  XX))
([L] (18,  fo:index-range-begin, chapter,  XX),
  [O] (21, fo:index-range-end,   chapter,  XX))
[B] (23,   fo:wrapper,           chapter,  XB)
[D] (25,   fo:wrapper,           chapter,  XI)
[P] (27,   fo:wrapper,           chapter,  XX)
([Q] (29,  fo:wrapper,           chapter,  XX),
  [V] (34, fo:wrapper,           chapter,  XX))
[X] (37,   fo:wrapper,           glossary, XX)
6.10.1.3 Example Index

The final set of page numbers that will appear in the example index entry depends on the values of the merge-pages-across-index-key-references, merge-ranges-across-index-key-references, and index-class traits. If the index terms from the preface, chapter and glossary have different index-class values as is the case in the example, then the results for the generated page number list are:

merge-pages-across-index-key-references/ merge-ranges-across-index-key-referencesResulting index pages
leave-separate/leave-separateix, x, 1, 3-6, [5], 8-11, 9, 13, [15], 17, 19-24, G-3
leave-separate/mergeix, x, 1, 3-6, 8-11, 13, [15], 17, 19-24, G-3
merge/leave-separateix, x, 1, 3, 4, [5], 6, 8, 9, 10, 11, 13, [15], 17, 19-24, G-3
merge/mergeix, x, 1, 3-6, 8-11, 13, [15], 17, 19-24, G-3

If the index terms from the preface, chapter, and appendix pages are in the same index-class:

merge-pages-across-index-key-references/ merge-ranges-across-index-key-referencesResulting index pages
leave-separate/leave-separateix-1, 3-6, [5], 8-11, 9, 13, [15], 17, 19-24, G-3
leave-separate/mergeix-1, 3-6, 8-11, 13, [15], 17, 19-24, G-3
merge/leave-separateix-1, 3, 4, [5], 6, 8, 9, 10, 11, 13, [15], 17, 19-24, G-3
merge/mergeix-1, 3-6, 8-11, 13, [15], 17, 19-24, G-3

6.10.2 fo:index-page-number-prefix

Common Usage:

The fo:index-page-number-prefix formatting object specifies a static prefix for the cited page items created by fo:index-key-reference.

Areas:

The fo:index-page-number-prefix formatting object does not directly produce any areas. Its children will be retrieved and used by fo:index-page-citation-list when formatting cited page items and cited page item ranges.

Constraints:

None.

Contents:

(#PCDATA|%inline;)*

6.10.3 fo:index-page-number-suffix

Common Usage:

The fo:index-page-number-suffix formatting object specifies a static suffix for the cited page items created by fo:index-key-reference.

Areas:

The fo:index-page-number-suffix formatting object does not directly produce any areas. Its children will be retrieved and used by fo:index-page-citation-list when formatting cited page items and cited page item ranges.

Constraints:

None.

Contents:

(#PCDATA|%inline;)*

6.10.4 fo:index-range-begin

Common Usage:

The fo:index-range-begin formatting object is used to indicate the beginning of an "indexed range" associated with an index key. The index range is ended by a corresponding fo:index-range-end.

All formatting objects following (in document order) this fo:index-range-begin, and up to the matching fo:index-range-end, are considered to be under the index range influence of this fo:index-range-begin.

Areas:

The fo:index-range-begin does not generate any area.

Constraints:

Each fo:index-range-begin formatting object must specify both an id and an index-key property.

An fo:index-range-begin/fo:index-range-end pair is considered a matching pair if the ref-id property of the fo:index-range-end has the same value as the id property on the fo:index-range-begin.

Following this fo:index-range-begin in document order, there must be an fo:index-range-end with which it forms a matching pair. If there is no such fo:index-range-end, it is an error, and the implementation should recover by assuming the equivalent of a matching fo:index-range-end at the end of the document.

Contents:

EMPTY

The following properties apply to this formatting object:

7.30.8 id
7.24.2 index-key
7.24.1 index-class

6.10.5 fo:index-range-end

Common Usage:

The fo:index-range-end is used to indicate the end of an "indexed range" that is started by its matching fo:index-range-begin. See 6.10.4 fo:index-range-begin for details.

Areas:

The fo:index-range-end does not generate any area.

Constraints:

Preceding this fo:index-range-end in document order, there must be an fo:index-range-begin with which it forms a matching pair. If there is no such fo:index-range-begin, it is an error, and the implementation should recover by ignoring this fo:index-range-end.

Contents:

EMPTY

The following properties apply to this formatting object:

7.30.13 ref-id

6.10.6 fo:index-key-reference

Common Usage:

The fo:index-key-reference formatting object is used to generate a set of cited page items for all the occurrences of the specified index-key.

A cited page item is a name for a collection containing the following information:

  • a reference to a page area

  • a reference to an fo:index-key-reference

  • an index class.

Areas:

The fo:index-key-reference does not generate any areas. The containing fo:index-page-citation-list formatting object uses the cited page items that it contains to produce the generated list of page numbers.

Constraints:

Each fo:index-key-reference formatting object identifies one or more formatting objects in the formatting object tree with an index-key value that matches the ref-index-key property of the fo:index-key-reference. It is an error if there are no such formatting objects. Implementations should recover from this error by ignoring the fo:index-key-reference.

If the matched index-key occurs on an fo:index-range-begin, all of the pages whose descendants include areas generated by formatting objects under the index range influence of that fo:index-range-begin are referenced by the generated cited page items.

For each formatting object containing a matching index-key, a cited page item is generated for each page whose descendants include areas returned from that formatting object. The index class of these cited page items is taken from that formatting object. If there are no areas returned from that formatting object then a cited page item is generated referring to the page containing the first area returned from a following formatting object, if any, or the last area returned from a preceding formatting object, if any.

Note:

For example, if the matched index-key occurs on an fo:block and that block spans pages 3 and 4, then pages 3 and 4 are referenced. If the block is wholly contained on page 3, only page 3 is referenced. Equally, if the matched element is an fo:index-range-begin on page 8 and the matching pair fo:index-range-end is on page 10, then pages 8-10 are referenced. If the beginning of the range and the end of the range both occur on page 8, then only page 8 is referenced.

Within each fo:index-key-reference, page ranges are expanded to a sequence of individual cited page items and all but one cited page item that refer to the same page are removed. When two cited page items refer to the same page, the cited page item referring to the fo:index-range-begin or fo:index-range-end occurring first in document order is retained. If none of the referenced formatting objects is an fo:index-range-begin or fo:index-range-end, the cited page item referring to the formatting object that occurs first in the page is retained.

Note:

Duplicates are removed irrespective of index-class.

Contents:

The following properties apply to this formatting object:

7.24.3 page-number-treatment
7.24.7 ref-index-key

6.10.7 fo:index-page-citation-list

Common Usage:

The fo:index-page-citation-list formatting object is used to group together the sets of cited page items generated by its fo:index-key-reference children. Each fo:index-key-reference child provides formatting properties for the corresponding cited page items. The resulting cited page items are sorted and collated together. The ultimate effect of the fo:index-page-citation-list is to generate a formatted list of page numbers and ranges.

Areas:

The fo:index-page-citation-list formatting object generates and returns one or more normal inline-areas.

Trait Derivation:

The traits used for formatting the individual parts of the list of page numbers and ranges is described below.

Constraints:

Note:

Although the constraints are described as performing a series of steps, this is solely for the convenience of exposition and does not imply they must be implemented as separate steps in any conforming implementation. A conforming implementation must only achieve the same effect.

Step A: Cited page items from all the child fo:index-key-reference formatting objects are sorted in area tree order. There are then two cases: if merge-pages-across-index-key-references has the value "leave-separate", cited page items referring to the same page generated by different fo:index-key-reference formatting objects will be preserved. If merge-pages-across-index-key-references has the value "merge", only one of the cited page items referring to any given page will be preserved, as specified in 7.24.6 merge-pages-across-index-key-references.

Step B: consists of merging sequences of three or more sequential cited page items into a cited page item range. It is performed only if the value of merge-sequential-page-numbers is "merge".

Several conditions influence whether or not any two cited page items from the complete set of cited page items are considered sequential. Two cited page items are sequential if and only if all of the following conditions hold:

  1. The cited page items refer to page-viewport-areas that are consecutive children of the root of the area tree.

  2. They have the same index-class.

  3. Either the cited page items are generated by the same fo:index-key-reference or the value of merge-ranges-across-index-key-references is "merge".

Step C: consists of formatting the cited page items and cited page item ranges into the list of formatted page numbers and ranges. The result is the same as formatting a sequence of result tree fragments corresponding to individual page numbers, any index page number prefix or suffix, range and list separators.

For each cited page item, from fo:index-key-reference R, the result areas are the same as the result of formatting:

  1. If R has an fo:index-page-number-prefix child, an fo:inline containing the result-tree fragment that are the children of the fo:index-page-number-prefix. The traits of the fo:inline are inherited from R, except for keep-with-next.within-line which has the value "always".

  2. An fo:inline containing the result-tree fragment, defined in 6.6.10 fo:page-number, using the page referenced by the cited page item as the reference-page, and the fo:page-sequence that generated the referenced page as the reference-page-sequence. The traits of the fo:inline are inherited from R. If the page-number-treatment has the value "link", the fo:inline should be a link back to the source of the reference as for fo:basic-link.

  3. If R has an fo:index-page-number-suffix child, an fo:inline containing the result-tree fragment that are the children of the fo:index-page-number-suffix. The traits of the fo:inline are inherited from R, except for keep-with-previous.within-line which has the value "always".

For each cited page item range the result areas are the same as the result of formatting:

  1. The first cited page item in the range in the same way as a cited page item; see above.

  2. If the fo:index-page-citation-list has an fo:index-page-citation-range-separator child, an fo:inline containing the result-tree fragment that are the children of the fo:index-page-citation-range-separator. The traits of the fo:inline are inherited from the fo:index-page-citation-range-separator, except for keep-with-previous.within-line and keep-with-next.within-line that have the value "always".

    Otherwise an fo:character with traits: character with value U+2013 (en dash), keep-with-previous.within-line and keep-with-next.within-line that have the value "always". All other traits are inherited from the fo:index-page-citation-list. Implementations may provide an alternative default, for example to provide a language- or locale-specific index range separator.

  3. The last cited page item in the range in the same way as a cited page item; see above.

After each formatted page item or range, except the last, a separator is inserted. The result areas are the same as the result of formatting:

If the fo:index-page-citation-list has an fo:index-page-citation-list-separator child, the result-tree fragment that are the children of the fo:index-page-citation-list-separator. The traits of the fo:inline are inherited from the fo:index-page-citation-list-separator.

Otherwise an fo:character with traits: character with value U+002C (comma) and keep-with-previous.within-line with value "always", followed by an fo:character with trait: character with value U+0020 (space). All other traits are inherited from the fo:index-page-citation-list. Implementations may provide an alternative default, for example to provide a language- or locale-specific index list separator.

Contents:

The following properties apply to this formatting object:

7.24.5 merge-sequential-page-numbers
7.24.4 merge-ranges-across-index-key-references
7.24.6 merge-pages-across-index-key-references

6.10.8 fo:index-page-citation-list-separator

Common Usage:

The fo:index-page-citation-list-separator formatting object specifies the formatting objects used to separate singleton page numbers or page number ranges in the generated list of page numbers.

Areas:

The fo:index-page-citation-list-separator formatting object does not directly produce any areas. Its children will be retrieved and used by fo:index-page-citation-list when formatting the list of page references.

Constraints:

None.

Contents:

(#PCDATA|%inline;)*

6.10.9 fo:index-page-citation-range-separator

Common Usage:

The fo:index-page-citation-range-separator formatting object specifies the formatting objects used to separate two page numbers forming a range in the generated list of page numbers.

Areas:

The fo:index-page-citation-range-separator formatting object does not directly produce any areas. Its children will be retrieved and used by fo:index-page-citation-list when formatting the list of page references.

Constraints:

None.

Contents:

(#PCDATA|%inline;)*

6.11 Formatting Objects for Bookmarks

6.11.1 fo:bookmark-tree

Common Usage:

The fo:bookmark-tree formatting object is used to hold a list of access points within the document such as a table of contents, a list of figures or tables, etc. Each access point is called a bookmark.

Areas:

This formatting object returns the sequence of areas returned by the children of this formatting object.

Constraints:

The sequence of returned areas must be the concatenation of the sub-sequences of areas returned by each of the flow children of the fo:bookmark-tree formatting object in the order in which the children occur.

Contents:

6.11.2 fo:bookmark

Common Usage:

The fo:bookmark formatting object is used to identify an access point, by name, and to specify where that access point is within the current document or another external document. A given bookmark may be further subdivided into a sequence of (sub-)bookmarks to as many levels as the authors desire.

Note:

The fo:bookmark is a specialized form of the fo:basic-link with restrictions on the applicable properties and on its content model.

Areas:

The fo:bookmark formatting object generates one or more normal inline-areas. The fo:bookmark returns these areas.

Constraints:

One of the external-destination and internal-destination properties should be specified. If both are specified, the system may either report it as an error, or use the internal-destination property.

No area may have more than one normal child area returned by the same fo:bookmark formatting object.

The children of each normal area returned by an fo:bookmark must satisfy the constraints specified in 4.7.3 Inline-building.

The property "starting-state" determines whether any sub-list of bookmarks is initially displayed or is hidden. The value "show" means include the sub-list of bookmarks in the presentation of this bookmark. The value "hide" means show only this bookmark in the presentation.

Contents:

The following properties apply to this formatting object:

7.5 Common Accessibility Properties
7.23.6 external-destination
7.23.8 internal-destination
7.23.10 starting-state

6.11.3 fo:bookmark-title

Common Usage:

The fo:bookmark-title formatting object is used to identify, in human readable form, an access point.

Note:

The fo:bookmark-title is a specialized form of the fo:inline with restrictions on the applicable properties and on its content model.

Areas:

The fo:bookmark-title formatting object generates one or more normal inline-areas. The fo:bookmark-title returns these areas.

Trait Derivation:

Even though the white-space-treatment, linefeed-treatment, and white-space-collapse properties are not applicable to fo:bookmark-title, the implementation should behave as though these properties applied and had their initial values.

Constraints:

No area may have more than one normal child area returned by the same fo:bookmark-title formatting object.

The children of each normal area returned by an fo:bookmark-title must satisfy the constraints specified in 4.7.3 Inline-building.

Contents:

(#PCDATA)

The following properties apply to this formatting object:

7.5 Common Accessibility Properties
7.18.1 color
7.9.7 font-style
NOTE: with the value space limited to "normal" and "italic",

7.9.9 font-weight
NOTE: with the value space limited to "normal" and "bold"

6.12 Out-of-Line Formatting Objects

6.12.1 Introduction

6.12.1.1 Floats

The fo:float formatting object is used for two distinct purposes. First, so that during the normal placement of content, some related content is formatted into a separate area at the beginning of a page where it is available to be read without immediately intruding on the reader. The areas generated by this kind of fo:float are called before-floats. An fo:float is specified to generate before-floats if it has a "float" property value of "before". The constraints on placing before-floats on a page are described in the 6.12.1.3 Conditional Sub-Regions section of this introduction and in the description of the fo:float formatting object.

Second, the fo:float formatting object is used when an area is intended to float to one side, with normal content flowing alongside the floated area. The areas generated by this kind of fo:float are called side-floats. A side-float is always made a child of the nearest ancestor reference-area. The edge of the reference-area towards which the side-float floats is controlled by the value of the "float" property.

Flowing normal content flowing alongside side-floats is realized by increasing the start-intrusion-adjustment or the end-intrusion-adjustment of normal child areas of the parent reference-area of the side-float.

The "clear" property applies to any block-level formatting object. If the value of this property for a particular formatting object is any value other than "none", then the areas generated by the block will be positioned to ensure that their border-rectangles do not overlap the allocation-rectangles of the applicable side-floats as determined by the "clear" property value.

6.12.1.2 Footnotes

The fo:footnote formatting object is used to generate both a footnote and its citation. The fo:footnote has two children, which are both required to be present. The first child is an fo:inline formatting object, which is formatted to produce the footnote citation. The second child is an fo:footnote-body formatting object which generates the content (or body) of the footnote.

The actual areas generated by the descendants of the fo:footnote-body formatting object are determined by the formatting objects that comprise the descendant subtree. For example, the footnote could be formatted with a label and an indented body by using the fo:list-block formatting object within the fo:footnote-body.

6.12.1.3 Conditional Sub-Regions

The region-body has two conditional sub-regions which implicitly specify corresponding reference-areas called before-float-reference-area and footnote-reference-area. These reference-areas are conditionally generated as children of the region-reference-area. The before-float-reference-area is generated only if the page contains one or more areas with area-class "xsl-before-float". The footnote-reference-area is generated only if the page contains one or more areas with area-class "xsl-footnote".

The conditionally generated areas borrow space in the block-progression-dimension (this is "height" when the writing-mode is "lr-tb") within the region-reference-area, at the expense of the main-reference-area. Whether or not a conditionally generated area is actually generated depends, additionally, on whether there is sufficient space left in the main-reference-area.

There may be limits on how much space conditionally generated areas can borrow from the region-reference-area. It is left to the user agent to decide these limits.

The block-progression-dimension of the main-reference-area is set equal to the block-progression-dimension of the allocation-rectangle of the region-reference-area minus the sum of the sizes in the block-progression-direction of the allocation-rectangles of the conditionally generated reference-areas that were actually generated. The main-reference-area is positioned to immediately follow the after-edge of the allocation-rectangle of the before-float-reference-area. This positions the after-edge of the main-reference-area to coincide with the before-edge of the allocation-rectangle of the footnote-reference-area. In addition to the constraints normally determined by the region-reference-area, the inline-progression-dimension (this is "width" when the writing-mode is "lr-tb") of a conditionally generated reference-area is constrained to match the inline-progression-dimension of the main-reference-area.

Each conditionally generated reference-area may additionally contain a sequence of areas used to separate the reference-area from the main-reference-area. The sequence of areas is the sequence returned by formatting an fo:static-content specified in the page-sequence that is being used to format the page.

If there is an fo:static-content in a page-sequence whose "flow-name" property value is "xsl-before-float-separator", then the areas returned by formatting the fo:static-content are inserted in the proper order as the last children of a before-float-reference-area that is generated using the same page-master, provided the main-reference-area on the page is not empty.

If there is an fo:static-content whose "flow-name" property value is "xsl-footnote-separator", then the areas returned by formatting the fo:static-content are inserted in the proper order as the initial children of a footnote-reference-area that is generated using the same page-master.

An interactive user agent may choose to create "hot links" to the footnotes from the footnote-citation, or create "hot links" to the before-floats from an implicit citation, instead of realizing conditional sub-regions.

The generation of areas with area-class "xsl-before-float" or "xsl-footnote" is specified in the descriptions of the formatting objects that initially return areas with those area-classes.

6.12.1.4 Examples
6.12.1.4.1 Floating Figure

Input sample:

<doc>
  <p>C'ieng pieces were made in northern towns, such as C'ieng Mai.
They were typically of tamlung weight.</p>
  <figure>
    <photo image="TH0317A.jpg"/>
    <caption>C'ieng Tamlung of C'ieng Mai</caption>
  </figure>
</doc>

In this example the figures are placed as floats at the before side (top in a lr-tb writing-mode).

XSL Stylesheet:

<?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="p">
  <fo:block>
    <xsl:apply-templates/>
  </fo:block>
</xsl:template>

<xsl:template match="figure">
  <fo:float float="before">
    <xsl:apply-templates/>
  </fo:float>
</xsl:template>

<xsl:template match="photo">
  <fo:block text-align="center">
    <fo:external-graphic src="{@image}"/>
  </fo:block>
</xsl:template>

<xsl:template match="caption">
  <fo:block space-before="3pt" text-align="center"
    start-indent="10mm" end-indent="10mm">
    <xsl:apply-templates/>
  </fo:block>
</xsl:template>

</xsl:stylesheet>

Result Instance: elements and attributes in the fo: namespace

<fo:block>C'ieng pieces were made in northern towns,
such as C'ieng Mai. They were typically of tamlung weight.
</fo:block>

<fo:float float="before">

  <fo:block text-align="center">
    <fo:external-graphic src="TH0317A.jpg">
    </fo:external-graphic>
  </fo:block>

  <fo:block space-before="3pt" text-align="center" start-indent="10mm"
    end-indent="10mm">C'ieng Tamlung of C'ieng Mai
  </fo:block>

</fo:float>
6.12.1.4.2 Footnote

Input sample:

<doc>
  <p>Some Pod Duang were restruck<fn>Berglund, A., Thai Money, from
Earliest Times to King Rama V, p. 203.</fn> during the reign of King Rama V.</p>
</doc>

In this example the footnotes are numbered consecutively throughout the document. The footnote callout is the number of the footnote, followed by a ")", as a superscript. The footnote itself is formatted using list formatting objects with the footnote number as the label and the footnote text as the body.

XSL Stylesheet:

<?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="p">
  <fo:block>
    <xsl:apply-templates/>
  </fo:block>
</xsl:template>

<xsl:template match="fn">
  <fo:footnote>
    <fo:inline font-size="0.83em" baseline-shift="super">
      <xsl:number level="any" count="fn" format="1)"/>
    </fo:inline>
    <fo:footnote-body>
      <fo:list-block provisional-distance-between-starts="20pt"
          provisional-label-separation="5pt">
        <fo:list-item>
          <fo:list-item-label end-indent="label-end()">
            <fo:block  font-size="0.83em"
                       line-height="0.9em">
              <xsl:number level="any" count="fn" format="1)"/>
            </fo:block>
          </fo:list-item-label>
          <fo:list-item-body start-indent="body-start()">
            <fo:block  font-size="0.83em"
                       line-height="0.9em">
              <xsl:apply-templates/>
            </fo:block>
          </fo:list-item-body>
        </fo:list-item>
      </fo:list-block>
    </fo:footnote-body>
  </fo:footnote>
</xsl:template>

</xsl:stylesheet>

Result Instance: elements and attributes in the fo: namespace

<fo:block>Some Pod Duang were restruck
  <fo:footnote>
    <fo:inline font-size="0.83em" baseline-shift="super">1)
    </fo:inline>
    <fo:footnote-body>
    <fo:list-block provisional-distance-between-starts="20pt"
      provisional-label-separation="5pt">
    <fo:list-item>
    <fo:list-item-label end-indent="label-end()">
    <fo:block font-size="0.83em" line-height="0.9em">1)
    </fo:block>
    </fo:list-item-label>
    <fo:list-item-body start-indent="body-start()">
    <fo:block font-size="0.83em" line-height="0.9em">Berglund, A.,
Thai Money, from Earliest Times to King Rama V, p. 203.
    </fo:block>
    </fo:list-item-body>
    </fo:list-item>
    </fo:list-block>
    </fo:footnote-body>
  </fo:footnote> during the reign of King Rama V.
</fo:block>

6.12.2 fo:float

Common Usage:

The fo:float formatting object is typically used either to cause an image to be positioned in a separate area at the beginning of a page, or to cause an image to be positioned to one side, with normal content flowing around and along-side the image.

Areas:

The fo:float generates an optional single area with area-class "xsl-anchor", and one or more block-areas that all share the same area-class, which is either "xsl-before-float", "xsl-side-float" or "xsl-normal" as specified by the "float" property. (An fo:float generates normal block-areas if its "float" property value is "none".)

Areas with area-class "xsl-side-float" are reference areas.

An area with area-class "xsl-before-float" is placed as a child of a before-float-reference-area.

The optional area with area-class "xsl-anchor" is not generated if the "float" property value is "none", or if, due to an error as described in the constraints section, the fo:float shall be formatted as though its "float" property was "none". Otherwise, the area with area-class "xsl-anchor" shall be generated.

The area with area-class "xsl-anchor" has no children, and is an inline-area, except where this would violate the constraints that (a.) any area's children must be either block-areas or inline-areas, but not a mixture, and (b.) the children of a line-area may not consist only of anchor areas. In the case where an inline-area would violate these constraints, the fo:float must instead generate a block-area.

Constraints:

The normal inline-area generated by the fo:float shall be placed in the area tree as though the fo:float had a "keep-with-previous" property with value "always". The inline-area has a length of zero for both the inline-progression-dimension and block-progression-dimension.

The term anchor-area is used here to mean the area with area-class "xsl-anchor" generated by the fo:float. An area with area-class "xsl-side-float" is a side-float.

No area may have more than one child block-area with the same area-class returned by the same fo:float formatting object.

Areas with area-class "xsl-before-float" must be properly ordered within the area tree relative to other areas with the same area-class.

The padding-, border-, and content-rectangles of the block-areas generated by fo:float all coincide. That is, the padding and border are zero at all edges of the area.

The following constraints apply to fo:float formatting objects that generate areas with area-class "xsl-before-float":

  • It is an error if the fo:float occurs as a descendant of a flow that is not assigned to one or more region-body regions, or of an fo:block-container that generates absolutely positioned areas. In either case, the fo:float shall be formatted as though its "float" property was "none".

  • A block-area with area-class "xsl-before-float" generated by the fo:float may only be descendant from a before-float-reference-area that is (a) descendant from a "region-reference-area" generated using the region-master for the region to which the flow that has the fo:float as a descendant is assigned, and (b) is descendant from the same page containing the anchor-area, or from a page following that page.

  • The fo:float may not generate any additional block-areas with area-class "xsl-before-float" unless the page containing the preceding block-area generated by the fo:float contains no other areas with area-class "xsl-before-float", has an empty main-reference-area, and does not contain a footnote-reference-area.

  • The "clear" property does not apply.

The following constraints apply to fo:float formatting objects that generate areas with area-class "xsl-side-float":

  • Each side-float is placed either as a child of the nearest ancestor reference-area of the anchor-area or as a child of a later reference-area in the same reference-area chain.

  • Side-floats that are siblings in the area-tree may overlap their content rectangles.

  • The description in section 9.5 of [CSS2] shall be used to determine the formatting of the fo:float and the rendering of normal line-areas and side-floats that are inline-overlapping, with these modifications:

    • All references to left and right shall be interpreted as their corresponding writing-mode relative directions "start" and "end". The "float" property will additionally have the writing-mode relative values "start" and "end".

    • All references to top and bottom shall be interpreted as their corresponding writing-mode relative directions "before" and "after".

    • The phrase "current line box" shall be interpreted to mean the line-area containing the anchor-area generated by the float. If the anchor-area is a block-area then the "current line box" does not exist.

    • Side-floats derive their length in the inline-progression-dimension intrinsically from their child areas; the length is not determined by an explicit property value.

    • A side-float may add to the intrusion adjustment of any inline-overlapping block-area whose nearest ancestor reference-area is the parent of the side-float. See 4.4.2 Intrusion Adjustments for the description of intrusion adjustments.

    • The user agent may make its own determination, after taking into account the intrusion adjustments caused by one or more overlapping side-floats, that the remaining space in the inline-progression-direction is insufficient for the next side-float or normal block-area. The user agent may address this by causing the next side-float or normal block-area to "clear" one of the relevant side-floats, as described in the "clear" property description, so the intrusion adjustment is sufficiently reduced. Of the side-floats that could be cleared to meet this constraint, the side-float that is actually cleared must be the one whose after-edge is closest to the before-edge of the parent reference-area.

      Note:

      The user agent may determine sufficiency of space by using a fixed length, or by some heuristic such as whether an entire word fits into the available space, or by some combination, in order to handle text and images.

Contents:

An fo:float is not permitted to have an fo:float, fo:footnote or fo:marker as a descendant.

Additionally, an fo:float is not permitted to have as a descendant an fo:block-container that generates an absolutely positioned area.

The following properties apply to this formatting object:

7.19.2 float
7.19.1 clear
7.30.8 id
7.24.1 index-class
7.24.2 index-key

6.12.3 fo:footnote

Common Usage:

The fo:footnote is typically used to produce footnote-citations within the region-body of a page and the corresponding footnote in a separate area nearer the after-edge of the page.

Areas:

The fo:footnote formatting object does not generate any areas. The fo:footnote formatting object returns the areas generated and returned by its child fo:inline formatting object.

Additionally the fo:footnote formatting object returns the block-areas with area class "xsl-footnote" generated by its fo:footnote-body child. An area with area-class "xsl-footnote" is placed as a child of a footnote-reference-area.

Constraints:

The term anchor-area is defined to mean the last area that is generated and returned by the fo:inline child of the fo:footnote.

A block-area returned by the fo:footnote is only permitted as a descendant from a footnote-reference-area that is (a) descendant from a "region-reference-area" generated using the region-master for the region to which the flow that has the fo:footnote as a descendant is assigned, and (b) is descendant from the same page that contains the anchor-area, or from a page following the page that contains the anchor-area.

The second block-area and any additional block-areas returned by an fo:footnote must be placed on the immediately subsequent pages to the page containing the first block-area returned by the fo:footnote, before any other content is placed. If a subsequent page does not contain a region-body, the user agent must use the region-master of the last page that did contain a region-body to hold the additional block-areas.

It is an error if the fo:footnote occurs as a descendant of a flow that is not assigned to one or more region-body regions, or of an fo:block-container that generates absolutely positioned areas. In either case, the block-areas generated by the fo:footnote-body child of the fo:footnote shall be returned to the parent of the fo:footnote and placed in the area tree as though they were normal block-level areas.

Contents:

An fo:footnote is not permitted to have an fo:float, fo:footnote, or fo:marker as a descendant.

Additionally, an fo:footnote is not permitted to have as a descendant an fo:block-container that generates an absolutely positioned area.

The following properties apply to this formatting object:

7.5 Common Accessibility Properties
7.30.8 id
7.24.1 index-class
7.24.2 index-key

6.12.4 fo:footnote-body

Common Usage:

The fo:footnote-body is used to generate the footnote content.

Areas:

The fo:footnote-body generates and returns one or more block-level areas with area-class "xsl-footnote".

Constraints:

The fo:footnote-body is only permitted as a child of an fo:footnote.

No area may have more than one child block-area returned by the same fo:footnote-body formatting object.

Areas with area-class "xsl-footnote" must be properly ordered within the area tree relative to other areas with the same area-class.

Contents:

The following properties apply to this formatting object:

7.5 Common Accessibility Properties
7.30.8 id
7.24.1 index-class
7.24.2 index-key

6.13 Other Formatting Objects

6.13.1 Introduction

6.13.1.1 Examples
6.13.1.1.1 Wrapper

The following example shows the use of the fo:wrapper formatting object that has no semantics but acts as a "carrier" for inherited properties.

Input sample:

<doc>
<p>This is an <emph>important word</emph> in this
sentence that also refers to a <code>variable</code>.</p>
</doc>

The "emph" elements are to be presented using a bold font and the "code" elements using a Courier font.

XSL Stylesheet:

<?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="p">
  <fo:block>
    <xsl:apply-templates/>
  </fo:block>
</xsl:template>

<xsl:template match="emph">
  <fo:wrapper font-weight="bold">
    <xsl:apply-templates/>
  </fo:wrapper>
</xsl:template>

<xsl:template match="code">
  <fo:wrapper font-family="Courier">
    <xsl:apply-templates/>
  </fo:wrapper>
</xsl:template>

</xsl:stylesheet>

fo: element and attribute tree:

<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">This is an
<fo:wrapper font-weight="bold">important word</fo:wrapper>
in this sentence that also refers to a
<fo:wrapper font-family="Courier">variable</fo:wrapper>.
</fo:block>
6.13.1.1.2 Table Markers

The following example shows how to use the fo:retrieve-table-marker formatting object to create a 'Table continued...' caption that appears at the bottom of the table, when the table continues on the next page (assuming enough data is present that page breaks are generated). It will also show the subtotal at the bottom of the page when the table continues on the next page, and the grand total at the end of the table.

Input sample:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<numbers>
  <number>1</number>
  <number>2</number>
  <!-- and so on... -->
  <number>11</number>
  <number>12</number>
</numbers>

XSL Stylesheet:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
  <xsl:strip-space elements="*"/>

  <xsl:template match="numbers">
    <fo:table>
      <fo:table-column/>
      <fo:table-footer>
        <fo:table-row>
          <fo:table-cell font-weight="bold">
            <fo:block>
 <fo:retrieve-table-marker retrieve-class-name="subtotal-caption"
retrieve-position-within-table="last-ending"/>
 <fo:retrieve-table-marker retrieve-class-name="subtotal"
retrieve-position-within-table="last-ending"/>
            </fo:block>
          </fo:table-cell>
        </fo:table-row>
        <fo:retrieve-table-marker retrieve-class-name="continued"
          retrieve-position-within-table="last-ending"/>
      </fo:table-footer>
      <fo:table-body>
        <fo:marker marker-class-name="continued">
          <fo:table-row>
            <fo:table-cell>
              <fo:block>Table continued...</fo:block>
            </fo:table-cell>
          </fo:table-row>
        </fo:marker>
        <fo:marker marker-class-name="subtotal-caption">
                Subtotal:
        </fo:marker>
        <xsl:apply-templates/>
      </fo:table-body>
    </fo:table>
  </xsl:template>

  <xsl:template match="number">
    <fo:table-row>
      <fo:marker marker-class-name="subtotal">
        <xsl:value-of select="sum(preceding::number)+text()"/>
      </fo:marker>
      <xsl:if test="position() = last()">
        <fo:marker marker-class-name="continued"/>
        <fo:marker marker-class-name="subtotal-caption">
          Total:
        </fo:marker>
      </xsl:if>
      <fo:table-cell>
        <fo:block>
          <xsl:apply-templates/>
        </fo:block>
      </fo:table-cell>
    </fo:table-row>
  </xsl:template>

</xsl:stylesheet>

Result Instance: elements and attributes in the fo: namespace

<?xml version="1.0" encoding="UTF-8"?>
<fo:table>
  <fo:table-column/>
  <fo:table-footer>
    <fo:table-row>
      <fo:table-cell font-weight="bold">
        <fo:block>
          <fo:retrieve-table-marker
            retrieve-position-within-table="last-ending"
            retrieve-class-name="subtotal-caption"/>
          <fo:retrieve-table-marker
            retrieve-position-within-table="last-ending"
            retrieve-class-name="subtotal"/>
        </fo:block>
      </fo:table-cell>
    </fo:table-row>
    <fo:retrieve-table-marker retrieve-class-name="continued"
      retrieve-position-within-table="last-ending"/>
  </fo:table-footer>
  <fo:table-body>
    <fo:marker marker-class-name="continued">
      <fo:table-row>
        <fo:table-cell>
          <fo:block>Table continued...</fo:block>
        </fo:table-cell>
      </fo:table-row>
    </fo:marker>
    <fo:marker marker-class-name="subtotal-caption">
      Subtotal:
    </fo:marker>
    <fo:table-row>
      <fo:marker marker-class-name="subtotal">1</fo:marker>
      <fo:table-cell>
        <fo:block>1</fo:block>
      </fo:table-cell>
    </fo:table-row>
    <fo:table-row>
      <fo:marker marker-class-name="subtotal">3</fo:marker>
      <fo:table-cell>
        <fo:block>2</fo:block>
      </fo:table-cell>
    </fo:table-row>
    <!-- and so on... -->
    <fo:table-row>
      <fo:marker marker-class-name="subtotal">66</fo:marker>
      <fo:table-cell>
        <fo:block>11</fo:block>
      </fo:table-cell>
    </fo:table-row>
    <fo:table-row>
      <fo:marker marker-class-name="subtotal">78</fo:marker>
      <fo:marker marker-class-name="continued"/>
      <fo:marker marker-class-name="subtotal-caption">
        Total:
      </fo:marker>
      <fo:table-cell>
        <fo:block>12</fo:block>
      </fo:table-cell>
    </fo:table-row>
  </fo:table-body>
</fo:table>

The following is meant as a note that shows by another example how the retrieve-table-marker funtions, and how the retrieve scope area set gets determined depending on the properties specified on the fo:retrieve-table-marker.

Consider this XSL-FO result instance:

<fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format>
  <fo:layout-master-set>
    <fo:simple-page-master master-name="page ">
      <fo:region-body region-name=" body"  column-count="2"/>
    </fo:simple-page-master>
  </fo:layout-master-set>
  <fo:page-sequence master-reference="page"
    <fo:flow fo:flow-name=" body">
      <fo:table>
        <fo:table-column/>
        <fo:table-header>...</fo:table-header>
          <fo:table-footer>
            <fo:table-row>
              <fo:table-cell>
                <fo:block>
                  <fo:retrieve-table-marker
                    retrieve-class-name="marker-name"
                    retrieve-position-within-table="See table for values..."
                    retrieve-boundary-within-table="See table for values..."/>
                </fo:block>
              </fo:table-cell>
            </fo:table-row>
        </fo:table-footer>
        <fo:table-body>
          <fo:table-row>
            <fo:table-cell>
              <!-- cell 1 -->
              <fo:marker marker-class-name="marker-name">
                <!-- marker 1 -->
                ...
              </fo:marker>
              ...
            </fo:table-cell>
          </fo:table-row>
          <!-- and so on ... -->
          <fo:table-row>
            <fo:table-cell>
              <!-- cell 14 -->
              <fo:marker marker-class-name="marker-name">
                <!-- marker 14 -->
                ...
              </fo:marker>
              ...
            </fo:table-cell>
          </fo:table-row>
        </fo:table-body>
      </fo:table>
    </fo:flow>
  </fo:page-sequence>
</fo:root>

Say the XSL-FO instance results in a paginated document with two page, that can be represented by this illustration:

Two pages with Table   [D]

The following table shows the behaviour for retrieve-table-marker 1 depending on the values for the properties:

retrieve-boundary-within-tableretrieve scope area setprimary retrieve scope arearetrieve-position-within-tableselected fo-marker
tableA1A1first-starting1
first-including-carryover1
last-starting4
last-ending3
table-fragmentA1A1first-starting1
first-including-carryover1
last-starting4
last-ending3
pageA1A1first-starting1
first-including-carryover1
last-starting4
last-ending3

The following table shows the behaviour for retrieve-table-marker 2 depending on the values for the properties:

retrieve-boundary-within-tableretrieve scope area setprimary retrieve scope arearetrieve-position-within-tableselected fo-marker
tableA1, A2A2first-starting5
first-including-carryover4
last-starting7
last-ending7
table-fragmentA2A2first-starting5
first-including-carryover4
last-starting7
last-ending7
pageA1, A2A2first-starting5
first-including-carryover4
last-starting7
last-ending7

The following table shows the behaviour for retrieve-table-marker 3 depending on the values for the properties:

retrieve-boundary-within-tableretrieve scope area setprimary retrieve scope arearetrieve-position-within-tableselected fo-marker
tableA1, A2, A3A3first-starting8
first-including-carryover8
last-starting11
last-ending10
table-fragmentA3A3first-starting8
first-including-carryover8
last-starting11
last-ending10
pageA3A3first-starting8
first-including-carryover8
last-starting11
last-ending10

The following table shows the behaviour for retrieve-table-marker 4 depending on the values for the properties:

retrieve-boundary-within-tableretrieve scope area setprimary retrieve scope arearetrieve-position-within-tableselected fo-marker
tableA1, A2, A3, A4A4first-starting12
first-including-carryover11
last-starting14
last-ending14
table-fragmentA4A4first-starting12
first-including-carryover11
last-starting14
last-ending14
pageA3, A4A4first-starting12
first-including-carryover11
last-starting14
last-ending14

6.13.2 fo:change-bar-begin

Common Usage:

The fo:change-bar-begin is used to indicate the beginning of a "change region" that is ended by the subsequent fo:change-bar-end whose change-bar-class property value matches that of the change-bar-class property on this fo:change-bar-begin and is at the same nesting level (relative to other fo:change-bar-begin/fo:change-bar-end pairs with the same change-bar-class property value) of this fo:change-bar-begin.

The change region is decorated with a change bar down either the start or end edge of the column. That is, a change bar is generated along side of the areas generated within the region-body's non-conditional reference area by the formatting objects "under the change bar influence". All formatting objects after (in document order) this fo:change-bar-begin and up to the matching fo:change-bar-end (or end of document) are considered under the change bar influence of this fo:change-bar-begin.

The position, thickness, style, and color of the generated change bar is determined by the respective properties (see each property definition).

Areas:

The fo:change-bar-begin formatting object does not in itself generate any areas, but it causes areas to be generated by the ancestor fo:page-sequence object, near the start or end edge of a normal-flow-reference-area or region-reference-area.

Constraints:

An fo:change-bar-begin/fo:change-bar-end pair is considered a matching pair if (1) the value of their change-bar-class properties are identical and (2) between (in document order) the fo:change-bar-begin and fo:change-bar-end formatting objects, the only occurrences of fo:change-bar-begin and fo:change-bar-end formatting objects of that class (if any) are matching pairs.

Following this fo:change-bar-begin in document order, there must be an fo:change-bar-end with which it forms a matching pair. If there is no such fo:change-bar-end, it is an error, and the implementation should recover by assuming the equivalent of a matching fo:change-bar-end at the end of the document.

The generated change bar areas run continuously down the start or end edge of the column within the region body.

Contents:

EMPTY

The following properties apply to this formatting object:

7.5 Common Accessibility Properties
7.7 Common Aural Properties
7.30.1 change-bar-class
7.30.2 change-bar-color
7.30.3 change-bar-offset
7.30.4 change-bar-placement
7.30.5 change-bar-style
7.30.6 change-bar-width
7.30.18 z-index

6.13.3 fo:change-bar-end

Common Usage:

The fo:change-bar-end is used to indicate the end of a "change region" that is started by its matching fo:change-bar-begin. See 6.13.2 fo:change-bar-begin for details.

Areas:

The fo:change-bar-end formatting object does not in itself generate any areas, but it causes areas to be generated by the ancestor fo:page-sequence object, near the start or end edge of a normal-flow-reference-area or region-reference-area.

Constraints:

Preceding this fo:change-bar-end in document order, there must be an fo:change-bar-begin with which it forms a matching pair. If there is no such fo:change-bar-begin, it is an error, and the implementation should recover by ignoring this fo:change-bar-end.

Contents:

EMPTY

The following properties apply to this formatting object:

7.5 Common Accessibility Properties
7.7 Common Aural Properties
7.30.1 change-bar-class

6.13.4 fo:wrapper

Common Usage:

The fo:wrapper formatting object is used to specify inherited properties for a group of formatting objects.

Areas:

The fo:wrapper formatting object returns the sequence of areas created by concatenating the sequences of areas returned by each of the children of the fo:wrapper. If this sequence contains at least one normal area, or if the "id" and "index-key" properties are not specified on the fo:wrapper, then the fo:wrapper does not itself generate any areas.

If the sequence of areas returned to the fo:wrapper contains no normal areas, and the "id" or "index-key" property is specified on the fo:wrapper, then it additionally generates and returns one normal area with inline-progression-dimension and block-progression-dimension set to zero. This area is an inline-area except where this would violate the constraint (on some ancestor area) that an area's children are all block-areas or all inline-areas, but not a mixture. In that case the fo:wrapper must instead generate a block-area.

Trait Derivation:

Except for "id", "index-class", and "index-key", the fo:wrapper has no properties that are directly used by it. However, it does serve as a carrier to hold inheritable properties that are utilized by its children.

Constraints:

The order of concatenation of the sequences of areas returned by the children of the fo:wrapper is the same order as the children are ordered under the fo:wrapper.

Contents:

(#PCDATA|%inline;|%block;)*

An fo:wrapper is only permitted to have children that would be permitted to be children of the parent of the fo:wrapper, with two exceptions:

  • An fo:wrapper may always have a sequence of zero or more fo:markers as its initial children.

  • An fo:wrapper that is a child of an fo:multi-properties is only permitted to have children that would be permitted in place of the fo:multi-properties.

This restriction applies recursively.

Note:

For example an fo:wrapper that is a child of another fo:wrapper may only have children that would be permitted to be children of the parent fo:wrapper.

The following properties apply to this formatting object:

7.30.8 id
7.24.1 index-class
7.24.2 index-key

6.13.5 fo:marker

Common Usage:

The fo:marker is used in conjunction with fo:retrieve-marker or fo:retrieve-table-marker to produce running headers or footers and dynamic table headers or footers. Typical examples include:

  • dictionary headers showing the first and last word defined on the page.

  • headers showing the page's chapter and section titles.

  • subtotals e.g. that give a subtotal of numbers in rows up to the last row on the current page.

  • table-continued captions that show whether or not a table is continued after the current page, or was a continuation from a previous page.

The fo:marker has to be an initial child of its parent formatting object.

Areas:

The fo:marker does not directly produce any area. Its children may be retrieved and formatted from within an fo:static-content or table header/footer, using an fo:retrieve-marker or an fo:retrieve-table-marker respectively, whose "retrieve-class-name" property value is the same as the "marker-class-name" property value of this fo:marker.

Constraints:

An fo:marker is only permitted as the descendant of an fo:flow.

Note: Property values set on an fo:marker or its ancestors will not be inherited by the children of the fo:marker when they are retrieved by an fo:retrieve-marker or fo:retrieve-table-marker.

It is an error if two or more fo:markers that share the same parent have the same "marker-class-name" property value.

Contents:

(#PCDATA|%inline;|%block;)*

An fo:marker may contain any formatting objects that are permitted as a replacement of any fo:retrieve-marker or fo:retrieve-table-marker that retrieves the fo:marker's children. No fo:marker may have as a descendant any fo:marker, fo:retrieve-marker, or fo:retrieve-table-marker.

The following properties apply to this formatting object:

7.25.1 marker-class-name

6.13.6 fo:retrieve-marker

Common Usage:

The fo:retrieve-marker is used in conjunction with fo:marker to produce running headers or footers. Typical examples include:

  • dictionary headers showing the first and last word defined on the page.

  • headers showing the page's chapter and section titles.

Areas:

The fo:retrieve-marker does not directly generate any area. It is (conceptually) replaced by the children of the fo:marker that it retrieves.

Trait Derivation:

The properties and traits specified on the ancestors of the fo:retrieve-marker are taken into account when formatting the children of the retrieved fo:marker as if the children had the same ancestors as the fo:retrieve-marker.

Constraints:

An fo:retrieve-marker is only permitted as the descendant of an fo:static-content.

The fo:retrieve-marker specifies that the children of a selected fo:marker shall be formatted as though they replaced the fo:retrieve-marker in the formatting tree.

The properties of the fo:retrieve-marker impose a hierarchy of preference on the areas of the area tree. Each fo:marker is conceptually attached to each normal area returned by the fo:marker's parent formatting object. Additionally, an fo:marker is conceptually attached to each non-normal area that is directly generated by the fo:marker's parent formatting object. Conversely, areas generated by any descendant of an fo:flow may have zero or more fo:marker's conceptually attached. The fo:marker whose children are retrieved is the one that is (conceptually) attached to the area that is at the top of this hierarchy.

Every area in the hierarchy is considered preferential to, or "better" than, any area below it in the hierarchy. When comparing two areas to determine which one is better, the terms "first" and "last" refer to the pre-order traversal order of the area tree.

The term "containing page" is used here to mean the page that contains the first area generated or returned by the children of the retrieved fo:marker.

An area that has an attached fo:marker whose "marker-class-name" property value is the same as the "retrieve-class-name" property value of the fo:retrieve-marker is defined to be a qualifying area. Only qualifying areas have positions in the hierarchy.

A qualifying area within a page is better than any qualifying area within a preceding page, except that areas do not have a position in the hierarchy if they are within pages that follow the containing page. If the "retrieve-boundary" property has a value of "page-sequence", then an area does not have a position in the hierarchy if it is on a page from a page-sequence preceding the page-sequence of the containing page. If the "retrieve-boundary" property has a value of "page", then an area does not have a position in the hierarchy if it is not on the containing page.

If the value of the "retrieve-position" property is "first-starting-within-page", then the first qualifying area in the containing page whose "is-first" trait has a value of "true" is better than any other area. If there is no such area, then the first qualifying area in the containing page is better than any other area.

If the value of the "retrieve-position" property is "first-including-carryover", then the first qualifying area in the containing page is better than any other area.

If the value of the "retrieve-position" property is "last-starting-within-page", then the last qualifying area in the containing page whose "is-first" trait has a value of "true" is better than any other area. If there is no such area, then the last qualifying area in the containing page is better than any other area.

If the value of the "retrieve-position" property is "last-ending-within-page", then the last qualifying area in the containing page whose "is-last" trait has a value of "true" is better than any other area. If there is no such area, then the last qualifying area in the containing page is better than any other area.

If the hierarchy of areas is empty, no formatting objects are retrieved.

Contents:

EMPTY

The following properties apply to this formatting object:

7.25.3 retrieve-class-name
7.25.4 retrieve-position
7.25.5 retrieve-boundary

6.13.7 fo:retrieve-table-marker

Common Usage:

The fo:retrieve-table-marker is used in conjunction with fo:marker to produce table-headers and table-footers whose content can change over different pages, different regions or different columns.

Typical examples include:

  • dictionary headers showing the first and last word defined in the part of the table on the current page.

  • subtotals e.g. that give a subtotal of numbers in rows up to the last row on the current page. For pages with multiple columns and/or multiple regions, the subtotal is to be displayed at the bottom of every table "fragment" in every region or column.

  • table-continued captions that show if a table is continued after the current page, or was a continuation from a previous page.

Areas:

The fo:retrieve-table-marker does not directly generate any area. It is (conceptually) replaced by the children of the fo:marker that it retrieves.

Trait Derivation:

The properties and traits specified on the ancestors of the fo:retrieve-table-marker are taken into account when formatting the children of the retrieved fo:marker as if the children had the same ancestors as the fo:retrieve-table-marker.

Constraints:

An fo:retrieve-table-marker is only permitted as the descendant of an fo:table-header or fo:table-footer or as a child of fo:table in a position where fo:table-header or fo:table-footer is permitted.

The fo:retrieve-table-marker specifies that the children of a selected fo:marker shall be formatted as though they replaced the fo:retrieve-table-marker in the formatting tree.

The fo:table that is a parent of both the fo:table-body (that has the fo:markers as its descendants) and the fo:table-header or fo:table-footer that has the fo:retrieve-table-marker as its descendant generates one or more normal block-areas. These are are said to be the retrieve scope area set. The retrieve scope area set is limited by the constraints specified by retrieve-boundary-within-table property. An area in the retrieve scope area set is called a retrieve scope area. There is exactly one retrieve scope area that contains the areas generated or returned by the children on the retrieved fo:marker, and that is called the primary retrieve scope area.

The properties of the fo:retrieve-table-marker impose a hierarchy of preference on the descendants of the retrieve scope areas. Each fo:marker is conceptually attached to each normal area returned by the fo:marker's parent formatting object. Additionally, an fo:marker is conceptually attached to each non-normal area that is directly generated by the fo:marker's parent formatting object. Conversely, areas generated by any descendant of an fo:flow may have zero or more fo:marker's conceptually attached. The fo:marker whose children are retrieved is the one that is conceptually attached to the area that is at the top of this hierarchy.

Every area in the hierarchy is considered preferential to, or "better" than, any area below it in the hierarchy. When comparing two areas to determine which one is better, the terms "first" and "last" refer to the pre-order traversal order of the area tree.

An area that has an attached fo:marker whose "marker-class-name" property value is the same as the "retrieve-class-name" property value of the fo:retrieve-table-marker, is defined to be a qualifying area if it is a descendant of a retrieve scope area. Only qualifying areas have positions in the hierarchy.

If the value of the "retrieve-position-within-table" property is "first-starting", then the first qualifying area in the primary retrieve scope area whose "is-first" trait has a value of "true" is better than any other area. If there is no such area, then the first qualifying area in the primary retrieve scope area is better than any other area. If there is no such area, then the last qualifying area that is a descendant of a retrieve scope area is better than any other area.

If the value of the "retrieve-position-within-table" property is "first-including-carryover", then the first qualifying area in the primary retrieve scope area is better than any other area. If there is no such area, then the last qualifying area that is a descendant of a retrieve scope area is better than any other area.

If the value of the "retrieve-position-within-table" property is "last-starting ", then the last qualifying area that is a descendant of a retrieve scope area whose "is-first" trait has a value of "true" is better than any other area. If there is no such area, then the last qualifying area that is a descendant of a retrieve scope area is better than any other area.

If the value of the "retrieve-position-within-table" property is "last-ending ", then the last qualifying area that is a descendant of a retrieve scope area whose "is-last" trait has a value of "true" is better than any other area. If there is no such area, then the last qualifying area that is a descendant of a retrieve scope area is better than any other area.

If the hierarchy of areas is empty, no formatting objects are retrieved.

Contents:

EMPTY

The following properties apply to this formatting object:

7.25.3 retrieve-class-name
7.25.6 retrieve-position-within-table
7.25.2 retrieve-boundary-within-table