<?xml version="1.0" encoding="utf-8"?>
<spec>
<header>
<title>Extensible Stylesheet Language (XSL)</title>
<version>Version 1.0</version>
<w3c-designation>xsl-20000327</w3c-designation>
<w3c-doctype>W3C Working Draft</w3c-doctype>
<pubdate><day>27</day><month>March</month><year>2000</year></pubdate>
<publoc>
<loc href="http://www.w3.org/TR/2000/WD-xsl-20000327/" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">http://www.w3.org/TR/2000/WD-xsl-20000327/</loc>
<otherversions>
<loc href="http://www.w3.org/TR/2000/WD-xsl-20000327/xslspec.xml" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">XML file</loc>,
<loc href="http://www.w3.org/TR/2000/WD-xsl-20000327/xslspec.html" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">HTML (one large file)</loc>,
<loc href="http://www.w3.org/TR/2000/WD-xsl-20000327/xs000327.zip" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">ZIP file</loc>
</otherversions>

</publoc>
<latestloc>
<loc href="http://www.w3.org/TR/xsl/" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">http://www.w3.org/TR/xsl/</loc>
</latestloc>
<prevlocs>
<loc href="http://www.w3.org/TR/2000/WD-xsl-20000301" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">http://www.w3.org/TR/2000/WD-xsl-20000301</loc>
</prevlocs>
<authlist>
<author>
<name>Sharon Adler</name>
<affiliation>IBM</affiliation>
<email href="mailto:sca@us.ibm.com" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">sca@us.ibm.com</email>
</author>
<author>
<name>Anders Berglund</name>
<affiliation>IBM</affiliation>
<email href="mailto:alrb@us.ibm.com" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">alrb@us.ibm.com</email>
</author>
<author>
<name>Jeff Caruso</name>
<affiliation>Bitstream</affiliation>
<email href="mailto:jcaruso@bitstream.com" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">jcaruso@bitstream.com</email>
</author>
<author>
<name>Stephen Deach</name>
<affiliation>Adobe</affiliation>
<email href="mailto:sdeach@adobe.com" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">sdeach@adobe.com</email>
</author>
<author>
<name>Paul Grosso</name>
<affiliation>ArborText</affiliation>
<email href="mailto:paul@arbortext.com" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">paul@arbortext.com</email>
</author>
<author>
<name>Eduardo Gutentag</name>
<affiliation>Sun</affiliation>
<email href="mailto:eduardo.gutentag@eng.sun.com" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">eduardo.gutentag@eng.sun.com</email>
</author>
<author>
<name>Alex Milowski</name>
<affiliation>Lexica</affiliation>
<email href="mailto:alex@milowski.com" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">alex@milowski.com</email>
</author>
<author>
<name>Scott Parnell</name>
<affiliation>Xerox</affiliation>
<email href="mailto:Scott.Parnell@usa.xerox.com" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">Scott.Parnell@usa.xerox.com</email>
</author>
<author>
<name>Jeremy Richman</name>
<affiliation>Interleaf</affiliation>
<email href="mailto:jrichman@hq.ileaf.com" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">jrichman@hq.ileaf.com</email>
</author>
<author>
<name>Steve Zilles</name>
<affiliation>Adobe</affiliation>
<email href="mailto:szilles@adobe.com" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">szilles@adobe.com</email>
</author>
</authlist>

<status>

<p>This is a W3C Working Draft for review by W3C members and other
interested parties.

The XSL Working Group considers that this draft is stable and ready
to move to Candidate Recommendation status, following the successful
resolution of comments. This is therefore the
last call for comments on this Working Draft. Please send detailed
comments to <loc href="mailto:xsl-editors@w3.org" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">xsl-editors@w3.org</loc> before 30
April 2000; <loc href="http://lists.w3.org/Archives/Public/xsl-editors" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">archives</loc>
of the comments are available.
More general public discussion of XSL takes place on the <loc href="http://www.mulberrytech.com/xsl/xsl-list/index.html" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">XSL-List</loc>
mailing list.</p>

<p>It is a draft document and may be
updated, replaced, or obsoleted by other documents at any time.  The
XSL Working Group will not allow early implementation to constrain its
ability to make changes to this specification prior to final release.
It is inappropriate to use W3C Working Drafts as reference material or
to cite them as other than <quote>work in progress</quote>. A list of
current W3C working drafts can be found at <loc href="http://www.w3.org/TR" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">http://www.w3.org/TR</loc>.</p>

<p>This document has been produced as part of the <loc href="http://www.w3.org/Style/" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">W3C Style Activity</loc> by
the <loc href="http://www.w3.org/Style/XSL/Group/" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">XSL Working Group</loc>
(<loc href="http://cgi.w3.org/MemberAccess/" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">members only</loc>).</p>



</status>

<abstract>

<p>XSL is a language for expressing stylesheets.  It consists of two
parts:</p>

<olist>

<item><p>a language for transforming XML documents, and</p></item>

<item><p>an XML vocabulary for specifying formatting
semantics.</p></item>

</olist>

<p>An XSL stylesheet specifies the presentation of a class of XML
documents by describing how an instance of the class is transformed
into an XML document that uses the formatting vocabulary.</p>

</abstract>

<langusage>
<language id="EN">English</language>
<language id="ebnf">EBNF</language>
</langusage>
<revisiondesc>
<slist>
<sitem>See RCS log for revision history.</sitem>
</slist>
</revisiondesc>
</header>
<body>


<div1><head>Introduction and Overview</head>
<p>
This specification defines the Extensible Stylesheet Language
(XSL). XSL is a language for expressing stylesheets. Given a class of
arbitrarily structured XML <bibref ref="XML"/>
documents or data files, designers use
an XSL stylesheet to express their intentions about how that
structured content should be presented; that is, how the source
content should be styled, laid out, and paginated onto some
presentation medium, such as a window in a Web browser or a
hand-held device, or a set of
physical pages in a catalog, report, pamphlet, or book.
</p>
<div2><head>Processing a Stylesheet</head>
<p>
An XSL <term>stylesheet processor</term> accepts a document
or data in XML
and an XSL stylesheet and produces the presentation of that XML source
content that was intended by the designer of that
stylesheet. There are two aspects of this
presentation process:
first, constructing a result tree from the XML source tree and second,
interpreting the result tree to produce formatted
results suitable for presentation on a
display, on paper, in speech, or onto other media. The first
aspect is called <term>tree transformation</term> and the
second
is called <term>formatting</term>. The process of formatting
is performed by the <term>formatter.</term> This formatter
may simply be a rendering engine inside a browser.
</p>
<p>
Tree transformation allows the structure of the result tree to be significantly
different from the structure of the source tree. For example, one could add
a table-of-contents as a filtered selection of an original source document,
or one could rearrange source data into a sorted tabular presentation.
In constructing the result tree,
the tree transformation process also adds the information necessary to
format that result tree.
</p>
<p>Formatting is enabled by including formatting semantics
in the result tree. Formatting semantics are
expressed in terms of a catalog of classes of
<term>formatting
objects.</term> The nodes of the result tree are formatting
objects. The classes of formatting objects
denote typographic abstractions such as page, paragraph,
table, and so
forth. Finer control over the presentation of these abstractions is
provided by a set of formatting properties, such as
those controlling indents, word- and
letter-spacing, and widow, orphan, and hyphenation control.
In XSL, the
classes of <term>formatting objects</term> and
<term>formatting properties</term>
provide the vocabulary for expressing presentation intent.
</p>
<p>
The XSL processing model is intended to be
conceptual only.  An implementation is not
mandated to provide these as separate
processes.  Furthermore, implementations are free to process
the source document in any way that produces the same result
as if it were processed using the conceptual XSL processing
model.  A diagram depicting the detailed conceptual model is
shown below.</p>
<graphic source="two-process.gif" xml:attributes="href source" show="embed" actuate="auto" xmlns:xlink="http://www.w3.org/TR/WD-xlink"/>
<div3><head>Tree Transformations</head>
<p>
Tree transformation constructs the result tree.  In XSL,
this tree is called the <term>element and attribute
tree,</term> with objects primarily in the
"formatting object" namespace. In this tree, a formatting
object
is represented as an XML element, with the properties represented by a
set of XML attribute-value pairs. The content of the formatting object
is the content of the XML element. Tree
transformation is defined in the XSLT Recommendation
<bibref ref="XSLT"/>.
A diagram depicting this conceptual process is
shown below.</p>
<graphic source="tree1-2.gif" xml:attributes="href source" show="embed" actuate="auto" xmlns:xlink="http://www.w3.org/TR/WD-xlink"/>
<p>
The XSL stylesheet is used in tree transformation. A stylesheet
contains a set of tree construction rules. The tree construction rules
have two parts: a pattern that is matched against elements in the
source tree and a template that constructs a portion of the result
tree. This allows a stylesheet to be applicable to a wide class of
documents that have similar source tree structures.
</p>
</div3>

<div3><head>Formatting</head>
<p>
Formatting interprets the result tree in its formatting object tree
form to produce the presentation intended by the designer
of the stylesheet from which the XML element and attribute
tree in the "fo" namespace was constructed.
</p>
<p>
The vocabulary of formatting objects supported by XSL - the set of
<code>fo:</code> element types - represents the set of
typographic abstractions available to the
designer. Semantically, each formatting object represents a
specification for a part of the pagination, layout, and styling
information that will be applied to the content of that formatting
object as a result of formatting the whole result tree. Each
formatting object class represents a particular kind of formatting
behavior. For example, the block formatting object class represents
the breaking of the content of a paragraph into lines. Other parts of
the specification may come from other formatting objects; for
example, the formatting of a paragraph (block formatting
object)
depends on both the specification of properties on the block
formatting object and the specification of the layout structure into
which the block is placed by the formatter.
</p>
<p>
The properties associated with an instance of a formatting object
control the formatting of that object. Some of the properties, for
example "color", directly specify the formatted result.
Other properties, for example 'space-before', only constrain the set
of possible formatted results without specifying any particular
formatted result. The formatter may make choices among other
possible considerations such as esthetics.
</p>
<p>
Formatting consists of the generation of a tree
of geometric areas, called the <term>area tree</term>. The
geometric areas are
positioned on a sequence of one or more pages (a browser typically
uses a single page). Each geometric area has a position on the page, a
specification of what to display in that area and may have a
background, padding, and borders. For example, formatting a
single
character generates an area sufficiently large enough to hold the
glyph that is used to present the character visually and the glyph is
what is displayed in this area. These areas may be nested. For
example, the glyph may be positioned within a line, within a
block, within a page.
</p>
<p>
Rendering
takes the area tree, the abstract model of the presentation (in terms
of pages and their collections of areas), and causes a
presentation to appear on the relevant medium, such as a browser
window on a computer display screen or sheets of paper. The semantics
of rendering are not described in detail in this specification.
</p>
<p>
The first step in formatting is to "objectify" the element
and attribute
tree obtained via an XSLT transformation.
Objectifying the tree basically consists of turning the
elements in the
tree into formatting object nodes and the
attributes into property specifications. The result of this step is
the <term>formatting object tree</term>.
</p>
<graphic source="tree2-3.gif" xml:attributes="href source" show="embed" actuate="auto" xmlns:xlink="http://www.w3.org/TR/WD-xlink"/>
<p>
As part of the step of objectifying, the characters that occur in
the result tree are replaced by fo:character nodes.  The
first phase of the
Unicode Bidirectional Algorithm is used to convert implicit Bidirectional
mark-up to explicit nodes with the appropriate directional
properties. Care is taken to insure that the explicit nodes
so introduced
are properly nested in the formatting object tree.</p>
<p>
The second phase in formatting is to refine the formatting
object tree
to produce the <term>refined formatting object tree</term>.
The refinement process handles the mapping from properties
to traits.  This consists of: (1) shorthand expansion into
individual properties, (2) mapping of corresponding
properties, (3) determining computed values (may include
expression evaluation), and (4) inheritance. Details on
refinement are found in <specref ref="refinement"/>.
</p>
<p>The refinement step is depicted in the diagram below.
</p>
<graphic source="tree3-4.gif" xml:attributes="href source" show="embed" actuate="auto" xmlns:xlink="http://www.w3.org/TR/WD-xlink"/>
<p>
The third step in formatting is the construction of the area
tree. The
area tree is generated as described in the semantics of each
formatting object. The traits applicable to each formatting
object
class control how the areas are generated. Although every
formatting property may be specified on every formatting object, for
each formatting object class, only a subset of the formatting
properties are used to determine the traits for objects of
that class.
</p>
<p>Area generation is depicted in the diagram below.
</p>
<graphic source="trees4-5.gif" xml:attributes="href source" show="embed" actuate="auto" xmlns:xlink="http://www.w3.org/TR/WD-xlink"/>
</div3>
</div2>
<div2><head>Benefits of XSL</head>
<p>Unlike the case of HTML, element names in XML have no intrinsic
presentation semantics. Absent a stylesheet, a processor could not
possibly know how to render the content of an XML document other
than as an undifferentiated string of characters. XSL provides
a comprehensive model and a vocabulary for writing such stylesheets using XML syntax.
</p>
<p>
This document is intended for implementors of such XSL processors.
Although it can be used as a reference manual for writers of XSL
style sheets, it is not tutorial in nature. </p>
<p>
XSL builds on the prior work on Cascading Style Sheets
<bibref ref="CSS2"/> and
the Document Style Semantics and Specification Language
<bibref ref="DSSSL"/>.
While many of XSL's formatting objects and properties correspond
to the common set of properties, this would not be
sufficient by
itself to accomplish all the goals of XSL. In particular, XSL introduces
a model for pagination and layout that extends what is currently available
and that can in turn be extended, in a straightforward way, to page
structures beyond the simple page models described in this specification.
</p><div3><head>Paging and Scrolling</head>
<p>Doing both scrollable document windows and pagination introduces
new complexities to the styling (and pagination) of XML content.
Because pagination introduces arbitrary boundaries
(pages or regions on pages) on the content, concepts such as
the control
of spacing at page, region, and block boundaries become
extremely important. There are also concepts related to
adjusting the spaces between lines (to adjust the page
vertically)
and between words and letters (to justify the lines of text).
These do not always arise with simple scrollable document
windows, such as those found in today's browsers. However, there
is a correspondence between a page with multiple regions, such as a body,
header, footer, and left and right side-bars, and a Web
presentation using "frames". The distribution of content into the regions
is basically the same in both cases, and XSL handles both
cases in an analogous fashion.</p>
<p>
XSL was developed to give designers control over the features
needed when documents are paginated as well as to provide an
equivalent "frame" based structure for browsing on the Web.
To achieve this control, XSL has extended the set of formatting
objects and formatting properties. In addition, the selection
of XML source components that can be styled (elements,
attributes, text nodes, comments, and processing
instructions) is based on XSLT and XPath, thus providing the
user with an extremely powerful selection mechanism. </p>
<p>
The design of the formatting objects and properties extensions
was first inspired by DSSSL. The actual extensions, however, do not
always look like the DSSSL constructs on which they were based. To either
conform more closely with the CSS2 specification or to
handle cases more simply than in DSSSL, some extensions have diverged from DSSSL.
</p><p>
There are several ways in which extensions were made. In some cases,
it sufficed to add new values, as in the case of those added to reflect
a variety of writing-modes, such as top-to-bottom and bottom-to-top, rather
than just left-to-right and right-to-left.
</p><p>
In other cases, common properties that are expressed in CSS2
as one property with multiple simultaneous values, are split into
several new properties to provide independent control over independent
aspects of the property. For example, the "white-space" property was
split into four properties:
a "space-treatment" property that
controls how white-space is processed, a "line-feed" property that controls
how line-feeds are processed, a "white-space-collapse" property that controls
how multiple consecutive spaces are collapsed,
and a "wrap-option" property
that controls whether lines are automatically wrapped when
they encounter a boundary, such as the edge of a column.
The effect of splitting a property into two or more
(sub-)properties is to make the equivalent existing CSS2
property a "shorthand" for the set of sub-properties it subsumes.
</p><p>
In still other cases, it was necessary to create new properties.
For example, there are a number of new properties that control how
hyphenation is done. These include identifying the script and country
the text is from as well as such properties as "hyphenation-character"
(which varies from script to script).
</p><p>
Some of the formatting objects and many of the properties in XSL
come from the CSS2 specification, ensuring compatibility
between the two.</p>
<p>
There are four classes of XSL properties that can be identified as:</p>
<olist><item><p>
CSS properties by copy (unchanged from their CSS2
semantics)</p></item>
<item><p>
CSS properties with extended values</p></item>
<item><p>
CSS properties broken apart and/or extended</p></item>
<item><p>
XSL only properties</p></item></olist>
</div3>
<div3><head>Selectors and Tree Construction</head>
<p>
As mentioned above, XSL uses XSLT and XPath for tree construction
and pattern selection, thus providing a high degree of control
over how portions of the source content are presented, and what
properties are associated with those content portions, even where
mixed namespaces are involved.
</p><p>
For example, the patterns of XPath allow the selection of a portion
of a string or the Nth text node in a paragraph. This allows
users to have a rule that makes all third paragraphs in
procedural steps appear in bold, for instance. In addition,
properties can be associated with a content portion based on the
numeric value of that content portion or attributes on the
containing element. This allows one to have a style rule
that makes negative values appear in "red" and positive
values appear in "black". Also, text can be generated
depending on a particular context in the source tree,
or portions of the source tree may be presented
multiple times with different styles.
</p></div3>
<div3><head>An Extended Page Layout Model</head>
<p>
There is a set of formatting objects in XSL to describe both the
layout structure of a page or "frame"
(how big is the body; are there multiple columns;
are there headers, footers, or side-bars; how big are these)
and the rules by which the XML source content is placed into these "containers".
</p><p>
The layout structure is defined in terms of one or more instances
of a "simple-page-master" formatting object. This formatting
object allows one to define independently filled regions for
the body (with multiple columns), a header, a footer, and side-bars
on a page. These simple-page-masters can be used in page sequences
that specify in which order the various simple-page-masters shall be used.
The page sequence also specifies how styled content is to fill those pages.
This model allows one to specify a sequence of simple-page-masters
for a book chapter where the page instances are automatically
generated by the formatter or an explicit sequence of pages
such as used in a magazine layout. Styled content is assigned
to the various regions on a page by associating the name of the
region with names attached to styled content in the result tree.
</p><p>
In addition to these layout formatting objects and properties,
there are properties designed to provide the level of control
over formatting that is typical of paginated documents.
This includes control over hyphenation, and expanding the control over
text that is kept with other text in the same line, column,
or on the same page.
</p></div3>
<div3><head>A Comprehensive Area Model</head>
<p>
The extension of the properties and formatting objects,
particularly in the area on control over the spacing of blocks, lines,
and page regions and within lines, necessitated an extension of the
CSS2 box formatting model. This extended model is described
in <specref ref="area_model"/> of this
specification. The CSS2 box model is a
subset of this model.  See the mapping of the CSS2 box model
terminology to the XSL Area Model terminology in
<specref ref="cssbox"/>.
The area model provides a vocabulary for describing
the relationships and space-adjustment between
letters, words, lines, and blocks.</p>
</div3>
<div3><head>Internationalization and Writing-Modes</head>
<p>
There are many scripts, in particular in the Far East, that are
typically set with words proceeding from top-to-bottom and
lines proceeding either from right-to-left (most common) or
from left-to-right. Other directions are also
used. Properties expressed in terms of a fixed,
absolute frame of reference (using top, bottom, left, and right)
and which apply only to a notion of words proceeding from left to right
or right to left do not generalize well to the languages based on these scripts.
</p><p>
For this reason XSL (and before it DSSSL) uses a relative frame of
reference for the formatting object and property descriptions. Just as
the CSS2 frame of reference has four directions (top, bottom, left and right),
so does the XSL relative frame of reference have four directions
(before, after, start, and end), but these are relative to the "writing-mode". The
"writing-mode" property is a way of controlling the
directions needed by a formatter to correctly place
glyphs, words, lines, blocks, etc. on the page or screen.
The "writing-mode" expresses the basic directions noted
above. There are writing-modes for "left-to-right - top-to-bottom"
(denoted as "lr-tb"), "right-to-left - top-to-bottom" (denoted as "rl-tb"),
"top-to-bottom - right-to-left" (denoted as "tb-rl") and more, see <specref ref="writing-mode"/>
for the description of the "writing-mode" property.
Typically, the writing-mode value specifies two directions,
the first is the inline-progression-direction which determines
the direction in which words will
be placed and the second is the block-progression-direction
which determines the direction in which blocks (and lines)
are placed one after another.
</p><p>
Besides the directions that are explicit in the name of the
value of the "writing-mode" property, the writing-mode determines
other directions needed by the formatter, such as the
shift-direction (used for sub- and super-scripts), etc.
</p></div3>
<div3><head>Linking</head>
<p>
Because XML, unlike HTML, has no built-in semantics,
there is no built-in notion of a hypertext link. Therefore,
XSL has a formatting object that expresses the dual semantics of
formatting the content of the link reference and the
semantics of following the link.</p>
<p>
XSL provides a few mechanisms for changing the presentation
of a link target that is being visited. One of these mechanisms
permits indicating the link target as such;
another allows for control over the placement of the link
target in the viewing area; still another permits some degree of
control over the way the link target is displayed in relationship
to the originating link anchor.</p>
<p>XSL also provides a general mechanism for changing the way elements
are formatted depending on their active state. This is particularly
useful in relation to links, to indicate whether a given link
reference has already been visited, or to apply a given style
depending on whether the mouse, for instance, is hovering over
the link reference or not.</p>
</div3>
</div2>
</div1>


<div1><head>Introduction to XSL Transformation</head>
<div2>
<head>Tree Construction</head>
<p>The Tree Construction is described in
"XSL Transformations" <bibref ref="XSLT"/>.</p>
<p>The provisions in "XSL Transformations" form an integral part of
this recommendation and are considered normative.</p>
</div2>

<div2 id="xsl-namespace">
<head>XSL Namespace</head>

<p>The XSL namespace has the URI <code>http://www.w3.org/1999/XSL/Format</code>.</p>
<note><p>The <code>1999</code> in the URI indicates the year in which
the URI was allocated by the W3C.  It does not indicate the version of
XSL being used.</p></note>
<p>XSL processors must use the XML namespaces mechanism <bibref ref="XMLNAMES"/> to recognize elements and attributes from this
namespace. Elements from the XSL namespace are recognized only in the
stylesheet, not in the source document.
Implementors must not extend the XSL
namespace with additional elements or attributes. Instead, any
extension must be in a separate namespace.</p>
<p>This specification uses the prefix <code>fo:</code> for referring
to elements in the XSL namespace. However, XSL stylesheets are free
to use any prefix, provided that there is a namespace declaration that
binds the prefix to the URI of the XSL namespace.</p>
<p>An element from the XSL namespace may have any attribute not from
the XSL namespace, provided that the <xtermref href="http://www.w3.org/TR/xpath#dt-expanded-name" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">expanded-name</xtermref> of the
attribute has a non-null namespace URI.  The presence of such
attributes must not change the behavior of XSL elements and functions
defined in this document. Thus, an XSL processor is always free to
ignore such attributes, and must ignore such attributes without giving
an error if it does not recognize the namespace URI. Such attributes
can provide, for example, unique identifiers, optimization hints, or
documentation.</p>
<p>It is an error for an element from the XSL namespace to have
attributes with expanded-names that have null namespace URIs
(i.e., attributes with unprefixed names) other than
attributes defined for the element in this document.</p>
<note><p>The conventions used for the names of XSL elements,
attributes, and functions are as follows:
names are all lower-case,
hyphens are used to separate words, dots are used to
separate names for the components of complex datatypes,
and abbreviations are used only if they already
appear in the syntax of a related language such as XML or
HTML.</p></note>

</div2>

</div1>


<div1 id="fo-jc-intro"><head>Introduction to
Formatting</head>
<p>The aim of this section is to describe the general process
of formatting, enough to read the area model and the
formatting object descriptions and properties and to
understand the process of refinement.</p>
<p><emph>Formatting</emph> is the process of turning the result of an XSL
transformation into a tangible form for the reader or listener. This
process comprises several steps, some of which depend on others in a
non-sequential way.
Our model for formatting will be the construction of an
<term>area tree</term>, which is an ordered tree containing
geometric information
for the placement of every glyph, shape, and image in the document,
together with information embodying spacing constraints and other rendering
information; this information is referred to under the rubric of
<emph>traits</emph>, which are to areas what properties are to formatting objects
and attributes are to XML nodes. Section 4 (see <specref ref="area_model"/>) will
describe the area tree and
define the default placement-constraints on stacked areas. However, this is
an abstract model which need not be actually implemented in this way
in a formatter, so long as the resulting tangible form obeys the implied constraints.
Constraints might conflict to the point where it is
impossible to satisfy them all.  In that case, it is
implementation-defined which constraints should be relaxed
and in what order to satisfy the others.
</p>
<p><emph>Formatting objects</emph> are elements in the formatting object tree, whose
names are from the XSL namespace; a formatting object belongs to a
<emph>class</emph> of formatting objects identified by its element name. The
formatting behavior of each class of formatting objects is described in
terms of what areas are created by a formatting object of that class, how
the traits of the areas are established, and how the areas are
structured hierarchically with respect to areas created by other formatting
objects. Sections 6 (see <specref ref="fo-section"/>) and
Section 7
(see <specref ref="pr-section"/>
describe formatting objects and their properties.</p>
<p>Some formatting objects are <emph>block-level</emph> and others are
<emph>inline-level</emph>. This refers to the types of areas which they generate,
which in turn refer to their default placement method. Inline-areas (for
example, glyph-areas) are collected into lines and the direction in which
they are stacked is the inline-progression-direction. Lines are a type of
block-area and these are stacked in a direction perpendicular to the
inline-progression-direction, called the block-progression-direction. See
Section 4 for detailed decriptions of these area types and
directions.</p>
<p>In Western writing systems, the block-progression-direction is
"top-to-bottom" and the inline-progression-direction is
"left-to-right". This specification treats other writing systems
as well and introduces the terms "block" and "inline"
instead of using absolute indicators like "vertical" and
"horizontal". Similarly this specification tries to give
relatively-specified directions ("before" and "after"
in the block-progression-direction, "start" and "end"
in the inline-progression-direction) where appropriate, either in addition
to or in place of absolutely-specified directions such as "top",
"bottom", "left", and "right". These are
interpreted according to the value of the writing-mode property.</p>
<p>Central to this model of formatting is <emph>refinement</emph>.
This is a computational
process which finalizes the specification of properties based on the attribute
values in the XML result tree. Though the XML result tree and the formatting object
tree have very similar structure, it is helpful to think of them as
separate conceptual entities. Refinement involves</p>
<ulist><item><p>propagating the various inherited values
of properties (both implicitly and those with an attribute value of "inherit"),
</p></item>
<item><p>evaluating expressions in property value specifications into actual
values, which
are then used to determine the value of the properties</p></item>
<item><p>converting relative numerics to absolute numerics,</p></item>
<item><p>constructing some composite properties from more than one attribute,</p></item>
</ulist>
<p>Some of these operations (particularly evaluating expressions) depend on knowledge
of the area tree. Thus refinement is not necessarily a straightforward, sequential
procedure, but may involve look-ahead, back-tracking, or control-splicing with
other processes in the formatter. Refinement is described more fully in Section 5.
See (see <specref ref="refinement"/>).</p>
<p>To summarize, formatting proceeds by constructing an area tree
(containing areas and their traits) which satisfies constraints based on
information contained in the XML result tree (containing
element nodes and their
attributes). Conceptually, there are intermediate steps of
constructing a formatting object tree (containing formatting objects and their
properties) and refinement;
these steps may proceed in an interleaved fashion during the
construction of the area tree.</p>
<div2><head>Conceptual Procedure</head>
<p>This subsection contains a conceptual description of how
formatting could work. This conceptual
procedure does not mandate any particular algorithms or data structures as
long as the result obeys the implied constraints.</p>
<p>The procedure works by processing formatting objects. Each object,
while being processed, may initiate processing in other objects. While the
objects are hierarchically structured, the processing is not; processing of
a given object is rather like a co-routine which may pass control to other
processes, but pick up again later where it left off. The procedure starts
by initiating the processing of the fo:root
formatting object.</p>
<p>Unless otherwise specified, processing a formatting object creates areas
and returns
them to its parent to be placed in the area tree. Like a co-routine, it
resumes control later and initiates formatting of its own children (if
any), or some subset of them. The formatting object supplies parameters to its
children
based on the traits of areas already in the area tree, possibly including
areas generated by the formatting object or its ancestors. It then disposes of the
areas
returned by its formatting object children. It might simply
return such an area to its
parent (and will always do this if it does not generate areas itself), or
alternatively it might arrange the area in the area tree according to the
semantics of the formatting object; this may involve changing its geometric position.
It
terminates processing when all its children have terminated processing (if
initiated) and it is finished generating areas.</p>
<p>Some formatting objects do not themselves generate areas, instead these
formatting objects simply
return the areas returned to them by their children. Alternatively, a formatting object
may continue to generate (and return) areas based on information discovered
while formatting its own children; for example, the fo:page-sequence formatting object
will continue generating pages as long as it contains a flow with
unprocessed descendants.</p>
<p>Areas returned to an fo:root formatting object are
page-viewport-areas, and are simply placed as
children of the area tree root in the order in which they are returned,
with no geometrical implications.</p>
<p>As a general rule, the order of the area tree parallels the order of the
formatting object tree. That is, if one formatting object
precedes another in the depth-first
traversal of the formatting object tree, with neither
containing the other, then
all the areas generated by the first will precede all the areas generated
by the second in the depth-first traversal of the area tree, unless
otherwise specified. Typical exceptions to this rule would be things like
side floats, before floats, and footnotes.</p>
<p>At the end of the procedure, the areas and their traits have been
constructed, and they are required to satisfy constraints described in the
definitions of their associated formatting objects, and in the area model
section. In particular, size and position of the areas will be subject to
the placement and spacing constraints described in the area model, unless
the formatting object definition indicates otherwise.</p>
<p>The formatting object definitions, property descriptions, and area model
are not algorithms. Thus, the formatting object semantics do not specify how
the line-breaking algorithm must work in collecting characters into words,
positioning words within lines, shifting lines within a container, etc.
Rather this specification assumes that the formatter has done these things
and describes the constraints which the result is supposed to
satisfy.</p>
</div2>
</div1>




<div1 id="area_model"><head>Area Model</head>
<p>In XSL, one creates a tree of formatting objects that serve as inputs or
specifications to a formatter. The formatter generates a hierarchical arrangement
of areas which comprise the formatted result. This section defines the general
model of areas and how they interact. The purpose is to present an abstract
framework which is used in describing the semantics of formatting objects.
It should be seen as describing a series of constraints for
conforming implementations,
and not as prescribing particular algorithms.</p>
<div2 id="area-intro"><head>Introduction</head>
<p>The formatter generates an ordered tree, the <term>area tree,</term> which
describes a geometric structuring of the output medium. The terms
<term>child, sibling, parent, descendant,</term> and <term>ancestor</term>
refer to this tree structure. The tree has a <term>root node</term>.</p>
<p>Each area tree node other than the root is called an <term>area</term> and is
associated to a rectangular portion of the output medium. Areas are
not formatting objects; rather, a formatting object generates zero or more
rectangular areas, and normally each area is generated by a unique object in the
formatting object tree.</p>
<note><p>The only exceptions are when several leaf nodes of the formatting object
tree are combined
to generate a single area, for example when several characters
in sequence generate a single ligature
glyph. In all such cases, relevant properties such as
<trait>font-family</trait> and <trait>font-size</trait> are the same for
all the generating formatting objects (see section <specref ref="area-linebuild"/>).</p></note>
<p>An area has a <term>content-rectangle</term>,
the portion in which its child areas are assigned, and optional
<term>padding</term> and <term>border</term>. The diagram shows
how these portions are related to one another. The outer bound of the border
is called the <term>border-rectangle</term>, and the outer
bound of the
padding is called the <term>padding-rectangle</term>.</p>
<graphic source="Image1.gif" xml:attributes="href source" show="embed" actuate="auto" xmlns:xlink="http://www.w3.org/TR/WD-xlink"/>
<p>Each area has a set of <term>traits</term>, a mapping of names to values,
in the way elements have attributes and formatting objects have properties.
Individual traits are used either
for rendering the area or for defining constraints on the result of formatting,
or both. Traits used strictly for formatting purposes or for defining
constraints may be called <term>formatting traits</term>, and traits used for
rendering may be called <term>rendering traits</term>.
Traits whose values are copied from property of the same or a corresponding
name are listed in <specref ref="property-index"/> and <specref ref="refinement"/>;
other traits are listed
in <specref ref="area-traitlist"/>.</p>
<p>The semantics of each type of formatting object that generates areas are
given in terms of which areas it generates and their place in the area-tree
hierarchy. This may be further modified by interactions between the various
types of formatting
objects. The properties of the formatting object determine what areas are
generated and how the formatting object's content is distributed among them.
(For example, a word that is not to be hyphenated may not have its glyphs
distributed into areas on two separate line-areas.)</p>
<p>The traits of an area are either:</p>
<p>1. "directly-derived" -- The values of directly-derived traits are the computed
value of a property of the same name on the generating formatting object, or</p>
<p>2. "indirectly-derived" -- The values of indirectly-derived traits are the
result of a computation involving the computed values of one or more properties
on the generating formatting object, other traits on this area or other
interacting areas (ancestors, parent, siblings, and/or children) and/or
one or more values constructed by the formatter. The calculation formula
may depend on the type of the formatting object.</p>
<p>This description assumes that refined values have been computed for all
properties of formatting objects in the result tree, i.e.,
all relative and corresponding values have been computed and the inheritable
values have been propagated as described in <specref ref="refinement"/>. This
allows the
process of inheritance to be described once and avoids a need to repeat
information on computing values
in this description.</p>
</div2>
<div2 id="area-rect"><head>Rectangular Areas</head>
<div3><head>Area Types</head>
<p>There are two types of areas: <term>block-areas</term> and
<term>inline-areas</term>. These differ according to how
they are typically stacked by the formatter. An area can have
block-area children or inline-area children as determined
by the generating formatting object, but a given area's children must all be of
one type. Although block-areas and inline-areas are
typically stacked, some areas can be explicitly positioned.</p>
<p>A <term>line-area</term> is a special kind of block-area whose children
are all inline-areas. A <term>glyph-area</term> is a special kind of
inline-area which has no child areas, and has a single
glyph image as its content.</p>
<p>Typical examples would be: a paragraph rendered by using
an fo:block formatting object,
which generates block-areas,
and a character rendered by using an fo:character
formatting object,
which generates an inline-area (in fact, a glyph-area).</p>
</div3>
<div3 id="area-common"><head>Common Traits</head>
<p>Associated with any area are two directions, which are derived from the
generating
formatting object's <trait>writing-mode</trait> and
<trait>reference-orientation</trait> properties: the
<term>block-progression-direction</term> is the direction for stacking block-area
descendants of the area, and the
<term>inline-progression-direction</term> is the direction for stacking inline-area
descendants of the area. Another
trait, the <term>shift-direction</term>, is present on inline-areas and refers to
the direction in which baseline
shifts are applied. Also the <term>glyph-orientation</term> defines the orientation
of glyph-images in the rendered result.</p>
<p>The Boolean trait <term>is-reference-area</term> determines
whether or not an area establishes a coordinate system for
specifying indents. An area for which this trait is <code role="value">true</code>
is called a <term>reference-area</term>.
Only a reference-area may have a block-progression-direction which is different from
that of its parent.
A reference-area may be either a
block-area or an inline-area.</p>

<p>The Boolean trait <term>is-viewport-area</term> determines
whether or not an area establishes an opening through which its
descendant areas can be viewed, and can be used to
present clipped or scrolled material; for example, in printing
applications where bleed and trim is desired.
An area for which this trait is <code role="value">true</code>
is called a <term>viewport-area</term>.
</p>
<p>A common construct is a <term>viewport/reference pair</term>.
This is a block-area viewport-area <var>V</var> and a block-area
reference-area <var>R</var>, where <var>R</var> is the sole child
of <var>V</var> and where the start-edge and end-edge of the
content-rectangle of <var>R</var> coincide with the start-edge and
end-edge of the content-rectangle of <var>V</var>.</p>

<p>Each element has the traits <term>top-position</term>, <term>bottom-position</term>,
<term>left-position</term>, and <term>right-position</term> which represent the distance
from the edges of its content-rectangle to the like-named edges of the
nearest ancestor reference-area (or the page-viewport-area
in the
case of areas generated by descendants of formatting objects
whose absolute-position is <code role="value">fixed</code>); the <term>left-offset</term>
and <term>top-offset</term> determine the amount by which
a relatively-positioned area is shifted for rendering.  These traits receive
their values during the formatting process, or in the case
of absolutely positioned areas, during refinement.</p>
<p>The <term>block-progression-dimension</term> and
<term>inline-progression-dimension</term> of an area represent the
extent of the content-rectangle of that area in each of the two
relative dimensions</p>

<p>Other traits include:</p>
<ulist><item>
<p>the <term>is-first</term> and <term>is-last</term> traits, which are Boolean traits
indicating the order in which areas are generated and returned by a given
formatting object. <term>is-first</term> is <code role="value">true</code>
for the first area (or only area) generated and returned by a formatting object,
and <term>is-last</term>
is true for the last area (or only area).</p></item>
<item>
<p>the amount of space outside the border-rectangle: <term>space-before</term>,
<term>space-after</term>, <term>space-start</term>, and <term>space-end</term>
(though some of these may be required to be zero on certain classes of area);</p></item>
<item><p>the thickness of each of the four sides of the padding: <term>padding-before</term>,
<term>padding-after</term>, <term>padding-start</term>, and <term>padding-end</term>;</p></item>
<item><p>the style, thickness, and color of each of the
four sides of the border: <term>border-before</term>, etc.; and</p></item>
<item><p>the background rendering of the
area: <term>background-color</term>, <term>background-image</term>, and
other background traits.</p>
<note><p>"Before", "after", "start",
and "end" refer to relative directions and are defined
below.</p></note>
</item><item>
<p>a set of font traits (see "Common Font Properties")
which determine the <term>nominal-font</term> that is deemed to be used
within that area.</p></item>
</ulist>
<p>Unless otherwise specified, the traits of a
formatting object are present on each of its generated areas,
and with the same value. (However, see sections
<specref ref="area-linebuild"/> and <specref ref="rend-border"/>.)</p>
</div3>
<div3 id="area-geo"><head>Geometric Definitions</head>
<p>As described above, the <term>content-rectangle</term> is the rectangle
bounding the inside of the padding and is used to describe
the constraints on the positions of descendant areas. It is possible that
marks from glyph contents or descendant areas may appear outside the
content-rectangle.</p>
<p>Related to this is the <term>allocation-rectangle</term>
of an area,
which is used to describe the constraints on the position of
the area within its parent area. For an inline-area this extends
to the content-rectangle
in the block-progression-direction and to the border-rectangle in the
inline-progression-direction.</p>
<figure>
<graphic source="Image2.gif" xml:attributes="href source" show="embed" actuate="auto" xmlns:xlink="http://www.w3.org/TR/WD-xlink"/>
<figcap><p>Allocation- and content-rectangles of an inline-area</p></figcap>
</figure>
<p>For a block-area, the allocation-rectangle extends to the border-rectangle in
the block-progression-direction and outside the content-rectangle
in the inline-progression-direction by an amount equal to
the end-indent,
and in the opposite direction by an amount equal to the start-indent.</p>
<note><p>The inclusion of space outside the border-rectangle of a block-area
in the inline-progression-direction does not affect
placement constraints, and
is intended to promote compatibility with the CSS box model.</p></note>
<figure>
<graphic source="Image3.gif" xml:attributes="href source" show="embed" actuate="auto" xmlns:xlink="http://www.w3.org/TR/WD-xlink"/>
<figcap><p>Allocation- and content-rectangles of a block-area</p></figcap>
</figure>
<p>The edges of a rectangle are designated as follows:</p>
<ulist><item>
<p>the <term>before-edge</term> is the edge occurring first in the
block-progression-direction and perpendicular
to it;</p></item>
<item><p>the <term>after-edge</term> is the edge opposite
the before-edge;</p></item>
<item><p>the <term>start-edge</term> is the edge occurring
first in the inline-progression-direction and perpendicular
to it,</p></item>
<item><p>the <term>end-edge</term> is the edge opposite the
start-edge.</p></item></ulist>
<p>The following diagram shows the correspondence between the various edge
names for a mixed writing-mode example:</p>
<graphic source="japaneseblock3.gif" xml:attributes="href source" show="embed" actuate="auto" xmlns:xlink="http://www.w3.org/TR/WD-xlink"/>

<p>For purposes of this definition, the content-rectangle of an area uses the
inline-progression-direction and block-progression-direction of that area;
but the border-rectangle, padding-rectangle, and
allocation-rectangle use the
directions of its parent area. Thus the edges designated for the
content-rectangle may not correspond with the same-named edges
on the padding-, border-,
and allocation-rectangles. This is important in the case of
nested block-areas with different writing-modes.</p>
<p>Each inline-area has a <term>position-point</term> determined by the formatter,
on the start-edge
of its allocation-rectangle; for a glyph-area, this is
a point on the leading edge of the glyph on its preferred baseline (see below).
This is script-dependent and does not necessarily correspond to the
(0,0) coordinate point used for the data describing the glyph shape.</p>
</div3>
<div3 id="area-treeorder"><head>Tree Ordering</head>
<p>In the area tree, the set of areas with a given parent is ordered.
The terms <term>initial, final, preceding</term>, and
<term>following</term> refer to this ordering.</p>

<p>In any ordered tree, this sibling order extends to an ordering of the entire tree
in at least two ways.</p>
<ulist><item><p>In the <term>pre-order traversal order</term> of a tree, the children
of each node (their order unchanged relative to one another) follow the node, but
precede any following siblings of the node or of its ancestors.</p></item>
<item><p>In the <term>post-order traversal order</term> of a tree, the children of
each node precede the node, but follow any preceding siblings of the node or of its
ancestors.</p></item></ulist>
<p>"Preceding" and "following", when applied to non-siblings, will depend on the
extension order used, which must be specified. However, in either of these given orders,
the leaves of the tree (nodes without children) are unambiguously ordered.</p>
</div3>

<div3 id="area-stackcon"><head>Stacking Constraints</head>
<p>This section defines the notion of <term>block-stacking constraints</term> and
<term>inline-stacking constraints</term> involving areas.  These are defined as
ordered relations, i.e., if <var>A</var> and <var>B</var>
have a stacking constraint
it does not necessarily mean that <var>B</var> and <var>A</var> have a stacking
constraint.</p>
<p>The <term>area-class</term> trait is an enumerated value which is
<code role="value">xsl-normal</code> for an area which is stacked with
other areas in sequence.  A <term>normal</term> area is an
area for which this trait is <code role="value">xsl-normal</code>. A
<term>page-level-out-of-line</term>
area is an area with area-class <code role="value">xsl-footnote</code>,
<code role="value">xsl-before-float</code>,
or <code role="value">xsl-fixed</code>; placement of these areas is controlled
by the fo:page-sequence
ancestor of its generating formatting object.  A <term>reference-level-out-of-line</term>
area is an area with area-class
<code role="value">xsl-side-float</code> or <code role="value">xsl-absolute</code>;
placement of these areas is controlled by the formatting object generating
the relevant reference-area.  Areas with area-class equal to one of
<code role="value">xsl-normal</code>,
<code role="value">xsl-footnote</code>, or
<code role="value">xsl-before-float</code> are defined to be
<term>stackable</term>,
indicating that they are supposed to be properly stacked.
</p>
<p>If <var>P</var> is a block-area, then there is a <term>fence-before</term>
<var>P</var> if <var>P</var> is a reference-area or if the
border-before-width
or padding-before-width of <var>P</var> are non-zero.
Similarly, there is a
<term>fence-after</term> <var>P</var> if <var>P</var> is a
reference-area
or if the border-after-width or padding-after-width of <var>P</var> are non-zero.</p>
<p>If <var>A</var> and <var>B</var> are stackable areas, and <var>S</var> is
a sequence of space-specifiers, it is defined that <term><var>A</var> and <var>B</var>
have block-stacking constraint <var>S</var></term> if
any of the following conditions holds:</p>
<olist>
<item><p><var>B</var> is a block-area which is the first normal
child of <var>A</var>, and <var>S</var> is the sequence consisting of the
space-before of <var>B</var>.</p></item>
<item><p><var>A</var> is a block-area which is the last normal
child of <var>B</var>, and <var>S</var> is the sequence consisting of the
space-after of <var>A</var>.</p></item>
<item><p><var>A</var> and <var>B</var> are both block-areas, and either</p>
    <p>a. <var>B</var> is the next stackable sibling area of <var>A</var>,
    and <var>S</var> is the sequence consisting of the space-after of <var>A</var>
    and the space-before of <var>B</var>;</p>
    <p>b. <var>B</var> is the first normal child of a block-area
    <var>P</var>, there is no fence-before <var>P</var>,
<var>A</var> and
    <var>P</var> have a block-stacking constraint <var>S</var>', and <var>S</var>
    consists of <var>S</var>' followed by the space-before of <var>B</var>; or</p>
    <p>c. <var>A</var> is the last normal child of a block-area
    <var>P</var>, there is no fence-after <var>P</var>,
<var>P</var> and
    <var>B</var> have a block-stacking constraint <var>S</var>'', and <var>S</var>
    consists of the space-after of <var>A</var> followed by <var>S</var>''.</p></item>
</olist>
<figure>
<graphic source="block-stacking-constraints.gif" xml:attributes="href source" show="embed" actuate="auto" xmlns:xlink="http://www.w3.org/TR/WD-xlink"/>
<figcap><p>Adjacent Edges with Block-stacking</p></figcap>
</figure>
<note><p>The use of "stackable" in two places in the above definition allows
block-stacking constraints to apply between areas of area-class
<code role="value">xsl-before-float</code>
or <code role="value">xsl-footnote</code>.</p></note>
<p>When <var>A</var> and <var>B</var> have a block-stacking constraint, the
<term>adjacent edges</term> of <var>A</var> and <var>B</var> are an ordered
pair recursively defined as:</p>
<ulist><item><p>In case 1, the before-edge of the
content-rectangle of <var>A</var>
and the before-edge of the allocation-rectangle of <var>B</var>.</p></item>
<item><p>In case 2, the after-edge of the content-rectangle
of <var>A</var> and
the after-edge of the allocation-rectangle of <var>B</var>.</p></item>
<item><p>In case 3a, the after-edge of the
allocation-rectangle of <var>A</var>
and the before-edge of the allocation-rectangle of <var>B</var>.</p></item>
<item><p>In case 3b, the first of the adjacent edges of <var>A</var> and <var>P</var>,
and the before-edge of the allocation-rectangle of <var>B</var>.</p></item>
<item><p>In case 3c, the after-edge of the
allocation-rectangle of <var>A</var>
and the second of the adjacent edges of <var>P</var> and <var>B</var>.</p></item></ulist>

<note><p>The intention of the definition is to identify areas at any level of the
tree which have only space between them.</p></note>

<figure>
<graphic source="mantree.gif" xml:attributes="href source" show="embed" actuate="auto" xmlns:xlink="http://www.w3.org/TR/WD-xlink"/>
<figcap><p>Block-stacking constraint example</p></figcap>
</figure>

<p><emph>Example</emph>. In this diagram each node represents a block-area.

Assume that all padding
and border widths are zero, and none of the areas are
reference-areas. Then <var>P</var>
and <var>A</var> have a block-stacking constraint, as do <var>A</var>
and <var>B</var>, <var>A</var> and

<var>C</var>, <var>B</var> and <var>C</var>, <var>C</var> and <var>D</var>,
<var>D</var> and <var>B</var>,
<var>B</var> and

<var>E</var>, <var>D</var> and

<var>E</var>, and <var>E</var> and

<var>P</var>; these

are the only pairs  in the diagram having block-stacking constraints. If

<var>B</var> had non-zero padding-after, then <var>D</var>

and <var>E</var> would not have any block-stacking constraint (though <var>B</var>

and <var>E</var> would continue to have a block-stacking constraint).</p>

<p><emph>Inline-stacking constraints.</emph> This section will recursively define the
inline-stacking constraints between two inline-areas,
together with the notion of
fence-before and fence-after; these definitions are interwoven with one another.
This parallels the definition for block-stacking
constraints, but with the additional complication that we may have a stacking
constraint between inline-areas which are stacked in opposite inline-progression-directions.
(This is not an issue for block-stacking constraints because
a block-area which is not a reference-area may not have
block-progression-direction
different from that of its parent.)</p>
<p>If <var>P</var> and <var>Q</var> have an inline-stacking constraint, then
<var>P</var> has a <term>fence-before <var>Q</var></term> if <var>P</var> is
a reference-area or has non-zero border-width or padding-width at the first
adjacent edge of <var>P</var> and <var>Q</var>. Similarly, <var>Q</var> has
a <term>fence-after <var>P</var></term> if <var>Q</var> is a reference-area
or has non-zero border-width or padding-width at the second
adjacent edge of
<var>P</var> and <var>Q</var>.</p>
<p>If <var>A</var> and <var>B</var> are normal inline-areas, and <var>S</var>
is a sequence of space-specifiers, it is defined that <term><var>A</var> and
<var>B</var> have inline-stacking constraint <var>S</var></term> if any of the
following conditions holds:</p>
<olist>
<item><p><var>B</var> is an inline-area which is the first normal child of
<var>A</var>, and <var>S</var> is the sequence consisting of the space-start of
<var>B</var>.</p></item>
<item><p><var>A</var> is an inline-area which is the last normal child of
<var>B</var>, and <var>S</var> is the sequence consisting of the space-end of
<var>A</var>.</p></item>
<item><p><var>A</var> and <var>B</var> are both inline-areas, and either</p>
    <p>a. <var>B</var> is the next normal sibling area of <var>A</var>,
    and <var>S</var> is the sequence consisting of the space-end of <var>A</var>
    and the space-start of <var>B</var>;</p>
    <p>b. <var>B</var> is the first normal child of an inline-area <var>P</var>,
	      <var>P</var> has no fence-after <var>A</var>,
<var>A</var> and <var>P</var> have an
		  inline-stacking constraint <var>S</var>', the inline-progression-direction of
		  <var>P</var> is the same as the inline-progression-direction of the nearest
		  common ancestor area of <var>A</var> and <var>P</var>, and <var>S</var> consists of
		  <var>S</var>' followed by the space-start of <var>B</var>.</p>
    <p>c. <var>A</var> is the last normal child of a block-area <var>P</var>,
	      <var>P</var> has no fence-before <var>B</var>,
<var>P</var> and <var>B</var> have an
		  inline-stacking constraint <var>S</var>'', the inline-progression-direction of
		  <var>P</var> is the same as the inline-progression-direction of the nearest
		  common ancestor area of <var>A</var> and <var>P</var>, and <var>S</var> consists of the
		  space-end of <var>A</var> followed by <var>S</var>''.</p>
    <p>d. <var>B</var> is the last normal child of an inline-area <var>P</var>,
	      <var>P</var> has no fence-after <var>A</var>,
<var>A</var> and <var>P</var> have an
		  inline-stacking constraint <var>S</var>', the inline-progression-direction of
		  <var>P</var> is opposite to the inline-progression-direction of the nearest
		  common ancestor area of <var>A</var> and <var>P</var>, and <var>S</var> consists of
		  <var>S</var>' followed by the space-end of <var>B</var>.</p>
    <p>e. <var>A</var> is the first normal child of a block-area <var>P</var>,
	      <var>P</var> has no fence-before <var>B</var>,
<var>P</var> and <var>B</var> have an
		  inline-stacking constraint <var>S</var>'', the inline-progression-direction of
		  <var>P</var> is opposite to the inline-progression-direction of the nearest
		  common ancestor area of <var>A</var> and <var>P</var>, and <var>S</var> consists of the
		  space-start of <var>A</var> followed by <var>S</var>''.</p>
</item>
</olist>
<figure>
<graphic source="inline-stacking1.gif" xml:attributes="href source" show="embed" actuate="auto" xmlns:xlink="http://www.w3.org/TR/WD-xlink"/>
<figcap><p>Adjacent Edges with Inline-stacking 1.</p></figcap>
</figure>
<figure>
<graphic source="inline-stacking2.gif" xml:attributes="href source" show="embed" actuate="auto" xmlns:xlink="http://www.w3.org/TR/WD-xlink"/>
<figcap><p>Adjacent Edges with Inline-stacking 2.</p></figcap>
</figure>
<graphic source="inline-stacking3.gif" xml:attributes="href source" show="embed" actuate="auto" xmlns:xlink="http://www.w3.org/TR/WD-xlink"/>
<graphic source="inline-stacking4.gif" xml:attributes="href source" show="embed" actuate="auto" xmlns:xlink="http://www.w3.org/TR/WD-xlink"/>

<p>When <var>A</var> and <var>B</var> have an inline-stacking constraint,
the <term>adjacent edges</term> of <var>A</var> and <var>B</var> are an ordered
pair defined as:</p>
<ulist><item><p>In case 1, the start-edge of the
content-rectangle of <var>A</var>
and the start-edge of the allocation-rectangle of <var>B</var>.</p></item>
<item><p>In case 2, the end-edge of the content-rectangle of <var>A</var> and
the end-edge of the allocation-rectangle of <var>B</var>.</p></item>
<item><p>In case 3a, the end-edge of the
allocation-rectangle of <var>A</var> and
the start-edge of the allocation-rectangle of <var>B</var>.</p></item>
<item><p>In case 3b, the first of the adjacent edges of <var>A</var> and
<var>P</var>, and the start-edge of the allocation-rectangle of <var>B</var>.</p></item>
<item><p>In case 3c, the end-edge of the
allocation-rectangle of <var>A</var>
and the second of the adjacent edges of <var>P</var> and <var>B</var>.</p></item>
<item><p>In case 3d, the first of the adjacent edges of <var>A</var> and
<var>P</var>, and the end-edge of the allocation-rectangle of <var>B</var>.</p></item>
<item><p>In case 3e, the start-edge of the
allocation-rectangle of <var>A</var>
and the second of the adjacent edges of <var>P</var> and <var>B</var>.</p></item></ulist>

<p>Two areas are <term>adjacent</term> if they have a block-stacking constraint
or an inline-stacking constraint. It follows from the definitions that areas of the same
type (inline or block) can be adjacent only if all their non-common ancestors
are also of the same type (up to but not including their nearest common ancestor).
Thus, for example, two inline-areas which reside in different line-areas are never
adjacent.</p>

<p>An area <var>A</var> <term>begins</term> an area <var>P</var> if <var>A</var> is a
descendant of <var>P</var> and <var>P</var> and <var>A</var> have either a
block-stacking constraint or an inline-stacking constraint. In this case the
second of the adjacent edges of <var>P</var> and <var>A</var> is defined to be
a <term>leading edge</term> in <var>P</var>. A space-specifier which applies to
the leading edge is also defined to <term>begin</term> <var>P</var></p>

<p>Similarly, An area <var>A</var> <term>ends</term> an area <var>P</var> if <var>A</var> is a
descendant of <var>P</var> and <var>A</var> and <var>P</var> have either a
block-stacking constraint or an inline-stacking constraint. In this case the
first of the adjacent edges of <var>A</var> and <var>P</var> is defined to be
a <term>trailing edge</term> in <var>P</var>. A space-specifier which applies to
the trailing edge is also defined to <term>end</term> <var>P</var></p>
</div3>
<div3 id="area-font"><head>Font Baseline Tables</head>
<p>Each script has its preferred "baseline" for aligning glyphs from that script.
Western scripts typically use a "alphabetic" baseline that touches at or near the
bottom of capital letters. Further, for each font there is a
preferred way of aligning embedded characters from different scripts, e.g., for a
Western font there is a separate baseline for aligning embedded ideographic or Indic
characters.</p>
<p>Each block-area and inline-area has a
<trait>dominant-baseline</trait> trait which is a
baseline-type, an enumerated type corresponding to the type of alignment expected
for the nominal font for that area. Similarly, each inline-area has
a <trait>baseline-identifier</trait> trait, corresponding to
the type of alignment preferred for
that area. The geometric line identified by this trait is called the
<term>preferred baseline</term>
of the inline-area.</p>
<p>Associated to each font is a table of baseline shifts, called the
<term>baseline table</term>, which associates to each pair of possible baseline types
the distance between the corresponding baselines in that font.</p>
<p><emph>Example</emph>.  For a Western font, the baseline table would
associate to the pair &lt;<code role="value">alphabetic</code>,
<code role="value">hanging</code>&gt; a distance
approximately equal to the ascent of the font, representing the offset
from the alphabetic baseline of the designated
alignment-point for embedded hanging-aligned characters.</p>
<p>Some font standards, e.g., OpenType, define a baseline
table as part of the font data.</p>
<p>Certain baselines which are not part of the registered set of baselines are defined
as follows.  The offset of the <code role="value">text-before-edge</code> baseline
is determined by the ascent of the nominal-font relative to the
dominant-baseline.
The <code role="value">text-after-edge</code>
baseline offset is defined to be the descent of the nominal-font.
</p>
<p>
For each line-area, the offset of the "before-edge" baseline is determined by ignoring
all inline-areas whose baseline-identifier is <code role="value">before-edge</code>.
The "before-edge" baseline
offset is set to the maximum extent in the direction opposite the block-progression-direction,
of the before-edges of the remaining inline-areas. If all
the inline-areas in a line-area are aligned "before-edge"
then use "text-before-edge" as the
"before-edge" alignment offset. The determination of the "after-edge" baseline is analogous.</p>
<p>For each area <term>before-baseline-height</term> and
<term>after-baseline-height</term> are defined to be the respective distances from
the area's
dominant-baseline to the before-edge and after-edge
baselines.  The <term>text-before-baseline-height</term> and the
<term>text-after-baseline-height</term> are defined to be the respective distances from
the area's
dominant-baseline to the text-before-edge and text-after-edge
baselines.</p>
</div3>
</div2>
<div2 id="spacecond"><head>Spaces and Conditionality</head>
<p>A space-specifier is a compound datatype whose components are minimum, optimum,
and maximum, conditionality, and precedence.</p>
<p><term>Minimum</term>, <term>optimum</term>, and <term>maximum</term> are lengths
and can be used to define a constraint
on a distance, namely that the distance should preferably be the optimum,
and in any case no less than the minimum nor more than the maximum. Any of these
values may be negative, which can (for
example) cause areas to overlap, but in any case the minimum should be less
than or equal to the optimum value, and the optimum less than or equal to
the maximum value.</p>
<p><term>Conditionality</term> is an enumerated value which controls whether a
space-specifier has effect at the beginning or end of a reference-area or a
line-area. Possible values are <code role="value">retain</code> and
<code role="value">discard</code>;
a <term>conditional</term> space-specifier is one for which this value is
<code role="value">discard</code>.</p>
<p><term>Precedence</term> has a value which is either an integer or the special
token <code role="value">force</code>. A <term>forcing</term> space-specifier
is one for which this value is <code role="value">force</code>.</p>
<p>Space-specifiers occurring in sequence may interact with each other. The
constraint imposed by a sequence of space-specifiers is computed by
calculating for each space-specifier
its associated <term>resolved space-specifier</term> in accordance with
their conditionality and precedence, as
shown below in the space-resolution rules.</p>
<p>The constraint imposed on a distance by a sequence of resolved space-specifiers
is additive; that is, the distance is constrained to be no less than the
sum of the resolved minimum values and no larger than the sum of the resolved
maximum values.</p>
<div3 id="area-space"><head>Space-resolution Rules</head>
<p>To compute the resolved space-specifier of a given space-specifier <var>S</var>,
consider the maximal inline-stacking constraint or block-stacking constraint
containing <var>S</var>. The resolved space-specifier of <var>S</var> is a
non-conditional space-specifier computed in terms of this sequence.</p>
<olist>
<item><p>If any of the space-specifiers (in the maximal sequence) is conditional,
and begins a reference-area or line-area, then it is <term>suppressed</term>,
which means that its resolved space-specifier is zero. Further, any conditional
space-specifiers which consecutively follow it in the sequence are also suppressed.</p>
<p>If a conditional space-specifier ends a reference-area or line-area, then it
is suppressed together with any other conditional space-specifiers which
consecutively precede it in the sequence.</p></item>
<item><p>If any of the remaining space-specifiers is forcing, all non-forcing
space-specifiers are suppressed, and the value of each of the forcing space-specifiers
is taken as its resolved value.</p></item>
<item><p>Alternatively if all of the remaining space-specifiers are non-forcing,
then the resolved space-specifier is defined in terms of those space-specifiers
whose precedence is numerically highest, and among these those whose optimum value is the
greatest. All other space-specifiers are suppressed. If there is only one of
these then its value is taken as its resolved value.</p>
<p>Otherwise, when there are at two or more space-specifiers all of the same highest
precedence and the same (largest) optimum, the resolved space-specifier of the
last space-specifier in the
sequence is derived from these spaces by taking their common optimum value as
its optimum, the greatest of their minimum values as its minimum,
and the least of their maximum values as its maximum, and all other space-specifiers
are suppressed.</p></item>
</olist>
<p><emph>Example</emph>. Suppose the sequence of space values occurring at the
beginning of a reference-areas is: first, a space with value 10 points (that is
minimum, optimum, and maximum all equal to 10 points) and conditionality
<code role="value">discard</code>; second, a space with value 4 points and
conditionality <code role="value">retain</code>; and third, a space
with value 5 points and conditionality <code role="value">discard</code>;
all three spaces having precedence zero. Then the first (10 point) space is
suppressed under rule 1, and the
second (4 point) space is suppressed under rule 3. The resolved value of the
third space is a non-conditional 5 points, even though
it originally came from a conditional space.</p>
<p>The padding of a block-area does not interact with the any space-specifier
(except that by definition, the presence of padding at the before- or after-edge
prevents areas on either side of it from having a stacking constraint.)</p>
<p>The border or padding at the before-edge or after-edge of a block-area may
be specified as conditional. If so, then it is set to zero if its associated
edge is a leading or trailing edge in a reference-area. In this case, the border
or padding is taken to be zero for purposes of the stacking constraint definitions.</p>
</div3>
</div2>
<div2 id="area-block"><head>Block-areas</head>
<p>Block-areas have several traits which typically affect the placement of their
children. The <term>line-height</term> is used in line placement calculations.
The <term>line-stacking-strategy</term> trait controls what kind of allocation
is used for descendant line-areas and has an enumerated value
(either <code role="value">font-height</code>, <code role="value">max-height</code>,
or <code role="value">line-height</code>). This is all rigorously described below.
All areas have these traits,
but they only have relevance for areas which have stacked line-area children.</p>
<p>The <term>space-before</term> and <term>space-after</term> determine the
distance between the block-area and surrounding block-areas.</p>
<p>A block-area which is not a line-area typically has its size in the
inline-progression-direction determined
by its start-indent and end-indent and by the size of its nearest ancestor
reference-area. A
block-area which is not a line-area typically varies its
block-progression-dimension
to accommodate its descendants. Alternatively the generating
formatting object may specify a
block-progression-dimension for the block-area.</p>
</div2>
<div2 id="area-stackblock"><head>Stacked Block-areas</head>
<p>Block-area children of an area are typically stacked in the
block-progression-direction
within their parent area, and this is the default method of
positioning block-areas. However, formatting objects
are free to specify other methods of positioning child areas of areas which
they generate, for example list-items or tables.</p>
<p>For a parent area <var>P</var> whose children are
block-areas, <var>P</var> is defined to be <term>properly
stacked</term> if all of the following conditions hold:</p>
<olist>
<item><p>For each block-area <var>B</var> which is a descendant of <var>P</var>,
the following hold:</p>
<ulist><item><p>the before-edge and after-edge
of its allocation-rectangle are parallel to the before-edge and after-edges of the
content-rectangle of <var>P</var>,</p></item>
<item>
<p>the start-edge of its allocation-rectangle is parallel to the start-edge
of the content-rectangle of <var>R</var> (where <var>R</var> is the closest
ancestor reference-area of <var>B</var>), and offset from it inward
by a distance equal to
the block-area's start-indent plus its
start-intrusion-adjustment, minus its border-start,
padding-start, and space-start values, and</p></item><item>
<p>the end-edge of its allocation-rectangle is parallel to the
end-edge
of the content-rectangle of <var>R</var>, and offset from it inward
by a distance equal to
the block-area's end-indent plus its
end-intrusion-adjustment,
minus its border-end, padding-end, and space-end
values.</p></item></ulist></item>
<item><p>For each pair of normal areas <var>B</var> and <var>B</var>'
in the subtree below <var>P</var>, if
<var>B</var> and <var>B</var>' have a block-stacking constraint <var>S</var>,
then the distance between the adjacent edges of <var>B</var> and <var>B</var>'
is consistent with the
constraint imposed by the
resolved values of the space-specifiers in <var>S</var>.</p></item>
</olist>
<graphic source="Image8.gif" xml:attributes="href source" show="embed" actuate="auto" xmlns:xlink="http://www.w3.org/TR/WD-xlink"/>
<note><p>The <trait>start-intrusion-adjustment</trait> and
<trait>end-intrusion-adjustment</trait> are traits used to
deal with intrusions from
floats in the inline-progression-direction. The notion of indent is intended to apply to the content-rectangle, but
the constraint is written in terms of the
allocation-rectangle, because as noted earlier the edges of the
content-rectangle may not
correspond to like-named edges of the
allocation-rectangle.</p></note>
<graphic source="spacebeforeafter.gif" xml:attributes="href source" show="embed" actuate="auto" xmlns:xlink="http://www.w3.org/TR/WD-xlink"/>
<p><emph>Example</emph>. In the diagram, if area
<var>A</var>
has a space-after value of 3 points, <var>B</var> a
space-before
of 1 point, and <var>C</var> a space-before of 2 points, all
with
precedence of <code role="value">force</code>, and with zero border and padding,
then the constraints will place <var>B</var>'s
allocation-rectangle
4 points below that of <var>A</var>, and <var>C</var>'s
allocation-rectangle
6 points below that
of <var>A</var>. Thus the 4-point gap receives the
background color
from <var>P</var>, and the 2-point gap before <var>C</var>
receives the background color from <var>B</var>.</p>
</div2>
<div2 id="area-line"><head>Line-areas</head>
<p>A line-area is a special type of block-area, and is generated by the same
formatting object which generated
its parent. Line-areas do not have borders and padding, i.e., border-before-width,
padding-before-width, etc. are all zero. Inline-areas are stacked within a line-area
relative to a <term>baseline-start-point</term> which is a point determined by the
formatter, on the start-edge of its content-rectangle.</p>
<p>The allocation-rectangle of a line is determined by the value of the
<trait>line-stacking-strategy</trait> trait: if the
value is <code role="value">font-height</code>, the allocation-rectangle is
the <term>nominal-requested-line-rectangle</term>, defined below; if the value is
<code role="value">max-height</code>, the allocation-rectangle is the
<term>maximum-line-rectangle</term>, defined below; and if
the value is
<code role="value">line-height</code>, the allocation-rectangle is the
<term>per-inline-height-rectangle</term>, defined below.</p>

<p>The <term>nominal-requested-line-rectangle</term> for a line-area is the rectangle
whose start-edge and end-edge are parallel to and coincident with the start-edge
and end-edge of the content-rectangle of the parent block-area (as modified by
typographic properties such as indents), whose before-edge is separated from the
baseline-start-point by the text-before-baseline-height, and whose after-edge is
separated from the baseline-start-point by the text-after-baseline-height. It has the
same block-progression-dimension for each line-area child of a block-area.</p>
<p>The <term>maximum-line-rectangle</term> for a line-area is the rectangle
whose start-edge and end-edge are parallel to and coincident with the start-edge
and end-edge of the nominal-requested-line-rectangle, and whose
extent in the block-progression-direction is the minimum required to enclose both the
nominal-requested-line-rectangle and the allocation-rectangles of all the
inline-areas stacked within the line-area; this may vary depending on the
descendants of the line-area.</p>

<figure>
<graphic source="Image10.gif" xml:attributes="href source" show="embed" actuate="auto" xmlns:xlink="http://www.w3.org/TR/WD-xlink"/>
<figcap><p>Nominal and Maximum Line Rectangles</p></figcap>
</figure>

<p>The <term>per-inline-height-rectangle</term> has the same length as the
nominal-requested-line-rectangle in the inline-progression-direction. For each
inline-area the <term>half-leading</term> is defined to be half the difference of its
line-height minus its block-progression-dimension. The
<term>expanded-rectangle</term> of an inline-area is the rectangle with start-edge
and end-edge coincident with those of its allocation-rectangle, and whose
before-edge and after-edge are outside those of its allocation-rectangle by a
distance equal to the half-leading. The per-inline-height-rectangle is then
defined to have the minimum block-progression-dimension required to enclose both
the nominal-requested-line-rectangle and the expanded-rectangles of all the
inline-areas stacked within the line-area; this may vary depending on the
descendants of the line-area.</p>
<note><p>
Using the nominal-requested-line-rectangle allows equal baseline-to-baseline
spacing. Using the maximum-line-rectangle allows constant space between line-areas.
Using the
per-inline-height-rectangle and zero space-before and space-after allows
CSS-style line box stacking.</p></note>
</div2>
<div2 id="area-inline"><head>Inline-areas</head>
<p>An inline-area has its own <term>line-height</term> trait, which may be
different from the line-height of its containing block-area. This may affect the
placement of its ancestor line-area when the line-stacking-strategy
is <code role="value">line-height</code>. An inline-area has a baseline table
for its nominal-font. It has
a <trait>dominant-baseline</trait> trait which determines how
its stacked inline-area descendants are to be aligned.</p>
<p>An inline-area may or may not have child areas, and if so it may or may not
be a reference-area. The dimensions of the content-rectangle for an inline-area
without children is computed as specified by the generating formatting object,
as are those of an inline-area with block-area children.</p>
<p>An inline-area with inline-area children has a content-rectangle which is
the minimum rectangle (with sides parallel to those of the content-rectangle
of its parent area) which includes the allocation-rectangles of all of its
children, and which extends from its position-point by at
least the
after-baseline-height in the block-progression-direction, and in the opposite
direction by at least the before-baseline-height from its position-point (these
latter quantities derived from the nominal-font of the area, as defined in
section <specref ref="area-font"/>).</p>
<p>Examples of inline-areas with children might include portions of inline
mathematical expressions or areas arising from mixed writing systems
(left-to-right within right-to-left, for example).</p>
</div2>
<div2 id="area-stackinline"><head>Stacked Inline-areas</head>
<p>Inline-area children of an area are typically stacked in the
inline-progression-direction
within their parent area, and this is the default method of
positioning inline-areas.</p>
<p>Inline-areas are stacked relative to a <term>baseline</term>, defined as
follows:</p>
<p>1. If <var>P</var> is a line-area, the baseline of <var>P</var> is defined
to be the line through the baseline-start-point which is parallel to the
inline-progression-direction;</p>
<p>2. If <var>P</var> is an inline-area, the baseline of <var>P</var> is defined
to be the line through the position-point of <var>P</var> which is parallel to
the inline-progression-direction.</p>
<p>For a parent area <var>P</var> whose children are inline-areas, <var>P</var>
is defined to be <term>properly stacked</term> if all of the following conditions
hold:</p>
<olist>
<item><p>For each inline-area descendant <var>I</var> of <var>P</var>, the
start-edge, end-edge, before-edge and after-edge of the allocation-rectangle
of <var>I</var> are parallel to corresponding edges of the content-rectangle
of the nearest ancestor reference-area of <var>I</var>.</p></item>
<item><p>For each pair of normal areas <var>I</var> and <var>I</var>'
in the subtree below <var>P</var>, if <var>I</var> and <var>I</var>' have
an inline-stacking constraint <var>S</var>, then the distance between the
adjacent edges of <var>I</var> and <var>I</var>' is consistent with the
constraint imposed by the resolved values of the space-specifiers in
<var>S</var>.</p></item>
<item><p>For any inline-area descendant <var>I</var> of <var>P</var>, the
distance in the shift-direction from the baseline of <var>P</var> to the
position-point of <var>I</var> equals the distance between the dominant-baseline
of <var>P</var> and the preferred baseline of <var>I</var> (as determined
by the dominant-baseline table of <var>P</var>), plus the
sum of the
baseline-shifts for <var>I</var> and all of its ancestors which are
descendants of <var>P</var>. This alignment is done with respect to the
line-area's dominant-baseline, and not with respect to the
baseline of any
intermediate area.</p><p> The first summand is computed to compensate for
mixed writing systems with different nominal glyph baselines, and the other
summands involve deliberate baseline shifts for things like superscripts
and subscripts.</p></item>
</olist>
</div2>
<div2 id="area-glyph"><head>Glyph-areas</head>
<p>The most common inline-area is a glyph-area, which contains the
representation for a character in a particular font.</p>
<p>A glyph-area has an associated <term>nominal-font</term>, determined by
the area's typographic traits, which apply to its character data, and
a <term>glyph-orientation</term> determined by its writing-mode and
reference-orientation, which determine the orientation of the glyph
when it is rendered.</p>
<p>The position-point and preferred baseline of a glyph-area are assigned
according to the writing-system in use (e.g., the glyph baseline
in Western languages), and are used to control placement of inline-areas
descendants of a line-area. The formatter may generate inline-areas with
different inline-progression-directions from their parent to accommodate
correct inline-area stacking in the case of mixed writing systems.</p>
<p>A glyph-area has no children. Its block-progression-dimension and
baseline table are the same for all glyphs in a font.</p>
</div2>

<div2 id="area-order"><head>Ordering Constraints</head>

<div3 id="area-genorder"><head>General Ordering Constraints</head>

<p>A subset <var>S</var> of the areas returned to a formatting object is
called <term>properly ordered</term> if the areas in that
subset have the
same order as their generating formatting objects.  Specifically, if <var>A</var><sub>1</sub>
and <var>A</var><sub>2</sub> are areas in <var>S</var>, returned by child
formatting objects <var>F</var><sub>1</sub> and <var>F</var><sub>2</sub>
where <var>F</var><sub>1</sub> precedes <var>F</var><sub>2</sub>,
then <var>A</var><sub>1</sub> must precede <var>A</var><sub>2</sub> in the
pre-order traversal order of the area tree. If <var>F</var><sub>1</sub>
equals <var>F</var><sub>2</sub> and <var>A</var><sub>1</sub> is
returned prior to <var>A</var><sub>2</sub>, then <var>A</var><sub>1</sub>
must precede <var>A</var><sub>2</sub> in the pre-order-traversal
of the area tree.
</p>
<p>For each formatting object <var>F</var> and each area-class <var>C</var>,
the subset consisting of the areas returned to <var>F</var> with area-class
<var>C</var> must be properly ordered, except where
otherwise specified.
</p>
</div3>
<div3 id="area-linebuild"><head>Line-building</head>
<p>This section describes the ordering constraints that apply to formatting
an fo:block or similar block-level object.</p>
<p>A block-level formatting object <var>F</var> which
constructs lines does so by
constructing block-areas which it returns to its parent
formatting object, and placing normal areas returned to
<var>F</var> by its child
formatting objects as children of those block-areas or of
line-areas
which it constructs as children of those block-areas.</p>
<p>For each such formatting object <var>F</var>, it must be
possible to form an
ordered partition <var>P</var> consisting of ordered subsets <var>S</var><sub>1</sub>,
<var>S</var><sub>2</sub>, ..., <var>S</var><sub><var>n</var></sub> of
the normal areas returned by the child formatting objects,
such that the following are all satisfied:</p>
<olist>
<item><p>Each subset consists of a sequence of inline-areas, or of a single
block-area.</p>
</item>
<item><p>The ordering of the partition follows the ordering of the
formatting object tree. Specifically, if <var>A</var> is in
<var>S</var><sub><var>i</var></sub>
and <var>B</var> is in <var>S</var><sub><var>j</var></sub> with
<var>i</var> &lt; <var>j</var>, or if <var>A</var> and <var>B</var> are both in the same subset
<var>S</var><sub><var>i</var></sub> with <var>A</var> before <var>B</var> in the
subset order, then either <var>A</var> is returned by a preceding sibling
formatting object of <var>B</var>, or <var>A</var> and
<var>B</var> are returned by the same
formatting object with <var>A</var> being returned before
<var>B</var>.</p>
</item>
<item><p>The partitioning occurs at legal line-breaks. Specifically, if <var>A</var> is
the last area of <var>S</var><sub><var>i</var></sub> and <var>B</var> is the first area of
<var>S</var><sub><var>i</var>+1</sub>, then the rules of
the language and script in effect must permit a line-break
between <var>A</var> and
<var>B</var>, within the context of all areas in <var>S</var><sub><var>i</var></sub>
and <var>S</var><sub><var>i</var>+1</sub>.</p>
</item>
<item><p>The partition follows the ordering of the area
tree, except for
certain glyph substitutions and deletions.  Specifically, if <var>B</var><sub>1</sub>,
<var>B</var><sub>2</sub>, ..., <var>B</var><sub><var>p</var></sub> are the normal
child areas of the area
or areas returned by <var>F</var>, (ordered in the pre-order traversal order of the
area tree) then there is a one-to-one correspondence between
these child areas
and the partition subsets (i.e., <var>n</var> = <var>p</var>), and for each <var>i</var>,</p>
<ulist>
<item><p>if <var>S</var><sub><var>i</var></sub> consists of a single block-area then
<var>B</var><sub><var>i</var></sub> is that block-area, and</p></item>
<item><p>if <var>S</var><sub><var>i</var></sub> consists of inline-areas then
<var>B</var><sub><var>i</var></sub> is a line-area whose child areas are the
same as the inline-areas in <var>S</var><sub><var>i</var></sub>, and in the same order,
except that where the rules of the language and script in effect call
for glyph-areas to be substituted, inserted, or deleted, then the
substituted or inserted glyph-areas appear in the area tree in the
corresponding place, and the deleted glyph-areas do not appear in the
area tree. Deletions occur when a glyph-area which is
first or last within a subset, has a
<trait>suppress-at-line-break</trait> value of <code role="value">suppress</code>.
Insertions and substitutions may
occur because of addition of hyphens or spelling changes due to
hyphenation, or glyph image construction from syllabification, or
ligature formation.</p></item>
</ulist>
</item>
</olist>
<p>Substitutions that replace a sequence of glyph-areas with a single
glyph-area should only occur when the margin, border, and padding in the
inline-progression-direction (start- and end-), baseline-shift, and
letter-spacing values are zero, treat-as-word-space is
<code role="value">false</code>, and the
values of all other relevant traits match (i.e.,
alignment-adjust, baseline-identifier, color
trait, background traits, dominant-baseline, font traits,
font-height-override-after,
font-height-override-before, glyph-orientation-horizontal,
glyph-orientation-vertical, line-height, line-height-shift-adjustment,
text-decoration, text-shadow).</p>
<note><p>Line-areas do not receive the background traits or text-decoration
of their generating formatting object, or any other trait that requires
generation of a mark during rendering.</p></note>
</div3>


<div3 id="area-inlinebuild"><head>Inline-building</head>
<p>This section describes the ordering constraints that apply to formatting
an fo:inline or similar inline-level object.</p>
<p>An inline-level formatting object <var>F</var> which
constructs one or more inline-areas does so by
placing normal inline-areas returned to <var>F</var> by its child
formatting objects as children of inline-areas which it
generates.</p>
<p>For each such formatting object <var>F</var>, it must be
possible to form an
ordered partition <var>P</var> consisting of ordered subsets <var>S</var><sub>1</sub>,
<var>S</var><sub>2</sub>, ..., <var>S</var><sub><var>n</var></sub> of
the normal inline-areas returned by the child formatting
objects, such that the following are all satisfied:</p>
<olist>
<item><p>Each subset consists of a sequence of inline-areas</p></item>
<item><p>The ordering of the partition follows the ordering of the
formatting object tree, as defined above.</p></item>
<item><p>The partitioning occurs at legal line-breaks, as defined above.</p></item>
<item><p>The partition follows the ordering of the area
tree, except for
certain glyph substitutions and deletions, as defined above
(except that the case where <var>S</var><sub><var>i</var></sub> is a block-area
does not arise).</p></item>
</olist>
</div3>
</div2>

<div2 id="keepbreak"><head>Keeps and Breaks</head>
<p>Keep and break conditions apply to a class of areas, which are typically
page-reference-areas,
column-areas, and line-areas.  The appropriate class for a given condition is referred
to as a <term>context</term> and an area in this class is a <term>context-area</term>.

As defined in Section <specref ref="pag-intro"/>, <term>page-reference-areas</term> are
areas generated by an fo:page-sequence using the
specifications in a fo:page-master, and
<term>column-areas</term>
are reference-areas generated from a region-master.</p>
<p>A keep or break condition is an open statement about a formatting object and the
tree relationships of the areas it generates with the relevant context-areas. These
tree relationships are defined mainly in terms of <term>leading</term> or <term>trailing</term>
areas.  If <var>A</var> is a descendant of <var>P</var>, then <var>A</var> is defined to
be <term>leading</term> in <var>P</var> if <var>A</var> has no preceding sibling which
is a normal area, nor does any of its ancestor areas up to but not including
<var>P</var>.  Similarly, <var>A</var> is defined to
be <term>trailing</term> in <var>P</var> if <var>A</var> has no following sibling which
is a normal area, nor does any of its ancestor areas up to but not including
<var>P</var>. For any given formatting object, the <term>next</term> formatting object
in the flow is the first formatting object following (in the pre-order traversal order)
which generates and returns normal areas.</p>
<p>Break conditions are either break-before or break-after conditions.  A break-before
condition is <term>satisfied</term> if the first area generated and returned
by the formatting object is
leading within a context-area. A break-after condition
depends on the next formatting object in
the flow; it is satisfied if either there is no such next formatting object, or if the
first normal area generated and returned by that formatting object is leading in a context-area.</p>
<p>Break conditions are imposed by the <trait>break-before</trait> and
<trait>break-after</trait> properties. A
refined value of <code role="value">page</code> for these traits imposes a
break condition with a context
consisting of the page-reference-areas; a value of <code role="value">even-page</code>
or <code role="value">odd-page</code> imposes a
break condition with a context of even-numbered page-reference-areas
or odd-numbered
page-reference-areas, respectively; a value of <code role="value">column</code> imposes a
break condition with a
context of column-areas. A value of <code role="value">auto</code> in a
break-before or break-after
trait imposes no break condition.</p>
<p>Keep conditions are either keep-with-previous, keep-with-next, or keep-together
conditions.  A keep-with-previous condition on an object is satisfied if the first
area generated and returned by the formatting object is not leading within a
context-area, or if
there are no preceding areas in a post-order traversal of the area tree.  A
keep-with-next condition is satisfied if the last area generated and returned by the
formatting object is not trailing within a context-area, or
if there are
no following areas in a pre-order traversal of the area tree.  A keep-together
condition is satisfied if all areas generated and returned by the formatting object are
descendants of a single context-area.</p>
<p>Keep conditions are imposed by the "within-page", "within-column", and "within-line" components
of the <trait>keep-with-previous</trait>, <trait>keep-with-next</trait>, and
<trait>keep-within</trait> properties.
The refined value of each component specifies the <term>strength</term> of the keep condition
imposed, with higher numbers being stronger than lower numbers and the value
<code role="value">always</code> being stronger than all numeric values.
A component with value <code role="value">auto</code>
does not impose a keep condition.  A "within-page" component imposes a keep-condition
with context consisting of the page-reference-areas; "within-column", with context consisting of
the column-areas; and "within-line" with context consisting of the line-areas.</p>
<p>The area tree is constrained to satisfy all break conditions imposed.
Each keep condition must also be satisfied, except when this would cause a
break condition or a stronger keep condition to fail to be satisfied. If not
all of a set of keep conditions of equal strength can be satisfied, then some
maximal satisfiable subset of conditions of that strength
must be satisfied (together with all break conditions
and maximal subsets of stronger keep conditions, if any).</p>
</div2>

<div2 id="rendmodel"><head>Rendering Model</head>
<p>
This section makes explicit the relationship between the area tree
and visually rendered output.
</p>
<p>
Areas generate three types of marks: (1) the area
background, if any, (2) the marks
intrinsic to the area (a glyph, image, or decoration) if any, and (3) the
area border, if any.
</p>
<p>
An area tree is rendered by causing marks to appear on an output medium in
accordance with the areas in the area tree.  This section describes the
geometric location of such marks, and how conflicts between marks are to
be resolved.
</p>
<div3 id="rend-geo"><head>Geometry</head>
<p>
Each area is rendered in a particular location. Formatting object semantics
describe the location of instrinsic marks relative to the object's location,
i.e., the left, right, top and bottom edges of its content-rectangle. This
section describes how the area's location is determined,
which determines the location of its intrinsic marks.
</p>
<p>
For each page, the page-viewport-area corresponds isometrically to the
output medium.
</p>
<p>
The page-reference-area is offset from the page-viewport-area as described
below in section <specref ref="rend-view"/>.
</p>
<p>
All areas in the tree with an area-class of <code role="value">xsl-fixed</code>
are positioned such
that the left-, right-, top-, and bottom-edges of its
content-rectangle are
offset inward from the content-rectangle of its ancestor page-viewport-area
by distances specified by the <trait>left-position</trait>,
<trait>right-position</trait>, <trait>top-position</trait>,
and <trait>bottom-position</trait> traits, respectively.
</p>
<p>
Any area in the tree which is the child of a viewport-area is rendered
as described in section <specref ref="rend-view"/>.
</p>
<p>
All other areas in the tree are positioned such that the
left-, right-, top-,
and bottom-edges of its content-rectangle are offset inward
from the
content-rectangle of its nearest ancestor reference-area by distances
specified by the <trait>left-position</trait>,
<trait>right-position</trait>, <trait>top-position</trait>,
and
<trait>bottom-position</trait> traits, respectively.  These are shifted left
and down by the values of the <trait>top-offset</trait>
and <trait>left-offset</trait> traits, respectively, if the area
has a <trait>relative-position</trait> of <code role="value">relative</code>.
</p>
</div3>
<div3 id="rend-view"><head>Viewport Geometry</head>
<p>
A reference-area which is the child of a viewport-area is positioned
such that
the start-edge and end-edge of its content-rectangle are
coincident with the
start-edge and end-edge of the content-rectangle of its parent
viewport-area,
and the before-edge of its content-rectangle is offset from the
before-edge of
the content-rectangle of its parent viewport-area by a
<term>scroll-amount</term>.
</p>
<p>
If the block-progression-dimension of the reference-area is larger
than that
of the viewport-area and the <trait>overflow</trait> trait
for the reference-area is <code role="value">scroll</code>,
then the scroll-amount is determined by a scrolling mechanism, if any,
provided by the user agent. Otherwise, the scroll-amount is zero.
</p>
</div3>
<div3 id="rend-vis"><head>Visibility</head>
<p>
The visibility of marks depends upon the location of the marks,
the <trait>visibility</trait> of the area, and the <trait>overflow</trait> of any ancestor
viewport-areas.
</p>
<p>
If an area has visibility <code role="value">hidden</code> it generates no marks.
</p>
<p>
If an area has an <trait>overflow</trait> of <code role="value">hidden</code>,
or when the environment is non-dynamic and the <trait>overflow</trait> is
<code role="value">scroll</code> then the area determines
a <term>clipping rectangle</term>, which is defined to be the
rectangle determined by the value of the <trait>clip</trait> trait of the area, and
for any mark
generated by one of its descendant areas, portions of the mark
lying outside
the clipping rectangle do not appear.</p>
</div3>
<div3 id="rend-border"><head>Border, Padding, and Background</head>
<p>
The border- and padding-rectangles are determined relative to the
content-rectangle by the values of the common padding and border width
traits (border-before-width, etc.).
</p>
<p>
For any area which is not a child of a viewport-area, the border is
rendered between the border-rectangle and the padding-rectangle in
accordance with the common border color and style traits. For a child of
a viewport-area, the border is not rendered.
</p>
<p>For an area which is not part of a viewport/reference pair, the
background is rendered. For an area that is either a viewport-area or a
reference-area in a viewport/reference pair, if the refined value of
<trait>background-attachment</trait> is <code role="value">scroll</code>
and the block-progression-dimension of the reference-area is larger than
that of the viewport-area, then the background is rendered on the
reference-area and not the viewport-area, and otherwise it is rendered
on the viewport-area and not the reference-area.
</p>
<p>
The background, if any, is rendered in the
padding-rectangle, in accordance
with the <trait>background-image</trait>,
<trait>background-color</trait>,
<trait>background-repeat</trait>,
<trait>background-position-vertical</trait>, and
<trait>background-position-horizontal</trait> traits.
</p>
</div3>
<div3 id="rend-intrinsic"><head>Intrinsic Marks</head>
<p>
For each class of formatting objects, the marks intrinsic to its
generated areas are specified in the formatting object description.
For example, an fo:character object generates a glyph-area, and this
is rendered by drawing a glyph within that area's
content-rectangle in accordance with the area's font traits and <trait>glyph-orientation</trait>
and <trait>blink</trait> traits.
</p>
<p>
In addition, other traits (for example the various score and score-color traits) specify
other intrinsic
marks.  In the case of score traits (<trait>underline-score</trait>,
<trait>overline-score</trait> and <trait>through-score</trait>), the score thickness and position
are specified by the nominal-font in effect; where the font fails to
specify these quantities, they are implementation-dependent.

</p>
</div3>
<div3 id="rend-layer"><head>Layering and Conflict of Marks</head>
<p>
Marks are layered as described below, which defines a partial
ordering of which marks are <term>beneath</term> which other marks.
</p>
<p>
Two marks are defined to <term>conflict</term> if they apply to
the same point
in the output medium. When two marks conflict, the one which is
beneath the other does not affect points in the output medium where
they both apply.
</p>
<p>
Marks generated by the same area are layered as follows:  the area
background is beneath the area's intrinsic marks, and the intrinsic
marks are beneath the border.  Layering among the area's intrinsic
marks is defined by the semantics of the area's generating formatting
object and its properties.  For example, a glyph-area's glyph drawing
comes beneath the marks generated for text-decoration.
</p>
<p>
If <var>A</var> and <var>B</var> are areas, and the z-index
of <var>A</var> is less than the z-index
of <var>B</var>, then all marks generated by <var>A</var>
are beneath all marks generated by <var>B</var>.
</p>
<p>
If <var>A</var> and <var>B</var> are areas with the same
z-index, the backgrounds of <var>A</var> and <var>B</var>
come beneath all other marks generated by <var>A</var> and
<var>B</var>. Further, if <var>A</var> is an
ancestor of <var>B</var> (still with the same z-index), then
the background of <var>A</var>
is beneath all the areas of <var>B</var>, and all the areas
of <var>B</var> are beneath the intrinsic areas (and border)
of <var>A</var>.
</p>
<p>
If <var>A</var> and <var>B</var> have the same z-index and
neither is an ancestor of the other,
then it is an error if either their backgrounds conflict or if a
non-background mark of <var>A</var> conflicts with a
non-background mark of <var>B</var>.
An implementation may recover by proceeding as if the marks from the
first area in the pre-order traversal order are beneath those of the
other area.
</p>
</div3>
</div2>
<div2 id="area-tree-sample"><head>Sample Area Tree</head>
<graphic source="page-area-tree.gif" xml:attributes="href source" show="embed" actuate="auto" xmlns:xlink="http://www.w3.org/TR/WD-xlink"/>
</div2>
<div2 id="area-traitlist"><head>List of Traits on Areas</head>
<ulist>
<item><p>block-progression-direction</p></item>
<item><p>inline-progression-direction</p></item>
<item><p>shift-direction</p></item>
<item><p>glyph-orientation</p></item>
<item><p>is-reference-area</p></item>
<item><p>is-viewport-area</p></item>
<item><p>left-position</p></item>
<item><p>right-position</p></item>
<item><p>top-position</p></item>
<item><p>bottom-position</p></item>
<item><p>left-offset</p></item>
<item><p>top-offset</p></item>
<item><p>is-first</p></item>
<item><p>is-last</p></item>
<item><p>position-point</p></item>
<item><p>area-class</p></item>
<item><p>start-intrusion-adjustment</p></item>
<item><p>end-intrusion-adjustment</p></item>
<item><p>generated-by</p></item>
<item><p>returned-by</p></item>
<item><p>page-number</p></item>
<item><p>blink</p></item>
<item><p>underline-score</p></item>
<item><p>overline-score</p></item>
<item><p>through-score</p></item>
<item><p>underline-score-color</p></item>
<item><p>overline-score-color</p></item>
<item><p>through-score-color</p></item>
</ulist>
</div2>
</div1>


<div1 id="refinement"><head>Property Refinement / Resolution</head>


<p>During refinement the set of <term>properties</term> that apply to a formatting
object is transformed into a set of <term>traits</term> that
define constraints on the result of formatting. For many traits there
is a one-to-one correspondence with a property; for other traits the
transformation is more complex. Details on the transformation are
described below.
</p>
<p>The first step in refinement of a particular formatting object
is to obtain the effective value of each property that applies to the
object. Any shorthand property specified on the formatting object is
expanded into the individual properties. This is further described in
<specref ref="shortexpan"/>. For any property that has not been specified
on the object the inherited (see <specref ref="inheritance"/>)
or initial value, as applicable, is used as the effective value.
The second step is to transform this property set into traits.
</p>
<note><p>Although the refinement process is described in 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.</p>
</note>
<div2 id="speccomact">
<head>Specified, Computed, and Actual Values, and Inheritance</head>
<p>For every property that is applicable to a given
formatting object, it is necessary to determine
the value of the property.
Three variants of the property value are
distinguished: the specified value, the computed value, and
the actual value. The "specified value" is one that is
placed on the formatting object during the tree-construction process.
A specified value may not be in a
form that is directly usable; for example, it may be a
percentage or other expression
that must be converted into an absolute value.
A value resulting from such a conversion is called the
"computed value".  Finally, the computed value may not be
realizable on the output medium and may need to be adjusted
prior to use in rendering. For example, a line width may be
adjusted to become an integral number of output
medium pixels. This adjusted value is the "actual value."</p>
<div3><head>Specified Values</head>
<p>The specified value of a property is
determined using the following mechanisms
(in order of precedence):</p>
<olist><item><p>
If the tree-construction process placed the property
on the formatting object, use the value of that property
as the specified value.  This is called "explicit
specification".</p></item>
<item><p>
Otherwise, if the property is inheritable, use the value of that
property from the parent formatting object, generally the
computed value (see below).</p></item>
<item><p>
Otherwise use the property's initial value, if it has one.
The initial value of each property is indicated in the
property's definition. If there is no initial value, that
property is not specified on the formatting object.
In general, this is an error.
</p></item></olist>
<p>Since it has no parent, the root of the result tree
cannot use values from its parent formatting
object; in this case, the initial value is used if necessary.</p>
</div3>
<div3><head>Computed Values</head>
<p>Specified values may be absolute (i.e., they are not
specified relative to another value, as in "red" or "2mm")
or relative (i.e., they are specified relative to another value,
as in "auto", "2em", and "12%"), or they may be expressions.
For most absolute values, no
computation is needed to find the computed value. Relative values,
on the other hand, must be transformed into computed values: percentages
must be multiplied by a reference value (each property defines which value
that is), values with a relative unit (em)
must be made absolute by multiplying with the appropriate font size,
"auto" values must be computed by the formulas given with
each property, certain property
values ("smaller", "bolder") must be replaced
according to their definitions.
The computed value of any property that controls a border width
where the style of
the border is "none" is forced to be "0pt".</p>
<p>
Some properties have more than one way in which the property value can be specified.
The simplest example of such properties are those which can be specified
either in terms of a direction relative to the writing-mode (e.g., padding-before)
or a direction in terms of the absolute geometric orientation of the viewport
(e.g., padding-top). These two properties are called the
relative property and the absolute property, respectively.
Collectively, they are called "corresponding properties".</p>
<p>Specifying a value for one property determines both a
computed value for the specified property and a computed value
for the corresponding property.
Which relative property corresponds to which absolute
property depends on the writing-mode. For example, if
the "writing-mode" at the top level of a document is
"lr-tb",
then "padding-start" corresponds to "padding-left", but if
the "writing-mode" is "rl-tb", then "padding-start"
corresponds to "padding-right".
The exact specification of how to compute the values of
corresponding properties is given in <specref ref="compcorr"/>.</p>
<p>In most cases, elements inherit computed values. However,
there are some properties whose specified value may be
inherited (e.g., the value for the "line-height"
property).
In the cases where child elements do not inherit the computed value,
this is described in the property definition.</p>
</div3>
<div3><head>Actual Values</head>
<p>A computed value is in principle ready to be
used, but a user agent may not be able to make
use of the value in a given environment. For
example, a user agent may only be able to render
borders with integer pixel widths and may, therefore,
have to adjust the computed width to an integral number
of media pixels. The actual
value is the computed value after any such adjustments have been applied.</p>
</div3>
<div3 id="inheritance"><head>Inheritance</head>
<p>Some of the properties applicable to formatting objects are "inheritable."
Such properties are so identified in the property description.
The inheritable properties can be placed on any formatting
object.  The inheritable properties are propagated down the
formatting object tree from a parent to each child.  (These properties
are given their initial value at the root of the result tree.)
For a given inheritable property, if that property is present on a
child, then that value of the property is used for that child
(and its descendants until explicitly re-set in a lower descendant);
otherwise, the specified value of that property on the child is the
computed value of that property on the parent formatting
object. Hence there is always a specified value
defined for every inheritable property for every
formatting object.</p>
</div3>
</div2>

<div2 id="shortexpan"><head>Shorthand Expansion</head>
<p>In XSL there are two kinds of shorthand properties; those originating
from CSS, such as "border", and those that arise from breaking apart
and/or combining CSS properties, such as "page-break-inside". In XSL
both types of shorthands are handled in the same way.</p>
<note><p>Shorthands are only included in the highest XSL conformance
level; "complete".</p>
<p>The conformance level for each property is shown in
<specref ref="prtab2"/>.</p>
</note>
<p>Shorthand properties do not inherit from
the shorthand on the parent. Instead the individual properties that
the shorthand expands into may inherit.</p>
<p>Some CSS shorthands are interrelated; their expansion has one
or more individual properties in common.
CSS indicates that the user must specify the order of processing
for combinations of multiple interrelated shorthands and individual
interrelated properties. In XML, attributes are defined as unordered.
To resolve this issue, XSL defines a precedence order
when multiple interrelated shorthand properties or a shorthand property
and an interrelated individual property are specified:</p>
<p>They are processed in increasing precision (i.e., "border" is less precise
than "border-top", which is less precise than "border-top-color").
The individual properties are always more precise than any shorthand.
For the remaining ambiguous case, XSL defines the ordering to
be:</p>
<olist>
<item><p>"border-style", "border-color", and "border-width"
is less precise than</p></item>
<item><p>"border-top", "border-bottom", "border-right",
and "border-left".</p></item>
</olist>
<p>Processing is conceptually in the following steps:</p>
<olist>
<item><p>Set the effective value of
all properties to their initial values.</p></item>
<item><p>Process all shorthands in increasing precision.</p>
<p>If the shorthand is set to "inherit": set the effective
value of each property that can be set by the shorthand to
the computed value of the corresponding property in the parent.</p>
<p>If the value of the shorthand is not "inherit": determine which
individual properties are to be set, and replace the
initial-value with the computed value derived from the specified
value.</p></item>
<item><p>Process all specified individual properties.</p>
</item>
<item><p>Carry out any inheritance for properties that were
not given a value other than by the first step.</p>
</item>
</olist>
<note><p>For example,
if both the "background"
and the "background-color" properties are specified on a given
formatting object:
process the "background" shorthand, then process the
"background-color" property.</p></note>
</div2>

<div2 id="compcorr"><head>Computing the Values of Corresponding Properties</head>
<p>Where there are corresponding properties, such as "padding-left"
and "padding-start", a computed value is determined for all the
corresponding properties. How the computed values are determined
for a given formatting object is dependent on which of
the corresponding properties are specified on the object. See description
below.</p>
<p>The correspondance mapping from absolute to relative property
is as follows:
</p>
<p>If the "writing-mode" specifies a block-progression-direction of
"top-to-bottom": "top" maps to "before", and "bottom" maps to "after".</p>
<p>If the "writing-mode" specifies a block-progression-direction of
"bottom-to-top": "top" maps to "after", and "bottom" maps to "before".</p>
<p>If the "writing-mode" specifies a block-progression-direction of
"left-to-right": "left" maps to "before", and "right" maps to "after".</p>
<p>If the "writing-mode" specifies a block-progression-direction of
"right-to-left": "left" maps to "after", and "right" maps to "before".</p>
<p>If the "writing-mode" specifies an inline-progression-direction of
"left-to-right": "left" maps to "start", and "right" maps to "end".</p>
<p>If the "writing-mode" specifies an inline-progression-direction of
"right-to-left": "left" maps to "end", and "right" maps to "start".</p>
<p>If the "writing-mode" specifies an inline-progression-direction of
"top-to-bottom": "top" maps to "start", and "bottom" maps to "end".</p>
<p>If the "writing-mode" specifies an inline-progression-direction of
"bottom-to-top": "top" maps to "end", and "bottom" maps to "start".</p>
<p>If the "writing-mode" specifies an inline-progression-direction of
"left-to-right" for odd-numbered lines, and "right-to-left" for
even-numbered lined: "left" maps to "start", and "right" maps to "end".</p>
<note><p>"reference-orientation" is a rotation and does not influence
the correspondance mapping.
</p>
</note>
<div3 id="refine-border-padding"><head>Border and Padding Properties</head>
<p>The simplest class of corresponding properties are
those for which there are only two variants in the
correspondance, an absolute property and a relative
property, and the property names differ only in the
choice of absolute or
relative designation; for example, "border-left-color" and
"border-start-color".</p>
<p>For this class, the computed values of the corresponding
properties are determined as follows. If the corresponding
absolute variant of the property is specified on the formatting
object, its computed value is used to set the computed value of the
corresponding relative property.  If the corresponding absolute property
is not explicitly specified, then the computed
value of the absolute property is set to the computed value of the
corresponding relative property.</p>
<p>Note that if both the absolute and the relative
properties are not
explicitly specified, then the rules for determining the specified
value will use either inheritance if that is defined for the property
or the initial value. The initial value must be the same for all possible
corresponding properties. If both an absolute and a corresponding relative
property are explicitly specified, then the above rule gives precedence to the
absolute property, and the specified value of the
corresponding relative property
is ignored in determining the computed value of the corresponding properties.</p>
<p>The (corresponding) properties that use the above rule to
determine their computed value are:</p>
<ulist>
<item><p>border-after-color</p></item>
<item><p>border-before-color</p></item>
<item><p>border-end-color</p></item>
<item><p>border-start-color</p></item>
<item><p>border-after-style</p></item>
<item><p>border-before-style</p></item>
<item><p>border-end-style</p></item>
<item><p>border-start-style</p></item>
<item><p>border-after-width</p></item>
<item><p>border-before-width</p></item>
<item><p>border-end-width </p></item>
<item><p>border-start-width</p></item>
<item><p>padding-after</p></item>
<item><p>padding-before</p></item>
<item><p>padding-end</p></item>
<item><p>padding-start </p></item>
</ulist>
</div3>
<div3><head>Margin, Space, and Indent Properties</head>
<p>The "space-before", and "space-after" properties (block-level
formatting objects), "space-start", and "space-end" properties
(inline-level formatting objects) are handled in the same way as the
properties immediately above, but the corresponding
absolute properties are in the set: "margin-top",
"margin-bottom", "margin-left", and "margin-right".</p>
<p>There are two more properties, "end-indent" and
"start-indent" (block-level formatting objects),
for which the computed value may be
determined by the computed value of the
absolute margin properties. For these traits,
the calculation of the value of the trait when the
corresponding absolute property is present depends on
three computed values: the computed value of the corresponding
absolute property, the computed value of the corresponding
"padding"
property, and the computed value of the corresponding
"border-width" property.</p>
<p>Here the term "corresponding" has been broadened to mean
that if
"margin-left" is the corresponding absolute property
to "start-indent", then
"padding-left" (and "padding-start")
and "border-left-width" (and "border-start-width") are the
"corresponding" "padding" and "border-width" properties.</p>
<p>The formulae for calculating the computed value of the
"start-indent", and "end-indent" properties are as follows (where
"margin-corresponding" is a variable for the
corresponding absolute "margin" property):</p>
<p><code>
end-indent = margin-corresponding + padding-end + border-end-width</code></p>
<p><code>start-indent = margin-corresponding + padding-start + border-start-width</code></p>
<p>If an absolute "margin" property is not explicitly
specified,
these equations determine a computed value for the corresponding
"margin" property given values for the three traits
<emph>corresponding</emph>-indent,
padding-<emph>corresponding</emph> and
border-<emph>corresponding</emph> width.</p>
</div3>
<div3><head>Height, and Width Properties</head>
<p>Based on the writing-mode in effect for the formatting object,
either the "height", "min-height", and "max-height" properties, or
the "width", "min-width", and "max-width" properties are converted
to the corresponding block-progression-dimension, or
inline-progression-dimension.</p>
<p>The "height" properties are absolute and indicate the dimension
from "top" to "bottom"; the width properties the dimension from
"left" to "right".</p>
<p>If the "writing-mode" specifies a block-progression-direction of
"top-to-bottom" or "bottom-to-top" the conversion is as follows:</p>
<ulist>
<item><p>If any of "height", "min-height", or "max-height" is specified:</p>
<ulist>
<item><p>If "height" is specified then first set:</p>
<p>block-progression-dimension.minimum=&lt;height&gt;</p>
<p>block-progression-dimension.optimum=&lt;height&gt;</p>
<p>block-progression-dimension.maximum=&lt;height&gt;</p>
</item>
<item><p>If "height" is not specified, then first set:</p>
<p>block-progression-dimension.minimum=auto</p>
<p>block-progression-dimension.optimum=auto</p>
<p>block-progression-dimension.maximum=auto</p>
</item>
<item><p>Then, if "min-height" is specified, reset:</p>
<p>block-progression-dimension.minimum=&lt;min-height&gt;</p>
</item>
<item><p>Then, if "max-height" is specified, reset:</p>
<p>block-progression-dimension.minimum=&lt;max-height&gt;</p>
</item>
<item><p>However, if "max-height" is specified
as "none", reset:</p>
<p>block-progression-dimension.minimum=auto</p>
</item>
</ulist>
</item>
<item><p>If any of "width", "min-width", or "min-width" is specified:</p>
<ulist>
<item><p>If "width" is specified then first set:</p>
<p>inline-progression-dimension.minimum=&lt;width&gt;</p>
<p>inline-progression-dimension.optimum=&lt;width&gt;</p>
<p>inline-progression-dimension.maximum=&lt;width&gt;</p>
</item>
<item><p>If "width" is not specified, then first set:</p>
<p>inline-progression-dimension.minimum=auto</p>
<p>inline-progression-dimension.optimum=auto</p>
<p>inline-progression-dimension.maximum=auto</p>
</item>
<item><p>Then, if "min-width" is specified, reset:</p>
<p>inline-progression-dimension.minimum=&lt;min-width&gt;</p>
</item>
<item><p>Then, if "max-width" is specified, reset:</p>
<p>inline-progression-dimension.minimum=&lt;max-width&gt;</p>
</item>
<item><p>However, if "max-width" is specified
as "none", reset:</p>
<p>inline-progression-dimension.minimum=auto</p>
</item>
</ulist>
</item>
</ulist>
<p>If the "writing-mode" specifies a block-progression-direction of
"left-to-right" or "right-to-left" the conversion is as follows:</p>
<ulist>
<item><p>If any of "height", "min-height", or "max-height" is specified:</p>
<ulist>
<item><p>If "height" is specified then first set:</p>
<p>inline-progression-dimension.minimum=&lt;height&gt;</p>
<p>inline-progression-dimension.optimum=&lt;height&gt;</p>
<p>inline-progression-dimension.maximum=&lt;height&gt;</p>
</item>
<item><p>If "height" is not specified, then first set:</p>
<p>inline-progression-dimension.minimum=auto</p>
<p>inline-progression-dimension.optimum=auto</p>
<p>inline-progression-dimension.maximum=auto</p>
</item>
<item><p>Then, if "min-height" is specified, reset:</p>
<p>inline-progression-dimension.minimum=&lt;min-height&gt;</p>
</item>
<item><p>Then, if "max-height" is specified, reset:</p>
<p>inline-progression-dimension.minimum=&lt;max-height&gt;</p>
</item>
<item><p>However, if "max-height" is specified
as "none", reset:</p>
<p>inline-progression-dimension.minimum=auto</p>
</item>
</ulist>
</item>
<item><p>If any of "width", "min-width", or "min-width" is specified:</p>
<ulist>
<item><p>If "width" is specified then first set:</p>
<p>block-progression-dimension.minimum=&lt;width&gt;</p>
<p>block-progression-dimension.optimum=&lt;width&gt;</p>
<p>block-progression-dimension.maximum=&lt;width&gt;</p>
</item>
<item><p>If "width" is not specified, then first set:</p>
<p>block-progression-dimension.minimum=auto</p>
<p>block-progression-dimension.optimum=auto</p>
<p>block-progression-dimension.maximum=auto</p>
</item>
<item><p>Then, if "min-width" is specified, reset:</p>
<p>block-progression-dimension.minimum=&lt;min-width&gt;</p>
</item>
<item><p>Then, if "max-width" is specified, reset:</p>
<p>block-progression-dimension.minimum=&lt;max-width&gt;</p>
</item>
<item><p>However, if "max-width" is specified
as "none", reset:</p>
<p>block-progression-dimension.minimum=auto</p>
</item>
</ulist>
</item>
</ulist>
</div3>
<div3><head>Overconstrained Geometry</head>
<p>The sum of the start-indent, end-indent, and inline-progression-dimension
of the content-rectangle of an area should be equal to the
inline-progression-dimension of the content-rectangle of the closest
ancestor reference-area. In the case where a specification would
lead to them being different the end-indent (and thus the corresponding
margin) is adjusted such that the equality is true.</p>
</div3>
</div2>

<div2><head>Simple Property to Trait Mapping</head>

<p>The majority of the properties map into traits of the same name.
Most of these also simply copy the value from the property.
These are classified as "Rendering", "Formatting", "Specification",
"Font selection", "Reference", and "Action" in the property table in
<specref ref="prtab2"/>.
For example, the property <code>font-style="italic"</code> is
refined into a <trait>font-style</trait> trait with a value of "italic".
</p>
<p>Some traits have a value that is different
from the value of the property. These are classified as "Value change"
in the property table.
For example, the property <code>background-position-horizontal="left"</code>
is refined into a <trait>background-position-horizontal</trait> trait
with a value of "0pt".
The value mapping for these traits is given below.</p>
<div3><head>Background-position-horizontal and
background-position-vertical Properties</head>
<p>A value of "top", "bottom", "left", "right", or "center" is
converted to a length as specified in the property definition.</p>
</div3>
<div3><head>Column-number Property</head>
<p>If a value has not been specified on a formatting object to which
this property applies the initial value is computed as specified
in the property definition.</p>
</div3>
<div3><head>Text-align Property</head>
<p>A value of "left", or "right" is converted to the writing-mode
relative value as specified in the property definition.</p>
</div3>
<div3><head>Text-align-last Property</head>
<p>A value of "left", or "right" is converted to the writing-mode
relative value as specified in the property definition.</p>
</div3>
<div3><head>z-index Property</head>
<p>The value is converted to one that is absolute; i.e., the refined value
is the specified value plus the refined value of z-index of its parent
formatting object, if any.</p>
</div3>
</div2>

<div2><head>Complex Property to Trait Mapping</head>
<p>A small number of properties influence traits in a more
complex manner. Details are given below.</p>

<div3><head>Word-spacing and Letter-spacing Properties</head>
<p>These properties may set values for the <trait>start-space</trait>
and <trait>end-space</trait> traits, as described in the property
definitions.</p>
</div3>
<div3 id="refine-reference-orientation"><head>Reference-orientation Property</head>
<ulist>
<item><p>If this area sets a reference-area:</p>
<olist><item><p>Let <var>A</var> be the area whose traits are being determined;</p></item>
<item><p>Let <var>F</var> be the formatting object that generates area
<var>A</var>;</p></item>
<item><p>Let <var>N</var> be the nearest ancestor formatting object,
including
self, to <var>F</var> such that <var>N</var> generates a reference-area that is an ancestor
of <var>A</var> in the area tree:</p>
<p>Then, the <trait>reference-orientation</trait> trait for <var>A</var> is set to the modulo-360
sum of the "reference-orientation" property on <var>F</var> and the value established
by the "reference-orientation" property of formatting object <var>N</var> (recursively). </p></item>
</olist>
</item>
<item><p>All other areas:</p>
<olist><item><p>Let <var>A</var> be the area whose traits are being determined;</p></item>
<item><p>Let <var>F</var> be the formatting object that generates area
<var>A</var>;</p></item>
<item><p>Let <var>N</var> be the nearest ancestor formatting object,
including
self, to <var>F</var> such that <var>N</var> generates a reference-area that is an ancestor
of <var>A</var> in the area tree:</p>
<p>Then, the <trait>reference-orientation</trait> trait for <var>A</var> is set to the value
established by the "reference-orientation" property of formatting object
<var>N</var>. </p></item>
</olist>
</item>
</ulist>
</div3>
<div3 id="refine-writing-mode"><head>Writing-mode and Direction Properties</head>
<p>The direction traits on an area are indirectly derived from the
"writing-mode", "direction" and "unicode-bidi" properties on the
formatting object that generates the area or the formatting object
ancestors of that formatting object. The exact derivation depends
on the trait.</p>
<ulist>
<item><p>block-progression-direction trait:</p>
<ulist>
<item><p>Let <var>A</var> be the area whose traits are being determined;</p>
</item>
<item><p>Let <var>F</var> be the formatting object that generates area <var>A</var>;</p>
</item>
<item><p>Let <var>N</var> be the nearest ancestor formatting object,
including
self, to <var>F</var> such that <var>N</var> generates a reference-area that is an ancestor
of <var>A</var> in the area tree:</p>
<p>Then, the <trait>block-progression-direction</trait> trait for <var>A</var> is set to the
block-progression-direction established by the "writing-mode" property
of formatting object <var>N</var>. </p>
</item>
</ulist>
</item>
<item><p>inline-progression-direction trait:</p>
<ulist>
<item><p>Let <var>A</var> be the area whose traits are being determined;</p>
</item>
<item><p>Let <var>F</var> be the formatting object that generates area <var>A</var>;</p>
</item>
<item><p>Let <var>N</var> be the nearest ancestor formatting object,
including
self, to <var>F</var> such that at least one of the following conditions is
satisfied:</p>
<ulist>
<item><p><var>N</var> generates a reference-area that is an ancestor
to <var>A</var> in the area tree, or</p>
</item>
<item><p><var>N</var> is a block-level formatting object and the
glyph-orientation
of <var>N</var> is either 0 or 180 degrees, in which case, the "direction"
property establishes the inline-progression-direction for <var>N</var>, or</p>
<note>
<p>The above condition is complex because direction changes in vertical
text only affect the rotated non-ideographic text; that is they
only affect the Latin or Arabic/Hebrew half-width
characters.</p>
</note>
</item>
<item><p><var>N</var> is an inline formatting object and has a "unicode-bidi"
property with a value of either "embed" or "override", in which
case, the "direction" property establishes an inline-progression-direction
for <var>N</var>.</p>
</item>
</ulist>
<p>Then, the <trait>inline-progression-direction</trait> trait for <var>A</var> is set to
the inline-progression-direction established by formatting object
<var>N</var>. If <var>N</var> has both a "writing-mode" and a "direction" property that establishes
the inline-progression-direction then the "direction" property's overrides
that established by the "writing-mode".</p>
<p>The final <trait>inline-progression-direction-trait</trait> may be further modified
by the formatter's application of the unicode-bidi rule, and for
alternating lines in the extended set of international writing-modes.</p>
</item>
</ulist>
</item>
<item><p>shift-direction trait:</p>
<ulist>
<item><p>Let <var>A</var> be the area whose traits are being determined;</p>
</item>
<item><p>Let <var>F</var> be the formatting object that generates area <var>A</var>;</p>
</item>
<item><p>Let <var>N</var> be the nearest ancestor formatting object, including
self, to <var>F</var> such that <var>N</var> generates a reference-area that is an ancestor
of <var>A</var> in the area tree:</p>
<p>Then, the <trait>shift-direction</trait> trait for <var>A</var> is set to the shift-direction
established by the "writing-mode" property of formatting
object <var>N</var>.</p>
<p>The <trait>shift-direction-trait</trait> may be further modified by the formatter
for inverted lines in the extended set of international writing-modes.</p>
</item>
</ulist>
</item>
</ulist>
</div3>
<div3 id="refine-absolute-pos"><head>Absolute-position Property</head>
<p>If absolute-position = "absolute" or "fixed", the values of the
<trait>left-position</trait>, <trait>top-position</trait>, etc. traits
are copied directly from the
values of the "left", "top", etc. properties. Otherwise these traits'
values are left undefined during refinement and determined during
composition.</p>
</div3>
<div3 id="refine-relative-pos"><head>Relative-position Property</head>
<p>If relative-position = "relative" then the values of the
<trait>left-offset</trait> and
<trait>top-offset</trait> traits are copied directly
from the "left" and "top"
properties. If the "right" property is specified but "left" is not,
then <trait>left-offset</trait> is set to the negative of the
value of "right".  If neither
"left" nor "right" is specified the <trait>left-offset</trait> is 0.
If the "bottom"
property is specified but "top" is not, then
<trait>top-offset</trait> is set to the
negative of the value of "bottom". If neither "top" nor "bottom" is
specified the <trait>top-offset</trait> is 0.</p>
</div3>
<div3 id="refine-text-decoration"><head>Text-decoration Property</head>
<p>The "text-decoration" property value provides values for
the <trait>blink</trait> trait and a set of
score and score-color traits. The <term>specified color</term> has the
value of the <trait>color</trait> trait of the formatting object
for which the "text-decoration" property is being refined.</p>
<p>A property value containing the token "underline" sets a value of
"yes" to the <trait>underline-score</trait> trait, and a value of
<term>specified color</term> to the <trait>underline-score-color</trait>
trait.</p>
<p>A property value containing the token "overline" sets a value of
"yes" to the <trait>overline-score</trait> trait, and a value of
<term>specified color</term> to the <trait>overline-score-color</trait>
trait.</p>
<p>A property value containing the token "line-through" sets a value of
"yes" to the <trait>through-score</trait> trait, and a value of
<term>specified color</term> to the <trait>through-score-color</trait>
trait.</p>
<p>A property value containing the token "blink" sets a value of
"yes" to the <trait>blink</trait> trait.</p>
<p>A property value containing the token "no-underline" sets a value of
"no" to the <trait>underline-score</trait> trait, and a value of
<term>specified color</term> to the <trait>underline-score-color</trait>
trait.</p>
<p>A property value containing the token "no-overline" sets a value of
"no" to the <trait>overline-score</trait> trait, and a value of
<term>specified color</term> to the <trait>overline-score-color</trait>
trait.</p>
<p>A property value containing the token "no-line-through" sets a value of
"no" to the <trait>through-score</trait> trait, and a value of
<term>specified color</term> to the <trait>through-score-color</trait>
trait.</p>
<p>A property value containing the token "no-blink" sets a value of
"no" to the <trait>blink</trait> trait.</p>
</div3>
</div2>

<div2><head>Non-property Based Trait Generation</head>
<p>The <trait>is-reference-area</trait> trait is set to "true" for the
following formatting objects:
"simple-page-master", "title",
"region-body", "region-before","region-after", "region-start", "region-end",
"block-container", "inline-container",
"table", "table-caption",
and
"table-cell".
For all other formatting objects it is set to "false".
</p>
</div2>

<div2><head>Property Based Transformations</head>
<div3><head>Text-transform Property</head>
<p>The case changes specified by this property are carried out during
refinement by changing the value of the "character" property
appropriately.</p>
<note><p>The use of the "text-transform" property is deprecated in XSL
due to its severe internationalization issues.</p>
</note>
</div3>
</div2>




<div2><head>Expressions</head>
<p>All property value specifications in attributes within an XSL stylesheet can be expressions. These expressions represent the value of the property specified.    The expression is first evaluated and then the resultant value is used to determine the value of the property.  </p>
<div3><head>Property Context</head>
<p>Properties are evaluated against a property-specific context.  This context provides:</p>
<ulist>
<item>
<p>A list of allowed resultant types for a property value.</p>
</item>
<item>
<p>Conversions from resultant expression value types to an allowed type for the property.</p>
</item>
<item>
<p>The current font-size value.</p>
</item>
<item>
<p>Conversions from relative numerics by type to absolute numerics within additive expressions.</p>
</item>
</ulist>
<note>
<p>It is not necessary that a conversion is provided for all types.  If no conversion is specified, it is an error.</p>
</note>
<p>When a type instance (e.g., a string, a keyword, a
numeric, etc.) is recognized in the expression it is evaluated against
the property context.  This provides the ability for specific values to be
converted with the property context's specific algorithms or conversions
for use in the evaluation of the expression as a whole.  </p>
<p>For example, the "auto" enumeration token for certain
properties is a calculated value.  Such a token would be converted
into a specific type instance via an algorithm specified in the property definition.
In such a case the resulting value might be an absolute length specifying the width
of some aspect of the formatting object.</p>
<p>In addition, this allows certain types like relative numerics to be
resolved into absolute numerics prior to mathematical
operations.</p>
<p>All property contexts allow conversions as specified in
<specref ref="expr.value.conv"/>.</p>
</div3>

<div3><head>Evaluation Order</head>
<p>When a set of properties is being evaluated for a
specific formatting object in the formatting object tree
there is a specific order in which properties must be evaluated.
Essentially, the "font-size" property must be evaluated first before
all other properties.  Once the "font-size" property has been evaluated,
all other properties may be evaluated in any order.</p>
<p>When the "font-size" property is evaluated, the current
font-size for use in evaluation is the font-size of the parent element.
Once the "font-size" property has been evaluated,
that value is used as the
current font-size for all property contexts of all properties value expressions
being further evaluated.</p></div3>
<div3><head>Basics</head><scrap headstyle="show"><head/>
<prod id="NT-Expr"><lhs>Expr</lhs><rhs><nt def="NT-AdditiveExpr">AdditiveExpr</nt></rhs></prod>
<prod id="NT-PrimaryExpr">
<lhs>PrimaryExpr</lhs><rhs>'(' <nt def="NT-Expr">Expr</nt> ')'</rhs><rhs>|<nt def="NT-Numeric">Numeric</nt></rhs><rhs>| <nt def="NT-Literal">Literal</nt></rhs><rhs>| <nt def="NT-Color">Color</nt></rhs><rhs>| <nt def="NT-Keyword">Keyword</nt></rhs><rhs>| <nt def="NT-EnumerationToken">EnumerationToken</nt></rhs><rhs>| <nt def="NT-FunctionCall">FunctionCall</nt></rhs>
</prod>
</scrap>
</div3>

<div3><head>Function Calls</head>
<scrap headstyle="show">
<head/>
<prod id="NT-FunctionCall">
<lhs>FunctionCall</lhs>
<rhs><nt def="NT-FunctionName">FunctionName</nt> '(' ( <nt def="NT-Argument">Argument</nt> ( ',' <nt def="NT-Argument">Argument</nt>)*)? ')'</rhs>
</prod>
<prod id="NT-Argument">
<lhs>Argument</lhs>
<rhs><nt def="NT-Expr">Expr</nt></rhs>
</prod>
</scrap>
</div3>

<div3 id="numbers">
<head>Numerics</head>
<p>A numeric represents all the types of numbers in an XSL expression.
Some of these numbers are absolute values.  Others are
relative to some other set of values.  All of these values use a floating-point number to represent the number-part of their definition. </p>
<p>A floating-point number can have any
double-precision 64-bit format IEEE 754 value <bibref ref="IEEE754"/>.
These include a special <quote>Not-a-Number</quote> (NaN) value,
positive and negative infinity, and positive and negative zero.  See
<loc href="http://java.sun.com/docs/books/jls/html/4.doc.html#9208" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">Section 4.2.3</loc> of <bibref ref="JLS"/> for a summary of the key
rules of the IEEE 754 standard.</p><scrap headstyle="show"><head/>
<prod id="NT-Numeric"><lhs>Numeric</lhs><rhs><nt def="NT-AbsoluteNumeric">AbsoluteNumeric</nt></rhs><rhs>| <nt def="NT-RelativeNumeric">RelativeNumeric</nt></rhs></prod>
<prod id="NT-AbsoluteNumeric"><lhs>AbsoluteNumeric</lhs><rhs><nt def="NT-AbsoluteLength">AbsoluteLength</nt></rhs></prod><prod id="NT-AbsoluteLength"><lhs>AbsoluteLength</lhs><rhs><nt def="NT-Number">Number</nt> <nt def="NT-AbsoluteUnitName">AbsoluteUnitName</nt>?</rhs></prod>
<prod id="NT-RelativeNumeric"><lhs>RelativeNumeric</lhs><rhs><nt def="NT-Percent">Percent</nt></rhs><rhs>| <nt def="NT-RelativeLength">RelativeLength</nt></rhs></prod>
<prod id="NT-Percent"><lhs>Percent</lhs><rhs><nt def="NT-Number">Number</nt> '%'</rhs></prod>

<prod id="NT-RelativeLength"><lhs>RelativeLength</lhs><rhs><nt def="NT-Number">Number</nt> <nt def="NT-AbsoluteUnitName">RelativeUnitName</nt></rhs></prod></scrap>
<p>The following operators may be used with numerics:</p>
<glist>
<gitem><label><code>+</code></label>
<def>
<p>Performs addition.</p>
</def></gitem>
<gitem><label><code>-</code></label>
<def>
<p>Performs subtraction or negation.</p>
</def></gitem>
<gitem><label><code>*</code></label>
<def>
<p>Performs multiplication.</p>
</def></gitem>
<gitem><label><code>div</code></label>
<def>
<p>Performs floating-point division according to IEEE 754.</p>
</def></gitem>
<gitem><label><code>mod</code></label><def>
<p>Returns the remainder from a truncating division.</p>
</def></gitem>
</glist>
<note>
<p>Since XML allows <code>-</code> in names, the <code>-</code>
operator (when not used as a UnaryExpr negation) typically needs to be
preceded by whitespace.   For example the expression <code>10pt - 2pt</code>
means subtract 2 points from 10 points.  The expression <code>10pt-2pt</code>
would mean a length value of 10 with a unit of "pt-2pt".</p>
</note>
<note>
<p>The following are examples of the <code>mod</code> operator:</p>
<ulist>
<item>
<p><code>5 mod 2</code> returns <code>1</code></p>
</item>
<item>
<p><code>5 mod -2</code> returns <code>1</code></p>
</item>
<item>
<p><code>-5 mod 2</code> returns <code>-1</code></p>
</item>
<item>
<p><code>-5 mod -2</code> returns <code>-1</code></p>
</item>
</ulist>
</note>
<note>
<p>The <code>mod</code> operator is the same as the <code>%</code> operator in Java and
ECMAScript and is not the same as the IEEE remainder operation, which
returns the remainder from a rounding division.</p>
</note>
<scrap headstyle="show">
<head>Numeric Expressions</head>
<prodgroup pcw5="1" pcw2="10" pcw4="21">
<prod id="NT-AdditiveExpr">
<lhs>AdditiveExpr</lhs>
<rhs><nt def="NT-MultiplicativeExpr">MultiplicativeExpr</nt></rhs>
<rhs>| <nt def="NT-AdditiveExpr">AdditiveExpr</nt> '+' <nt def="NT-MultiplicativeExpr">MultiplicativeExpr</nt></rhs>
<rhs>| <nt def="NT-AdditiveExpr">AdditiveExpr</nt> '-' <nt def="NT-MultiplicativeExpr">MultiplicativeExpr</nt></rhs>
</prod>
<prod id="NT-MultiplicativeExpr">
<lhs>MultiplicativeExpr</lhs>
<rhs><nt def="NT-UnaryExpr">UnaryExpr</nt></rhs>
<rhs>| <nt def="NT-MultiplicativeExpr">MultiplicativeExpr</nt> <nt def="NT-MultiplyOperator">MultiplyOperator</nt> <nt def="NT-UnaryExpr">UnaryExpr</nt></rhs>
<rhs>| <nt def="NT-MultiplicativeExpr">MultiplicativeExpr</nt> 'div' <nt def="NT-UnaryExpr">UnaryExpr</nt></rhs>
<rhs>| <nt def="NT-MultiplicativeExpr">MultiplicativeExpr</nt> 'mod' <nt def="NT-UnaryExpr">UnaryExpr</nt></rhs>
</prod>
<prod id="NT-UnaryExpr">
<lhs>UnaryExpr</lhs><rhs><nt def="NT-PrimaryExpr">PrimaryExpr</nt></rhs>
<rhs>| '-' <nt def="NT-UnaryExpr">UnaryExpr</nt></rhs>
</prod>
</prodgroup>
</scrap><note><p>The effect of this grammar is that the order of precedence is (lowest precedence first):</p><ulist><item><p>+,  -</p></item><item><p>*, div, mod</p></item></ulist><p>and the operators are all left associative.  For example, 2*3 + 4 div 5 is equivalent to (2*3) + (4 div 5).</p></note>
<p>If a non-numeric value is used in an <nt def="NT-AdditiveExpr">AdditiveExpr</nt> and there is no property context conversion from that type into an absolute numeric value, the expression is invalid and considered an error.</p>
</div3><div3><head>Absolute Numerics</head><p>An absolute numeric is an absolute length which is a pair consisting of a <nt def="NT-Number">Number</nt> and a <nt def="NT-AbsoluteUnitName">UnitName</nt> raised to a power. When an absolute length is written without a unit, the unit power is assumed to be zero.  Hence, all floating point numbers are a length with a power of zero.</p>

<p> Each unit name has associated with it an internal ratio to some common
internal unit of measure (e.g., a meter). When a value is
written in a
property expression, it is first converted to the internal unit of measure
and then mathematical operations are performed.</p>
<p>In
addition, only the mod,
addition, and subtraction operators require that the numerics on
either side of the operation be absolute numerics of the same unit power.
For other operations, the unit powers may be different and the result
should be mathematically consistent as with the handling of powers in algebra.</p>
<p>A property definition may constrain an absolute length to a
particular power.
For example, when specifying font-size, the value is expected to be of
power "one".
That is, it is expected to have a single powered unit specified (e.g., 10pt).</p>
<p>When the final value of property is calculated, the resulting power of the
absolute numeric must be either zero or one.  If any other power is specified,
the value is an error.</p></div3>
<div3><head>Relative Numerics</head><p>Relative lengths are values that are
calculated relative to some other set of values. When written as part of an
expression, they are either converted via the property
context into an absolute numeric or passed verbatim as the property value.</p>
<p>It is an error if the property context has no available conversion
for the relative numeric and a conversion is required for expression
evaluation (e.g., within an add operation).</p>

<div4><head>Percents</head>
<p>Percentages are values that are counted in 1/100 units.  That is, <code>10%</code>
as a percentage value is <code>0.10</code> as a floating point number.
When converting to an absolute numeric, the percentage is defined in the
property definition as being a percentage of some known
property value.</p>
<p> For example, a value of  "110%" on a "font-size"
property
would be evaluated to mean 1.1 times the current font size.
Such a definition of the allowed conversion for percentages is specified on
the property definition.  If no conversion is specified, the resulting value
is a percentage.</p>
</div4>
<div4 id="relative.lengths"><head>Relative Lengths</head>
<p>A relative length is a unit-based value that is measured against the
current value of the <code>font-size</code> property.   </p>
<p>There is only one relative unit of measure, the "em". The
definition of  "1em" is equal to the current font size. For
example, a value of "1.25em" is 1.25 times the current font
size.</p>
<p>When an em measurement is used in an expression, it is converted according
to the font-size value of the current property's context.
The result of the expression is an absolute length.
See <specref ref="font-size"/></p>

</div4>
</div3>
<div3><head>Strings</head>
<p>Strings are represented either as <nt def="NT-Literal">literals</nt> or
as an <nt def="NT-EnumerationToken">enumeration token</nt>.
All properties contexts allow conversion from enumeration tokens to strings.
See <specref ref="expr.value.conv"/>.</p>
</div3>
<div3><head>Colors</head>
<p>A color is a set of values used to identify a particular color from a color space.
Only RGB and ICC colors are included in this Recommendation.</p>
<p>RGB colors are directly represented in the expression language using a
hexadecimal notation.  ICC colors can be accessed through an icc-color
function.
Colors can also be accessed through the system-color
function or through conversion from an
<nt def="NT-EnumerationToken">EnumerationToken</nt>
via the property context.</p>
</div3>
<div3><head>Keywords</head>
<p>Keywords are special tokens in the grammar that provide access to
calculated values or other property values.
The allowed keywords are defined in the following subsections.</p>
<div4><head>inherit</head>
<p>The property takes the same <emph>computed</emph> value as the property
for the formatting object's parent object.</p>
</div4>
</div3>
<div3><head>Lexical Structure</head>
<p>When processing an expression,
whitespace (<nt def="NT-ExprWhitespace">ExprWhitespace</nt>) may be
allowed before or after any expression token even though it is not
explicitly defined as such in the grammar.  In some cases, whitespace
is necessary to make tokens in the grammar lexically distinct.
Essentially, whitespace should be treated as if it does not exist
after tokenization of the expression has occurred.</p>
<p>The following special tokenization rules must be applied in the
order specified to disambiguate the grammar:</p>
<ulist>
<item>
<p>If the character following an
<xnt href="http://www.w3.org/TR/REC-xml-names#NT-NCName" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">NCName</xnt> (possibly after intervening
<nt def="NT-ExprWhitespace">ExprWhitespace</nt>) is
"<code>(</code>",
then the token must be recognized as
<nt def="NT-FunctionName">FunctionName</nt>.</p></item>
<item>
<p>A number terminates at the first occurrence of a non-digit character other
than "<code>.</code>".  This allows the unit token for
length quantities to parse properly.</p></item>
<item>
<p>When an <xnt href="http://www.w3.org/TR/REC-xml-names#NT-NCName" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">NCName</xnt> immediately follows a
<nt def="NT-Number">Number</nt>, it should be recognized as a
<nt def="NT-AbsoluteUnitName">UnitName</nt> or it is an error.</p></item>
<item>
<p>The <nt def="NT-Keyword">Keyword</nt> values take precedence over
<nt def="NT-EnumerationToken">EnumerationToken</nt>.</p></item>
<item>
<p>If a <xnt href="http://www.w3.org/TR/REC-xml-names#NT-NCName" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">NCName</xnt> follows a numeric,
it should be recognized as an <nt def="NT-OperatorName">OperatorName</nt> or it is an error.</p></item></ulist>
<scrap headstyle="show">
<head>Expression Lexical Structure</head>
<prodgroup pcw5="1" pcw2="8" pcw4="21">
<prod id="NT-ExprToken">
<lhs>ExprToken</lhs>
<rhs>'(' | ')' | '%'</rhs>
<rhs>| <nt def="NT-Operator">Operator</nt></rhs>
<rhs>| <nt def="NT-FunctionName">FunctionName</nt></rhs><rhs>| <nt def="NT-EnumerationToken">EnumerationToken</nt></rhs>
<rhs>| <nt def="NT-Number">Number</nt></rhs>
</prod>
<prod id="NT-Number">
<lhs>Number</lhs>
<rhs>  <nt def="NT-FloatingPointNumber">FloatingPointNumber</nt></rhs>
</prod>
<prod id="NT-FloatingPointNumber"><lhs>FloatingPointNumber</lhs><rhs><nt def="NT-Digits">Digits</nt> ('.' <nt def="NT-Digits">Digits</nt>?)?</rhs><rhs>| '.' <nt def="NT-Digits">Digits</nt></rhs></prod>
<prod id="NT-Digits">
<lhs>Digits</lhs>
<rhs>[0-9]+</rhs>
</prod>
<prod id="NT-Color"><lhs>Color</lhs><rhs>'#' <nt def="NT-AlphaOrDigits">AlphaOrDigits</nt></rhs></prod>
<prod id="NT-AlphaOrDigits">
<lhs>AlphaOrDigits</lhs>
<rhs>[a-fA-F0-9]+</rhs>
</prod>
<prod id="NT-Literal">
<lhs>Literal</lhs>
<rhs>'"' [^"]* '"'</rhs>
<rhs>| "'" [^']* "'"</rhs>
</prod>
<prod id="NT-Operator">
<lhs>Operator</lhs>
<rhs><nt def="NT-OperatorName">OperatorName</nt></rhs>
<rhs>| <nt def="NT-MultiplyOperator">MultiplyOperator</nt></rhs>
<rhs>| '+' | '-'</rhs>
</prod>
<prod id="NT-OperatorName">
<lhs>OperatorName</lhs>
<rhs>'mod' | 'div'</rhs>
</prod>
<prod id="NT-MultiplyOperator">
<lhs>MultiplyOperator</lhs>
<rhs>'*'</rhs>
</prod>
<prod id="NT-Keyword"><lhs>Keyword</lhs><rhs>'inherit'</rhs></prod>
<prod id="NT-FunctionName">
<lhs>FunctionName</lhs>
<rhs>
<xnt href="http://www.w3.org/TR/REC-xml-names#NT-NCName" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">NCName</xnt></rhs>
</prod>
<prod id="NT-EnumerationToken"><lhs>EnumerationToken</lhs><rhs><xnt href="http://www.w3.org/TR/REC-xml-names#NT-NCName" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">NCName</xnt></rhs></prod>
<prod id="NT-AbsoluteUnitName"><lhs>AbsoluteUnitName</lhs><rhs>'cm' | 'mm' | 'in' | 'pt' | 'pc' | 'px'</rhs></prod>
<prod id="NT-RelativeUnitName"><lhs>RelativeUnitName</lhs><rhs>'em'</rhs></prod>
<prod id="NT-ExprWhitespace">
<lhs>ExprWhitespace</lhs>
<rhs><xnt href="http://www.w3.org/TR/REC-xml#NT-S" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">S</xnt></rhs>
</prod>
</prodgroup>
</scrap>
</div3>
<div3 id="expr.value.conv"><head>Expression Value Conversions</head>
<p>Values that are the result of an expression evaluation may be converted
into property value types.  In some instances this is a simple verification
of set membership (e.g., is the value a legal country code).  In other cases,
the value is expected to be a simple type like an integer and must be converted.</p>
<p>It is not necessary that all types be allowed to be converted.  If the
expression value cannot be converted to the necessary type for the property value,
it is an error. </p>
<p>The following table indicates what conversions are allowed.</p>
<table border="1">
<tbody align="left" valign="top">
<tr align="left" valign="top"><th rowspan="1" colspan="1" align="left" valign="top">Type</th><th rowspan="1" colspan="1" align="left" valign="top">Allowed Conversions</th><th rowspan="1" colspan="1" align="left" valign="top">Constraints</th></tr>
<tr align="left" valign="top">
<td rowspan="1" colspan="1" align="left" valign="top"><xnt href="http://www.w3.org/TR/REC-xml-names#NT-NCName" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">NCName</xnt></td>
<td rowspan="1" colspan="1" align="left" valign="top">
<ulist>
<item>
<p>Color, via the system-color() function.</p></item>
<item>
<p>Enumeration value, as defined in the property definition.</p></item>
<item>
<p>To a string literal</p></item></ulist></td><td rowspan="1" colspan="1" align="left" valign="top">The value may be checked against
a legal set of values depending on the property.</td></tr><tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top">
<nt def="NT-AbsoluteNumeric">AbsoluteNumeric</nt></td><td rowspan="1" colspan="1" align="left" valign="top">
<ulist>
<item>
<p>Integer, via the round() function.</p></item>
<item>
<p>Color, as an RGB color value.</p></item></ulist>
</td>
<td rowspan="1" colspan="1" align="left" valign="top">
If converting to an RGB color value, it must be a legal color value from the color
space.</td></tr><tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><nt def="NT-RelativeLength">RelativeLength</nt></td><td rowspan="1" colspan="1" align="left" valign="top">
<ulist>
<item>
<p>To an AbsoluteLength</p></item></ulist>
</td>
<td rowspan="1" colspan="1" align="left" valign="top">
</td>
</tr>
</tbody>
</table>
<p>The specific conversion to be applied is property specific and can be
found in the definition of each property.</p>
</div3>
<div3><head>Definitions of Units of Measure</head>
<p>The units of measure in this recommendation have the following definitions:</p>
<table border="1">
<tbody align="left" valign="top">
<tr align="left" valign="top"><th rowspan="1" colspan="1" align="left" valign="top">Name</th><th rowspan="1" colspan="1" align="left" valign="top">Definition</th></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top">cm</td><td rowspan="1" colspan="1" align="left" valign="top">See ISO 31</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top">mm</td><td rowspan="1" colspan="1" align="left" valign="top">See ISO 31</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top">in</td><td rowspan="1" colspan="1" align="left" valign="top">2.54cm</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top">pt</td><td rowspan="1" colspan="1" align="left" valign="top">1/72in</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top">pc</td><td rowspan="1" colspan="1" align="left" valign="top">12pt</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top">px</td><td rowspan="1" colspan="1" align="left" valign="top">See <specref ref="pixels"/></td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top">em</td><td rowspan="1" colspan="1" align="left" valign="top">See <specref ref="relative.lengths"/></td></tr>
</tbody>
</table>
<div4 id="pixels"><head>Pixels</head>
<p> XSL interprets a 'px' unit to be a request for the formatter to choose a
device-dependent measurement that approximates viewing one pixel on a
typical computer monitor.  This interpretation is follows:
</p>
<olist>

<item><p>The preferred definition of one 'px' is:</p>
<ulist>
<item><p>The actual distance covered by the largest integer number of
device dots (the size of a device dot is measured as the distance
between dot centers) that spans a distance less-than-or-equal-to
the distance specified by the arc-span rule in CSS-2
[... CSS2/syndata.html#x39] (for print, desktop computer monitors,
and hand-held devices viewed at normal viewing distances this is
assumed to be 0.28mm [approximately 1/90]).</p>
</item>
<item><p>A minimum of the size of 1 device dot should be used.</p></item>
<item><p>This calculation is done separately in each axis,
and may have a different value in each axis.</p></item>
</ulist>
</item>

<item><p>However, implementors may instead simply pick a fixed conversion
factor, treating 'px' as an absolute unit of measurement (such as
1/92" or 1/72").</p></item>
</olist>

<note>

<p>Pixels should not be mixed with other absolute units in
expressions as they may cause undesirable effects.
Also, particular caution should be used with inherited property values
that may have been specified using pixels.</p>

<p>If the User Agent chooses a measurement for a 'px' that
does not match an integer number of device dots in each axis it may
produce undesirable effects, such as:</p>
<ulist>
<item><p>moir<entity name="eacute"/> patterns in scaled raster graphics</p></item>
<item><p>unrenderable overlapping areas when the renderer rounds fonts
or graphics sizes upward to its actual dot-size</p></item>
<item><p>large spaces between areas when the renderer rounds fonts or
graphics sizes downward to its actual dot-size</p></item>
<item><p>unreadable results including unacceptably small text/layout
(for example, a layout was done at 72 dpi [dots per inch], but
the renderer assumed the result was already specified in device
dots and renders it at 600 dpi).</p></item>
</ulist>

<p>Stylesheet authors should understand a pixel's actual size may
vary from device to device:</p>
<ulist>
<item><p>stylesheets utilizing 'px' units may not produce consistent
results across different implementations or different
output devices from a single implementation</p></item>
<item><p>even if stylesheets are expresses entirely in 'px' units
the results may vary on different devices</p></item>
</ulist>

</note>

</div4>
</div3>
</div2>
<div2><head>Core Function Library</head>
<div3><head>Number Functions</head><proto name="floor" return-type="numeric">
<arg type="numeric"/></proto>
<p>The <function>floor</function> function returns the largest (closest to
positive infinity) integer that is not greater than the argument.
The numeric argument to this function must be of unit power zero.</p>
<note><p>If it is necessary to use the <function>floor</function> function for a
property where a unit power of one is expected, then an expression
such as: "floor(1.4in/1.0in)*1.0in" must be used.  This applies to the ceiling,
round, and other such functions where a unit power of zero is required.</p></note>
<proto name="ceiling" return-type="numeric"><arg type="numeric"/></proto>
<p>The <function>ceiling</function> function returns the smallest (closest
to negative infinity) integer that is not less than the argument.  The numeric
argument to this function must be of unit power zero.</p>
<proto name="round" return-type="numeric"><arg type="numeric"/></proto>
<p>The <function>round</function> function returns the integer that is
closest to the argument.  If there are two such
numbers, then the one that is closest to positive infinity is
returned.  The numeric argument to this function must be of unit power zero.</p>
<proto name="min" return-type="numeric">
<arg type="numeric"/><arg type="numeric"/></proto>
<p>The <function>min</function> function returns the minimum of the
two numeric arguments.  These arguments must have the same unit power.</p>
<proto name="max" return-type="numeric"><arg type="numeric"/>
<arg type="numeric"/></proto>
<p>The <function>min</function> function returns the maximum of the two
numeric arguments.  These arguments must have the same unit power.</p>
<proto name="abs" return-type="numeric">
<arg type="numeric"/></proto><p>The <function>abs</function> functions
returns the absolute value of the numeric argument.
That is, if the numeric argument is negative, it returns the negation of
the argument.</p></div3>
<div3 id="expr-color-functions"><head>Color Functions</head>
<proto name="rgb" return-type="color"><arg type="numeric"/><arg type="numeric"/>
<arg type="numeric"/></proto>
<p>The <function>rgb</function> function returns a specific color from the RGB
color space.  The parameters to this function must be numerics (real numbers) with a
length power of zero.</p>
<proto name="icc-color" return-type="color"><arg type="numeric"/><arg type="numeric"/>
<arg type="numeric"/><arg type="NCName"/><arg type="numeric"/><arg type="numeric" occur="rep"/></proto>
<p>The <function>icc-color</function> function returns a specific color from the an ICC Color Profile.  The color profile is specified by the name parameter (the fourth parameter).  This color profile must have been declared in the fo:declarations formatting object using an fo:color-profile formatting object.</p>
<p>The first three parameters specify a fallback color from the sRGB color space.  This color is used when the color profile is not available.</p>
<p>The color is specified by a sequence of one or more color values (real numbers) specified after the name parameter.  These values are specific to the color profile</p>
<proto name="system-color" return-type="color">
<arg type="NCName"/></proto>
<p>The <function>system-color</function> function returns a system defined
color with a given name.</p>
</div3><div3><head>Font Functions</head>
<proto name="system-font" return-type="object">
<arg type="NCName"/><arg type="NCName" occur="opt"/></proto>
<p>The <function>system-font</function> functions returns a
characteristic of a system font.  The first argument is the
name of the system font and the second argument, which is optional,
names the property that specifies the characteristic.  If the second
argument is omitted, then the characteristic returned is the same as
the name of the property to which the expression is being assigned.</p>
<p>For example, the expression
"system-font(heading,font-size)" returns the font-size
characteristic for the system font named "heading".  This is equivalent to the
property assignment
'font-size="system-font(heading)"'.</p></div3>
<div3><head>Property Value Functions</head><proto name="inherited-property-value" return-type="object"><arg type="NCName"/></proto>
<p>The <function>inherited-property-value</function> function returns the
inherited value of the property whose name matches the argument specified.
It is an error if this property is not an inherited property.</p>
<proto name="label-end" return-type="numeric"/>
<p>The <function>label-end</function> function returns the calculated
label-end value for lists.  See the definition of the
<code>provisional-label-separation</code> property.</p>
<proto name="body-start" return-type="numeric"/>
<p>The <function>body-start</function> function returns the
calculated body-start value for lists.
See the definition of the
<code>provisional-distance-between-starts</code>
property.</p>
<note><p>When this function is used outside of a list, it still
returns a calculated value as specified.</p></note>
<proto name="from-parent" return-type="object">
<arg type="NCName"/></proto>
<p>The <function>from-parent</function> function
returns a computed value of the property whose name matches
the argument specified.
The value returned is that for the parent of the
formatting object for which the expression is evaluated.
If there is no parent, the value returned is the initial
value. If the argument specifies a shorthand property and if
the expression only consists of the from-parent function with an
argument matching the property being computed, it is
interpreted
as an expansion of the shorthand with each property into which
the shorthand expands; each having a value of from-parent with
an argument matching the property.
It is an error if arguments matching a shorthand property are used
in any other way.
</p>
<proto name="from-nearest-specified-value" return-type="object">
<arg type="NCName" occur="opt"/></proto>
<p>The <function>from-nearest-specified-value</function> function
returns a computed value of the property whose name matches
the argument specified.
The value returned is that for the closest ancestor of the
formatting object for which the expression is evaluated on
which there
is an assignment of the property in the xml result tree in the
fo namespace.
If there is no such ancestor, the value returned is the
initial value.
If the argument specifies a shorthand property and if
the expression only consists of the from-nearest-specified-value function with an
argument matching the property being computed, it is
interpreted
as an expansion of the shorthand with each property into which
the shorthand expands; each having a value of from-nearest-specified-value with
an argument matching the property.
It is an error if arguments matching a shorthand property are used
in any other way.
</p>
<proto name="from-table-column" return-type="object">
<arg type="NCName" occur="opt"/></proto>
<p>The <function>from-table-column</function> function
returns the inherited value of the property whose name matches the
argument specified, from the fo:table-column whose column-number
matches the column for which this expression is evaluated and
whose number-columns-spanned also matches any span.
If there is no match for the number-columns-spanned, it is
matched
against a span of 1. If there is still no match, the initial
value is returned.
It is an error to use this function on formatting objects
that are not an fo:table-cell or its descendants.
</p>

<proto name="proportional-column-width" return-type="numeric">
<arg type="numeric"/></proto>
<p>The <function>proportional-column-width</function> function
returns <var>proportional factor</var> (the argument)
units of proportional measure.
The column widths are first determined ignoring the proportional
measures. The difference between the table-width and the sum of
the column widths is the available proportional width. One unit
of proportional measure is the available proportional width
divided by the sum of the proportional factors.
It is an error to use this function on formatting objects other
than an fo:table-column. It is also an error to use this function
if the fixed table layout is not used.
</p>
<proto name="merge-property-values" return-type="object">
<arg type="NCName" occur="opt"/></proto>
<p>The <function>merge-property-values</function> function returns a value of the
property whose name matches the argument.
The value returned is the specified value on the last
fo:multi-property-set, of the parent fo:multi-properties,
that applies to the User Agent state.
If there is no such value, the computed value of the
parent fo:multi-properties is returned.
</p>
<note><p>The test for applicability of a User Agent state is
specified using the "active-state" property.</p></note>
<p>It is an error to use this function on formatting objects other
than an fo:wrapper that is the child of an fo:multi-properties.</p>
</div3>
</div2>


<div2><head>Property Datatypes</head>
<p>Certain property values are described in terms of compound
datatypes, in terms of restrictions on permitted number values, or
strings with particular semantics.</p>
<p>The compound datatypes, such as space, are represented in the
result tree as multiple attributes. The names of these attributes
consist of the property name, followed by a period, followed by
the component name. For example a the "space-before" property may
be specified as:</p>
<eg xml:space="preserve">
space-before.minimum="2.0pt"
space-before.optimum="3.0pt"
space-before.maximum="4.0pt"
space-before.precedence="0"
space-before.conditionality="discard"
</eg>
<p>A short form of compound value specification may be used, in cases
where the datatype has some numeric components.
Such a specification consists of giving a numeric value to an attribute
with a name matching a property name. Such a specification gives
that value to each of the numeric components and the initial value
to all the non-numeric components. For example:</p>
<eg xml:space="preserve">
space-before="4.0pt"
</eg>
<p>is equivalent to a specification of</p>
<eg xml:space="preserve">
space-before.minimum="4.0pt"
space-before.optimum="4.0pt"
space-before.maximum="4.0pt"
space-before.precedence="0"
space-before.conditionality="discard"
</eg>
<p>Short forms may be used together with complete forms; the complete
forms having precedence over the expansion of a short form.
For example:</p>
<eg xml:space="preserve">
space-before="4.0pt"
space-before.maximum="6.0pt"
</eg>
<p>is equivalent to a specification of</p>
<eg xml:space="preserve">
space-before.minimum="4.0pt"
space-before.optimum="4.0pt"
space-before.maximum="6.0pt"
space-before.precedence="0"
space-before.conditionality="discard"
</eg>
<p>Compound values of properties are inherited as a unit and not
as individual components.</p>
<p>The following datatypes are defined:</p>


<glist>
<gitem>
<label>&lt;integer&gt;</label>
<def><p>A signed integer value which consists of an optional '+' or '-'
character followed by a sequence of digits.
A property may define additional constraints on the value.
</p></def>
</gitem>
<gitem>
<label>&lt;number&gt;</label>
<def><p>A signed real number which consists of an optional '+' or '-'
character followed by a sequence of digits followed by an optional '.'
character and sequence of digits.
A property may define additional constraints on the value.
</p></def>
</gitem>
<gitem>
<label>&lt;length&gt;</label>
<def><p>A signed length value where a 'length' is a real number plus a unit
qualification.
A property may define additional constraints on the value.
</p></def>
</gitem>
<gitem>
<label>&lt;length-range&gt;</label>
<def><p>A compound datatype, with components:
minimum, optimum, maximum. Each component is a &lt;length&gt;.
A property may define additional constraints on the values.
</p></def>
</gitem>
<gitem>
<label>&lt;length-conditional&gt;</label>
<def><p>A compound datatype, with components:
length, conditionality. The length component is a &lt;length&gt;.
The conditionality component is either "discard" or "retain".
A property may define additional constraints on the values.
</p></def>
</gitem>
<gitem>
<label>&lt;length-bp-ip-direction&gt;</label>
<def><p>A compound datatype, with components:
block-progression-direction, and inline-progression-direction.
Each component is a &lt;length&gt;.
A property may define additional constraints on the values.
</p></def>
</gitem>
<gitem>
<label>&lt;space&gt;</label>
<def><p>A compound datatype, with components:
minimum, optimum, maximum, precedence, and conditionality.
The minimum, optimum, and maximum components are &lt;length&gt;s.
The precedence component is either "force" or an &lt;integer&gt;.
The conditionality component is either "discard" or "retain".
</p></def>
</gitem>
<gitem>
<label>&lt;keep&gt;</label>
<def><p>A compound datatype, with components:
within-line, within-column, and within-page. The value of each
component is either "auto", "always", or an &lt;integer&gt;.
</p></def>
</gitem>
<gitem>
<label>&lt;angle&gt;</label>
<def><p>An &lt;integer&gt; representing an angle.</p></def>
</gitem>
<gitem>
<label>&lt;percentage&gt;</label>
<def><p>A signed real percentage which consists of an optional '+' or '-'
character followed by a sequence of digits followed by an optional '.'
character and sequence of digits followed by '%'.
A property may define additional constraints on the value.
</p></def>
</gitem>
<gitem>
<label>&lt;character&gt;</label>
<def><p>A single Unicode character.</p></def>
</gitem>
<gitem>
<label>&lt;string&gt;</label>
<def><p>A sequence of characters.
</p></def>
</gitem>
<gitem>
<label>&lt;name&gt;</label>
<def><p>A string of characters representing a name. It must not contain
any whitespace, or space characters.
</p></def>
</gitem>
<gitem>
<label>&lt;family-name&gt;</label>
<def><p>A string of characters identifying a font.
</p></def>
</gitem>
<gitem>
<label>&lt;color&gt;</label>
<def><p>Either a string of characters representing a keyword or a color
function defined in <specref ref="expr-color-functions"/>.
The list of keyword color names is:
aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive,
purple, red, silver, teal, white, and yellow.</p>
</def>
</gitem>
<gitem>
<label>&lt;country&gt;</label>
<def><p>A string of characters conforming to an ISO 3166 country code.
</p></def>
</gitem>
<gitem>
<label>&lt;language&gt;</label>
<def><p>A string of characters conforming to the
ISO 639 3-letter code.
</p></def>
</gitem>
<gitem>
<label>&lt;script&gt;</label>
<def><p>A string of characters conforming to an
ISO 15924 script code.
</p></def>
</gitem>
<gitem>
<label>&lt;id&gt;</label>
<def><p>A string of characters conforming to the XML NMTOKEN definition
that is unique within the stylesheet.
</p></def>
</gitem>
<gitem>
<label>&lt;idref&gt;</label>
<def><p>A string of characters conforming to the XML NMTOKEN definition
that matches an ID property value used within the stylesheet.
</p></def>
</gitem>
<gitem>
<label>&lt;uri&gt;</label>
<def><p>A sequence of characters conforming to a URI value as specified in
the URI specification.
</p></def>
</gitem>
<gitem>
<label>&lt;uri-reference&gt;</label>
<def><p>A sequence of characters conforming to a "URI-reference" as defined in
RFC 2396.
</p></def>
</gitem>
</glist>
</div2>


</div1>



<div1 id="fo-section"><head>Formatting Objects</head>

<div2><head>Introduction to Formatting Objects</head>
<p>
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
<specref ref="fo-jc-intro"/>.The presentation
is represented, abstractly, by an area tree, as defined in
the area model.  See <specref ref="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.</p>
<p>
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
<term>flow objects</term>. The third kind is either a
<term>layout object</term> or an <term>auxiliary
object</term>. 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.
</p>
<div3>
<head>Definitions Common to Many Formatting Objects</head>

<p>
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
<trait>generated-by</trait> and
<trait>returned-by</trait>.
</p>

<p>
The value of the <trait>generated-by</trait> trait is a
single formatting
object. A formatting object <var>F</var> is defined to
<term>generate</term> an area <var>A</var>
if the semantics of <var>F</var> specify the generation of
one or more areas and <var>A</var> is one of the areas thus
generated, or is a substituted form of one of the areas thus
generated, as specified in section <specref ref="area-linebuild"/>.</p>
<p>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.
</p>
<p>
The value of the <trait>returned-by</trait> 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.
</p>
<p>
A formatting object <var>F</var> is defined to <term>return
the sequence of
areas</term> <var>A</var>, <var>B</var>, <var>C</var>, ... if
the pair
(<var>F</var>,1) is a member of the
<trait>returned-by</trait> trait of <var>A</var>, the pair
(<var>F</var>,2) is a member of the
<trait>returned-by</trait> trait of <var>B</var>, the pair
(<var>F</var>,3) is a member of the
<trait>returned-by</trait> trait of <var>C</var>, ...
</p>
<p>
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.
</p>
<p>
A set of nodes in a tree is a <term>lineage</term> if:
</p>
<ulist>
<item><p>
there is a node <var>N</var> in the set such that all the
nodes in the set are ancestors of <var>N</var>, and</p>
</item>
<item><p>
for every node <var>N</var> in the set, if the set contains
an ancestor of <var>N</var>, it also contains the parent of
<var>N</var>.</p>
</item>
</ulist>
<p>
The set of formatting objects that an area is returned by is a <term>lineage</term>.
</p>
<p>
Areas returned by a formatting object may be either
<term>normal</term> or
<term>out-of-line</term>. 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
<trait>returned-by</trait> lineage of size one. There is
only one kind of normal area.
</p>
<p>
Out-of-line areas are areas used outside the normal flow of text
either because the are absolutely positioned or they are part of a
float or footnote. Out-of-line areas may have a
<trait>returned-by</trait> lineage of size greater than one.
</p>
<p>
The <trait>area-class</trait> 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: "normal", "xsl-absolute", "xsl-footnote",
"xsl-side-float", or "xsl-before-float".
An area
is normal if and only if the value of the
<trait>area-class</trait> trait is
"normal"; otherwise, the area is an out-of-line
area. (See section <specref ref="area-stackcon"/>.)</p>
<p>
The areas <term>returned-by</term> 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 <term>area-class</term>, such as the sub-sequence
of normal areas. An area <var>A</var> precedes an area <var>B</var> in the sub-sequence if
and only if area <var>A</var> precedes area <var>B</var> in the areas <term>returned-by</term> the
formatting objects.
</p>
</div3>
</div2>

<div2><head>Formatting Object Content</head>
<p>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.</p>

<p id="block.fo.list">The parameter entity, "%block;" in the content models below,
contains the following formatting objects:</p>
<eg xml:space="preserve">
     block
     block-container
     table-and-caption
     table
     list-block
</eg>
<p id="inline.fo.list">The parameter entity, "%inline;" in the content models below,
contains the following formatting objects:</p>
<eg xml:space="preserve">
     bidi-override
     character
     external-graphic
     instream-foreign-object
     inline
     inline-container
     leader
     page-number
     page-number-citation
     simple-link
     multi-toggle
</eg>
<p>The following formatting objects are "neutral" containers and
may be used anywhere where #PCDATA, %block;, or %inline; are allowed:</p>
<eg xml:space="preserve">
     multi-switch
     multi-properties
     wrapper
</eg>
<p>The following "out-of-line" formatting objects
may be used anywhere where #PCDATA, %block;, or %inline; are allowed:</p>
<eg xml:space="preserve">
     float
     footnote
</eg>
</div2>

<div2><head>Formatting Objects Summary</head>
<glist>
<gitem><label>bidi-override</label>
<def><p>The fo:bidi-override inline formatting object is used
where it is necessary to override the default Unicode-bidirectionality
algorithm direction for different (or nested) inline scripts
in mixed-language documents.</p></def>
</gitem>
<gitem><label>block</label>
<def><p>The fo:block formatting object is commonly used for formatting paragraphs,
titles, headlines, figure and table captions,
etc.</p></def>
</gitem>
<gitem><label>block-container</label>
<def><p>The fo:block-container flow object is used to
generate a block-level reference-area.</p></def>
</gitem>
<gitem><label>character</label>
<def><p>The fo:character flow object represents a character that
is mapped to
a glyph for presentation.</p></def>
</gitem>
<gitem><label>color-profile</label>
<def><p>Used to declare a color profile for a stylesheet.</p></def>
</gitem>
<gitem><label>conditional-page-master-reference</label>
<def><p>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.</p></def>
</gitem>
<gitem><label>declarations</label>
<def><p>Used to group global declarations for a stylesheet.</p></def>
</gitem>
<gitem><label>external-graphic</label>
<def><p>The fo:external-graphic flow object is used for an inline
graphic where the graphics data resides outside of the
xml result tree in the fo namespace.</p></def>
</gitem>
<gitem><label>float</label>
<def><p>
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.
</p></def>
</gitem>
<gitem><label>flow</label>
<def><p>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.</p></def>
</gitem>
<gitem><label>footnote</label>
<def><p>The fo:footnote is used to produce a footnote citation and the corresponding footnote.</p></def>
</gitem>
<gitem><label>footnote-body</label>
<def><p>The fo:footnote-body is used to generate the content of the footnote.</p></def>
</gitem>
<gitem><label>initial-property-set</label>
<def><p>The fo:initial-property-set specifies formatting properties
for the first line of an fo:block.</p></def>
</gitem>
<gitem><label>inline</label>
<def><p>The fo:inline formatting object is commonly used for formatting
a portion of text with a background or enclosing it in a border.
</p></def>
</gitem>
<gitem><label>inline-container</label>
<def><p>The fo:inline-container flow object is used to
generate an inline reference-area.</p></def>
</gitem>
<gitem><label>instream-foreign-object</label>
<def><p>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.</p></def>
</gitem>
<gitem><label>layout-master-set</label>
<def><p>The fo:layout-master-set is a wrapper around all masters used in the
document.</p></def>
</gitem>
<gitem><label>leader</label>
<def><p>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.</p></def>
</gitem>
<gitem><label>list-block</label>
<def><p>The fo:list-block flow object is used to format a list.</p></def>
</gitem>
<gitem><label>list-item</label>
<def><p>The fo:list-item formatting object contains the label and the
body of an item in a list.</p></def>
</gitem>
<gitem><label>list-item-body</label>
<def><p>The fo:list-item-body formatting object contains the
content
of the body of a list-item.</p></def>
</gitem>
<gitem><label>list-item-label</label>
<def><p>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.</p></def>
</gitem>
<gitem><label>marker</label>
<def><p>The fo:marker is used in conjunction with
fo:retrieve-marker to produce running headers or footers.</p></def>
</gitem>
<gitem><label>multi-case</label>
<def><p>The fo:multi-case is used to embed flow objects, that the parent
fo:multi-switch can choose to either show or hide.</p></def>
</gitem>
<gitem><label>multi-properties</label>
<def><p>The fo:multi-properties is used to switch between two or more property sets that
are associated with a given portion of content.
</p></def>
</gitem>
<gitem><label>multi-property-set</label>
<def><p>
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.
</p></def>
</gitem>
<gitem><label>multi-switch</label>
<def><p>The fo:multi-switch is used to switch between two or more
sub-trees of formatting objects.</p></def>
</gitem>
<gitem><label>multi-toggle</label>
<def><p>The fo:multi-toggle is used within an fo:multi-case to
switch to another
fo:multi-case.</p></def>
</gitem>
<gitem><label>page-number</label>
<def><p>The fo:page-number formatting object is used to represent
the
current page-number.</p></def>
</gitem>
<gitem><label>page-number-citation</label>
<def><p>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.</p></def>
</gitem>
<gitem><label>page-sequence</label>
<def><p>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.</p></def>
</gitem>
<gitem><label>page-sequence-master</label>
<def><p>The fo:page-sequence-master specifies sequences of page-masters
that are used when generating a sequence of pages.
</p></def>
</gitem>
<gitem><label>region-after</label>
<def><p>This region defines
a viewport that is located on the "after" side of fo:region-body
region.</p></def>
</gitem>
<gitem><label>region-before</label>
<def><p>This region defines
a viewport that is located on the "before" side of fo:region-body
region.</p></def>
</gitem>
<gitem><label>region-body</label>
<def><p>This region specifies a
viewport/reference pair that is located in the "center" of the
fo:simple-page-master.</p></def>
</gitem>
<gitem><label>region-end</label>
<def><p>This region defines
a viewport that is located on the "end" side of fo:region-body region.</p></def>
</gitem>
<gitem><label>region-start</label>
<def><p>This region defines
a viewport that is located on the "start" side of fo:region-body
region.</p></def>
</gitem>
<gitem><label>repeatable-page-master-alternatives</label>
<def><p>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.</p></def>
</gitem>
<gitem><label>repeatable-page-master-reference</label>
<def><p>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.</p></def>
</gitem>
<gitem><label>retrieve-marker</label>
<def><p>The fo:retrieve-marker is used in
conjunction with fo:marker to produce running headers or footers.</p></def>
</gitem>
<gitem><label>root</label>
<def><p>The fo:root node is the top node of an XSL result tree.
This tree is composed of formatting objects.</p></def>
</gitem>
<gitem><label>simple-link</label>
<def><p>The fo:simple-link is used for representing the start resource of a simple
link.</p></def>
</gitem>
<gitem><label>simple-page-master</label>
<def><p>The fo:simple-page-master is used in the generation of pages and
specifies the geometry of the page. The page may be subdivided into up
to five regions</p></def>
</gitem>
<gitem><label>single-page-master-reference</label>
<def><p>An fo:single-page-master-reference specifies a sub-sequence consisting
of a single instance of a single page-master.</p></def>
</gitem>
<gitem><label>static-content</label>
<def><p>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. </p></def>
</gitem>
<gitem><label>table</label>
<def><p>The fo:table flow object is used for formatting the
tabular material
of a table.</p></def>
</gitem>
<gitem><label>table-and-caption</label>
<def><p>The fo:table-and-caption flow object is used for
formatting a table
together with its caption.</p></def>
</gitem>
<gitem><label>table-body</label>
<def><p>The fo:table-body formatting object is used to contain
the content
of the table body.</p></def>
</gitem>
<gitem><label>table-caption</label>
<def><p>The fo:table-caption formatting object is used to contain block-level
formatting objects containing the caption for the table.</p></def>
</gitem>
<gitem><label>table-cell</label>
<def><p>The fo:table-cell formatting object is used to group
content to be
placed in a table-cell.</p></def>
</gitem>
<gitem><label>table-column</label>
<def><p>The fo:table-column formatting object specifies
characteristics
applicable to table cells that have the same column and span.</p></def>
</gitem>
<gitem><label>table-footer</label>
<def><p>The fo:table-footer formatting object is used to contain
the content
of the table footer.</p></def>
</gitem>
<gitem><label>table-header</label>
<def><p>The fo:table-header formatting object is used to contain
the content
of the table header.</p></def>
</gitem>
<gitem><label>table-row</label>
<def><p>The fo:table-row formatting object is used to group
table-cells into
rows.</p></def>
</gitem>
<gitem><label>title</label>
<def><p>
The fo:title formatting object is used to associate a title with a
given document. This title may be used by an interactive User Agent to
identify the document. For example, the content of the fo:title can be
formatted and displayed in a "title" window or in a "tool tip".
</p></def>
</gitem>
<gitem><label>wrapper</label>
<def><p>The fo:wrapper formatting object is used to
specify
inherited properties for a group of formatting objects.
It has no additional formatting semantics.</p></def>
</gitem>
</glist>
</div2>





<div2>
<head>Declarations and Pagination and Layout Formatting Objects</head>

<div3 id="pag-intro"><head>Introduction</head>
<p>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,
 and a sequence of one or more
fo:page-sequences. The fo:layout-master-set defines the geometry and
sequencing of the pages; the children of the fo:page-sequences, which
are called <term>flows</term> (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.
</p>
<p>The children of the fo:layout-master-set are the pagination and layout
specifications. The names of these specifications end in
"-master". 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.
</p>
<div4><head>Page-sequence-masters</head>
<p>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.
</p>
<p>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).
</p>
<p>The fo:single-page-master-reference is used to specify a sub-sequence
consisting of a single page-master.
</p>
<p>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.
</p>
</div4>
<div4><head>Page-masters</head> <p>A page-master is a master that is
used to generate a <term>page</term>. A page is a viewport/reference
pair in which the viewport-area is a child of the area tree
root.  A <term>page-viewport-area</term> is defined to be the viewport-area of a
page, and a <term>page-area</term> is defined to be the unique child of a
page-viewport-area.
</p>
<p>
The page-viewport-area is defined by the output medium; the page-area
holds the page contents and has the affect of positioning the page
contents on the output medium.
</p>
<p>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.
</p>
<note>
<p>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.</p>
</note>
<p>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.
</p>
<p>An fo:simple-page-master has, as children, specifications for one or more
regions.
</p>
<p>A region specification is used as a master, the <term>region-master</term>,
in generating viewport/reference pair consisting of a
<term>region-viewport-area</term> and a <term>region-reference-area</term>.
The region-viewport-area is always a child
of a page-area generated using the parent of the region-master.
</p>
<note>
<p>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 flow assigned to the region is viewed by scrolling
the region reference-area through the viewport.
</p>
</note>
<p>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.
</p>
<p>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.
</p>
<p>For  version 1.0 of this recommendation, a page-master will
consist of up to five regions: "region-body" 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.</p>
<p>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 "normal-flow-reference-areas",
corresponding to the number of columns specified, as specified in the
region-master descriptions.</p>
</div4>
<div4><head>Page Generation</head> <p>
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.
</p>
<p>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. We will say an fo:page-sequence references a page-master if
either the fo:page-sequence directly references the page-master via
the "master-name" property or that property references an
fo:page-sequence-master that references the page-master.
</p>
</div4>
<div4 id="fafm"><head>Flows and Flow Mapping</head>
<p>There are two kinds of <term>flows</term>: 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. The
fo:flow flow holds content that is distributed across a sequence of
pages. The processing of the fo:flow flow 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.
</p>
<p>The children of a flow are a sequence of block-level flow objects.
Each flow has a name, and no two fo:flow or fo:static-content
formatting objects in the same page-sequence may have the same
name. </p>
<p>The assignment of flows to regions on a page-master is determined by
a <term>flow-map</term>.  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.
</p>
<p>In version 1.0 of this recommendation, the flow-map is implicit. The
"flow-name" property of a flow specifies to which region
that flow is assigned.  Each region has a "region-name"
property. The implicit flow-map assigns a flow to the region that has
the same name. In future versions of XSL, the flow-map is
expected to become an explicit formatting object.
</p>
<p>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.
</p>
<p>In addition, an fo:static-content formatting object may
have a "region-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 section <specref ref="pg-out-of-line"/>.
</p></div4>
<div4><head>Constraints on Page Generation</head>
<p>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 that were generated using
page-masters having the region to which the flow is assigned. 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,
except that for a fo:static-content with a <trait>flow-name</trait> of
<code role="value">xsl-before-float-separator</code>, the processing
is repeated only for those page-reference-areas which have descendant
areas with an area-class of <code role="value">xsl-before-float</code>,
and for a fo:static-content with a <trait>flow-name</trait> of
<code role="value">xsl-footnote-separator</code>, the processing
is repeated only for those page-reference-areas which have descendant
areas with an area-class of <code role="value">xsl-footnote</code>.</p>
</div4>
<div4><head>Pagination Tree Structure</head>
<p>The result tree structure is shown below.</p>
<graphic source="PageTree.gif" xml:attributes="href source" show="embed" actuate="auto" xmlns:xlink="http://www.w3.org/TR/WD-xlink"/>
</div4>

</div3>


<div3 id="fo_root"><head>fo:root</head>

<p><emph>Common Usage:</emph></p>
<p>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,
and one or more fo:page-sequence objects. Each
fo:page-sequence represents a sequence of pages that result from
formatting the content children of the fo:page-sequence.
</p>
<note><p>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.</p>
</note>

<p><emph>Areas:</emph></p>
<p>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.</p>

<p><emph>Constraints:</emph></p>
<p>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 <term>properly ordered</term>. (See Section <specref ref="area-genorder"/>.)
</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
(<loc href="#fo_layout-master-set" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">layout-master-set</loc>,<loc href="#fo_declarations" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">declarations</loc>?,<loc href="#fo_page-sequence" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">page-sequence</loc>+)
</eg>

</div3>


<div3 id="fo_declarations"><head>fo:declarations</head>

<p><emph>Common Usage:</emph></p>
<p>The fo:declarations formatting object is used to group global declarations for a stylesheet.</p>

<p><emph>Areas:</emph></p>
<p>The fo:declarations formatting object does not generate
or return any areas.</p>

<p><emph>Constraints:</emph></p>
<p>None.</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
(<loc href="#fo_color-profile" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">color-profile</loc>)+
</eg>

</div3>


<div3 id="fo_color-profile"><head>fo:color-profile</head>

<p><emph>Common Usage:</emph></p>
<p>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.
</p>
<p>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. </p>
<p>When the color-profile is referenced (e.g., via the
icc-color function), the following rules are used:</p>
<olist>
<item><p>If the color-profile is available, the color value
identified from the color-profile should be used.</p></item>
<item><p>If the color-profile is not available,
the sRGB fallback must be used.</p></item>
</olist>

<p><emph>Areas:</emph></p>
<p>The fo:color-profile formatting object does not generate
or return any areas.</p>

<p><emph>Constraints:</emph></p>
<p>None.</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
EMPTY
</eg>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>

<sitem><specref ref="src"/></sitem>
<sitem><specref ref="color-profile-name"/></sitem>
<sitem><specref ref="rendering-intent"/></sitem>
</slist>
</div3>


<div3 id="fo_page-sequence"><head>fo:page-sequence</head>

<p><emph>Common Usage:</emph></p>
<p>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. The layout of these pages comes from
the fo:page-sequence-master or page-master
referenced by the <trait>master-name</trait>

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.

</p>

<p><emph>Areas:</emph></p>
<p>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-sequence-reference-areas.
The generation of these further areas is described in the descriptions
of the fo:simple-page-master and region-masters.
</p>
<p>All areas generated by an fo:page-sequence have
area-class "xsl-absolute".</p>

<p><emph>Constraints:</emph></p>
<p>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 <trait>master-name</trait> trait of the
fo:page-sequence or a page-master that was directly identified by the
<trait>master-name</trait> trait. The
region-viewport-area children of such a page-reference-area must correspond
to the regions that are children of that page-master.
</p>
<p>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.</p>
<p>
The areas returned to the fo:page-sequence by a flow must satisfy four
types of constraints:</p>
<ulist>
<item><p><emph>Completeness</emph>.  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
<specref ref="area-linebuild"/> and <specref ref="area-inlinebuild"/>.
</p></item>
<item><p><emph>Flow-map association</emph>. All areas returned by flow
children of the fo:page-sequence become
descendants of region-reference-areas generated from column-areas
associated to the flow by the flow-map in effect, except for areas
returned from a fo:static-content with a <trait>flow-name</trait> of
<code role="value">xsl-before-float-separator</code> or
<code role="value">xsl-footnote-separator</code>.
</p>
<p>
Areas returned from an fo:static-content with a <trait>flow-name</trait> of
<code role="value">xsl-before-float-separator</code> become children of the
before-float-reference-area of an area associated to an fo:region-body,
following all sibling areas of area-class <code role="value">xsl-before-float</code>.
Areas returned from an fo:static-content with a <trait>flow-name</trait>
of <code role="value">xsl-footnote-separator</code> become children of the
footnote-reference-area of an area associated to an fo:region-body, preceding
all sibling areas of area-class <code role="value">xsl-footnote</code>.
</p></item>
<item><p><emph>Area-class association.</emph>  Areas returned by flow children of an
fo:page-sequence are distributed as follows: all areas of area-class
<code role="value">xsl-footnote</code> must be
descendants of a footnote-reference-area; areas of area-class
<code role="value">xsl-before-float</code>
must be descendants of a before-float-reference-area; all
other areas (including
normal areas) must be descendants of a main-reference-area for a region.</p></item>
<item><p><emph>Stacking</emph>.  The stackable areas of a given class returned
by children of each flow are properly stacked within the appropriate reference-area,
as described above.</p>
</item>
</ulist>
<p>The default ordering constraint of section <specref ref="area-genorder"/>
does not apply to the
fo:page-sequence. The default ordering constraints apply to the child fo:flow
objects; special ordering constraints apply to the child fo:static-content objects.</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
(<loc href="#fo_title" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">title</loc>?,<loc href="#fo_static-content" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">static-content</loc>*,<loc href="#fo_flow" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">flow</loc>)
</eg>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="country"/></sitem>
<sitem><specref ref="format"/></sitem>
<sitem><specref ref="language"/></sitem>
<sitem><specref ref="letter-value"/></sitem>
<sitem><specref ref="grouping-separator"/></sitem>
<sitem><specref ref="grouping-size"/></sitem>
<sitem><specref ref="id"/></sitem>
<sitem><specref ref="initial-page-number"/></sitem>
<sitem><specref ref="force-page-count"/></sitem>
<sitem><specref ref="master-name"/></sitem>
</slist>
</div3>


<div3 id="fo_layout-master-set"><head>fo:layout-master-set</head>

<p><emph>Common Usage:</emph></p>
<p>The fo:layout-master-set is a wrapper around all masters used in the
document. This includes page-sequence-masters, page-masters, and
region-masters.</p>

<p><emph>Areas:</emph></p>
<p>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.</p>

<p><emph>Constraints:</emph></p>
<p>The value of the <trait>master-name</trait> trait on each
child of the fo:layout-master-set must be unique within the set.
</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
(<loc href="#fo_simple-page-master" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">simple-page-master</loc>|<loc href="#fo_page-sequence-master" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">page-sequence-master</loc>)+
</eg>

</div3>


<div3 id="fo_page-sequence-master"><head>fo:page-sequence-master</head>

<p><emph>Common Usage:</emph></p>
<p>
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.
</p>
<note>
<p>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.
</p>
</note>

<p><emph>Areas:</emph></p>
<p>The fo:page-sequence-master formatting object generates no area directly.
It is used by the
fo:page-sequence formatting object to generate pages.
</p>

<p><emph>Constraints:</emph></p>
<p>The children of the fo:page-sequence-master are a sequence of
<term>sub-sequence-specifiers</term>. A page-sequence
satisfies the constraint
determined by an fo:page-sequence-master if (a) it can be partitioned
into sub-sequences of pages that map one-to-one, in order,
to the
sub-sequence of sub-sequence-specifiers that are the
children of the
fo:page-sequence-master and, (b) for each sub-sequence of pages, that
sub-sequence satisfies the constraints of the corresponding
sub-sequence-specifier. Note that the mapping of sub-sequences of the sequence
of pages to sub-sequence-specifiers need not be onto; that
is, the
sequence of sub-sequences of pages can be shorter than the sequence of
sub-sequence-specifiers.
</p>
<p>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.
</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
(<loc href="#fo_single-page-master-reference" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">single-page-master-reference</loc>|<loc href="#fo_repeatable-page-master-reference" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">repeatable-page-master-reference</loc>|<loc href="#fo_repeatable-page-master-alternatives" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">repeatable-page-master-alternatives</loc>)+
</eg>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="master-name"/></sitem>
</slist>
</div3>


<div3 id="fo_single-page-master-reference"><head>fo:single-page-master-reference</head>

<p><emph>Common Usage:</emph></p>
<p>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.
</p>

<p><emph>Areas:</emph></p>
<p>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.
</p>

<p><emph>Constraints:</emph></p>
<p>The fo:single-page-master-reference has a reference to the
fo:simple-page-master which has the same master-name as the
<trait>master-name</trait> trait on the
fo:single-page-master-reference.
</p>
<p>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.
</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
EMPTY
</eg>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="master-name"/></sitem>
</slist>
</div3>


<div3 id="fo_repeatable-page-master-reference"><head>fo:repeatable-page-master-reference</head>

<p><emph>Common Usage:</emph></p>
<p>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.
</p>

<p><emph>Areas:</emph></p>
<p>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.
</p>

<p><emph>Constraints:</emph></p>
<p>The fo:repeatable-page-master-reference has a reference to the
fo:simple-page-master which has the same master-name as the
<trait>master-name</trait> trait on the
fo:repeatable-page-master-reference.
</p>
<p>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 consist 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 <trait>maximum-repeats</trait>.
</p>
<p>If no region-master child of the fo:repeatable-page-master has a region-name
associated to any flow in an fo:page-sequence, then the
sub-sequence is constrained to have length zero.</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
EMPTY
</eg>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="master-name"/></sitem>
<sitem><specref ref="maximum-repeats"/></sitem>
</slist>
</div3>


<div3 id="fo_repeatable-page-master-alternatives"><head>fo:repeatable-page-master-alternatives</head>

<p><emph>Common Usage:</emph></p>
<p>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.</p>
<note>
<p>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.
</p>
</note>

<p><emph>Areas:</emph></p>
<p>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.
</p>

<p><emph>Constraints:</emph></p>
<p>The children of the fo:repeatable-page-master-alternatives are
fo:conditional-page-master-references. These children will be called
<term>alternatives</term>.
</p>
<p>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 consist 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 <code role="value">true</code>, (d) that
alternative is the first alternative in the sequence of children for
which all the conditions are <code role="value">true</code>, and (e) the length
of the sub-sequence is less than or equal to the value of
<trait>maximum-repeats</trait>.
</p>
<p>If the conditions on all alternatives to extend a sub-sequence are
<code role="value">false</code>,
then the sub-sequence may not be extended.</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
(<loc href="#fo_conditional-page-master-reference" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">conditional-page-master-reference</loc>+)
</eg>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="maximum-repeats"/></sitem>
</slist>
</div3>


<div3 id="fo_conditional-page-master-reference"><head>fo:conditional-page-master-reference</head>

<p><emph>Common Usage:</emph></p>
<p>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.
</p>

<p><emph>Areas:</emph></p>
<p>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.
</p>

<p><emph>Constraints:</emph></p>
<p>The fo:conditional-page-master-reference has a reference to the
fo:simple-page-master which has the same master-name as
the <trait>master-name</trait> trait on the fo:conditional-page-master-reference.
</p>
<p>There are three traits, <trait>page-position</trait>,
<trait>odd-or-even</trait>, and <trait>blank-or-not-blank</trait> that
specify the
sub-conditions on the use of the referenced page-master. All three
sub-conditions must be <code role="value">true</code> for the condition on the
fo:conditional-page-master-reference to be <code role="value">true</code>. 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 <code role="value">true</code>, this
really means that the subset of traits that are derived from properties
with specified values must make the corresponding
sub-condition <code role="value">true</code>.
</p>
<p>The sub-condition corresponding to the <trait>page-position</trait>
trait is <code role="value">true</code>, 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", "rest" (not first) or
"any" (all of the previous). The <term>referencing
page-sequence</term> is the fo:page-sequence that referenced the
fo:page-sequence-master from which this
fo:conditional-page-master-reference is a descendant.
</p>
<p>The sub-condition corresponding to the <trait>odd-or-even</trait>
trait is <code role="value">true</code>, if the value of the <trait>odd-or-even</trait>
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.
</p>
<p>The sub-condition corresponding to the <trait>blank-or-not-blank</trait> trait is
<code role="value">true</code>, (1) if 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 object; (2) if 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 the 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 object would
not be satisfied if they were descendant from this page); or (3)
if value of the trait is "any".
</p>
<note>
<p>If any page-master referenced from a conditional-page-master-reference
with blank-or-not-blank="<code role="value">true</code>" provides a region
in which to put fo:flow content, no content is put in that region.</p>
</note>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
EMPTY
</eg>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="master-name"/></sitem>
<sitem><specref ref="page-position"/></sitem>
<sitem><specref ref="odd-or-even"/></sitem>
<sitem><specref ref="blank-or-not-blank"/></sitem>
</slist>
</div3>


<div3 id="fo_simple-page-master"><head>fo:simple-page-master</head>

<p><emph>Common Usage:</emph></p>
<p>The fo:simple-page-master is used in the generation of pages and
specifies the geometry of the page. The page may be subdivided into up
to five regions: region-body, region-before, region-after,
region-start, and region-end.</p>
<note>
<p>For example, if the <trait>writing-mode</trait> 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.</p>
</note>
<note>
<p>The simple-page-master is intended for systems that wish to provide
a simple page layout facility. Future versions of this recommendation
will support more complex page layouts constructed using the
fo:page-master formatting object.</p>
</note>

<p><emph>Areas:</emph></p>
<p>The fo:simple-page-master formatting object generates no area directly.
It is used in the generation of pages by an
fo:page-sequence.
</p>
<p>
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.
</p>
<p>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 for the details on the generation of these areas.)
</p>
<graphic source="ViewportsToPage-level.gif" xml:attributes="href source" show="embed" actuate="auto" xmlns:xlink="http://www.w3.org/TR/WD-xlink"/>

<p><emph>Trait Derivation:</emph></p>
<p>In version 1.0 of this recommendation, borders and padding are not
allowed with a page-reference-area.  The remaining traits on the
page-reference-area are
set according to normal rules for determining the values of
traits.</p>

<p><emph>Constraints:</emph></p>
<p>When a page-master is used in the generation of a page, the
<trait>height</trait> and <trait>width</trait> of the
content-rectangle of the page-viewport-area are determined using the
computed values of the
"page-height" and "page-width" properties.
If the
"page-height" and "page-width" properties have
explicit values, they are used to set the corresponding
<trait>height</trait> and <trait>width</trait> trait on the
page-viewport-area. If the "page-height" and/or
"page-width" are set to "auto", the size of the
page-viewport-area will be determined from the size of the media. If
the media has a fixed size, then the size of the media is used. In the
case of continuous media, the size of the User Agent window is used.
</p>
<note>
<p>The above size calculations are intended to match
the handling of a frameset in a browser window when the media is
continuous and to match pages when the media is paged.
</p>
<p>
A User Agent may provide a way to declare the media for which
formatting is to be done. This may be different from the media on
which the formatted result is viewed. For example, a browser User
Agent may be used to preview pages that are formatted for sheet
media. In that case, the size calculation is based on the media for
which formatting is done rather than the media being currently used.
</p>
</note>
<p>The traits derived from the margin properties determine the size
and position of the content-rectangle of the page-viewport-area.
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. Here "top", "bottom", "left"
and "right" are determined by the computed values of the
"page-height" and "page-width" properties. For
sheet media, these values 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".
</p>
<note>
<p>
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
<trait>writing-mode</trait> currently in use.
</p>
</note>
<graphic source="MediaReferenceArea.gif" xml:attributes="href source" show="embed" actuate="auto" xmlns:xlink="http://www.w3.org/TR/WD-xlink"/>
<p>The value of the <trait>page-number</trait> trait on the
first page returned by the
fo:page-sequence is constrained to equal the value of the
<trait>initial-page-number</trait> trait. The value of the
<trait>page-number</trait>
trait on subsequent pages is constrained to be one greater than the
value on the immediately preceding page.
</p>

<p>The <trait>format</trait>, <trait>letter-value</trait>,
<trait>grouping-separator</trait>, <trait>grouping-size</trait>,
<trait>country</trait>, and
<trait>language</trait> traits are used to format the number into a
string form, as specified in XSLT, section 7.7.1. This formatted
number is used as the value of the fo:page-number flow object.

</p>

<p><emph>Constraints applicable to regions:</emph></p>
<p>There are a number of constraints that apply to all the
regions that are specified within a given fo:simple-page-master.
</p>

<graphic source="PageAndRegion-bodyWithOrientationOnPage.gif" xml:attributes="href source" show="embed" actuate="auto" xmlns:xlink="http://www.w3.org/TR/WD-xlink"/>
<p>
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 <trait>overflow</trait> trait
on the region-master and the kind of flow
assigned to the region.

</p>
<p>If the flow assigned to the corresponding region is an
fo:static-content flow object, then there is no constraint
on the block-progression-dimension of the region-reference-area.</p>

<p>If the flow assigned to the corresponding region is an fo:flow formatting
object, then</p>
<ulist>
<item><p>If the value of the <trait>overflow</trait> trait is
<code>scroll</code>, then there is no constraint on the
block-progression-dimension of the region-reference-area.</p>
</item>
<item>
<p>If the value of the <trait>overflow</trait> trait is
<code>hidden</code>, <code>paginate</code>,
<code>error-if-overflow</code>, or <code>visible</code>, 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.</p>
</item>
</ulist>
<p>
The block-progression-dimension of a region-area that
corresponds to a
given region-master depends on the value of the
<trait>overflow</trait> trait on that region-master.</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
(<loc href="#fo_region-body" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">region-body</loc>,<loc href="#fo_region-before" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">region-before</loc>?,<loc href="#fo_region-after" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">region-after</loc>?,<loc href="#fo_region-start" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">region-start</loc>?,<loc href="#fo_region-end" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">region-end</loc>?)
</eg>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="common-margin-properties-block"/></sitem>
<sitem><specref ref="master-name"/></sitem>
<sitem><specref ref="page-height"/></sitem>
<sitem><specref ref="page-width"/></sitem>
<sitem><specref ref="reference-orientation"/></sitem>

<sitem><specref ref="writing-mode"/></sitem>
</slist>
</div3>


<div3 id="fo_region-body"><head>fo:region-body</head>

<p><emph>Common Usage:</emph></p>
<p>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 <trait>overflow</trait> trait controls how
much of the underlying region-reference-area is visible; that is, whether
the region-reference-area is clipped by the its parent region-viewport-area.
</p>
<note>
<p>Typically, for paged media, the areas
returned by the fo:flow formatting object in a
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.
</p>
</note>
<note><p>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.
</p>

<graphic source="PageAndRegion-bodyMargins.gif" xml:attributes="href source" show="embed" actuate="auto" xmlns:xlink="http://www.w3.org/TR/WD-xlink"/>
<p>
The spacing between the last four regions and the fo:region-body is
determined by subtracting the relevant <trait>extent</trait> trait on
the side regions from the trait that corresponds to the
"margin-<var>x</var>" property on the fo:region-body.</p>
</note>
<p>The fo:region-body may be also be used to provide multiple
columns. When the <trait>column-count</trait> trait is greater than one, then
the region-body will be subdivided into multiple columns.
</p>

<p><emph>Areas:</emph></p>
<p>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
<trait>overflow</trait> trait is "scroll".
</p>
<p>
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.
In version 1.0 of this recommendation, the values of the <trait>padding</trait>
and <trait>border-width</trait> traits must be "0".
</p>

<p>
The region-reference-area generated using an fo:region-body is the child
of the region-viewport-area. The <trait>reference-orientation</trait> trait
of the fo:region-body is used to orient the coordinate system of the
region-reference-area generated by the fo:region-body relative to the
coordinate system of the page-reference-area generated by
fo:simple-page-master (and, therefore, relative to the viewport
positioned in that latter coordinate system).

</p>
<p>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
<term>before-float-reference-area</term>,
the optional <term>footnote-reference-area</term>, and the
<term>main-reference-area</term>. 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.
</p>
<note>
<p>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.</p>
</note>
<p>If the <trait>column-count</trait> trait has a value <var>N</var>, then <var>N</var>
additional reference-areas are generated as children of the main-reference-area.
These <var>N</var> reference-areas are the <term>normal-flow-reference-areas</term>.
</p>
<p>It is an error to specify a <trait>column-count</trait> other than 1 if the "overflow"
property has the value "scroll". An implementation may recover by behaving
as if "1" had been specified.</p>
<p>The <trait>inline-progression-dimension</trait> of each
of these normal-flow-reference-areas is determined by subtracting
(<var>N</var>-1) times the <trait>column-gap</trait> trait from the
inline-progression-dimension of the main-reference-area
and dividing that result by <var>N</var>. Using "body-in-size"
for the name of the
inline-progression-dimension of the main-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:</p>
<p>column-in-size = (body-in-size - (<var>N</var> - 1)*column-gap)/<var>N</var>
</p>
<p>The block-progression-dimension of the normal-flow-reference-areas
is the same as that of the parent main-reference-area.</p>
<note>
<p>As noted above, the block-progression-dimension of the main-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.</p>
</note>
<p>The normal-flow-reference-areas are positioned within the
main-reference-area as follows: The first column is
positioned with the before-edge and start-edge of its content-rectangle coincident
with the <term>before-edge</term> and
<term>start-edge</term>
of the content-rectangle of the main-reference-area.  The
content-rectangle of the <var>J</var>th
normal-flow-reference-area child of the main-reference-area
is positioned with its before-edge coincident
with the before-edge of the content-rectangle of the main-reference-area and
with is start-edge at ((<var>J</var>-1)*(column-in-size + column-gap)) in the
inline-progression-direction. This results in the end-edge of the content-rectangle
of the <var>N</var>th
normal-flow-reference-area being coincident with the end-edge of the
content-rectangle of the main-reference-area. </p>
<note>
<p>If the <trait>writing-mode</trait> 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.</p>
</note>
<p>All areas generated by using the fo:region-body are of area-class "xsl-absolute".</p>

<p><emph>Trait Derivation:</emph></p>
<p>
The <trait>reference-orientation</trait> of the region-viewport-area
is taken from the value the
<trait>reference-orientation</trait> trait on the region-master which
specifies the region. <trait>reference-orientation</trait> of the
region-reference-area is set to "0" and is, therefore, the
same as the orientation established by the region-viewport-area.
</p>
<p>The remaining traits on the
region-viewport-area and region-reference-area are
set according to normal rules for determining the values of
traits.</p>

<p><emph>Constraints:</emph></p>
<p>The constraints applicable to all regions (see
<specref ref="fo_simple-page-master"/>) all apply.
</p>
<p>
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 <trait>start-indent</trait> and <trait>end-indent</trait>
traits of the region-master. The start-edge and end-edge of the
content-rectangle of the region-viewport-area are determined by the
<trait>reference-orientation</trait> trait on the page-master.
</p>
<p>
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
<trait>space-before</trait> and <trait>space-after</trait> traits of
the region-master. The before-edge and after-edge of the content-rectangle
of the region-viewport-area
are determined by the <trait>reference-orientation</trait> trait on
the page-master.
</p>
<p>
The values of the <trait>space-before</trait> and
<trait>start-indent</trait> 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.
</p>
<p>
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 <specref ref="fo_simple-page-master"/>.</p>


<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
EMPTY
</eg>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="common-border-padding-and-background-properties"/></sitem>
<sitem><specref ref="common-margin-properties-block"/></sitem>
<sitem><specref ref="clip"/></sitem>
<sitem><specref ref="column-count"/></sitem>
<sitem><specref ref="column-gap"/></sitem>
<sitem><specref ref="display-align"/></sitem>
<sitem><specref ref="overflow"/></sitem>
<sitem><specref ref="region-name"/></sitem>
<sitem><specref ref="reference-orientation"/></sitem>
<sitem><specref ref="writing-mode"/></sitem>
</slist>
</div3>


<div3 id="fo_region-before"><head>fo:region-before</head>

<p><emph>Common Usage:</emph></p>
<p>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 <trait>overflow</trait> trait controls how
much of the underlying region-reference-area is visible; that is, whether
the region-reference-area is clipped by the its parent region-viewport-area.</p>

<p><emph>Areas:</emph></p>
<p>The fo:region-before formatting object is used to generate one
region-viewport-area
and one region-reference-area.
</p>
<p>
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 <trait>extent</trait> trait on the fo:region-before
formatting object.</p>

<p>The inline-progression-dimension of the region-viewport-area is determined by the
<trait>precedence</trait> trait on the fo:region-before.  If the value
of the <trait>precedence</trait> trait is <code role="value">true</code>, then the
inline-progression-dimension extends up to the start- and after-edges 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 <trait>precedence</trait> trait on the fo:region-before
is <code role="value">false</code>, 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.
</p>
<p>
The region-reference-area lies on a canvas
underneath the region-viewport-area. The
<trait>reference-orientation</trait> trait is used to orient the
coordinate system of the region-reference-area relative to the
page-reference-area.
</p>
<p>
The size of the region-reference-area depends on the setting of the
<trait>overflow</trait> 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
<trait>overflow</trait>
trait is "scroll", the size of the reference-area is
equal
to the size of the viewport in the
inline-progression-direction in the
<trait>writing-mode</trait> for the region and has no constraint in the
block-progression-direction (which implies that it grows to
to hold the distribution of all the content bound to the region).</p>

<p><emph>Trait Derivation:</emph></p>
<p>
The <trait>reference-orientation</trait> of the region-viewport-area
is taken from the value the
<trait>reference-orientation</trait> trait on the region-master which
specifies the region. <trait>reference-orientation</trait> of the
region-reference-area is set to "0" and is, therefore, the
same as the orientation established by the region-viewport-area.
</p>
<p>The remaining traits on the
region-viewport-area and region-reference-area are
set according to normal rules for determining the values of
traits.</p>

<p><emph>Constraints:</emph></p>
<p>
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 <specref ref="fo_simple-page-master"/>.</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
EMPTY
</eg>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="common-border-padding-and-background-properties"/></sitem>
<sitem><specref ref="clip"/></sitem>
<sitem><specref ref="display-align"/></sitem>
<sitem><specref ref="extent"/></sitem>
<sitem><specref ref="overflow"/></sitem>
<sitem><specref ref="precedence"/></sitem>
<sitem><specref ref="region-name"/></sitem>
<sitem><specref ref="reference-orientation"/></sitem>
<sitem><specref ref="writing-mode"/></sitem>
</slist>
</div3>


<div3 id="fo_region-after"><head>fo:region-after</head>

<p><emph>Common Usage:</emph></p>
<p>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 <trait>overflow</trait> trait controls how
much of the underlying region-reference-area is visible; that is, whether
the region-reference-area is clipped by the its parent region-viewport-area.
</p>

<p><emph>Areas:</emph></p>
<p>The fo:region-after formatting object is used to generate one
region-viewport-area
and one region-reference-area.
</p>
<p>
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 <trait>extent</trait> trait on the fo:region-after
formatting object.</p>
<p>The inline-progression-dimension of the region-viewport-area is determined by the
<trait>precedence</trait> trait on the fo:region-after.  If the value
of the <trait>precedence</trait> trait is <code role="value">true</code>, then the
inline-progression-dimension extends up to the start- and after-edges 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 <trait>precedence</trait> trait on the fo:region-after
is <code role="value">false</code>, 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.
</p>
<p>
The region-reference-area lies on a canvas
underneath the region-viewport-area. The
<trait>reference-orientation</trait> trait is used to orient the
coordinate system of the region-reference-area relative to the
page-reference-area.
</p>
<p>The size of the region-reference-area depends on the setting of the
<trait>overflow</trait> 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
<trait>overflow</trait>
trait is "scroll", the size of the reference-area is
equal
to the size of the viewport in the
inline-progression-direction in the
<trait>writing-mode</trait> for the region and has no constraint in
block-progression-direction (which implies that it grows to
to hold the distribution of all the content bound to the region).</p>

<p><emph>Trait Derivation:</emph></p>
<p>
The <trait>reference-orientation</trait> of the region-viewport-area
is taken from the value the
<trait>reference-orientation</trait> trait on the region-master which
specifies the region. <trait>reference-orientation</trait> of the
region-reference-area is set to "0" and is, therefore, the
same as the orientation established by the region-viewport-area.
</p>
<p>The remaining traits on the
region-viewport-area and region-reference-area are
set according to normal rules for determining the values of
traits.</p>

<p><emph>Constraints:</emph></p>
<p>
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 <specref ref="fo_simple-page-master"/>.</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
EMPTY
</eg>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="common-border-padding-and-background-properties"/></sitem>
<sitem><specref ref="clip"/></sitem>
<sitem><specref ref="display-align"/></sitem>
<sitem><specref ref="extent"/></sitem>
<sitem><specref ref="overflow"/></sitem>
<sitem><specref ref="precedence"/></sitem>
<sitem><specref ref="region-name"/></sitem>
<sitem><specref ref="reference-orientation"/></sitem>
<sitem><specref ref="writing-mode"/></sitem>
</slist>
</div3>


<div3 id="fo_region-start"><head>fo:region-start</head>

<p><emph>Common Usage:</emph></p>
<p>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 <trait>overflow</trait> trait controls how
much of the underlying region-reference-area is visible; that is, whether
the region-reference-area is clipped by the its parent region-viewport-area.</p>

<p><emph>Areas:</emph></p>
<p>The fo:region-start formatting object is used to generate one
region-viewport-area
and one region-reference-area.
</p>
<p>
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 <trait>extent</trait> trait on the fo:region-after
formatting object.</p>
<p>The block-progression-dimension of the region-viewport-area is
determined by the <trait>precedence</trait> trait on the
adjacent fo:region-before and the fo:region-after. If the value of the
<trait>precedence</trait> trait of the fo:region-before (or, respectively,
fo:region-after) is <code role="value">false</code>, 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 <trait>precedence</trait> trait on the adjacent regions is
<code role="value">true</code>, 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 <trait>precedence</trait> trait equal to <code role="value">true</code>.</p>
<p>The region-reference-area lies on a canvas
underneath the region-viewport-area. The
<trait>reference-orientation</trait> trait is used to orient the
coordinate system of the region-reference-area relative to the
page-reference-area.
</p>
<p>The size of the region-reference-area depends on the setting of the
<trait>overflow</trait> 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
<trait>overflow</trait>
trait is "scroll", the size of the reference-area is
equal
to the size of the viewport in the
inline-progression-direction in the
<trait>writing-mode</trait> for the region and has no constraint in
block-progression-direction (which implies that it grows to
hold the distribution of all the content bound to the region).</p>

<p><emph>Trait Derivation:</emph></p>
<p>
The <trait>reference-orientation</trait> of the region-viewport-area
is taken from the value the
<trait>reference-orientation</trait> trait on the region-master which
specifies the region. <trait>reference-orientation</trait> of the
region-reference-area is set to "0" and is, therefore, the
same as the orientation established by the region-viewport-area.
</p>
<p>The remaining traits on the
region-viewport-area and region-reference-area are
set according to normal rules for determining the values of
traits.</p>

<p><emph>Constraints:</emph></p>
<p>
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 <specref ref="fo_simple-page-master"/>.</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
EMPTY
</eg>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="clip"/></sitem>
<sitem><specref ref="common-border-padding-and-background-properties"/></sitem>
<sitem><specref ref="display-align"/></sitem>
<sitem><specref ref="extent"/></sitem>
<sitem><specref ref="overflow"/></sitem>
<sitem><specref ref="region-name"/></sitem>
<sitem><specref ref="reference-orientation"/></sitem>
<sitem><specref ref="writing-mode"/></sitem>
</slist>
</div3>


<div3 id="fo_region-end"><head>fo:region-end</head>

<p><emph>Common Usage:</emph></p>
<p>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 <trait>overflow</trait> trait controls how
much of the underlying region-reference-area is visible; that is, whether
the region-reference-area is clipped by the its parent region-viewport-area.</p>

<p><emph>Areas:</emph></p>
<p>The fo:region-end formatting object is used to generate one
region-viewport-area
and one region-reference-area.
</p>
<p>
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 <trait>extent</trait> trait on the fo:region-after
formatting object.</p>
<p>The block-progression-dimension of the region-viewport-area is
determined by the <trait>precedence</trait> trait on the
adjacent fo:region-before and the fo:region-after. If the value of the
<trait>precedence</trait> trait of the fo:region-before (or, respectively,
fo:region-after) is <code role="value">false</code>, 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 <trait>precedence</trait> trait on the adjacent regions is
<code role="value">true</code>, 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 <trait>precedence</trait> trait equal to <code role="value">true</code>.</p>
<p>The region-reference-area lies on a canvas
underneath the region-viewport-area. The
<trait>reference-orientation</trait> trait is used to orient the
coordinate system of the region-reference-area relative to the
page-reference-area.
</p>
<p>The size of the region-reference-area depends on the setting of the
<trait>overflow</trait> 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
<trait>overflow</trait>
trait is "scroll", the size of the reference-area is
equal
to the size of the viewport in the
inline-progression-direction in the
<trait>writing-mode</trait> for the region and has no constraint in
block-progression-direction (which implies that it grows to
to hold the distribution of all the content bound to the region).</p>

<p><emph>Trait Derivation:</emph></p>
<p>
The <trait>reference-orientation</trait> of the region-viewport-area
is taken from the value the
<trait>reference-orientation</trait> trait on the region-master which
specifies the region. <trait>reference-orientation</trait> of the
region-reference-area is set to "0" and is, therefore, the
same as the orientation established by the region-viewport-area.
</p>
<p>The remaining traits on the
region-viewport-area and region-reference-area are
set according to normal rules for determining the values of
traits.</p>

<p><emph>Constraints:</emph></p>
<p>
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 <specref ref="fo_simple-page-master"/>.</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
EMPTY
</eg>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="clip"/></sitem>
<sitem><specref ref="common-border-padding-and-background-properties"/></sitem>
<sitem><specref ref="display-align"/></sitem>
<sitem><specref ref="extent"/></sitem>
<sitem><specref ref="overflow"/></sitem>
<sitem><specref ref="region-name"/></sitem>
<sitem><specref ref="reference-orientation"/></sitem>
<sitem><specref ref="writing-mode"/></sitem>
</slist>
</div3>


<div3 id="fo_flow"><head>fo:flow</head>

<p><emph>Common Usage:</emph></p>
<p>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.</p>

<p><emph>Areas:</emph></p>
<p>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.
</p>

<p><emph>Constraints:</emph></p>
<p>The (implicit) flow-map determines the assignment of the content
of the fo:flow to a region.
</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
(<loc href="#block.fo.list" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">%block;</loc>)+
</eg>

<p>In addition this formatting object may have a sequence of
zero or more fo:markers as its initial children.</p>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="flow-name"/></sitem>
</slist>
</div3>


<div3 id="fo_static-content"><head>fo:static-content</head>

<p><emph>Common Usage:</emph></p>
<p>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. </p>
<p>
This content is repeated, in its
entirety, on every page to which it is assigned.
</p>

<p><emph>Areas:</emph></p>
<p>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.
</p>

<p><emph>Constraints:</emph></p>
<p>The (implicit) flow-map determines the assignment of the content
of the fo:static-content to a region.</p>
<p>The fo:static-content may be processed multiple times and thus the
default ordering constraint of section <specref ref="area-genorder"/>
does not apply to the fo:static-content. Instead, it must satisfy the
constraint on a per-page basis. Specifically, if <var>P</var> is a page-reference-area
<var>C</var> is an area-class, and <var>S</var> is the set of all descendants of <var>P</var>
of area-class <var>C</var> returned to the fo:static-content descendant, then <var>S</var>
must be properly-ordered.</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
(<loc href="#block.fo.list" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">%block;</loc>)+
</eg>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="flow-name"/></sitem>
</slist>
</div3>


<div3 id="fo_title"><head>fo:title</head>

<p><emph>Common Usage:</emph></p>
<p>
The fo:title formatting object is used to associate a title with a
given document. This title may be used by an interactive User Agent to
identify the document. For example, the content of the fo:title can be
formatted and displayed in a "title" window or in a "tool tip".
</p>

<p><emph>Areas:</emph></p>
<p>
This formatting object returns the sequence of areas returned by the
flow children of this formatting object.
</p>

<p><emph>Constraints:</emph></p>
<p>
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.
</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
(#PCDATA|<loc href="#inline.fo.list" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">%inline;</loc>)*
</eg>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="common-accessibility-properties"/></sitem>
<sitem><specref ref="common-aural-properties"/></sitem>
<sitem><specref ref="common-border-padding-and-background-properties"/></sitem>
<sitem><specref ref="common-font-properties"/></sitem>
<sitem><specref ref="common-margin-properties-inline"/></sitem>
<sitem><specref ref="baseline-shift"/></sitem>
<sitem><specref ref="color"/></sitem>
<sitem><specref ref="line-height"/></sitem>
<sitem><specref ref="line-height-shift-adjustment"/></sitem>
<sitem><specref ref="visibility"/></sitem>
<sitem><specref ref="z-index"/></sitem>
</slist>
</div3>




</div2>

<div2>
<head>Block-level Formatting Objects</head>

<div3><head>Introduction</head>
<p>The fo:block formatting object is used for formatting
paragraphs, titles, figure captions, table titles, etc.  The
following example illustrates the usage of the fo:block in a
style sheet.</p>
<div4><head>Example</head>


<div5><head>Chapter and Section Titles, Paragraphs</head>
<p>Input sample:</p>
<eg xml:space="preserve">
&lt;doc&gt;
  &lt;chapter&gt;&lt;title&gt;Chapter&lt;/title&gt;
    &lt;p&gt;Text&lt;/p&gt;
    &lt;section&gt;&lt;title&gt;Section&lt;/title&gt;
    &lt;p&gt;Text&lt;/p&gt;
    &lt;/section&gt;
    &lt;section&gt;&lt;title&gt;Section&lt;/title&gt;
    &lt;p&gt;Text&lt;/p&gt;
    &lt;/section&gt;
  &lt;/chapter&gt;
  &lt;chapter&gt;&lt;title&gt;Chapter&lt;/title&gt;
    &lt;p&gt;Text&lt;/p&gt;
    &lt;section&gt;&lt;title&gt;Section&lt;/title&gt;
    &lt;p&gt;Text&lt;/p&gt;
    &lt;/section&gt;
    &lt;section&gt;&lt;title&gt;Section&lt;/title&gt;
    &lt;p&gt;Text&lt;/p&gt;
    &lt;/section&gt;
  &lt;/chapter&gt;
&lt;/doc&gt;
</eg>
<p>In this example the
chapter title appears at the top of the page
(its "space-before" is discarded).</p>
<p>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</p>
<p>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.</p>
<p>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.</p>
<p>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.</p>
<p>The indent on the first line of the first paragraph in section
one and the only paragraph in section two is 2pc; the indent on
the first line of the second paragraph in section one is zero.</p>
<p>XSL Stylesheet:</p>
<eg xml:space="preserve">
&lt;?xml version='1.0'?&gt;
&lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:fo="http://www.w3.org/1999/XSL/Format"
                version='1.0'&gt;

&lt;xsl:template match="chapter"&gt;
  &lt;fo:block break-before="page"&gt;
    &lt;xsl:apply-templates/&gt;
  &lt;/fo:block&gt;
&lt;/xsl:template&gt;

&lt;xsl:template match="chapter/title"&gt;
  &lt;fo:block text-align="center" space-after="8pt"
            space-before="16pt" space-after.precedence="3"&gt;
    &lt;xsl:apply-templates/&gt;
  &lt;/fo:block&gt;
&lt;/xsl:template&gt;

&lt;xsl:template match="section/title"&gt;
  &lt;fo:block text-align="center" space-after="6pt"
            space-before="12pt" space-before.precedence="0"
            space-after.precedence="3"&gt;
    &lt;xsl:apply-templates/&gt;
  &lt;/fo:block&gt;
&lt;/xsl:template&gt;

&lt;xsl:template match="p[1]" priority="1"&gt;
  &lt;fo:block text-indent="0pc" space-after="7pt"
            space-before.minimum="6pt" space-before.optimum="8pt"
            space-before.maximum="10pt"&gt;
    &lt;xsl:apply-templates/&gt;
  &lt;/fo:block&gt;
&lt;/xsl:template&gt;

&lt;xsl:template match="p"&gt;
  &lt;fo:block text-indent="2pc" space-after="7pt"
            space-before.minimum="6pt" space-before.optimum="8pt"
            space-before.maximum="10pt"&gt;
    &lt;xsl:apply-templates/&gt;
  &lt;/fo:block&gt;
&lt;/xsl:template&gt;

&lt;/xsl:stylesheet&gt;
</eg>
<p>Result Instance: elements and attributes in the fo:
namespace</p>
<eg xml:space="preserve">
&lt;fo:block break-before="page"&gt;
  &lt;fo:block text-align="center" space-after="8pt"
  space-before="16pt" space-after.precedence="3"&gt;Chapter
  &lt;/fo:block&gt;

  &lt;fo:block text-indent="0pc" space-after="7pt"
  space-before.minimum="6pt" space-before.optimum="8pt"
  space-before.maximum="10pt"&gt;Text
  &lt;/fo:block&gt;

  &lt;fo:block text-align="center" space-after="6pt"
  space-before="12pt" space-before.precedence="0"
  space-after.precedence="3"&gt;Section
  &lt;/fo:block&gt;

  &lt;fo:block text-indent="0pc" space-after="7pt"
  space-before.minimum="6pt" space-before.optimum="8pt"
  space-before.maximum="10pt"&gt;Text
  &lt;/fo:block&gt;

  &lt;fo:block text-align="center" space-after="6pt"
  space-before="12pt" space-before.precedence="0"
  space-after.precedence="3"&gt;Section
  &lt;/fo:block&gt;

  &lt;fo:block text-indent="0pc" space-after="7pt"
  space-before.minimum="6pt" space-before.optimum="8pt"
  space-before.maximum="10pt"&gt;Text
  &lt;/fo:block&gt;
&lt;/fo:block&gt;

&lt;fo:block break-before="page"&gt;
  &lt;fo:block text-align="center" space-after="8pt"
  space-before="16pt" space-after.precedence="3"&gt;Chapter
  &lt;/fo:block&gt;

  &lt;fo:block text-indent="0pc" space-after="7pt"
  space-before.minimum="6pt" space-before.optimum="8pt"
  space-before.maximum="10pt"&gt;Text
  &lt;/fo:block&gt;

  &lt;fo:block text-align="center" space-after="6pt"
  space-before="12pt" space-before.precedence="0"
  space-after.precedence="3"&gt;Section
  &lt;/fo:block&gt;

  &lt;fo:block text-indent="0pc" space-after="7pt"
  space-before.minimum="6pt" space-before.optimum="8pt"
  space-before.maximum="10pt"&gt;Text
  &lt;/fo:block&gt;

  &lt;fo:block text-align="center" space-after="6pt"
  space-before="12pt" space-before.precedence="0"
  space-after.precedence="3"&gt;Section
  &lt;/fo:block&gt;

  &lt;fo:block text-indent="0pc" space-after="7pt"
  space-before.minimum="6pt" space-before.optimum="8pt"
  space-before.maximum="10pt"&gt;Text
  &lt;/fo:block&gt;
&lt;/fo:block&gt;
</eg>
</div5>

</div4>
</div3>


<div3 id="fo_block"><head>fo:block</head>


<p><emph>Common Usage:</emph></p>
<p>The fo:block formatting object is commonly used for formatting paragraphs,
titles, headlines, figure and table captions, etc.</p>

<p><emph>Areas:</emph></p>
<p>The fo:block formatting object generates one or more
<term>normal</term> block-areas.
The fo:block returns these areas, any
<term>page-level-out-of-line</term> areas, and
any <term>reference-level-out-of-line</term> areas
returned by the children of the fo:block.</p>

<p><emph>Trait Derivation:</emph></p>

<p>The <trait>half-leading</trait> trait
is set to 1/2 the computed
value of the <trait>line-height</trait> property minus the
<trait>font-size</trait> property.</p>

<p><emph>Constraints:</emph></p>
<p>No area may have more than one normal child area
returned by the same fo:block formatting object.</p>
<p>The children of each normal area returned by an fo:block
must satisfy the constraints specified in <specref ref="area-linebuild"/>.
</p>
<p>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 <specref ref="area_model"/>.</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
(#PCDATA|<loc href="#inline.fo.list" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">%inline;</loc>|<loc href="#block.fo.list" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">%block;</loc>)*
</eg>

<p>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.
</p>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="common-accessibility-properties"/></sitem>
<sitem><specref ref="common-aural-properties"/></sitem>
<sitem><specref ref="common-border-padding-and-background-properties"/></sitem>
<sitem><specref ref="common-font-properties"/></sitem>
<sitem><specref ref="common-hyphenation-properties"/></sitem>

<sitem><specref ref="common-margin-properties-block"/></sitem>
<sitem><specref ref="break-after"/></sitem>
<sitem><specref ref="break-before"/></sitem>
<sitem><specref ref="color"/></sitem>
<sitem><specref ref="font-height-override-after"/></sitem>
<sitem><specref ref="font-height-override-before"/></sitem>
<sitem><specref ref="hyphenation-keep"/></sitem>
<sitem><specref ref="hyphenation-ladder-count"/></sitem>
<sitem><specref ref="id"/></sitem>
<sitem><specref ref="keep-together"/></sitem>
<sitem><specref ref="keep-with-next"/></sitem>
<sitem><specref ref="keep-with-previous"/></sitem>
<sitem><specref ref="last-line-end-indent"/></sitem>
<sitem><specref ref="linefeed-treatment"/></sitem>
<sitem><specref ref="line-height"/></sitem>
<sitem><specref ref="line-height-shift-adjustment"/></sitem>
<sitem><specref ref="line-stacking-strategy"/></sitem>
<sitem><specref ref="orphans"/></sitem>

<sitem><specref ref="relative-position"/></sitem>
<sitem><specref ref="space-treatment"/></sitem>
<sitem><specref ref="span"/></sitem>
<sitem><specref ref="text-align"/></sitem>
<sitem><specref ref="text-align-last"/></sitem>
<sitem><specref ref="text-indent"/></sitem>
<sitem><specref ref="visibility"/></sitem>

<sitem><specref ref="white-space-collapse"/></sitem>
<sitem><specref ref="widows"/></sitem>
<sitem><specref ref="wrap-option"/></sitem>
<sitem><specref ref="z-index"/></sitem>
</slist>
</div3>


<div3 id="fo_block-container"><head>fo:block-container</head>

<p><emph>Common Usage:</emph></p>
<p>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.
</p>
<note><p>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.</p>
</note>

<p><emph>Areas:</emph></p>
<p>The fo:block-container formatting object generates one or more
<term>viewport/reference pair</term>s.
The fo:block-container returns these areas and any
<term>page-level-out-of-line</term> areas
returned by the children of the fo:block-container.</p>

<p><emph>Trait Derivation:</emph></p>
<p>The areas generated by the fo:block-container formatting object have
a value of "true" for the <trait>is-reference-area</trait>.</p>
<p>The size of the viewport-area and the reference-area
has to be fixed in the inline-progression-direction.
It must be specified
unless the inline-progression-direction is parallel to the
inline-progression-direction of the reference-area into
which
the areas generated by this flow object are placed.</p>

<p><emph>Constraints:</emph></p>
<p>No area may have more than one normal child area
returned by the same fo:block-container formatting object.</p>
<p>The children of each reference-area generated
by an fo:block-container formatting object
must be normal <term>block-area</term>s returned by the children of the fo:block-container,
must be <term>properly stacked</term>, and
must be <term>properly ordered</term>.
</p>
<p>Any <term>reference-level-out-of-line</term>
areas returned by the children of the fo:block-container
are handled as described in <specref ref="fo_float"/>.</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
(<loc href="#block.fo.list" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">%block;</loc>)+
</eg>

<p>In addition an fo:block-container that does not generate
an <term>absolutely positioned</term> area
may have a sequence of
zero or more fo:markers as its initial children.</p>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="common-absolute-position-properties"/></sitem>
<sitem><specref ref="common-border-padding-and-background-properties"/></sitem>

<sitem><specref ref="common-margin-properties-block"/></sitem>
<sitem><specref ref="block-progression-dimension"/></sitem>
<sitem><specref ref="break-after"/></sitem>
<sitem><specref ref="break-before"/></sitem>
<sitem><specref ref="clip"/></sitem>
<sitem><specref ref="display-align"/></sitem>
<sitem><specref ref="height"/></sitem>
<sitem><specref ref="id"/></sitem>
<sitem><specref ref="inline-progression-dimension"/></sitem>
<sitem><specref ref="keep-together"/></sitem>
<sitem><specref ref="keep-with-next"/></sitem>
<sitem><specref ref="keep-with-previous"/></sitem>
<sitem><specref ref="overflow"/></sitem>
<sitem><specref ref="reference-orientation"/></sitem>
<sitem><specref ref="span"/></sitem>
<sitem><specref ref="width"/></sitem>
<sitem><specref ref="writing-mode"/></sitem>
</slist>
</div3>

</div2>

<div2>
<head>Inline-level Formatting Objects</head>

<div3><head>Introduction</head>
<p>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.</p>
<ulist><item><p>
putting the first line of a paragraph into
small-caps,</p></item>
<item><p>turning a normally inline formatting object, fo:external-graphic, into
a block by "wrapping" with an fo:block formatting
object,</p></item>
<item><p>formatting a running footer containing the word
"Page" followed by a page number.</p></item></ulist>
<div4><head>Examples</head>



<div5><head>First Line of Paragraph in Small-caps</head>
<p>Input sample:</p>
<eg xml:space="preserve">
&lt;doc&gt;
&lt;p&gt;This is the text of a paragraph that is going to be
presented with the first line in small-caps.&lt;/p&gt;
&lt;/doc&gt;
</eg>
<p>XSL Stylesheet:</p>
<eg xml:space="preserve">
&lt;?xml version='1.0'?&gt;
&lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:fo="http://www.w3.org/1999/XSL/Format"
                version='1.0'&gt;

&lt;xsl:template match="p"&gt;
  &lt;fo:block&gt;
    &lt;fo:initial-property-set font-variant="small-caps"/&gt;
    &lt;xsl:apply-templates/&gt;
  &lt;/fo:block&gt;
&lt;/xsl:template&gt;

&lt;/xsl:stylesheet&gt;
</eg>
<p>Result instance: elements and attributes in the fo:
namespace</p>
<eg xml:space="preserve">
&lt;fo:block&gt;
  &lt;fo:initial-property-set font-variant="small-caps"&gt;
  &lt;/fo:initial-property-set&gt;This is the text of a paragraph that is going to be
presented with the first line in small-caps.
&lt;/fo:block&gt;
</eg>
</div5>

<div5><head>Figure with a Photograph</head>
<p>Input sample:</p>
<eg xml:space="preserve">
&lt;doc&gt;
  &lt;figure&gt;
    &lt;photo image="TH0317A.jpg"/&gt;
    &lt;caption&gt;C'ieng Tamlung of C'ieng Mai&lt;/caption&gt;
  &lt;/figure&gt;
&lt;/doc&gt;
</eg>
<p>In this example the image (an fo:external-graphic) is
placed as a centered block-level object.
The caption is centered with 10mm indents.</p>
<p>XSL Stylesheet:</p>
<eg xml:space="preserve">
&lt;?xml version='1.0'?&gt;
&lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:fo="http://www.w3.org/1999/XSL/Format"
                version='1.0'&gt;

&lt;xsl:template match="figure"&gt;
  &lt;fo:block&gt;
    &lt;xsl:apply-templates/&gt;
  &lt;/fo:block&gt;
&lt;/xsl:template&gt;

&lt;xsl:template match="photo"&gt;
  &lt;fo:block text-align="center"&gt;
    &lt;fo:external-graphic src="{@image}"/&gt;
  &lt;/fo:block&gt;
&lt;/xsl:template&gt;

&lt;xsl:template match="caption"&gt;
  &lt;fo:block space-before="3pt" text-align="center"
    start-indent="10mm" end-indent="10mm"&gt;
    &lt;xsl:apply-templates/&gt;
  &lt;/fo:block&gt;
&lt;/xsl:template&gt;

&lt;/xsl:stylesheet&gt;
</eg>
<p>fo: element and attribute tree:</p>
<eg xml:space="preserve">
&lt;fo:block&gt;
  &lt;fo:block text-align="center"&gt;
    &lt;fo:external-graphic src="TH0317A.jpg"/&gt;
  &lt;/fo:block&gt;

  &lt;fo:block space-before="3pt" text-align="center" start-indent="10mm"
    end-indent="10mm"&gt;C'ieng Tamlung of C'ieng Mai&lt;/fo:block&gt;
&lt;/fo:block&gt;
</eg>
</div5>

<div5><head>Page numbering and page number reference</head>
<p>Input sample:</p>
<eg xml:space="preserve">
&lt;!DOCTYPE doc SYSTEM "pgref.dtd"&gt;
&lt;doc&gt;
  &lt;chapter id="x"&gt;&lt;title&gt;Chapter&lt;/title&gt;
    &lt;p&gt;Text&lt;/p&gt;
  &lt;/chapter&gt;
  &lt;chapter&gt;&lt;title&gt;Chapter&lt;/title&gt;
    &lt;p&gt;For a description of X see &lt;ref refid="x"/&gt;.&lt;/p&gt;
  &lt;/chapter&gt;
&lt;/doc&gt;
</eg>
<p>In this example each page has a running footer containing the word
"Page" followed by the page number. The "ref" element generates the
word "see" followed by the page number of the page on which the
referenced by the "refid" attribute was placed.</p>
<p>XSL Stylesheet:</p>
<eg xml:space="preserve">
&lt;?xml version='1.0'?&gt;
&lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:fo="http://www.w3.org/1999/XSL/Format"
                version='1.0'&gt;

&lt;xsl:template match="doc"&gt;
  &lt;fo:root&gt;
    &lt;fo:layout-master-set&gt;
      &lt;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"&gt;
        &lt;fo:region-body
          margin-top="0mm" margin-bottom="15mm"
          margin-left="0mm" margin-right="0mm"/&gt;
        &lt;fo:region-after extent="10mm"/&gt;
      &lt;/fo:simple-page-master&gt;
    &lt;/fo:layout-master-set&gt;
    &lt;fo:page-sequence master-name="page"&gt;
      &lt;fo:static-content flow-name="xsl-region-after"&gt;
        &lt;fo:block&gt;
          &lt;xsl:text&gt;Page &lt;/xsl:text&gt;
          &lt;fo:page-number/&gt;
        &lt;/fo:block&gt;
      &lt;/fo:static-content&gt;
      &lt;fo:flow flow-name="xsl-region-body"&gt;
        &lt;xsl:apply-templates/&gt;
      &lt;/fo:flow&gt;
    &lt;/fo:page-sequence&gt;
  &lt;/fo:root&gt;
&lt;/xsl:template&gt;

&lt;xsl:template match="chapter/title"&gt;
  &lt;fo:block id="{generate-id(.)}"&gt;
    &lt;xsl:number level="multiple" count="chapter" format="1. "/&gt;
    &lt;xsl:apply-templates/&gt;
  &lt;/fo:block&gt;
&lt;/xsl:template&gt;

&lt;xsl:template match="p"&gt;
  &lt;fo:block&gt;
    &lt;xsl:apply-templates/&gt;
  &lt;/fo:block&gt;
&lt;/xsl:template&gt;

&lt;xsl:template match="ref"&gt;
  &lt;xsl:text&gt;page &lt;/xsl:text&gt;
  &lt;fo:page-number-citation refid="{generate-id(id(@refid)/title)}"/&gt;
&lt;/xsl:template&gt;

&lt;/xsl:stylesheet&gt;
</eg>
<p>Result Instance: elements and attributes in the fo:
namespace</p>
<eg xml:space="preserve">
&lt;fo:root&gt;
  &lt;fo:layout-master-set&gt;
    &lt;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"&gt;
      &lt;fo:region-body margin-top="0mm" margin-bottom="15mm"
        margin-left="0mm" margin-right="0mm"/&gt;
      &lt;fo:region-after extent="10mm"/&gt;
    &lt;/fo:simple-page-master&gt;
  &lt;/fo:layout-master-set&gt;
  &lt;fo:page-sequence master-name="page"&gt;
    &lt;fo:static-content flow-name="xsl-region-after"&gt;
      &lt;fo:block&gt;Page &lt;fo:page-number/&gt;
      &lt;/fo:block&gt;
    &lt;/fo:static-content&gt;
    &lt;fo:flow flow-name="xsl-region-body"&gt;
      &lt;fo:block id="N5"&gt;1. Chapter&lt;/fo:block&gt;
      &lt;fo:block&gt;Text&lt;/fo:block&gt;
      &lt;fo:block id="N13"&gt;2. Chapter&lt;/fo:block&gt;
      &lt;fo:block&gt;For a description of X see page &lt;fo:page-number-citation refid="N5"/&gt;
      &lt;/fo:block&gt;
    &lt;/fo:flow&gt;
  &lt;/fo:page-sequence&gt;
&lt;/fo:root&gt;
</eg>
</div5>

</div4>
</div3>


<div3 id="fo_bidi-override"><head>fo:bidi-override</head>

<p><emph>Common Usage:</emph></p>
<p>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.</p>

<p><emph>Areas:</emph></p>
<p>The fo:bidi-override formatting object generates one or more
<term>normal</term> <term>inline-area</term>s.
The fo:bidi-override returns these areas, any
<term>page-level-out-of-line</term> areas, and
any <term>reference-level-out-of-line</term> areas
returned by the children of the fo:bidi-override.</p>

<p><emph>Trait Derivation:</emph></p>
<p>The direction traits are derived from the "writing-mode",
"direction", and "unicode-bidi" properties as described in
<specref ref="refine-writing-mode"/>.</p>

<p><emph>Constraints:</emph></p>
<p>No area may have more than one normal child area
returned by the same fo:bidi-override formatting object.</p>
<p>The children of each normal area returned by an fo:bidi-override
must satisfy the constraints specified in <specref ref="area-inlinebuild"/>.
</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
(#PCDATA|<loc href="#inline.fo.list" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">%inline;</loc>)*
</eg>

<p>In addition this formatting object may have a sequence of
zero or more fo:markers as its initial children.</p>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="common-aural-properties"/></sitem>
<sitem><specref ref="common-font-properties"/></sitem>
<sitem><specref ref="color"/></sitem>
<sitem><specref ref="direction"/></sitem>
<sitem><specref ref="id"/></sitem>
<sitem><specref ref="letter-spacing"/></sitem>
<sitem><specref ref="line-height"/></sitem>
<sitem><specref ref="line-height-shift-adjustment"/></sitem>
<sitem><specref ref="relative-position"/></sitem>
<sitem><specref ref="score-spaces"/></sitem>
<sitem><specref ref="text-shadow"/></sitem>
<sitem><specref ref="text-transform"/></sitem>
<sitem><specref ref="unicode-bidi"/></sitem>
<sitem><specref ref="word-spacing"/></sitem>
</slist>
</div3>


<div3 id="fo_character"><head>fo:character</head>

<p><emph>Common Usage:</emph></p>
<p>The fo:character flow object represents a character that
is mapped to
a glyph for presentation. It is an atomic unit to the formatter.</p>
<p>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 semantic of an "auto" value for character properties, which is
typically their initial value,
are based on the Unicode codepoint. Overrides may be specified in
an implementation-specific manner.
</p>
<note>
<p>In a stylesheet the explicit creation of an fo:character may be
used to explicitly override the default mapping.</p>
</note>

<p><emph>Areas:</emph></p>
<p>The fo:character formatting object generates and returns
a single <term>normal</term> <term>inline-area</term>.</p>

<p><emph>Constraints:</emph></p>
<p>The dimensions of the area is determined by the font metrics for
the glyph.</p>
<p>When formatting an fo:character with a "treat-as-wordspace" value
of "yes", the User Agent may use a different method for determining
the <trait>inline-progression-dimension</trait> of the area.</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
EMPTY
</eg>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="common-aural-properties"/></sitem>
<sitem><specref ref="common-border-padding-and-background-properties"/></sitem>
<sitem><specref ref="common-font-properties"/></sitem>
<sitem><specref ref="common-hyphenation-properties"/></sitem>

<sitem><specref ref="common-margin-properties-inline"/></sitem>
<sitem><specref ref="alignment-adjust"/></sitem>
<sitem><specref ref="treat-as-word-space"/></sitem>
<sitem><specref ref="baseline-identifier"/></sitem>
<sitem><specref ref="baseline-shift"/></sitem>
<sitem><specref ref="character"/></sitem>
<sitem><specref ref="color"/></sitem>
<sitem><specref ref="dominant-baseline"/></sitem>
<sitem><specref ref="font-height-override-after"/></sitem>
<sitem><specref ref="font-height-override-before"/></sitem>
<sitem><specref ref="glyph-orientation-horizontal"/></sitem>
<sitem><specref ref="glyph-orientation-vertical"/></sitem>
<sitem><specref ref="id"/></sitem>
<sitem><specref ref="keep-with-next"/></sitem>
<sitem><specref ref="keep-with-previous"/></sitem>
<sitem><specref ref="letter-spacing"/></sitem>
<sitem><specref ref="line-height"/></sitem>
<sitem><specref ref="line-height-shift-adjustment"/></sitem>
<sitem><specref ref="relative-position"/></sitem>
<sitem><specref ref="score-spaces"/></sitem>
<sitem><specref ref="suppress-at-line-break"/></sitem>
<sitem><specref ref="text-decoration"/></sitem>
<sitem><specref ref="text-shadow"/></sitem>
<sitem><specref ref="text-transform"/></sitem>

<sitem><specref ref="word-spacing"/></sitem>
</slist>
</div3>


<div3 id="fo_initial-property-set"><head>fo:initial-property-set</head>

<p><emph>Common Usage:</emph></p>
<p>The fo:initial-property-set auxiliary formatting object
specifies formatting properties
for the first line of an fo:block.</p>
<note><p>It is analogous to the CSS first-line pseudo-element.</p>
<p>In future verions of this recommendation a property controlling
the number of lines, or the "depth" that these initial properties
apply to may be added.</p>
</note>

<p><emph>Areas:</emph></p>
<p>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 <trait>is-first</trait> trait and that was
generated by the parent fo:block of the fo:initial-property-set.
</p>

<p><emph>Trait Derivation:</emph></p>
<p>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:wrapper, as a direct
child of the fo:block, with those traits.</p>

<p><emph>Constraints:</emph></p>
<p>None.</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
EMPTY
</eg>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="common-accessibility-properties"/></sitem>
<sitem><specref ref="common-aural-properties"/></sitem>
<sitem><specref ref="common-border-padding-and-background-properties"/></sitem>
<sitem><specref ref="common-font-properties"/></sitem>
<sitem><specref ref="color"/></sitem>
<sitem><specref ref="id"/></sitem>
<sitem><specref ref="letter-spacing"/></sitem>
<sitem><specref ref="line-height"/></sitem>
<sitem><specref ref="line-height-shift-adjustment"/></sitem>
<sitem><specref ref="relative-position"/></sitem>
<sitem><specref ref="score-spaces"/></sitem>
<sitem><specref ref="text-decoration"/></sitem>
<sitem><specref ref="text-shadow"/></sitem>
<sitem><specref ref="text-transform"/></sitem>
<sitem><specref ref="word-spacing"/></sitem>
</slist>
</div3>


<div3 id="fo_external-graphic"><head>fo:external-graphic</head>

<p><emph>Common Usage:</emph></p>
<p>The fo:external-graphic flow object is used for an inline
graphic where the graphics data resides outside of the fo:element tree.</p>

<p><emph>Areas:</emph></p>
<p>The fo:external-graphic
formatting object generates and returns one inline-level
viewport-area and one reference-area containing the external graphic.</p>

<p><emph>Constraints:</emph></p>
<p>The viewport's size is determined by the
<trait>height</trait> and <trait>width</trait> traits.
For values of "auto", the content size of the graphic is used.
</p>
<p>The content size of a graphic is determined by taking the
intrinsic size of the graphic and scaling as specified by the
<trait>content-height</trait>, <trait>content-width</trait>,
and <trait>scaling</trait> 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.
</p>
<p>Once scaled, the reference-area
is aligned with respect to the viewport-area
using the <trait>text-align</trait> and <trait>vertical-align</trait>
traits. If it is too large for the viewport-area,
the graphic is aligned as if it would fit and the <trait>overflow</trait>
trait controls the clipping, scroll bars, etc.
</p>
<p>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.</p>
<note><p>For example, using a size of 1/96" as the size of one pixel
for rasterized images.</p>
</note>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
EMPTY
</eg>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="common-accessibility-properties"/></sitem>
<sitem><specref ref="common-aural-properties"/></sitem>
<sitem><specref ref="common-border-padding-and-background-properties"/></sitem>

<sitem><specref ref="common-margin-properties-inline"/></sitem>
<sitem><specref ref="alignment-adjust"/></sitem>
<sitem><specref ref="baseline-identifier"/></sitem>
<sitem><specref ref="baseline-shift"/></sitem>
<sitem><specref ref="block-progression-dimension"/></sitem>
<sitem><specref ref="content-height"/></sitem>
<sitem><specref ref="content-type"/></sitem>
<sitem><specref ref="content-width"/></sitem>
<sitem><specref ref="dominant-baseline"/></sitem>
<sitem><specref ref="height"/></sitem>
<sitem><specref ref="id"/></sitem>
<sitem><specref ref="inline-progression-dimension"/></sitem>
<sitem><specref ref="keep-with-next"/></sitem>
<sitem><specref ref="keep-with-previous"/></sitem>
<sitem><specref ref="line-height"/></sitem>
<sitem><specref ref="line-height-shift-adjustment"/></sitem>
<sitem><specref ref="relative-position"/></sitem>
<sitem><specref ref="overflow"/></sitem>
<sitem><specref ref="scaling"/></sitem>
<sitem><specref ref="scaling-method"/></sitem>
<sitem><specref ref="src"/></sitem>

<sitem><specref ref="width"/></sitem>
</slist>
</div3>


<div3 id="fo_instream-foreign-object"><head>fo:instream-foreign-object</head>

<p><emph>Common Usage:</emph></p>
<p>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.</p>
<note>
<p>A common format is SVG.</p>
</note>

<p><emph>Areas:</emph></p>
<p>The fo:instream-foreign-object
formatting object generates and returns one inline
viewport-area and one reference-area containing the instream-foreign-object.</p>

<p><emph>Constraints:</emph></p>
<p>See <specref ref="fo_external-graphic"/>.</p>

<p><emph>Contents:</emph></p>
<p>The fo:instream-foreign-object flow object has children from a non-XSL
namespace. The permitted structure of these children is that
defined for that namespace.
</p>
<p>The fo:instream-foreign-object flow object may have additional attributes
in the non-XSL namespace. These are made available to the processor
of the content of the flow object. Their semantics is defined by that
namespace.
</p>
<p>The viewport's size is determined by the
<trait>height</trait> and <trait>width</trait> traits.
For values of "auto", the content size of the instream foreign object is used.
</p>
<p>The content size of an instream-foreign-object is determined by taking the
intrinsic size of the object and scaling as specified by the
<trait>content-height</trait>, <trait>content-width</trait>,
and <trait>scaling</trait> 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.
</p>
<p>Once scaled, the reference-area
is aligned with respect to the viewport-area
using the <trait>text-align</trait> and <trait>vertical-align</trait>
traits. If it is too large for the viewport-area,
the instream-foreign-object is aligned as if it would fit and the <trait>overflow</trait>
trait controls the clipping, scroll bars, etc.
</p>
<p>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.</p>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="common-accessibility-properties"/></sitem>
<sitem><specref ref="common-aural-properties"/></sitem>
<sitem><specref ref="common-border-padding-and-background-properties"/></sitem>

<sitem><specref ref="common-margin-properties-inline"/></sitem>
<sitem><specref ref="alignment-adjust"/></sitem>
<sitem><specref ref="baseline-identifier"/></sitem>
<sitem><specref ref="baseline-shift"/></sitem>
<sitem><specref ref="block-progression-dimension"/></sitem>
<sitem><specref ref="content-height"/></sitem>
<sitem><specref ref="content-type"/></sitem>
<sitem><specref ref="content-width"/></sitem>
<sitem><specref ref="dominant-baseline"/></sitem>
<sitem><specref ref="height"/></sitem>
<sitem><specref ref="id"/></sitem>
<sitem><specref ref="inline-progression-dimension"/></sitem>
<sitem><specref ref="keep-with-next"/></sitem>
<sitem><specref ref="keep-with-previous"/></sitem>
<sitem><specref ref="line-height"/></sitem>
<sitem><specref ref="line-height-shift-adjustment"/></sitem>
<sitem><specref ref="overflow"/></sitem>
<sitem><specref ref="relative-position"/></sitem>
<sitem><specref ref="scaling"/></sitem>
<sitem><specref ref="scaling-method"/></sitem>

<sitem><specref ref="width"/></sitem>
</slist>
</div3>


<div3 id="fo_inline"><head>fo:inline</head>

<p><emph>Common Usage:</emph></p>
<p>The fo:inline formatting object is commonly used for formatting
a portion of text with a background or enclosing it in a border.
</p>

<p><emph>Areas:</emph></p>
<p>The fo:inline formatting object generates one or more
<term>normal</term> <term>inline-area</term>s.
The fo:inline returns these areas, any
<term>page-level-out-of-line</term> areas, and
any <term>reference-level-out-of-line</term> areas
returned by the children of the fo:inline.</p>

<p><emph>Constraints:</emph></p>
<p>No area may have more than one normal child area
returned by the same fo:inline formatting object.</p>
<p>The children of each normal area returned by an fo:inline
must satisfy the constraints specified in <specref ref="area-inlinebuild"/>.
</p>
<p>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 <specref ref="area_model"/>.</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
(#PCDATA|<loc href="#inline.fo.list" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">%inline;</loc>)*
</eg>

<p>In addition this formatting object may have a sequence of
zero or more fo:markers as its initial children.</p>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="common-accessibility-properties"/></sitem>
<sitem><specref ref="common-aural-properties"/></sitem>
<sitem><specref ref="common-border-padding-and-background-properties"/></sitem>
<sitem><specref ref="common-font-properties"/></sitem>
<sitem><specref ref="common-margin-properties-inline"/></sitem>
<sitem><specref ref="alignment-adjust"/></sitem>
<sitem><specref ref="baseline-identifier"/></sitem>
<sitem><specref ref="baseline-shift"/></sitem>
<sitem><specref ref="color"/></sitem>
<sitem><specref ref="dominant-baseline"/></sitem>
<sitem><specref ref="id"/></sitem>
<sitem><specref ref="keep-together"/></sitem>
<sitem><specref ref="keep-with-next"/></sitem>
<sitem><specref ref="keep-with-previous"/></sitem>
<sitem><specref ref="line-height"/></sitem>
<sitem><specref ref="line-height-shift-adjustment"/></sitem>
<sitem><specref ref="relative-position"/></sitem>
<sitem><specref ref="text-decoration"/></sitem>
<sitem><specref ref="visibility"/></sitem>
<sitem><specref ref="z-index"/></sitem>
</slist>
</div3>


<div3 id="fo_inline-container"><head>fo:inline-container</head>

<p><emph>Common Usage:</emph></p>
<p>The fo:inline-container flow object is used to
generate an inline reference-area, typically containing
text blocks with a different writing-mode.
</p>
<note><p>The use of this flow object is not required for
bidirectional text;
in this case the Unicode bidi
algorithm and the fo:bidi-override are sufficient.</p>
</note>

<p><emph>Areas:</emph></p>
<p>The fo:inline-container formatting object generates one or more
<term>viewport/reference pair</term>s. The viewport-areas generated
by the fo:inline-container are
<term>normal</term> <term>inline-level</term> areas.
The fo:inline-container returns these areas and any
<term>page-level-out-of-line</term> areas
returned by the children of the fo:inline-container.</p>

<p><emph>Trait Derivation:</emph></p>
<p>The areas generated by the fo:inline-container formatting object have
a value of "true" for the <trait>is-reference-area</trait>.</p>
<p>The size of the viewport-area and the reference-area has to
be fixed in the inline-progression-direction.
It must be specified
unless the inline-progression-direction is parallel to the
inline-progression-direction of the reference-area into
which
the areas generated by this flow object are placed.</p>

<p><emph>Constraints:</emph></p>
<p>No area may have more than one normal child area
returned by the same fo:inline-container formatting object.</p>
<p>The children of each reference-area generated by an fo:inline-container
formatting object
must be normal <term>block-area</term>s returned by the children of the fo:inline-container,
must be <term>properly stacked</term>, and
must be <term>properly ordered</term>.
</p>
<p>Any <term>reference-level-out-of-line</term>
areas returned by the children of the fo:inline-container
are handled as described in <specref ref="fo_float"/>.</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
(<loc href="#block.fo.list" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">%block;</loc>)+
</eg>

<p>In addition this formatting object may have a sequence of
zero or more fo:markers as its initial children.</p>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="common-border-padding-and-background-properties"/></sitem>

<sitem><specref ref="common-margin-properties-inline"/></sitem>
<sitem><specref ref="alignment-adjust"/></sitem>
<sitem><specref ref="baseline-identifier"/></sitem>
<sitem><specref ref="baseline-shift"/></sitem>
<sitem><specref ref="block-progression-dimension"/></sitem>
<sitem><specref ref="clip"/></sitem>
<sitem><specref ref="display-align"/></sitem>
<sitem><specref ref="dominant-baseline"/></sitem>
<sitem><specref ref="height"/></sitem>
<sitem><specref ref="id"/></sitem>
<sitem><specref ref="inline-progression-dimension"/></sitem>
<sitem><specref ref="keep-together"/></sitem>
<sitem><specref ref="keep-with-next"/></sitem>
<sitem><specref ref="keep-with-previous"/></sitem>
<sitem><specref ref="line-height"/></sitem>
<sitem><specref ref="line-height-shift-adjustment"/></sitem>
<sitem><specref ref="overflow"/></sitem>
<sitem><specref ref="reference-orientation"/></sitem>
<sitem><specref ref="relative-position"/></sitem>

<sitem><specref ref="width"/></sitem>
<sitem><specref ref="writing-mode"/></sitem>
</slist>
</div3>


<div3 id="fo_leader"><head>fo:leader</head>

<p><emph>Common Usage:</emph></p>
<p>The fo:leader formatting object is often used:</p>
<ulist><item><p>in TOCs to generate sequences of "." glyphs that separate
titles from page numbers</p></item>
<item><p>to create entry fields in fill-in-the-blank forms</p></item>
<item><p>to create horizontal rules for use as separators</p></item></ulist>

<p><emph>Areas:</emph></p>
<p>The fo:leader formatting object generates and returns
a single normal <term>inline-area</term>.</p>

<p><emph>Trait Derivation:</emph></p>
<p>If the value of the <trait>leader-pattern</trait> is "use-content"
the <trait>block-progression-dimension</trait> of the content-rectangle is determined
in the same manner as for line-areas; otherwise it is determined by
the <trait>rule-thickness</trait> trait.</p>

<p><emph>Constraints:</emph></p>
<p>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
<trait>overflow</trait> trait.</p>
<p>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 <trait>leader-pattern</trait> trait is "use-content".</p>
<note><p>If the value of the <trait>leader-pattern</trait> trait is "use-content"
and the fo:leader has no children, the leader shall be filled with
blank space.</p></note>
<p>The inline-area generated by the fo:leader has a dimension in the
inline-progression-direction which shall be at least the
<trait>leader-length.minimum</trait> and at most the
<trait>leader-length.maximum</trait>.</p>
<p>For lines-areas that have been specified to be justified, the justified
line-area must honor the <trait>leader-alignment</trait> trait of any inline-areas
generated by fo:leaders.</p>
<p>If the value of the <trait>leader-pattern</trait> trait is "dots" or "use-content",
the following constraints apply:</p>
<ulist><item><p>
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 <trait>leader-pattern</trait> 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
<trait>leader-pattern-width</trait>
and <trait>leader-alignment</trait> traits.</p></item>
<item><p>The <trait>leader-pattern-width</trait> trait is ignored if its value is
less than the width obtained by formatting the specified leader pattern.</p></item>
</ulist>
<note><p>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.</p></note>
<note><p>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.</p></note>
<note><p>An fo:leader can be wrapped in an fo:block to create a rule for separating
or decorating block-areas.</p></note>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
(#PCDATA|<loc href="#inline.fo.list" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">%inline;</loc>)*
</eg>

<p>The content must not contain an fo:leader, or fo:inline-container,
either as a direct child or as a descendant.
</p>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="common-accessibility-properties"/></sitem>
<sitem><specref ref="common-aural-properties"/></sitem>
<sitem><specref ref="common-border-padding-and-background-properties"/></sitem>
<sitem><specref ref="common-font-properties"/></sitem>
<sitem><specref ref="common-margin-properties-inline"/></sitem>
<sitem><specref ref="alignment-adjust"/></sitem>
<sitem><specref ref="baseline-identifier"/></sitem>
<sitem><specref ref="baseline-shift"/></sitem>
<sitem><specref ref="color"/></sitem>
<sitem><specref ref="dominant-baseline"/></sitem>
<sitem><specref ref="font-height-override-after"/></sitem>
<sitem><specref ref="font-height-override-before"/></sitem>
<sitem><specref ref="id"/></sitem>
<sitem><specref ref="leader-alignment"/></sitem>
<sitem><specref ref="leader-length"/></sitem>
<sitem><specref ref="leader-pattern"/></sitem>
<sitem><specref ref="leader-pattern-width"/></sitem>
<sitem><specref ref="relative-position"/></sitem>
<sitem><specref ref="rule-style"/></sitem>
<sitem><specref ref="rule-thickness"/></sitem>
<sitem><specref ref="letter-spacing"/></sitem>
<sitem><specref ref="line-height"/></sitem>
<sitem><specref ref="line-height-shift-adjustment"/></sitem>
<sitem><specref ref="text-shadow"/></sitem>
<sitem><specref ref="visibility"/></sitem>
<sitem><specref ref="word-spacing"/></sitem>
<sitem><specref ref="z-index"/></sitem>
</slist>
</div3>



<div3 id="fo_page-number"><head>fo:page-number</head>

<p><emph>Common Usage:</emph></p>
<p>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.</p>

<p><emph>Areas:</emph></p>
<p>The fo:page-number formatting object generates and returns
a single normal <term>inline-area</term>.</p>

<p><emph>Constraints:</emph></p>
<p>The child areas of this 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 page-number string and
with only the "character" property specified.</p>
<p>The page-number string is obtained by converting the page-number
for the page
on which the inline-area is placed in accordance with the
number to string conversion properties specified on the ancestor
fo:page-sequence.</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
EMPTY
</eg>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="common-accessibility-properties"/></sitem>
<sitem><specref ref="common-aural-properties"/></sitem>
<sitem><specref ref="common-border-padding-and-background-properties"/></sitem>
<sitem><specref ref="common-font-properties"/></sitem>

<sitem><specref ref="common-margin-properties-inline"/></sitem>
<sitem><specref ref="alignment-adjust"/></sitem>
<sitem><specref ref="baseline-identifier"/></sitem>
<sitem><specref ref="baseline-shift"/></sitem>
<sitem><specref ref="dominant-baseline"/></sitem>
<sitem><specref ref="id"/></sitem>
<sitem><specref ref="keep-with-next"/></sitem>
<sitem><specref ref="keep-with-previous"/></sitem>
<sitem><specref ref="letter-spacing"/></sitem>
<sitem><specref ref="line-height"/></sitem>
<sitem><specref ref="line-height-shift-adjustment"/></sitem>
<sitem><specref ref="relative-position"/></sitem>
<sitem><specref ref="score-spaces"/></sitem>
<sitem><specref ref="text-decoration"/></sitem>
<sitem><specref ref="text-shadow"/></sitem>
<sitem><specref ref="text-transform"/></sitem>

<sitem><specref ref="word-spacing"/></sitem>
</slist>
</div3>


<div3 id="fo_page-number-citation"><head>fo:page-number-citation</head>

<p><emph>Common Usage:</emph></p>
<p>The fo:page-number-citation is used to reference the
page-number for the page containing the first <term>normal</term>
area returned by the cited formatting
object.</p>
<note>
<p>It may be used to provide the page-numbers in the table of contents,
cross-references, and index entries.</p>
</note>

<p><emph>Areas:</emph></p>
<p>The fo:page-number-citation formatting object generates and returns
a single normal <term>inline-area</term>.</p>

<p><emph>Constraints:</emph></p>
<p>The <term>cited page-number</term> is the number of the page containing,
as a descendant, the
first normal area returned by the formatting object with
an <trait>id</trait> trait matching the <trait>ref-id</trait> trait
of the fo:page-number-citation (the referenced formatting object).</p>
<p>The <term>cited page-number string</term> is obtained by converting the
cited page-number in accordance with the
number to string conversion properties specified on the ancestor
fo:page-sequence of the referenced formatting object.</p>
<p>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 cited page-number string and
with only the "character" property specified.</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
EMPTY
</eg>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="common-accessibility-properties"/></sitem>
<sitem><specref ref="common-aural-properties"/></sitem>
<sitem><specref ref="common-border-padding-and-background-properties"/></sitem>
<sitem><specref ref="common-font-properties"/></sitem>

<sitem><specref ref="common-margin-properties-inline"/></sitem>
<sitem><specref ref="alignment-adjust"/></sitem>
<sitem><specref ref="baseline-identifier"/></sitem>
<sitem><specref ref="baseline-shift"/></sitem>
<sitem><specref ref="dominant-baseline"/></sitem>
<sitem><specref ref="id"/></sitem>
<sitem><specref ref="keep-with-next"/></sitem>
<sitem><specref ref="keep-with-previous"/></sitem>
<sitem><specref ref="letter-spacing"/></sitem>
<sitem><specref ref="line-height"/></sitem>
<sitem><specref ref="line-height-shift-adjustment"/></sitem>
<sitem><specref ref="ref-id"/></sitem>
<sitem><specref ref="relative-position"/></sitem>
<sitem><specref ref="score-spaces"/></sitem>
<sitem><specref ref="text-decoration"/></sitem>
<sitem><specref ref="text-shadow"/></sitem>
<sitem><specref ref="text-transform"/></sitem>

<sitem><specref ref="word-spacing"/></sitem>
</slist>
</div3>


</div2>

<div2>
<head>Formatting Objects for Tables</head>

<div3><head>Introduction</head>
<p>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.
</p>
<graphic source="TableTree.gif" xml:attributes="href source" show="embed" actuate="auto" xmlns:xlink="http://www.w3.org/TR/WD-xlink"/>

<div4><head>Examples</head>
<div5><head>Simple Table with CALS Column-width Specifications</head>
<p>This example is using a simple, "CALS-like", markup for the
table elements. The column-widths are specificed using the
full CALS column-width specification.</p>
<p>Input sample:</p>
<eg xml:space="preserve">
&lt;doc&gt;
&lt;table&gt;
&lt;tgroup cols="3"&gt;
&lt;colspec colname="col1" colwidth="1*"/&gt;
&lt;colspec colname="col2" colwidth="2*+2pi"/&gt;
&lt;colspec colname="col3" colwidth="72"/&gt;
&lt;tbody&gt;
&lt;row&gt;
&lt;entry colnum="1" valign="top"&gt;&lt;p&gt;Cell 1&lt;/p&gt;&lt;/entry&gt;
&lt;entry colnum="2" valign="middle" align="center"&gt;&lt;p&gt;Cell 2&lt;/p&gt;&lt;/entry&gt;
&lt;entry colnum="3" align="center"&gt;&lt;p&gt;Cell 3&lt;/p&gt;&lt;/entry&gt;
&lt;/row&gt;
&lt;/tbody&gt;
&lt;/tgroup&gt;
&lt;/table&gt;
&lt;/doc&gt;
</eg>
<p>XSL Stylesheet:</p>
<eg xml:space="preserve">
&lt;?xml version='1.0'?&gt;
&lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:fo="http://www.w3.org/1999/XSL/Format"
                version='1.0'&gt;

&lt;xsl:template match="p"&gt;
  &lt;fo:block&gt;
    &lt;xsl:apply-templates/&gt;
  &lt;/fo:block&gt;
&lt;/xsl:template&gt;

&lt;xsl:template match="table"&gt;
  &lt;fo:table width="12cm" table-layout="fixed"&gt;
    &lt;xsl:apply-templates/&gt;
  &lt;/fo:table&gt;
&lt;/xsl:template&gt;

&lt;xsl:template match="colspec"&gt;
  &lt;fo:table-column&gt;
    &lt;xsl:attribute name="column-number"&gt;
      &lt;xsl:number count="colspec"/&gt;
    &lt;/xsl:attribute&gt;
    &lt;xsl:attribute name="column-width"&gt;
      &lt;xsl:call-template name="calc.column.width"&gt;
        &lt;xsl:with-param name="colwidth"&gt;
          &lt;xsl:value-of select="@colwidth"/&gt;
        &lt;/xsl:with-param&gt;
      &lt;/xsl:call-template&gt;
    &lt;/xsl:attribute&gt;
  &lt;/fo:table-column&gt;
&lt;/xsl:template&gt;

&lt;xsl:template match="tbody"&gt;
  &lt;fo:table-body&gt;
    &lt;xsl:apply-templates/&gt;
  &lt;/fo:table-body&gt;
&lt;/xsl:template&gt;

&lt;xsl:template match="row"&gt;
  &lt;fo:table-row&gt;
    &lt;xsl:apply-templates/&gt;
  &lt;/fo:table-row&gt;
&lt;/xsl:template&gt;

&lt;xsl:template match="entry"&gt;
  &lt;fo:table-cell column-number="{@colnum}"&gt;
    &lt;xsl:if test="@valign"&gt;
      &lt;xsl:choose&gt;
        &lt;xsl:when test="@valign='middle'"&gt;
          &lt;xsl:attribute name="display-align"&gt;center&lt;/xsl:attribute&gt;
        &lt;/xsl:when&gt;
        &lt;xsl:otherwise&gt;
          &lt;xsl:attribute name="display-align"&gt;
            &lt;xsl:value-of select="@valign"/&gt;
          &lt;/xsl:attribute&gt;
        &lt;/xsl:otherwise&gt;
      &lt;/xsl:choose&gt;
    &lt;/xsl:if&gt;
    &lt;xsl:if test="@align"&gt;
      &lt;xsl:attribute name="text-align"&gt;
        &lt;xsl:value-of select="@align"/&gt;
      &lt;/xsl:attribute&gt;
    &lt;/xsl:if&gt;
    &lt;xsl:apply-templates/&gt;
  &lt;/fo:table-cell&gt;
&lt;/xsl:template&gt;


&lt;xsl:template name="calc.column.width"&gt;
&lt;!-- **
     * &lt;p&gt;Calculate an XSL FO table column-width specification from a
     * CALS table column-width specification.&lt;/p&gt;
     *
     * &lt;p&gt;CALS expresses table column-widths in the following basic
     * forms:&lt;/p&gt;
     *
     * &lt;ul&gt;
     * &lt;li&gt;&lt;b&gt;99.99units&lt;/b&gt;, a fixed length-specifier.&lt;/li&gt;
     * &lt;li&gt;&lt;b&gt;99.99&lt;/b&gt;, a fixed length-specifier without any units.&lt;/li&gt;
     * &lt;li&gt;&lt;b&gt;99.99*&lt;/b&gt;, a relative length-specifier.&lt;/li&gt;
     * &lt;li&gt;&lt;b&gt;99.99*+99.99units&lt;/b&gt;, a combination of both.&lt;/li&gt;
     * &lt;/ul&gt;
     *
     * &lt;p&gt;The CALS 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 CALS default unit (pt) is assumed.&lt;/p&gt;
     *
     * &lt;p&gt;Relative length-specifiers are represented in XSL with the
     * proportional-column-width() function.&lt;/p&gt;
     *
     * &lt;p&gt;Here are some examples:&lt;/p&gt;
     *
     * &lt;ul&gt;
     * &lt;li&gt;"36pt" becomes "36pt"&lt;/li&gt;
     * &lt;li&gt;"3pi" becomes "3pc"&lt;/li&gt;
     * &lt;li&gt;"36" becomes "36pt"&lt;/li&gt;
     * &lt;li&gt;"3*" becomes "proportional-column-width(3)"&lt;/li&gt;
     * &lt;li&gt;"3*+2pi" becomes "proportional-column-width(3)+2pc"&lt;/li&gt;
     * &lt;li&gt;"1*+2" becomes "proportional-column-width(1)+2pt"&lt;/li&gt;
     * &lt;/ul&gt;
     *
     * @param colwidth The CALS column width specification.
     *
     * @returns The XSL column width specification.
     * --&gt;
  &lt;xsl:param name="colwidth"&gt;1*&lt;/xsl:param&gt;

  &lt;!-- Ok, the colwidth could have any one of the following forms: --&gt;
  &lt;!--        1*       = proportional width --&gt;
  &lt;!--     1unit       = 1.0 units wide --&gt;
  &lt;!--         1       = 1pt wide --&gt;
  &lt;!--  1*+1unit       = proportional width + some fixed width --&gt;
  &lt;!--      1*+1       = proportional width + some fixed width --&gt;

  &lt;!-- If it has a proportional width, translate it to XSL --&gt;
  &lt;xsl:if test="contains($colwidth, '*')"&gt;
    &lt;xsl:text&gt;proportional-column-width(&lt;/xsl:text&gt;
    &lt;xsl:value-of select="substring-before($colwidth, '*')"/&gt;
    &lt;xsl:text&gt;)&lt;/xsl:text&gt;
  &lt;/xsl:if&gt;

  &lt;!-- Now get the non-proportional part of the specification --&gt;
  &lt;xsl:variable name="width-units"&gt;
    &lt;xsl:choose&gt;
      &lt;xsl:when test="contains($colwidth, '*')"&gt;
        &lt;xsl:value-of
             select="normalize-space(substring-after($colwidth, '*'))"/&gt;
      &lt;/xsl:when&gt;
      &lt;xsl:otherwise&gt;
        &lt;xsl:value-of select="normalize-space($colwidth)"/&gt;
      &lt;/xsl:otherwise&gt;
    &lt;/xsl:choose&gt;
  &lt;/xsl:variable&gt;

  &lt;!-- Now the width-units could have any one of the following forms: --&gt;
  &lt;!--                 = &lt;empty string&gt; --&gt;
  &lt;!--     1unit       = 1.0 units wide --&gt;
  &lt;!--         1       = 1pt wide --&gt;
  &lt;!-- with an optional leading sign --&gt;

  &lt;!-- Get the width part by blanking out the units part and discarding --&gt;
  &lt;!-- whitespace. --&gt;
  &lt;xsl:variable name="width"
       select="normalize-space(translate($width-units,
                                         '+-0123456789.abcdefghijklmnopqrstuvwxyz',
                                         '+-0123456789.'))"/&gt;

  &lt;!-- Get the units part by blanking out the width part and discarding --&gt;
  &lt;!-- whitespace. --&gt;
  &lt;xsl:variable name="units"
       select="normalize-space(translate($width-units,
                                         'abcdefghijklmnopqrstuvwxyz+-0123456789.',
                                         'abcdefghijklmnopqrstuvwxyz'))"/&gt;

  &lt;!-- Output the width --&gt;
  &lt;xsl:value-of select="$width"/&gt;

  &lt;!-- Output the units, translated appropriately --&gt;
  &lt;xsl:choose&gt;
    &lt;xsl:when test="$units = 'pi'"&gt;pc&lt;/xsl:when&gt;
    &lt;xsl:when test="$units = '' and $width != ''"&gt;pt&lt;/xsl:when&gt;
    &lt;xsl:otherwise&gt;&lt;xsl:value-of select="$units"/&gt;&lt;/xsl:otherwise&gt;
  &lt;/xsl:choose&gt;
&lt;/xsl:template&gt;

&lt;/xsl:stylesheet&gt;
</eg>
<p>Result Instance: elements and attributes in the fo:
namespace</p>
<eg xml:space="preserve">
&lt;fo:table width="12cm" table-layout="fixed"&gt;
  &lt;fo:table-column column-number="1" column-width="proportional-column-width(1)"&gt;
  &lt;/fo:table-column&gt;
  &lt;fo:table-column column-number="2" column-width="proportional-column-width(2)+2pc"&gt;
  &lt;/fo:table-column&gt;
  &lt;fo:table-column column-number="3" column-width="72pt"&gt;
  &lt;/fo:table-column&gt;
  &lt;fo:table-body&gt;
    &lt;fo:table-row&gt;
      &lt;fo:table-cell column-number="1" display-align="top"&gt;
        &lt;fo:block&gt;Cell 1
        &lt;/fo:block&gt;
      &lt;/fo:table-cell&gt;
      &lt;fo:table-cell column-number="2" display-align="center" text-align="center"&gt;
        &lt;fo:block&gt;Cell 2
        &lt;/fo:block&gt;
      &lt;/fo:table-cell&gt;
      &lt;fo:table-cell column-number="3" text-align="center"&gt;
        &lt;fo:block&gt;Cell 3
        &lt;/fo:block&gt;
      &lt;/fo:table-cell&gt;
    &lt;/fo:table-row&gt;
  &lt;/fo:table-body&gt;
&lt;/fo:table&gt;
</eg>
</div5>
</div4>
</div3>


<div3 id="fo_table-and-caption"><head>fo:table-and-caption</head>

<p><emph>Common Usage:</emph></p>
<p>The fo:table-and-caption flow object is used for
formatting a table
together with its caption.</p>
<note><p>A fo:table-and-caption may be placed inline by enclosing
it in an fo:inline-container.</p>
</note>
<note>
<p>This formatting object corresponds to the CSS anonymous
box that encloses the table caption and the table.</p>
</note>

<p><emph>Areas:</emph></p>
<p>The fo:table-and-caption formatting object generates one or more
<term>normal</term> <term>block-area</term>s.
The fo:table-and-caption returns these areas, any
<term>page-level-out-of-line</term> areas, and
any <term>reference-level-out-of-line</term> areas
returned by the children of the fo:table-and-caption.</p>

<p><emph>Constraints:</emph></p>
<p>No area may have more than one normal child area
returned by the same fo:table-and-caption formatting object.</p>
<p>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
<trait>caption-side</trait> trait.
They are placed relative to the content-rectangle of the generated area
as specified by the <trait>text-align</trait> trait.</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
(<loc href="#fo_table-caption" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">table-caption</loc>?,<loc href="#fo_table" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">table</loc>)
</eg>

<p>In addition this formatting object may have a sequence of
zero or more fo:markers as its initial children.</p>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="common-accessibility-properties"/></sitem>
<sitem><specref ref="common-aural-properties"/></sitem>
<sitem><specref ref="common-border-padding-and-background-properties"/></sitem>
<sitem><specref ref="common-margin-properties-block"/></sitem>
<sitem><specref ref="caption-side"/></sitem>
<sitem><specref ref="id"/></sitem>
<sitem><specref ref="keep-together"/></sitem>
<sitem><specref ref="relative-position"/></sitem>
</slist>
</div3>


<div3 id="fo_table"><head>fo:table</head>

<p><emph>Common Usage:</emph></p>
<p>The fo:table flow object is used for formatting the
tabular material
of a table.</p>
<p>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.</p>
<p>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.</p>

<p><emph>Areas:</emph></p>
<p>The fo:table formatting object generates one or more
<term>normal</term> <term>block-area</term>s.
The fo:table returns these areas, any
<term>page-level-out-of-line</term> areas, and
any <term>reference-level-out-of-line</term> areas
returned by the children of the fo:table.</p>
<p>The areas generated by the fo:table formatting object have
as children:</p>
<ulist>
<item><p>Areas, with only background, corresponding to the
column-groups, columns, and rows.
</p></item>
<item><p>Areas returned by the fo:table-cell formatting objects.</p></item>
</ulist>
<p>These areas have a z-index controlling the rendering order
determined in accordance with 17.5.1 of the CSS2 specification.</p>
<note><p>A cell that is spanned may have a different background in each
of the grid units it occupies.</p>
</note>

<p><emph>Trait Derivation:</emph></p>
<p>The areas generated by the fo:table formatting object have
a value of "true" for the <trait>is-reference-area</trait>.</p>
<p>The column-progression-direction and row-progression-direction are
determined by the <trait>writing-mode</trait> trait. Columns use the
inline-progression-direction, and
rows use the block-progression-direction.
</p>
<p>The method for deriving the border traits for a table is
specified by the "border-collapse" property.</p>
<p>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.
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.</p>
<p>If the value of the "border-collapse" property is "collapse" the border
is determined, for each segment, at the cell level.</p>
<note><p>By specifying an appropriately high priority on the border
specification for the fo:table one may ensure that this specification
is the one used on all border segments.</p>
</note>

<p><emph>Constraints:</emph></p>
<p>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 <trait>table-layout</trait> and
the <trait>inline-progression-dimension</trait> traits in the following manner:</p>
<glist>
<gitem><label>inline-progression-dimension="auto" table-layout="auto"</label>
<def><p>The automatic table layout shall be used.</p></def>
</gitem>
<gitem><label>inline-progression-dimension="auto" table-layout="fixed"</label>
<def><p>The automatic table layout shall be used.</p></def>
</gitem>
<gitem><label>inline-progression-dimension=&lt;length&gt; table-layout="auto"</label>
<def><p>The automatic table layout shall be used.</p></def>
</gitem>
<gitem><label>inline-progression-dimension=&lt;length&gt; table-layout="fixed"</label>
<def><p>The fixed table layout shall be used.</p></def>
</gitem>
</glist>
<p>The automatic table layout and fixed table layout is defined in
17.5.2 of the CSS2 specification.</p>
<p>The method for determining the block-progression-dimension
of the table is
governed by the <trait>block-progression-dimension</trait> trait.</p>
<note><p>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.</p>
</note>
<note><p>The use of the "proportional-column-width()" function is only
permitted when the fixed table layout is used.</p>
</note>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
(<loc href="#fo_table-column" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">table-column</loc>*,<loc href="#fo_table-header" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">table-header</loc>?,<loc href="#fo_table-footer" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">table-footer</loc>?,<loc href="#fo_table-body" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">table-body</loc>+)
</eg>

<p>In addition this formatting object may have a sequence of
zero or more fo:markers as its initial children.</p>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="common-accessibility-properties"/></sitem>
<sitem><specref ref="common-aural-properties"/></sitem>
<sitem><specref ref="common-border-padding-and-background-properties"/></sitem>

<sitem><specref ref="common-margin-properties-block"/></sitem>
<sitem><specref ref="block-progression-dimension"/></sitem>
<sitem><specref ref="border-collapse"/></sitem>
<sitem><specref ref="border-separation"/></sitem>
<sitem><specref ref="break-after"/></sitem>
<sitem><specref ref="break-before"/></sitem>
<sitem><specref ref="id"/></sitem>
<sitem><specref ref="inline-progression-dimension"/></sitem>
<sitem><specref ref="height"/></sitem>
<sitem><specref ref="keep-together"/></sitem>
<sitem><specref ref="keep-with-next"/></sitem>
<sitem><specref ref="keep-with-previous"/></sitem>
<sitem><specref ref="relative-position"/></sitem>
<sitem><specref ref="table-layout"/></sitem>
<sitem><specref ref="table-omit-footer-at-break"/></sitem>
<sitem><specref ref="table-omit-header-at-break"/></sitem>
<sitem><specref ref="width"/></sitem>
<sitem><specref ref="writing-mode"/></sitem>
</slist>
</div3>


<div3 id="fo_table-column"><head>fo:table-column</head>

<p><emph>Common Usage:</emph></p>
<p>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.</p>

<p><emph>Areas:</emph></p>
<p>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.
Inheritable properties may also be specified on the fo:table-column.
These can be referenced by the from-table-column() function
in an expression.
</p>

<p><emph>Constraints:</emph></p>
<p>None.</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
EMPTY
</eg>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="common-border-padding-and-background-properties"/></sitem>
<sitem><specref ref="column-number"/></sitem>
<sitem><specref ref="column-width"/></sitem>
<sitem><specref ref="number-columns-repeated"/></sitem>
<sitem><specref ref="number-columns-spanned"/></sitem>
<sitem><specref ref="visibility"/></sitem>
</slist>
</div3>


<div3 id="fo_table-caption"><head>fo:table-caption</head>

<p><emph>Common Usage:</emph></p>
<p>The fo:table-caption formatting object is used to contain block-level
formatting objects containing the caption for the table.</p>

<p><emph>Areas:</emph></p>
<p>The fo:table-caption formatting object generates one or more
<term>normal</term> <term>reference-area</term>s.
The fo:table-caption returns these reference-areas and any
<term>page-level-out-of-line</term> areas
returned by the children of the fo:table-caption.</p>

<p><emph>Trait Derivation:</emph></p>
<p>The areas generated by the fo:table-caption formatting object have
a value of "true" for the <trait>is-reference-area</trait>.</p>

<p><emph>Constraints:</emph></p>
<p>For the case when the value of the <trait>caption-side</trait>
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.</p>
<p>When the value is "start" or "end" the inline-progression-dimension
of the generated reference-area is constrained by the value of
the <trait>width</trait> trait.</p>
<p>No area may have more than one normal child area
returned by the same fo:table-caption formatting object.</p>
<p>The children of each normal area returned by an fo:table-caption
formatting object
must be normal <term>block-area</term>s returned by the children of
the fo:table-caption,
must be <term>properly stacked</term>, and
must be <term>properly ordered</term>.
</p>
<p>Any <term>reference-level-out-of-line</term>
areas returned by the children of the fo:table-caption
are handled as described in <specref ref="fo_float"/>.</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
(<loc href="#block.fo.list" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">%block;</loc>)+
</eg>

<p>In addition this formatting object may have a sequence of
zero or more fo:markers as its initial children.</p>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="common-accessibility-properties"/></sitem>
<sitem><specref ref="common-aural-properties"/></sitem>
<sitem><specref ref="common-border-padding-and-background-properties"/></sitem>
<sitem><specref ref="block-progression-dimension"/></sitem>
<sitem><specref ref="height"/></sitem>
<sitem><specref ref="id"/></sitem>
<sitem><specref ref="inline-progression-dimension"/></sitem>
<sitem><specref ref="keep-together"/></sitem>
<sitem><specref ref="relative-position"/></sitem>
<sitem><specref ref="width"/></sitem>
</slist>
</div3>


<div3 id="fo_table-header"><head>fo:table-header</head>

<p><emph>Common Usage:</emph></p>
<p>The fo:table-header formatting object is used to contain
the content
of the table header.</p>

<p><emph>Areas:</emph></p>
<p>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.
</p>

<p><emph>Constraints:</emph></p>
<p>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.
</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
(<loc href="#fo_table-row" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">table-row</loc>+|<loc href="#fo_table-cell" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">table-cell</loc>+)
</eg>

<p>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.
</p>
<p>In addition this formatting object may have a sequence of
zero or more fo:markers as its initial children.</p>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="common-accessibility-properties"/></sitem>
<sitem><specref ref="common-aural-properties"/></sitem>
<sitem><specref ref="common-border-padding-and-background-properties"/></sitem>
<sitem><specref ref="id"/></sitem>
<sitem><specref ref="relative-position"/></sitem>
</slist>
</div3>


<div3 id="fo_table-footer"><head>fo:table-footer</head>

<p><emph>Common Usage:</emph></p>
<p>The fo:table-footer formatting object is used to contain
the content
of the table footer.</p>

<p><emph>Areas:</emph></p>
<p>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.
</p>

<p><emph>Constraints:</emph></p>
<p>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.
</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
(<loc href="#fo_table-row" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">table-row</loc>+|<loc href="#fo_table-cell" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">table-cell</loc>+)
</eg>

<p>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.
</p>
<p>In addition this formatting object may have a sequence of
zero or more fo:markers as its initial children.</p>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="common-accessibility-properties"/></sitem>
<sitem><specref ref="common-aural-properties"/></sitem>
<sitem><specref ref="common-border-padding-and-background-properties"/></sitem>
<sitem><specref ref="id"/></sitem>
<sitem><specref ref="relative-position"/></sitem>
</slist>
</div3>


<div3 id="fo_table-body"><head>fo:table-body</head>

<p><emph>Common Usage:</emph></p>
<p>The fo:table-body formatting object is used to contain
the content
of the table body.</p>

<p><emph>Areas:</emph></p>
<p>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.
</p>

<p><emph>Constraints:</emph></p>
<p>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.
</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
(<loc href="#fo_table-row" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">table-row</loc>+|<loc href="#fo_table-cell" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">table-cell</loc>+)
</eg>

<p>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.
</p>
<p>In addition this formatting object may have a sequence of
zero or more fo:markers as its initial children.</p>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="common-accessibility-properties"/></sitem>
<sitem><specref ref="common-aural-properties"/></sitem>
<sitem><specref ref="common-border-padding-and-background-properties"/></sitem>
<sitem><specref ref="id"/></sitem>
<sitem><specref ref="relative-position"/></sitem>
</slist>
</div3>


<div3 id="fo_table-row"><head>fo:table-row</head>

<p><emph>Common Usage:</emph></p>
<p>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.</p>

<p><emph>Areas:</emph></p>
<p>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.
</p>

<p><emph>Constraints:</emph></p>
<p>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.
</p>
<p>The method for determining the height of the row in the grid is
governed by the <trait>row-height</trait> trait.</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
(<loc href="#fo_table-cell" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">table-cell</loc>+)
</eg>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="common-accessibility-properties"/></sitem>
<sitem><specref ref="block-progression-dimension"/></sitem>
<sitem><specref ref="common-aural-properties"/></sitem>
<sitem><specref ref="common-border-padding-and-background-properties"/></sitem>

<sitem><specref ref="break-after"/></sitem>
<sitem><specref ref="break-before"/></sitem>
<sitem><specref ref="id"/></sitem>
<sitem><specref ref="height"/></sitem>
<sitem><specref ref="keep-together"/></sitem>
<sitem><specref ref="keep-with-next"/></sitem>
<sitem><specref ref="keep-with-previous"/></sitem>
<sitem><specref ref="relative-position"/></sitem>
</slist>
</div3>


<div3 id="fo_table-cell"><head>fo:table-cell</head>

<p><emph>Common Usage:</emph></p>
<p>The fo:table-cell formatting object is used to group
content to be
placed in a table-cell.</p>

<p><emph>Areas:</emph></p>
<p>The fo:table-cell formatting object generates one or more
<term>normal</term> <term>reference-area</term>s.
The fo:table-cell returns these reference-areas and any
<term>page-level-out-of-line</term> areas
returned by the children of the fo:table-cell.</p>

<p><emph>Trait Derivation:</emph></p>
<p>The areas generated by the fo:table-cell formatting object have
a value of "true" for the <trait>is-reference-area</trait>.</p>
<p>The method for deriving the border for a cell is
specified by the <trait>border-collapse</trait> trait.</p>
<p>If the value of the <trait>border-collapse</trait> 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 <trait>border-separation</trait> trait.
It is filled in accordance with the <trait>background</trait> 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.</p>
<p>If the value of the <trait>border-collapse</trait> 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 highest priority. It is an error if there are two such
borders that have the same priority but are not identical.
Each border segment is placed centered on the table grid boundary line.
</p>

<p><emph>Constraints:</emph></p>
<p>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:</p>
<ulist>
<item><p>If the value of the <trait>border-collapse</trait> trait is "separate":
half the value of the <trait>border-separation</trait> trait; otherwise 0.</p>
</item>
<item><p>If the value of the <trait>border-collapse</trait> trait is "separate":
the thickness of the cell-border; otherwise half the thickness of the
effective border.</p>
</item>
<item><p>The cell padding.</p>
</item>
</ulist>
<p>The method for determining the block-progression-dimension
of the cell in the grid is governed by the <trait>row-height</trait> trait.</p>
<p>No area may have more than one normal child area
returned by the same fo:table-cell formatting object.</p>
<p>The children of each normal area returned by an fo:table-cell
formatting object
must be normal <term>block-area</term>s returned by the children of
the fo:table-cell,
must be <term>properly stacked</term>, and
must be <term>properly ordered</term>.
</p>
<p>Any <term>reference-level-out-of-line</term>
areas returned by the children of the fo:table-cell
are handled as described in <specref ref="fo_float"/>.</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
(<loc href="#block.fo.list" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">%block;</loc>)+
</eg>

<p>In addition this formatting object may have a sequence of
zero or more fo:markers as its initial children.</p>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="common-accessibility-properties"/></sitem>
<sitem><specref ref="common-aural-properties"/></sitem>
<sitem><specref ref="common-border-padding-and-background-properties"/></sitem>
<sitem><specref ref="block-progression-dimension"/></sitem>
<sitem><specref ref="column-number"/></sitem>
<sitem><specref ref="display-align"/></sitem>
<sitem><specref ref="relative-align"/></sitem>
<sitem><specref ref="empty-cells"/></sitem>
<sitem><specref ref="ends-row"/></sitem>
<sitem><specref ref="height"/></sitem>
<sitem><specref ref="id"/></sitem>
<sitem><specref ref="number-columns-spanned"/></sitem>
<sitem><specref ref="number-rows-spanned"/></sitem>
<sitem><specref ref="relative-position"/></sitem>
<sitem><specref ref="starts-row"/></sitem>
<sitem><specref ref="width"/></sitem>
</slist>
</div3>


</div2>

<div2>
<head>Formatting Objects for Lists</head>

<div3><head>Introduction</head>
<p>There are four formatting objects used to construct lists:
fo:list-block, fo:list-item, fo:list-item-label, and fo:list-item-body.
</p>
<figure>
<graphic source="ListTree.gif" xml:attributes="href source" show="embed" actuate="auto" xmlns:xlink="http://www.w3.org/TR/WD-xlink"/>
<figcap><p>Tree representation of the formatting Objects for Lists.</p>
</figcap>
</figure>
<p>The fo:list-block has the role of containing the complete list and
to specify values used for the list geometry in the
inline-progression-direction (see details below).</p>
<p>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.</p>
<p>The fo:list-item has the role of containing each item in a list.</p>
<p>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 ding-bat character, or a term.</p>
<p>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.</p>
<p>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.</p>
<graphic source="ListGeom.gif" xml:attributes="href source" show="embed" actuate="auto" xmlns:xlink="http://www.w3.org/TR/WD-xlink"/>
<p>The specification of the list geometry in the
inline-progression-direction is achieved by:</p>
<ulist>
<item>
<p>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.
</p>
</item>
<item>
<p>Specifying end-indent="label-end()" on the fo:list-item-label.
</p>
<p>Specifying start-indent="body-start()" on the fo:list-item-body.
</p>
<note><p>These list specific functions are defined below.</p>
</note>
</item>
</ulist>
<p>The start-indent of the list-item-label and end-indent of the
list-item-body, if desired, are typically specified as a length.</p>

<div4><head>Examples</head>

<div5><head>Numbered List</head>
<p>The list-items are contained in an "ol"
element. The items are
contained in "item" elements and contain text (as opposed to
paragraphs).</p>
<p>The style is to number the items alphabetically with a dot at
the end of the number.</p>
<p>XSL Stylesheet:</p>
<eg xml:space="preserve">
&lt;?xml version='1.0'?&gt;
&lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:fo="http://www.w3.org/1999/XSL/Format"
                version='1.0'&gt;

&lt;xsl:template match="ol"&gt;
  &lt;fo:list-block provisional-distance-between-starts="15mm"
   provisional-label-separation="5mm"&gt;
    &lt;xsl:apply-templates/&gt;
  &lt;/fo:list-block&gt;
&lt;/xsl:template&gt;

&lt;xsl:template match="ol/item"&gt;
  &lt;fo:list-item&gt;
    &lt;fo:list-item-label start-indent="5mm" end-indent="label-end()"&gt;
      &lt;fo:block&gt;
        &lt;xsl:number format="a."/&gt;
      &lt;/fo:block&gt;
    &lt;/fo:list-item-label&gt;
    &lt;fo:list-item-body start-indent="body-start()"&gt;
      &lt;fo:block&gt;
        &lt;xsl:apply-templates/&gt;
      &lt;/fo:block&gt;
    &lt;/fo:list-item-body&gt;
  &lt;/fo:list-item&gt;
&lt;/xsl:template&gt;

&lt;/xsl:stylesheet&gt;
</eg>
<p>Input sample:</p>
<eg xml:space="preserve">
&lt;ol&gt;
&lt;item&gt;List item 1.&lt;/item&gt;
&lt;item&gt;List item 2.&lt;/item&gt;
&lt;item&gt;List item 3.&lt;/item&gt;
&lt;/ol&gt;
</eg>
<p>Result Instance: elements and attributes in the fo:
namespace</p>
<eg xml:space="preserve">
&lt;fo:list-block provisional-distance-between-starts="15mm"
  provisional-label-separation="5mm"&gt;

  &lt;fo:list-item&gt;
    &lt;fo:list-item-label start-indent="5mm" end-indent="label-end()"&gt;
      &lt;fo:block&gt;a.
      &lt;/fo:block&gt;
    &lt;/fo:list-item-label&gt;
    &lt;fo:list-item-body start-indent="body-start()"&gt;
      &lt;fo:block&gt;List item 1.
      &lt;/fo:block&gt;
    &lt;/fo:list-item-body&gt;
  &lt;/fo:list-item&gt;

  &lt;fo:list-item&gt;
    &lt;fo:list-item-label start-indent="5mm" end-indent="label-end()"&gt;
      &lt;fo:block&gt;b.
      &lt;/fo:block&gt;
    &lt;/fo:list-item-label&gt;
    &lt;fo:list-item-body start-indent="body-start()"&gt;
      &lt;fo:block&gt;List item 2.
      &lt;/fo:block&gt;
    &lt;/fo:list-item-body&gt;
  &lt;/fo:list-item&gt;

  &lt;fo:list-item&gt;
    &lt;fo:list-item-label start-indent="5mm" end-indent="label-end()"&gt;
      &lt;fo:block&gt;c.
      &lt;/fo:block&gt;
    &lt;/fo:list-item-label&gt;
    &lt;fo:list-item-body start-indent="body-start()"&gt;
      &lt;fo:block&gt;List item 3.
      &lt;/fo:block&gt;
    &lt;/fo:list-item-body&gt;
  &lt;/fo:list-item&gt;

&lt;/fo:list-block&gt;
</eg>
</div5>

<div5><head>HTML-style "dl" lists</head>
<p>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.</p>
<p>Balanced pairs of "dt"/"dd"s are converted into fo:list-items.
For unbalanced "dt"/"dd"s, the stylesheet makes the
following assumptions:</p>
<ulist>
<item><p>Multiple "dt"s are grouped together into a single
fo:list-item-label in a single list-item.</p></item>
<item><p>Multiple DDs are:</p>
<ulist>
<item><p>Output as individual FO list-items with an empty
list-item-label if the stylesheet variable
$allow-naked-dd is true.</p></item>
<item><p>Are grouped together into a single FO list-item-body if
$allow-naked-dd is false.</p></item>
</ulist>
</item>
</ulist>
<p>In other words, given a structure like this:</p>
<eg xml:space="preserve">
&lt;doc&gt;
&lt;dl&gt;
  &lt;dt&gt;term&lt;/dt&gt;
  &lt;dd&gt;definition&lt;/dd&gt;
  &lt;dt&gt;term&lt;/dt&gt;
  &lt;dt&gt;term&lt;/dt&gt;
  &lt;dd&gt;definition&lt;/dd&gt;
  &lt;dt&gt;term&lt;/dt&gt;
  &lt;dd&gt;definition&lt;/dd&gt;
  &lt;dd&gt;definition&lt;/dd&gt;
&lt;/dl&gt;
&lt;/doc&gt;
</eg>
<p>If $allow-naked-dd is true, the result instance: elements
and attributes in the fo: namespace is:</p>
<eg xml:space="preserve">
&lt;fo:list-block provisional-distance-between-starts="35mm"
  provisional-label-separation="5mm"&gt;
  &lt;fo:list-item&gt;
    &lt;fo:list-item-label end-indent="label-end()"&gt;
      &lt;fo:block&gt;term
      &lt;/fo:block&gt;
    &lt;/fo:list-item-label&gt;
    &lt;fo:list-item-body start-indent="body-start()"&gt;
      &lt;fo:block&gt;definition
      &lt;/fo:block&gt;
    &lt;/fo:list-item-body&gt;
  &lt;/fo:list-item&gt;
  &lt;fo:list-item&gt;
    &lt;fo:list-item-label end-indent="label-end()"&gt;
      &lt;fo:block&gt;term
      &lt;/fo:block&gt;
      &lt;fo:block&gt;term
      &lt;/fo:block&gt;
    &lt;/fo:list-item-label&gt;
    &lt;fo:list-item-body start-indent="body-start()"&gt;
      &lt;fo:block&gt;definition
      &lt;/fo:block&gt;
    &lt;/fo:list-item-body&gt;
  &lt;/fo:list-item&gt;
  &lt;fo:list-item&gt;
    &lt;fo:list-item-label end-indent="label-end()"&gt;
      &lt;fo:block&gt;term
      &lt;/fo:block&gt;
    &lt;/fo:list-item-label&gt;
    &lt;fo:list-item-body start-indent="body-start()"&gt;
      &lt;fo:block&gt;definition
      &lt;/fo:block&gt;
    &lt;/fo:list-item-body&gt;
  &lt;/fo:list-item&gt;
  &lt;fo:list-item&gt;
    &lt;fo:list-item-label end-indent="label-end()"&gt;
    &lt;/fo:list-item-label&gt;
    &lt;fo:list-item-body start-indent="body-start()"&gt;
      &lt;fo:block&gt;definition
      &lt;/fo:block&gt;
    &lt;/fo:list-item-body&gt;
  &lt;/fo:list-item&gt;
&lt;/fo:list-block&gt;
</eg>
<p>If $allow-naked-dd is false, the result instance:
elements and attributes in the fo: namespace is:</p>
<eg xml:space="preserve">
&lt;fo:list-block provisional-distance-between-starts="35mm"
  provisional-label-separation="5mm"&gt;
  &lt;fo:list-item&gt;
    &lt;fo:list-item-label end-indent="label-end()"&gt;
      &lt;fo:block&gt;term
      &lt;/fo:block&gt;
    &lt;/fo:list-item-label&gt;
    &lt;fo:list-item-body start-indent="body-start()"&gt;
      &lt;fo:block&gt;definition
      &lt;/fo:block&gt;
    &lt;/fo:list-item-body&gt;
  &lt;/fo:list-item&gt;
  &lt;fo:list-item&gt;
    &lt;fo:list-item-label end-indent="label-end()"&gt;
      &lt;fo:block&gt;term
      &lt;/fo:block&gt;
      &lt;fo:block&gt;term
      &lt;/fo:block&gt;
    &lt;/fo:list-item-label&gt;
    &lt;fo:list-item-body start-indent="body-start()"&gt;
      &lt;fo:block&gt;definition
      &lt;/fo:block&gt;
    &lt;/fo:list-item-body&gt;
  &lt;/fo:list-item&gt;
  &lt;fo:list-item&gt;
    &lt;fo:list-item-label end-indent="label-end()"&gt;
      &lt;fo:block&gt;term
      &lt;/fo:block&gt;
    &lt;/fo:list-item-label&gt;
    &lt;fo:list-item-body start-indent="body-start()"&gt;
      &lt;fo:block&gt;definition
      &lt;/fo:block&gt;
      &lt;fo:block&gt;definition
      &lt;/fo:block&gt;
    &lt;/fo:list-item-body&gt;
  &lt;/fo:list-item&gt;
&lt;/fo:list-block&gt;
</eg>
<p>XSL Stylesheet:</p>
<eg xml:space="preserve">
&lt;?xml version='1.0'?&gt;
&lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:fo="http://www.w3.org/1999/XSL/Format"
                version='1.0'&gt;

&lt;xsl:include href="dtdd.xsl"/&gt;

&lt;xsl:template match="doc"&gt;
  &lt;xsl:apply-templates/&gt;
&lt;/xsl:template&gt;

&lt;xsl:template match="dl"&gt;
  &lt;xsl:call-template name="process.dl"/&gt;
&lt;/xsl:template&gt;

&lt;xsl:template match="dt|dd"&gt;
  &lt;fo:block&gt;
    &lt;xsl:apply-templates/&gt;
  &lt;/fo:block&gt;
&lt;/xsl:template&gt;

&lt;/xsl:stylesheet&gt;
</eg>
<p>Included stylesheet "dtdd.xsl"</p>
<eg xml:space="preserve">
&lt;?xml version='1.0'?&gt;
&lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:fo="http://www.w3.org/1999/XSL/Format"
                version='1.0'&gt;

&lt;xsl:variable name="allow-naked-dd" select="true()"/&gt;

&lt;xsl:template name="process.dl"&gt;
  &lt;fo:list-block provisional-distance-between-starts="35mm"
   provisional-label-separation="5mm"&gt;
    &lt;xsl:choose&gt;
      &lt;xsl:when test="$allow-naked-dd"&gt;
        &lt;xsl:call-template name="process.dl.content.with.naked.dd"/&gt;
      &lt;/xsl:when&gt;
      &lt;xsl:otherwise&gt;
        &lt;xsl:call-template name="process.dl.content"/&gt;
      &lt;/xsl:otherwise&gt;
    &lt;/xsl:choose&gt;
  &lt;/fo:list-block&gt;
&lt;/xsl:template&gt;

&lt;xsl:template name="process.dl.content.with.naked.dd"&gt;
  &lt;xsl:param name="dts" select="./force-list-to-be-empty"/&gt;
  &lt;xsl:param name="nodes" select="*"/&gt;

  &lt;xsl:choose&gt;
    &lt;xsl:when test="count($nodes)=0"&gt;
      &lt;!-- Out of nodes, output any pending DTs --&gt;
      &lt;xsl:if test="count($dts)&gt;0"&gt;
        &lt;fo:list-item&gt;
          &lt;fo:list-item-label end-indent="label-end()"&gt;
            &lt;xsl:apply-templates select="$dts"/&gt;
          &lt;/fo:list-item-label&gt;
          &lt;fo:list-item-body start-indent="body-start()"/&gt;
        &lt;/fo:list-item&gt;
      &lt;/xsl:if&gt;
    &lt;/xsl:when&gt;

    &lt;xsl:when test="name($nodes[1])='dd'"&gt;
      &lt;!-- We found a DD, output the DTs and the DD --&gt;
      &lt;fo:list-item&gt;
        &lt;fo:list-item-label end-indent="label-end()"&gt;
          &lt;xsl:apply-templates select="$dts"/&gt;
        &lt;/fo:list-item-label&gt;
        &lt;fo:list-item-body start-indent="body-start()"&gt;
          &lt;xsl:apply-templates select="$nodes[1]"/&gt;
        &lt;/fo:list-item-body&gt;
      &lt;/fo:list-item&gt;
      &lt;xsl:call-template name="process.dl.content.with.naked.dd"&gt;
        &lt;xsl:with-param name="nodes" select="$nodes[position()&gt;1]"/&gt;
      &lt;/xsl:call-template&gt;
    &lt;/xsl:when&gt;

    &lt;xsl:when test="name($nodes[1])='dt'"&gt;
      &lt;!-- We found a DT, add it to the list of DTs and loop --&gt;
      &lt;xsl:call-template name="process.dl.content.with.naked.dd"&gt;
        &lt;xsl:with-param name="dts" select="$dts|$nodes[1]"/&gt;
        &lt;xsl:with-param name="nodes" select="$nodes[position()&gt;1]"/&gt;
      &lt;/xsl:call-template&gt;
    &lt;/xsl:when&gt;

    &lt;xsl:otherwise&gt;
      &lt;!-- This shouldn't happen --&gt;
      &lt;xsl:message&gt;
        &lt;xsl:text&gt;DT/DD list contained something bogus (&lt;/xsl:text&gt;
        &lt;xsl:value-of select="name($nodes[1])"/&gt;
        &lt;xsl:text&gt;).&lt;/xsl:text&gt;
      &lt;/xsl:message&gt;
    &lt;/xsl:otherwise&gt;
  &lt;/xsl:choose&gt;
&lt;/xsl:template&gt;

&lt;xsl:template name="process.dl.content"&gt;
  &lt;xsl:param name="dts" select="./force-list-to-be-empty"/&gt;
  &lt;xsl:param name="dds" select="./force-list-to-be-empty"/&gt;
  &lt;xsl:param name="output-on"&gt;&lt;/xsl:param&gt;
  &lt;xsl:param name="nodes" select="*"/&gt;

  &lt;!-- The algorithm here is to build up a list of DTs and DDs, --&gt;
  &lt;!-- outputing them only on the transition from DD back to DT --&gt;

  &lt;xsl:choose&gt;
    &lt;xsl:when test="count($nodes)=0"&gt;
      &lt;!-- Out of nodes, output any pending elements --&gt;
      &lt;xsl:if test="count($dts)&gt;0 or count($dds)&gt;0"&gt;
        &lt;fo:list-item&gt;
          &lt;fo:list-item-label end-indent="label-end()"&gt;
            &lt;xsl:apply-templates select="$dts"/&gt;
          &lt;/fo:list-item-label&gt;
          &lt;fo:list-item-body start-indent="body-start()"&gt;
            &lt;xsl:apply-templates select="$dds"/&gt;
          &lt;/fo:list-item-body&gt;
        &lt;/fo:list-item&gt;
      &lt;/xsl:if&gt;
    &lt;/xsl:when&gt;

    &lt;xsl:when test="name($nodes[1])=$output-on"&gt;
      &lt;!-- We're making the transition from DD back to DT --&gt;
      &lt;fo:list-item&gt;
        &lt;fo:list-item-label end-indent="label-end()"&gt;
          &lt;xsl:apply-templates select="$dts"/&gt;
        &lt;/fo:list-item-label&gt;
        &lt;fo:list-item-body start-indent="body-start()"&gt;
          &lt;xsl:apply-templates select="$dds"/&gt;
        &lt;/fo:list-item-body&gt;
      &lt;/fo:list-item&gt;

      &lt;!-- Reprocess this node (and the rest of the node list) --&gt;
      &lt;!-- resetting the output-on state to nil --&gt;
      &lt;xsl:call-template name="process.dl.content"&gt;
        &lt;xsl:with-param name="nodes" select="$nodes"/&gt;
      &lt;/xsl:call-template&gt;
    &lt;/xsl:when&gt;

    &lt;xsl:when test="name($nodes[1])='dt'"&gt;
      &lt;!-- We found a DT, add it to the list and loop --&gt;
      &lt;xsl:call-template name="process.dl.content"&gt;
        &lt;xsl:with-param name="dts" select="$dts|$nodes[1]"/&gt;
        &lt;xsl:with-param name="dds" select="$dds"/&gt;
        &lt;xsl:with-param name="nodes" select="$nodes[position()&gt;1]"/&gt;
      &lt;/xsl:call-template&gt;
    &lt;/xsl:when&gt;

    &lt;xsl:when test="name($nodes[1])='dd'"&gt;
      &lt;!-- We found a DD, add it to the list and loop, noting that --&gt;
      &lt;!-- the next time we cross back to DT's, we need to output the --&gt;
      &lt;!-- current DT/DDs. --&gt;
      &lt;xsl:call-template name="process.dl.content"&gt;
        &lt;xsl:with-param name="dts" select="$dts"/&gt;
        &lt;xsl:with-param name="dds" select="$dds|$nodes[1]"/&gt;
        &lt;xsl:with-param name="output-on"&gt;dt&lt;/xsl:with-param&gt;
        &lt;xsl:with-param name="nodes" select="$nodes[position()&gt;1]"/&gt;
      &lt;/xsl:call-template&gt;
    &lt;/xsl:when&gt;

    &lt;xsl:otherwise&gt;
      &lt;!-- This shouldn't happen --&gt;
      &lt;xsl:message&gt;
        &lt;xsl:text&gt;DT/DD list contained something bogus (&lt;/xsl:text&gt;
        &lt;xsl:value-of select="name($nodes[1])"/&gt;
        &lt;xsl:text&gt;).&lt;/xsl:text&gt;
      &lt;/xsl:message&gt;
    &lt;/xsl:otherwise&gt;
  &lt;/xsl:choose&gt;
&lt;/xsl:template&gt;

&lt;/xsl:stylesheet&gt;
</eg>
<p>The "dtdd.xsl" stylesheet may be customized in the following ways:</p>
<ulist>
<item><p>Set the value of $allow-naked-dd to control the processing of unbalanced
"dd"s.</p></item>
<item>
<p>Change "dt" to the name of the element
which is a term in the list.</p></item>
<item>
<p>Change "dd" to the name of the element
which is a definition in the list.</p></item>
<item>
<p>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.</p>
</item>
</ulist>
<p>In the stylesheet using the "dtdd.xsl" stylesheet change the "dl"
to the name of the element which is the wrapper for the list.</p>
</div5>
</div4>
</div3>


<div3 id="fo_list-block"><head>fo:list-block</head>

<p><emph>Common Usage:</emph></p>
<p>The fo:list-block flow object is used to format a list.</p>

<p><emph>Areas:</emph></p>
<p>The fo:list-block formatting object generates one or more
<term>normal</term> <term>block-area</term>s.
The fo:list-block returns these areas, any
<term>page-level-out-of-line</term> areas, and
any <term>reference-level-out-of-line</term> areas
returned by the children of the fo:list-block.</p>

<p><emph>Constraints:</emph></p>
<p>No area may have more than one normal child area
returned by the same fo:list-block formatting object.</p>
<p>The children of each normal area returned by an fo:list-block
formatting object
must be normal <term>block-area</term>s returned by the children of the fo:list-block,
must be <term>properly stacked</term>, and
must be <term>properly ordered</term>.
</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
(<loc href="#fo_list-item" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">list-item</loc>+)
</eg>

<p>In addition this formatting object may have a sequence of
zero or more fo:markers as its initial children.</p>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="common-accessibility-properties"/></sitem>
<sitem><specref ref="common-aural-properties"/></sitem>
<sitem><specref ref="common-border-padding-and-background-properties"/></sitem>

<sitem><specref ref="common-margin-properties-block"/></sitem>
<sitem><specref ref="break-after"/></sitem>
<sitem><specref ref="break-before"/></sitem>
<sitem><specref ref="id"/></sitem>
<sitem><specref ref="keep-together"/></sitem>
<sitem><specref ref="keep-with-next"/></sitem>
<sitem><specref ref="keep-with-previous"/></sitem>
<sitem><specref ref="provisional-distance-between-starts"/></sitem>
<sitem><specref ref="provisional-label-separation"/></sitem>
<sitem><specref ref="relative-position"/></sitem>
</slist>
</div3>


<div3 id="fo_list-item"><head>fo:list-item</head>

<p><emph>Common Usage:</emph></p>
<p>The fo:list-item formatting object contains the label and the
body of an item in a list.</p>

<p><emph>Areas:</emph></p>
<p>The fo:list-item formatting object generates one or more
<term>normal</term> <term>block-area</term>s.
The fo:list-item returns these areas, any
<term>page-level-out-of-line</term> areas, and
any <term>reference-level-out-of-line</term> areas
returned by the children of the fo:list-item.</p>

<p><emph>Constraints:</emph></p>
<p>No area may have more than one normal child area
returned by the same fo:list-item formatting object.</p>
<p>The children of each normal area returned by an fo:list-block
formatting object must be normal <term>block-area</term>s returned by
the fo:list-item-label and the fo:list-item-body flow objects and
must be <term>properly ordered</term>.
Those returned by the fo:list-item-label
must be <term>properly stacked</term> and
those returned by the fo:list-item-body
must be <term>properly stacked</term>.
</p>
<p>The children of each normal area returned by an fo:list-block
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 <trait>relative-align</trait> trait.</p>
<p>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.
</p>
<note><p>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.</p>
</note>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
(<loc href="#fo_list-item-label" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">list-item-label</loc>,<loc href="#fo_list-item-body" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">list-item-body</loc>)
</eg>

<p>In addition this formatting object may have a sequence of
zero or more fo:markers as its initial children.</p>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="common-accessibility-properties"/></sitem>
<sitem><specref ref="common-aural-properties"/></sitem>
<sitem><specref ref="common-border-padding-and-background-properties"/></sitem>

<sitem><specref ref="common-margin-properties-block"/></sitem>
<sitem><specref ref="break-after"/></sitem>
<sitem><specref ref="break-before"/></sitem>
<sitem><specref ref="id"/></sitem>
<sitem><specref ref="keep-together"/></sitem>
<sitem><specref ref="keep-with-next"/></sitem>
<sitem><specref ref="keep-with-previous"/></sitem>

<sitem><specref ref="relative-align"/></sitem>
<sitem><specref ref="relative-position"/></sitem>
</slist>
</div3>


<div3 id="fo_list-item-body"><head>fo:list-item-body</head>

<p><emph>Common Usage:</emph></p>
<p>The fo:list-item-body formatting object contains the
content
of the body of a list-item.</p>

<p><emph>Areas:</emph></p>
<p>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.
</p>

<p><emph>Constraints:</emph></p>
<p>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.
</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
(<loc href="#block.fo.list" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">%block;</loc>)+
</eg>

<p>In addition this formatting object may have a sequence of
zero or more fo:markers as its initial children.</p>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="common-accessibility-properties"/></sitem>
<sitem><specref ref="id"/></sitem>
<sitem><specref ref="keep-together"/></sitem>
</slist>
</div3>


<div3 id="fo_list-item-label"><head>fo:list-item-label</head>

<p><emph>Common Usage:</emph></p>
<p>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.</p>

<p><emph>Areas:</emph></p>
<p>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.
</p>

<p><emph>Constraints:</emph></p>
<p>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.
</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
(<loc href="#block.fo.list" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">%block;</loc>)+
</eg>

<p>In addition this formatting object may have a sequence of
zero or more fo:markers as its initial children.</p>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="common-accessibility-properties"/></sitem>
<sitem><specref ref="id"/></sitem>
<sitem><specref ref="keep-together"/></sitem>
</slist>
</div3>


</div2>

<div2>
<head>Link and Multi Formatting Objects</head>

<div3><head>Introduction</head>
<p>The following classes of "dynamic" effects are covered by the
formatting objects included in this section:</p>
<ulist>
<item><p>One-directional single-target links.</p>
</item>
<item><p>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.
</p>
</item>
<item><p>The ability to switch between different property values, such
as color or font-weight, depending on a User Agent state, such as "hover".
</p>
</item>
</ulist>

<p>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.
</p>
<graphic source="MultiSTree.gif" xml:attributes="href source" show="embed" actuate="auto" xmlns:xlink="http://www.w3.org/TR/WD-xlink"/>
<p>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.</p>

<p>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.</p>

<div4><head>Examples</head>

<div5><head>Expandable/Collapsible Table of Contents</head>
<p>Input sample:</p>
<eg xml:space="preserve">
&lt;doc&gt;
  &lt;chapter&gt;&lt;title&gt;Chapter&lt;/title&gt;
    &lt;p&gt;Text&lt;/p&gt;
    &lt;section&gt;&lt;title&gt;Section&lt;/title&gt;
    &lt;p&gt;Text&lt;/p&gt;
    &lt;/section&gt;
    &lt;section&gt;&lt;title&gt;Section&lt;/title&gt;
    &lt;p&gt;Text&lt;/p&gt;
    &lt;/section&gt;
  &lt;/chapter&gt;
  &lt;chapter&gt;&lt;title&gt;Chapter&lt;/title&gt;
    &lt;p&gt;Text&lt;/p&gt;
    &lt;section&gt;&lt;title&gt;Section&lt;/title&gt;
    &lt;p&gt;Text&lt;/p&gt;
    &lt;/section&gt;
    &lt;section&gt;&lt;title&gt;Section&lt;/title&gt;
    &lt;p&gt;Text&lt;/p&gt;
    &lt;/section&gt;
  &lt;/chapter&gt;
&lt;/doc&gt;
</eg>
<p>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.</p>
<p>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.</p>
<p>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:simple-link referring to that id.</p>
<p>XSL Stylesheet:</p>
<eg xml:space="preserve">
&lt;?xml version='1.0'?&gt;
&lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:fo="http://www.w3.org/1999/XSL/Format"
                version='1.0'&gt;

&lt;xsl:template match="doc"&gt;
  &lt;!-- create the table of contents --&gt;
  &lt;xsl:apply-templates select="chapter/title" mode="toc"/&gt;
  &lt;!-- do the document --&gt;
  &lt;xsl:apply-templates/&gt;
&lt;/xsl:template&gt;

&lt;xsl:template match="chapter/title" mode="toc"&gt;
  &lt;fo:multi-switch&gt;
    &lt;fo:multi-case case-name="collapsed" case-title="collapsed"
    starting-state="show"&gt;
      &lt;fo:block&gt;
        &lt;fo:multi-toggle switch-to="expanded"&gt;
          &lt;fo:external-graphic href="plus-icon.gif"/&gt;
        &lt;/fo:multi-toggle&gt;
        &lt;fo:simple-link internal-destination="{generate-id(.)}"&gt;
          &lt;xsl:number level="multiple" count="chapter" format="1. "/&gt;
          &lt;xsl:apply-templates mode="toc"/&gt;
        &lt;/fo:simple-link&gt;
      &lt;/fo:block&gt;
    &lt;/fo:multi-case&gt;
    &lt;fo:multi-case case-name="expanded" case-title="expanded"
    starting-state="hide"&gt;
      &lt;fo:block&gt;
        &lt;fo:multi-toggle switch-to="collapsed"&gt;
          &lt;fo:external-graphic href="minus-icon.gif"/&gt;
        &lt;/fo:multi-toggle&gt;
        &lt;fo:simple-link internal-destination="{generate-id(.)}"&gt;
          &lt;xsl:number level="multiple" count="chapter" format="1. "/&gt;
          &lt;xsl:apply-templates mode="toc"/&gt;
        &lt;/fo:simple-link&gt;
      &lt;/fo:block&gt;
      &lt;xsl:apply-templates select="../section/title" mode="toc"/&gt;
    &lt;/fo:multi-case&gt;
  &lt;/fo:multi-switch&gt;
&lt;/xsl:template&gt;

&lt;xsl:template match="section/title" mode="toc"&gt;
  &lt;fo:block start-indent="10mm"&gt;
    &lt;fo:simple-link internal-destination="{generate-id(.)}"&gt;
      &lt;xsl:number level="multiple" count="chapter|section" format="1.1 "/&gt;
      &lt;xsl:apply-templates/&gt;
    &lt;/fo:simple-link&gt;
  &lt;/fo:block&gt;
&lt;/xsl:template&gt;

&lt;xsl:template match="chapter/title"&gt;
  &lt;fo:block id="{generate-id(.)}"&gt;
    &lt;xsl:number level="multiple" count="chapter" format="1. "/&gt;
    &lt;xsl:apply-templates/&gt;
  &lt;/fo:block&gt;
&lt;/xsl:template&gt;

&lt;xsl:template match="section/title"&gt;
  &lt;fo:block id="{generate-id(.)}"&gt;
    &lt;xsl:number level="multiple" count="chapter|section" format="1.1 "/&gt;
    &lt;xsl:apply-templates/&gt;
  &lt;/fo:block&gt;
&lt;/xsl:template&gt;

&lt;xsl:template match="p"&gt;
  &lt;fo:block&gt;
    &lt;xsl:apply-templates/&gt;
  &lt;/fo:block&gt;
&lt;/xsl:template&gt;

&lt;/xsl:stylesheet&gt;
</eg>
<p>Result Instance: elements and attributes in the fo:
namespace</p>
<eg xml:space="preserve">
&lt;fo:multi-switch&gt;
  &lt;fo:multi-case case-name="collapsed" case-title="collapsed" starting-state="show"&gt;
    &lt;fo:block&gt;
      &lt;fo:multi-toggle switch-to="expanded"&gt;
        &lt;fo:external-graphic href="plus-icon.gif"&gt;
        &lt;/fo:external-graphic&gt;
      &lt;/fo:multi-toggle&gt;
      &lt;fo:simple-link internal-destination="N4"&gt;1. Chapter
      &lt;/fo:simple-link&gt;
    &lt;/fo:block&gt;
  &lt;/fo:multi-case&gt;
  &lt;fo:multi-case case-name="expanded" case-title="expanded" starting-state="hide"&gt;
    &lt;fo:block&gt;
      &lt;fo:multi-toggle switch-to="collapsed"&gt;
        &lt;fo:external-graphic href="minus-icon.gif"&gt;
        &lt;/fo:external-graphic&gt;
      &lt;/fo:multi-toggle&gt;
      &lt;fo:simple-link internal-destination="N4"&gt;1. Chapter
      &lt;/fo:simple-link&gt;
    &lt;/fo:block&gt;
    &lt;fo:block start-indent="10mm"&gt;
      &lt;fo:simple-link internal-destination="N11"&gt;1.1 Section
      &lt;/fo:simple-link&gt;
    &lt;/fo:block&gt;
    &lt;fo:block start-indent="10mm"&gt;
      &lt;fo:simple-link internal-destination="N19"&gt;1.2 Section
      &lt;/fo:simple-link&gt;
    &lt;/fo:block&gt;
  &lt;/fo:multi-case&gt;
&lt;/fo:multi-switch&gt;
&lt;fo:multi-switch&gt;
  &lt;fo:multi-case case-name="collapsed" case-title="collapsed" starting-state="show"&gt;
    &lt;fo:block&gt;
      &lt;fo:multi-toggle switch-to="expanded"&gt;
        &lt;fo:external-graphic href="plus-icon.gif"&gt;
        &lt;/fo:external-graphic&gt;
      &lt;/fo:multi-toggle&gt;
      &lt;fo:simple-link internal-destination="N28"&gt;2. Chapter
      &lt;/fo:simple-link&gt;
    &lt;/fo:block&gt;
  &lt;/fo:multi-case&gt;
  &lt;fo:multi-case case-name="expanded" case-title="expanded" starting-state="hide"&gt;
    &lt;fo:block&gt;
      &lt;fo:multi-toggle switch-to="collapsed"&gt;
        &lt;fo:external-graphic href="minus-icon.gif"&gt;
        &lt;/fo:external-graphic&gt;
      &lt;/fo:multi-toggle&gt;
      &lt;fo:simple-link internal-destination="N28"&gt;2. Chapter
      &lt;/fo:simple-link&gt;
    &lt;/fo:block&gt;
    &lt;fo:block start-indent="10mm"&gt;
      &lt;fo:simple-link internal-destination="N35"&gt;2.1 Section
      &lt;/fo:simple-link&gt;
    &lt;/fo:block&gt;
    &lt;fo:block start-indent="10mm"&gt;
      &lt;fo:simple-link internal-destination="N43"&gt;2.2 Section
      &lt;/fo:simple-link&gt;
    &lt;/fo:block&gt;
  &lt;/fo:multi-case&gt;
&lt;/fo:multi-switch&gt;

&lt;fo:block id="N4"&gt;1. Chapter
&lt;/fo:block&gt;
&lt;fo:block&gt;Text
&lt;/fo:block&gt;
&lt;fo:block id="N11"&gt;1.1 Section
&lt;/fo:block&gt;
&lt;fo:block&gt;Text
&lt;/fo:block&gt;
&lt;fo:block id="N19"&gt;1.2 Section
&lt;/fo:block&gt;
&lt;fo:block&gt;Text
&lt;/fo:block&gt;
&lt;fo:block id="N28"&gt;2. Chapter
&lt;/fo:block&gt;
&lt;fo:block&gt;Text
&lt;/fo:block&gt;
&lt;fo:block id="N35"&gt;2.1 Section
&lt;/fo:block&gt;
&lt;fo:block&gt;Text
&lt;/fo:block&gt;
&lt;fo:block id="N43"&gt;2.2 Section
&lt;/fo:block&gt;
&lt;fo:block&gt;Text
&lt;/fo:block&gt;
</eg>
</div5>

<div5><head>Expandable/Collapsible Table of Contents</head>
<p>Input sample:</p>
<eg xml:space="preserve">
&lt;p&gt;Follow this &lt;xlink:mylink xmlns:xlink="http://www.w3.org/1999/xlink"
        xlink:href="http://w3.org/TR"
        xlink:title="An Example"
        xlink:show="new"
        xlink:actuate="onRequest"&gt;link&lt;/xlink:mylink&gt; to access all
TRs of the W3C.&lt;/p&gt;
</eg>
<p>In this example an fo:simple-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:simple-link that allows for the
merging
of the properties of the fo:multi-properties with those of the
appropriate fo:multi-property-sets.</p>
<p>XSL Stylesheet:</p>
<eg xml:space="preserve">
&lt;?xml version='1.0'?&gt;
&lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:fo="http://www.w3.org/1999/XSL/Format"
                version='1.0'&gt;

&lt;xsl:template match="p"&gt;
    &lt;fo:block&gt;
        &lt;xsl:apply-templates/&gt;
    &lt;/fo:block&gt;
&lt;/xsl:template&gt;

&lt;xsl:template match="xlink:mylink" xmlns:xlink="http://www.w3.org/1999/xlink"&gt;
    &lt;xsl:variable name="show"&gt;&lt;xsl:value-of select="@xlink:show"/&gt;
    &lt;/xsl:variable&gt;
     &lt;fo:multi-properties text-decoration="underline"&gt;
        &lt;fo:multi-property-set active-state="link" color="blue"/&gt;
        &lt;fo:multi-property-set active-state="visited" color="red"/&gt;
        &lt;fo:multi-property-set active-state="active" color="green"/&gt;
        &lt;fo:multi-property-set active-state="hover" text-decoration="blink"/&gt;
        &lt;fo:multi-property-set active-state="focus" color="yellow"/&gt;
        &lt;fo:wrapper color="merge-property-values()"
                    text-decoration="merge-property-values()"&gt;
              &lt;fo:simple-link external-destination="http://w3.org/TR"
                              show-destination="{$show}"&gt;
                  &lt;xsl:attribute name="role"&gt;
                      &lt;xsl:value-of select="@xlink:title"/&gt;
                  &lt;/xsl:attribute&gt;
                  &lt;xsl:apply-templates/&gt;
              &lt;/fo:simple-link&gt;
        &lt;/fo:wrapper&gt;
      &lt;/fo:multi-properties&gt;
&lt;/xsl:template&gt;

&lt;/xsl:stylesheet&gt;
</eg>
<p>Result Instance: elements and attributes in the fo:
namespace</p>
<eg xml:space="preserve">
&lt;fo:block"&gt;Follow this
  &lt;fo:multi-properties text-decoration="underline"&gt;
    &lt;fo:multi-property-set active-state="link" color="blue"&gt;
    &lt;/fo:multi-property-set&gt;
    &lt;fo:multi-property-set active-state="visited" color="red"&gt;
    &lt;/fo:multi-property-set&gt;
    &lt;fo:multi-property-set active-state="active" color="green"&gt;
    &lt;/fo:multi-property-set&gt;
    &lt;fo:multi-property-set active-state="hover" text-decoration="blink"&gt;
    &lt;/fo:multi-property-set&gt;
    &lt;fo:multi-property-set active-state="focus" color="yellow"&gt;
    &lt;/fo:multi-property-set&gt;
    &lt;fo:wrapper color="merge-property-values()"
      text-decoration="merge-property-values()"&gt;
      &lt;fo:simple-link external-destination="http://w3.org/TR"
        show-destination="new" role="An Example"&gt;link
      &lt;/fo:simple-link&gt;
    &lt;/fo:wrapper&gt;
  &lt;/fo:multi-properties&gt; to access all
TRs of the W3C.
&lt;/fo:block&gt;
</eg>
</div5>

</div4>
</div3>


<div3 id="fo_simple-link"><head>fo:simple-link</head>

<p><emph>Common Usage:</emph></p>
<p>The fo:simple-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.</p>

<p><emph>Areas:</emph></p>
<p>The fo:simple-link formatting object generates one or more
<term>normal</term> inline-areas.
The fo:simple-link returns these areas, any
<term>page-level-out-of-line</term> areas, and
any <term>reference-level-out-of-line</term> areas
returned by the children of the fo:simple-link.</p>
<note><p>An fo:simple-link may be displayed by enclosing
it in an fo:block.</p>
</note>

<p><emph>Constraints:</emph></p>
<p>No area may have more than one normal child area
returned by the same fo:simple-link formatting object.</p>
<p>The children of each normal area returned by an fo:simple-link
must satisfy the constraints specified in <specref ref="area-inlinebuild"/>.
</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
(#PCDATA|<loc href="#inline.fo.list" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">%inline;</loc>|<loc href="#block.fo.list" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">%block;</loc>)*
</eg>

<p>In addition this formatting object may have a sequence of
zero or more fo:markers as its initial children.</p>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="common-accessibility-properties"/></sitem>
<sitem><specref ref="common-aural-properties"/></sitem>
<sitem><specref ref="common-border-padding-and-background-properties"/></sitem>

<sitem><specref ref="common-margin-properties-inline"/></sitem>
<sitem><specref ref="alignment-adjust"/></sitem>
<sitem><specref ref="baseline-identifier"/></sitem>
<sitem><specref ref="baseline-shift"/></sitem>
<sitem><specref ref="destination-placement-offset"/></sitem>
<sitem><specref ref="dominant-baseline"/></sitem>
<sitem><specref ref="external-destination"/></sitem>
<sitem><specref ref="id"/></sitem>
<sitem><specref ref="indicate-destination"/></sitem>
<sitem><specref ref="internal-destination"/></sitem>
<sitem><specref ref="keep-with-next"/></sitem>
<sitem><specref ref="keep-with-previous"/></sitem>
<sitem><specref ref="line-height"/></sitem>
<sitem><specref ref="line-height-shift-adjustment"/></sitem>
<sitem><specref ref="relative-position"/></sitem>
<sitem><specref ref="show-destination"/></sitem>

</slist></div3>


<div3 id="fo_multi-switch"><head>fo:multi-switch</head>

<p><emph>Common Usage:</emph></p>
<p>The fo:multi-switch is used to switch between two or more
sub-trees of formatting objects.</p>
<p>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.</p>
<p>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.</p>
<note><p>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.</p>
</note>

<p><emph>Areas:</emph></p>
<p>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.</p>

<p><emph>Trait Derivation:</emph></p>
<p>The <trait>currently-visible-multi-case</trait> trait has as initial
value a reference to the first fo:multi-case child
that has a value of "show" of the <trait>starting-state</trait> trait.
If there is no such child, it has a value indicating that there is no
currently visible fo:multi-case.
The trait value may be changed by actuating an fo:multi-toggle.</p>

<p><emph>Constraints:</emph></p>
<p>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.</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
(<loc href="#fo_multi-case" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">multi-case</loc>+)
</eg>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="common-accessibility-properties"/></sitem>
<sitem><specref ref="auto-restore"/></sitem>
<sitem><specref ref="id"/></sitem>
</slist>
</div3>


<div3 id="fo_multi-case"><head>fo:multi-case</head>

<p><emph>Common Usage:</emph></p>
<p>The fo:multi-case is used to group formatting objects,
that the parent fo:multi-switch
can choose to either show or hide.</p>

<p><emph>Areas:</emph></p>
<p>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.
</p>

<p><emph>Constraints:</emph></p>
<p>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.
</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
(#PCDATA|<loc href="#inline.fo.list" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">%inline;</loc>|<loc href="#block.fo.list" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">%block;</loc>)*
</eg>

<p>The fo:multi-case may contain any formatting objects that
are permitted in the context
of the fo:multi-switch formatting object.
In particular,
it can contain fo:multi-toggle objects (at any depth), which controls the
fo:multi-case switching.</p>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="common-accessibility-properties"/></sitem>
<sitem><specref ref="id"/></sitem>
<sitem><specref ref="starting-state"/></sitem>
<sitem><specref ref="case-name"/></sitem>
<sitem><specref ref="case-title"/></sitem>
</slist>
</div3>


<div3 id="fo_multi-toggle"><head>fo:multi-toggle</head>

<p><emph>Common Usage:</emph></p>
<p>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.
</p>

<p><emph>Areas:</emph></p>
<p>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 <trait>switch-to</trait>
trait with the same value as on the returning fo:multi-toggle.
</p>

<p><emph>Constraints:</emph></p>
<p>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.
</p>
<p>Activating an area returned by an fo:multi-toggle causes a change
to the value of the <trait>currently-visible-multi-case</trait>
of the closest fo:multi-switch.</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
(#PCDATA|<loc href="#inline.fo.list" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">%inline;</loc>|<loc href="#block.fo.list" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">%block;</loc>)*
</eg>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="common-accessibility-properties"/></sitem>
<sitem><specref ref="id"/></sitem>
<sitem><specref ref="switch-to"/></sitem>
</slist>
</div3>


<div3 id="fo_multi-properties"><head>fo:multi-properties</head>

<p><emph>Common Usage:</emph></p>
<p>The fo:multi-properties is used to switch between two or more property sets that
are associated with a given portion of content.</p>
<note><p>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.
</p></note>
<p>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.</p>

<p><emph>Areas:</emph></p>
<p>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.
</p>

<p><emph>Constraints:</emph></p>
<p>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.
</p>


<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
(<loc href="#fo_multi-property-set" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">multi-property-set</loc>+,<loc href="#fo_wrapper" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">wrapper</loc>)
</eg>

<p>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.
</p>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="common-accessibility-properties"/></sitem>
<sitem><specref ref="id"/></sitem>
</slist>
</div3>


<div3 id="fo_multi-property-set"><head>fo:multi-property-set</head>

<p><emph>Common Usage:</emph></p>
<p>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.</p>

<p><emph>Areas:</emph></p>
<p>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.
</p>

<p><emph>Constraints:</emph></p>
<p>None.</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
EMPTY
</eg>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="id"/></sitem>
<sitem><specref ref="active-state"/></sitem>
</slist>
</div3>


</div2>

<div2>
<head>Out-of-Line Formatting Objects</head>

<div3><head>Introduction</head>
<div4><head>Floats</head>
<p>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 <specref ref="pg-out-of-line"/>
section of this introduction and in the description of the fo:float
formatting object.</p>
<p>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.</p>
<p>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.</p>
<p>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.</p>
</div4>
<div4><head>Footnotes</head>
<p>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.</p>
<p>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.</p>
</div4>
<div4 id="pg-out-of-line"><head>Conditional Sub-Regions</head>
<p>The region-body has two conditional sub-regions which implicitly
specify corresponding reference-areas called <term>before-float-reference-area</term> and
<term>footnote-reference-area</term>. 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".
</p>
<p>The conditionally generated areas borrow space in the
<term>block-progression-dimension</term> (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.
</p>
<p>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.
</p>
<p>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 <term>inline-progression-dimension</term> (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.
</p>
<p>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 a fo:static-content
specified in the page-sequence that is being used to format the page.</p>
<p>If there is a fo:static-content in a page-sequence whose "region-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.</p>
<p>If there is an fo:static-content whose "region-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.</p>
<p>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.
</p>
<p>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.</p>
</div4>

</div3>


<div3 id="fo_float"><head>fo:float</head>

<p><emph>Common Usage:</emph></p>
<p>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.</p>

<p><emph>Areas:</emph></p>
<p>The fo:float generates a single normal inline-area with no children,
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".)</p>
<p>An area with area-class "xsl-side-float" is placed as a child of
the nearest ancestor reference-area.</p>
<p>An area with area-class "xsl-before-float" is placed as a child of
a "before-float-reference-area".</p>

<p><emph>Constraints:</emph></p>
<p>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.</p>
<p>The term <term>anchor-area</term> is used here to mean the normal inline-area generated
by the fo:float.</p>
<p>No area may have more than one child block-area returned by the same
fo:float formatting object.</p>
<p>Areas with area-class "xsl-before-float" must be properly ordered within the
area tree relative to other areas with the same area-class.</p>
<p>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.</p>
<p>The following constraints apply to fo:float formatting objects that generate
areas with area-class "xsl-before-float":</p>
<ulist><item><p>It is an error if the fo:float occurs as a descendant of
an fo:static-flow, or of an fo:flow that is not assigned to a region-body,
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".</p></item>
<item><p>A block-area 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.</p></item>
<item><p>The fo:float may not generate any additional block-areas 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".</p></item>
<item><p>The "clear" property does not apply.</p></item></ulist>
<p>The following constraints apply to fo:float formatting objects that generate
areas with area-class "xsl-side-float":</p>
<ulist><item><p>The block-areas generated by the fo:float are placed
as children of the reference-area generated by the nearest ancestor
formatting object that generates a reference-area.</p></item>
<item><p>A block-area generated by one fo:float may not be placed so that
it overlaps another area with area-class "xsl-side-float".</p></item>
<item><p>The description in section 9.5 of <bibref ref="CSS2"/> shall
be used to determine the formatting of the fo:float and the rendering of
normal line-areas that overlap a block-area generated by the fo:float,
with these modifications:</p>
<ulist><item><p>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". </p></item>
<item><p>All references to top and bottom shall be interpreted as their
corresponding writing-mode relative directions "before" and "after".</p></item>
<item><p>The phrase "current line box" shall be interpreted to mean
the line-area that contains the anchor-area.</p></item>
<item><p>The areas generated by the fo:float derive their length in the
inline-progression-dimension intrinsically from their child areas; the
length is not determined by an explicit property value.</p></item>
<item><p>The length of an area generated by the fo:float, in the
inline-progression-dimension, increases either the start-intrusion-adjustment
or the end-intrusion-adjustment, depending on which side the area floats to,
of each child area of the nearest ancestor reference-area, provided the
border-rectangle of the child area overlaps the floated area in the
inline-progression-direction.</p></item>
</ulist>
</item></ulist>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
(<loc href="#block.fo.list" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">%block;</loc>)+
</eg>
<p>An fo:float is not permitted to have an fo:float, fo:footnote
or fo:marker as a descendant.</p>
<p>Additionally, an fo:float is not permitted to have as a descendant an
fo:block-container that generates an absolutely positioned area.</p>
<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="float"/></sitem>
<sitem><specref ref="clear"/></sitem>
</slist>
</div3>


<div3 id="fo_footnote"><head>fo:footnote</head>

<p><emph>Common Usage:</emph></p>
<p>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.</p>

<p><emph>Areas:</emph></p>
<p>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.</p>
<p>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".</p>

<p><emph>Constraints:</emph></p>
<p>The term <term>anchor-area</term> is defined to mean the last area that is
generated and returned by the fo:inline child of the fo:footnote.</p>
<p>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.</p>
<p>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:foonote, 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.</p>
<p>It is an error if the fo:footnote occurs as a descendant of an fo:static-flow, or
of an fo:flow that is not assigned to a region-body, 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.</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
(<loc href="#fo_inline" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">inline</loc>,<loc href="#fo_footnote-body" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">footnote-body</loc>)
</eg>

<p>An fo:footnote is not permitted to have an fo:float, fo:footnote,
or fo:marker as a descendant.</p>
<p>Additionally, an fo:footnote is not permitted to have as a descendant
an fo:block-container that generates an absolutely positioned area.</p>

</div3>


<div3 id="fo_footnote-body"><head>fo:footnote-body</head>

<p><emph>Common Usage:</emph></p>
<p>The fo:footnote-body is used to generate the footnote content.</p>

<p><emph>Areas:</emph></p>
<p>The fo:footnote-body generates and returns one or more block-level
areas with area-class "xsl-footnote".</p>

<p><emph>Constraints:</emph></p>
<p>The fo:footnote-body is only permitted as a child of an fo:footnote.</p>
<p>No area may have more than one child block-area returned by the same
fo:footnote-body formatting object.</p>
<p>Areas with area-class "xsl-footnote" must be properly ordered within the
area tree relative to other areas with the same area-class.</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
(<loc href="#block.fo.list" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">%block;</loc>)+
</eg>

</div3>


</div2>

<div2>
<head>Other Formatting Objects</head>

<div3><head>Introduction</head>
<p>The following example shows the use of the fo:wrapper
formatting object that has no semantics but acts as a
"carrier" for inherited properties.</p>
<div4><head>Example</head>
<p>Input sample:</p>
<eg xml:space="preserve">
&lt;doc&gt;
&lt;p&gt;This is an &lt;emph&gt;important word&lt;/emph&gt; in this
sentence that also refers to a &lt;code&gt;variable&lt;/code&gt;.&lt;/p&gt;
&lt;/doc&gt;
</eg>
<p>The "emph" elements are to be presented using a
bold
font and the "code" elements are using a Courier
font.</p>
<p>XSL Stylesheet:</p>
<eg xml:space="preserve">
&lt;?xml version='1.0'?&gt;
&lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:fo="http://www.w3.org/1999/XSL/Format"
                version='1.0'&gt;

&lt;xsl:template match="p"&gt;
  &lt;fo:block&gt;
    &lt;xsl:apply-templates/&gt;
  &lt;/fo:block&gt;
&lt;/xsl:template&gt;

&lt;xsl:template match="emph"&gt;
  &lt;fo:wrapper font-weight="bold"&gt;
    &lt;xsl:apply-templates/&gt;
  &lt;/fo:wrapper&gt;
&lt;/xsl:template&gt;

&lt;xsl:template match="code"&gt;
  &lt;fo:wrapper font-family="Courier"&gt;
    &lt;xsl:apply-templates/&gt;
  &lt;/fo:wrapper&gt;
&lt;/xsl:template&gt;

&lt;/xsl:stylesheet&gt;
</eg>
<p>fo: element and attribute tree:</p>
<eg xml:space="preserve">
&lt;fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"&gt;This is an
&lt;fo:wrapper font-weight="bold"&gt;important word&lt;/fo:wrapper&gt;
in this sentence that also refers to a
&lt;fo:wrapper font-family="Courier"&gt;variable&lt;/fo:wrapper&gt;.
&lt;/fo:block&gt;
</eg>
</div4>
</div3>


<div3 id="fo_wrapper"><head>fo:wrapper</head>

<p><emph>Common Usage:</emph></p>
<p>The fo:wrapper formatting object is used to
specify
inherited properties for a group of formatting objects.</p>

<p><emph>Areas:</emph></p>
<p>The fo:wrapper formatting object does not generate any 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.
</p>

<p><emph>Trait Derivation:</emph></p>
<p>Except for "id",
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.</p>

<p><emph>Constraints:</emph></p>
<p>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.
</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
(#PCDATA|<loc href="#inline.fo.list" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">%inline;</loc>|<loc href="#block.fo.list" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">%block;</loc>)*
</eg>

<p>In addition this formatting object may have a sequence of
zero or more fo:markers as its initial children.</p>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="id"/></sitem>
</slist>
</div3>


<div3 id="fo_marker"><head>fo:marker</head>

<p><emph>Common Usage:</emph></p>
<p>The fo:marker is used in conjunction with
fo:retrieve-marker to produce running headers or footers. Typical
examples include:</p>
<ulist>
<item><p>dictionary headers showing the first and last word defined on the page.</p></item>
<item><p>headers showing the page's chapter and section titles.</p></item>
</ulist>

<p><emph>Areas:</emph></p>
<p>The fo:marker does not directly produce any
area. Its children may be retrieved and formatted from within an
fo:static-content, using an fo:retrieve-marker whose
"retrieve-class-name" property value is the same as the
"marker-class-name" property value of this fo:marker.</p>

<p><emph>Constraints:</emph></p>
<p>An fo:marker is only permitted as the descendant of an fo:flow.</p>
<p>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.</p>
<p>It is an error if two or more fo:markers that share the same parent
have the same "marker-class-name" property value.</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
(#PCDATA|<loc href="#inline.fo.list" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">%inline;</loc>|<loc href="#block.fo.list" show="replace" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">%block;</loc>)*
</eg>
<p>An fo:marker may contain any formatting objects that are
permitted as a replacement of any fo:retrieve-marker that retrieves
the fo:marker's children.</p>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="marker-class-name"/></sitem>
</slist>
</div3>




<div3 id="fo_retrieve-marker"><head>fo:retrieve-marker</head>

<p><emph>Common Usage:</emph></p>
<p>The fo:retrieve-marker is used in
conjunction with fo:marker to produce running headers or footers.
Typical examples include:</p>
<ulist>
<item><p>dictionary headers showing the first and last word defined on the page.</p></item>
<item><p>headers showing the page's chapter and section titles.</p></item>
</ulist>

<p><emph>Areas:</emph></p>
<p>The fo:retrieve-marker does not directly generate any area.  It is
(conceptually) replaced by the children of the fo:marker that it retrieves.</p>

<p><emph>Trait Derivation:</emph></p>
<p>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.</p>

<p><emph>Constraints:</emph></p>
<p>An fo:retrieve-marker is only permitted as the descendant of an
fo:static-content.</p>
<p>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.</p>
<p>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 which is (conceptually) attached to the area that is
at the top of this hierarchy.</p>
<p>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.</p>
<p>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.</p>
<p>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.</p>
<p>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.</p>
<p>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.</p>
<p>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.</p>
<p>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.</p>
<p>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.</p>
<p>If the hierarchy of areas is empty, no formatting objects are retrieved.</p>

<p><emph>Contents:</emph></p>
<eg xml:space="preserve">
EMPTY
</eg>

<p><emph>The following properties apply to this formatting object:</emph></p><slist>
<sitem><specref ref="retrieve-class-name"/></sitem>
<sitem><specref ref="retrieve-position"/></sitem>
<sitem><specref ref="retrieve-boundary"/></sitem>
</slist>
</div3>



</div2>

</div1>
<div1 id="pr-section"><head>Formatting Properties</head>
<div2><head>Description of Property Groups</head>
<p>The following sections describe the properties of the XSL
formatting objects. </p>
<p>A number of properties are copied from the CSS2 specification.
In addition, the CSS2 errata all apply.  See <bibref ref="CSS2"/>.</p>
<ulist>

<item><p>The first eight sets of property definitions have been
arranged into groups based on similar functionality
and the fact that they apply to many formatting objects.
In the formatting object descriptions the group name is
referred to rather than referring to the individual properties.</p>
<ulist>

<item><p>Common Absolute Position Properties</p>
<p>This set of properties controls the position and size of formatted
areas with absolute positioning.</p>
</item>

<item><p>Common Aural Properties</p>
<p>This group of properties controls the aural rendition of the
content of a formatting object. They appear on all formatting objects
that contain content and other formatting objects that group other
formatting objects and where that grouping is necessary for
the understanding of the aural rendition. An example of the latter
is fo:table-and-caption.</p>
</item>

<item><p>Common Border, Padding, and Background Properties</p>
<p>This set of properties controls the backgrounds and borders on
the block-areas and inline-areas.</p>
</item>

<item><p>Common Font Properties</p>
<p>This set of properties controls the font selection on all formatting
objects that can contain text.</p>
</item>

<item><p>Common Hyphenation Properties</p>
<p>Control of hyphenation for line-breaking, including
language, script, and country. </p>
</item>

<item><p>Common Margin Properties-Block</p>
<p>These properties set the spacing and indents surrounding block-level
formatting objects.</p>
</item>

<item><p>Common Margin Properties-Inline</p>
<p>These properties set the spacing surrounding inline-level
formatting objects.</p>
</item>

</ulist>
</item>

<item><p>The remaining properties are used on a number of
formatting objects. These are arranged into clusters of similar
functionality to
organize the property descriptions. In the formatting object description
the individual properties are referenced.</p>
<ulist>

<item><p>Area Alignment Properties</p>
<p>Properties that control the alignment of inline-areas
with respect to each other, particularly in relation to
the mixing of different baselines for different scripts.
In addition, there are two properties: "display-align" and
"relative-align" that control the placement of block-areas.
</p>
</item>

<item><p>Area Dimension Properties</p>
<p>Properties that control the dimensions of both
block-areas and inline-areas.
</p>
</item>

<item><p>Block and Line-related Properties</p>
<p>Properties that govern the construction of line-areas and
the placement of these line-areas within containing
block-areas.
</p>
</item>

<item><p>Character Properties</p>
<p>Properties that govern the presentation of text,
including word-spacing, letter-spacing, and
word-space treatment and suppression.</p>
</item>

<item><p>Color-related Properties</p>
<p>Properties that govern color and color-model
selection.</p>
</item>

<item><p>Float-related properties</p>
<p>Properties governing the placement of both
side-floats (start- and end-floats) and before-floats
("top" floats in "lr-tb" writing-mode).</p>
</item>

<item><p>Keeps and Breaks Properties</p>
<p>Properties that control keeps and breaks across pages,
columns, and lines, including widow and orphan control and
keeping content together.</p>
</item>

<item><p>Layout-related Properties</p>
<p>These properties control what is "top"
("reference-orientation") as well as clipping, overflow, and
column-spanning conditions.
</p>
</item>

<item><p>Leader and Rule Properties</p>
<p>Properties governing the construction of leaders and
horizontal rules.</p>
</item>

<item><p>Properties for Links</p>
<p>Properties governing the presentation and actions associated
with links.</p>
</item>

<item><p>Properties for Markers</p>
<p>Properties governing the creation and retrieval of
markers.  Markers are used typically for "dictionary"
headers and footers.</p>
</item>

<item><p>Properties for Number to String Conversions</p>
<p>Properties used in the construction of page-numbers and
other formatter-based numbering.</p>
</item>

<item><p>Pagination and Layout Properties</p>
<p>These properties govern the sequencing, layout, and instantiation
of pages, including: the page size and orientation, sizes of regions
on the page-master, the identification and selection of page-masters,
division of the body region into columns, and the assignment of
content flows to layout regions.</p>
</item>

<item><p>Table Properties</p>
<p>Properties governing the layout and presentation
of tables.</p></item>

<item><p>Writing-mode-related Properties</p>
<p>Properties related to various aspects of
"directionality" and writing-mode influencing
block-progression-direction and
inline-progression-direction. </p></item>

<item><p>Miscellaneous Properties</p>
<p>These properties did not reasonably fit into any of the other
categories.</p>
</item>
</ulist>
</item>

<item><p>Shorthand Properties</p>
<p>Shorthand properties that are part of the complete
conformance set.  Shorthands expand to the individual
properties that may be used in place of shorthands.</p>
</item>
</ulist>
</div2>
<div2 id="cssbox"><head>XSL Areas and the CSS Box Model</head>
<p>This section describes how to interpret property descriptions which
incorporate the CSS2 definition of the same property. In CSS2, "boxes"
are generated by "elements" in the same way that XSL areas are generated
by formatting objects.  Any references in the CSS2 definition to "boxes"
are to be taken as referring to "areas" in the XSL area model, and where
"element" appears in a CSS2 definition it should be taken to refer to a
"formatting object".</p>
<p>The position and size of a box are normally taken to refer to the
position and size of the area's content-rectangle.  Additional
correspondences between the CSS2 Box Model and the XSL Area Model are
contained in the following table.</p>
<table>
<thead align="left" valign="top"><tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top">Box</td><td rowspan="1" colspan="1" align="left" valign="top">Area</td></tr></thead>
<tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top">top content edge</td><td rowspan="1" colspan="1" align="left" valign="top">top edge of the content-rectangle</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top">padding edge</td><td rowspan="1" colspan="1" align="left" valign="top">padding-rectangle</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top">content area</td><td rowspan="1" colspan="1" align="left" valign="top">interior of the content-rectangle</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top">padding area</td><td rowspan="1" colspan="1" align="left" valign="top">region between the content-rectangle and the padding-rectangle</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top">border area</td><td rowspan="1" colspan="1" align="left" valign="top">region between the padding-rectangle and the border-rectangle</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top">background</td><td rowspan="1" colspan="1" align="left" valign="top">background</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top">containing block</td><td rowspan="1" colspan="1" align="left" valign="top">closest ancestor block-area</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top">caption</td><td rowspan="1" colspan="1" align="left" valign="top">area generated by fo:table-caption</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top">inline box</td><td rowspan="1" colspan="1" align="left" valign="top">inline-area</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top">line box</td><td rowspan="1" colspan="1" align="left" valign="top">line-area</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top">block box</td><td rowspan="1" colspan="1" align="left" valign="top">block-area which is not a line-area</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top">page box</td><td rowspan="1" colspan="1" align="left" valign="top">page-area</td></tr>
</tbody>
</table>
<p>Box margins map to area traits in accordance with the description of how
area traits are computed from property values
in<specref ref="refinement"/>.</p>
</div2>



<div2 id="common-accessibility-properties">
<head>Common Accessibility Properties</head>

<div3 id="source-document"><head><quote>source-document</quote></head>
<p>XSL Definition:</p>
<table border="0"><tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Value:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">&lt;uri&gt;+ | none | inherit</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Initial:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">none</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Applies to:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">see prose</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Inherited:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">no</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Percentages:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">N/A</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Media:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">all</td></tr>
</tbody></table>

<p>Values have the following meanings:</p>
<glist><gitem><label>none</label><def><p>The source document is transient, unknown, or unspecified.</p></def></gitem>
<gitem><label>&lt;uri&gt;</label><def><p>A list of space-separated URIs, indicating the XML document(s)
used as input to the stylesheet.</p>
</def></gitem></glist>
<p>This property provides a pointer back to the original XML
document(s) used to create this formatting object tree. It is useful
for alternate renderers (aural readers, etc.) whenever the structure
of the formatting object tree is inappropriate for that renderer.</p>

</div3>

<div3 id="role"><head><quote>role</quote></head>
<p>XSL Definition:</p>
<table border="0"><tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Value:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">&lt;string&gt; | none | inherit</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Initial:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">none</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Applies to:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">see prose</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Inherited:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">no</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Percentages:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">N/A</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Media:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">all</td></tr>
</tbody></table>
<p>It is used by all formatting objects that can be
contained in fo:flow
or fo:static-content (all formatting objects that can be
directly created from an XML source element).</p>
<p>Values have the following meanings:</p>
<glist><gitem><label>none</label><def><p>Indicates that no semantic tag is cited by this
formatting object.</p></def></gitem>
<gitem><label>&lt;string&gt;</label><def><p>The value is a string representing a semantic that
may be used in rendering this formatting object.  It can,
for example, be an element name in some known semantic
vocabulary, such as HTML, or a particular Web Accessibility
Initiative (WAI) semantic vocabulary.
</p></def></gitem></glist>
<p>This provides a hint for alternate renderers (aural readers,
etc.) as to the role and potential alternate presentation of the
content of this formatting
object.</p>
<p>This property is not inherited, but all subsidiary nodes of this
formatting object that do not bear a role property should
utilize
the same alternate presentation properties. (It is not inherited
because knowledge of the start and end of the formatting object
subtree generated by the element may be needed by the renderer.)</p>


</div3>
</div2>

<div2 id="common-absolute-position-properties">
<head>Common Absolute Position Properties</head>

<div3 id="absolute-position"><head><quote>absolute-position</quote></head>
<css-cited border="thin"><p>Property Derived from a CSS2 Property.</p>
<table border="0"><tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Value:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">auto | absolute | fixed | inherit</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Initial:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">auto</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Applies to:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">fo:block-container</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Inherited:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">no</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Percentages:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">N/A</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Media:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">visual</td></tr>
</tbody></table>

<p>Values have the following meanings:</p>
<glist>
<gitem><label>auto</label><def><p>There is no absolute-positioning constraint. Positioning is
in accordance with the relative-position property.</p></def></gitem>
<gitem><label>absolute</label><def><p>The area's position (and possibly size) is specified with
the "left", "right", "top", and "bottom" properties. These properties
specify offsets with respect to the area's containing area. Absolutely
positioned areas are taken out of the normal flow. This means they
have no impact on the layout of later siblings. Also, though absolutely
positioned areas have margins, they do not collapse with any other margins.</p></def></gitem>
<gitem><label>fixed</label><def><p>The area's position is calculated according to the "absolute"
model, but in addition, the area is fixed with respect to some reference.
In the case of continuous media, the area is fixed with respect to
the viewport (and doesn't move when scrolled). In the case of paged
media, the area is fixed with respect to the page, even if that page is
seen through a viewport (in the case of a print-preview, for example).
Authors may wish to specify "fixed" in a media-dependent way. For
instance, an author may want an area to remain at the top the viewport
on the screen, but not at the top of each printed page.</p></def></gitem>
</glist>

<p>The following additional restrictions apply for paged
presentations:</p>
<ulist>
<item><p>Only objects with absolute-position="auto"
may have page/column breaks. </p>
<p>For other values any
keep and break properties are ignored.</p>
</item>
<item><p>The area generated is a descendant of the page-area where the
first area from the object would have been placed had the object had
absolute-posiiton="auto" specified.</p>
</item>
</ulist>

</css-cited>
</div3>


<div3 id="top"><head><quote>top</quote></head>
<css-cited border="medium"><p>CSS2 Definition:</p>
<table border="0"><tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Value:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">&lt;length&gt; | &lt;percentage&gt; | auto | inherit</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Initial:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">auto</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Applies to:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">positioned elements</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Inherited:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">no</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Percentages:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">refer to height of containing block</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Media:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">visual</td></tr>
</tbody></table>
<p>CSS2 Reference:
<xspecref href="http://www.w3.org/TR/REC-CSS2/visuren.html#propdef-top" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">http://www.w3.org/TR/REC-CSS2/visuren.html#propdef-top</xspecref>.
</p>


<p>The "top" property specifies how far a box's top content edge
is offset below the top edge of the box's containing block.</p></css-cited>
<p><emph>XSL modifications to the CSS definition:</emph></p>
<p>See definition of property left (<specref ref="left"/>).</p>



</div3>
<div3 id="right"><head><quote>right</quote></head>
<css-cited border="medium"><p>CSS2 Definition:</p>
<table border="0"><tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Value:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">&lt;length&gt; | &lt;percentage&gt; | auto | inherit</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Initial:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">auto</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Applies to:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">positioned elements</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Inherited:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">no</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Percentages:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">refer to height of containing block</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Media:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">visual</td></tr>
</tbody></table>
<p>CSS2 Reference:
<xspecref href="http://www.w3.org/TR/REC-CSS2/visuren.html#propdef-right" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">http://www.w3.org/TR/REC-CSS2/visuren.html#propdef-right</xspecref>.
</p>


<p>The "right" property specifies how far a box's right content
edge is offset to the left of the right edge of the box's containing
block.</p></css-cited>
<p><emph>XSL modifications to the CSS definition:</emph></p>
<p>See definition of property left (<specref ref="left"/>).</p>


</div3>

<div3 id="bottom"><head><quote>bottom</quote></head>
<css-cited border="medium"><p>CSS2 Definition:</p>
<table border="0"><tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Value:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">&lt;length&gt; | &lt;percentage&gt; | auto | inherit</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Initial:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">auto</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Applies to:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">positioned elements</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Inherited:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">no</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Percentages:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">refer to height of containing block</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Media:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">visual</td></tr>
</tbody></table>
<p>CSS2 Reference:
<xspecref href="http://www.w3.org/TR/REC-CSS2/visuren.html#propdef-bottom" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">http://www.w3.org/TR/REC-CSS2/visuren.html#propdef-bottom</xspecref>.
</p>


<p>The "bottom" property specifies how far a box's bottom content
edge is offset above the bottom of the box's containing block.</p></css-cited>
<p><emph>XSL modifications to the CSS definition:</emph></p>
<p>See definition of property left (<specref ref="left"/>).</p>


</div3>

<div3 id="left"><head><quote>left</quote></head>
<css-cited border="medium"><p>CSS2 Definition:</p>
<table border="0"><tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Value:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">&lt;length&gt; | &lt;percentage&gt; | auto | inherit</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Initial:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">auto</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Applies to:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">positioned elements</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Inherited:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">no</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Percentages:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">refer to height of containing block</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Media:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">visual</td></tr>
</tbody></table>
<p>CSS2 Reference:
<xspecref href="http://www.w3.org/TR/REC-CSS2/visuren.html#propdef-left" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">http://www.w3.org/TR/REC-CSS2/visuren.html#propdef-left</xspecref>.
</p>


<p>The "left" property specifies how far a box's left content edge
is offset to the right of the left edge of the box's containing
block.</p>
<p>The values of the four (position offset) properties have the
following meanings:</p>
<glist><gitem><label>auto</label><def><p>The effect of this value depends on which of related properties
have the value "auto" as well. See the sections on the width and
height of absolutely positioned, non-replaced elements for details.</p></def></gitem>
<gitem><label>&lt;length&gt;</label><def><p>The offset is a fixed distance from the reference edge.</p></def></gitem>
<gitem><label>&lt;percentage&gt;</label><def><p>The offset is a percentage of the containing block's width
(for "left" or "right") or "height" (for "top" and "bottom"). For
"top" and "bottom", if the "height" of the containing block is not
specified explicitly (i.e., it depends on content height), the percentage
value is interpreted like "auto".</p></def></gitem></glist>
<p>For absolutely positioned boxes, the offsets are with respect
to the box's containing block. For relatively positioned boxes,
the offsets are with respect to the outer edges of the box itself
(i.e., the box is given a position in the normal flow, then offset
from that position according to these properties).</p></css-cited>
<p><emph>XSL modifications to the CSS definition:</emph></p>
<p>These properties set the position of the content-rectangle
of the associated area.</p>

<p>If both "top" and "bottom" are specified, the height of the
content-rectangle is overridden. If both "left" and "right" are specified,
the width of the content-rectangle is overridden.</p>



</div3>

</div2>

<div2 id="common-aural-properties"><head>Common Aural Properties</head>
<div3 id="azimuth"><head><quote>azimuth</quote></head>
<css-cited border="medium"><p>CSS2 Definition:</p>
<table border="0"><tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Value:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">&lt;angle&gt; | [[ left-side | far-left | left
| center-left | center | center-right | right | far-right | right-side
] || behind ] | leftwards | rightwards | inherit</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Initial:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">center</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Applies to:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">all elements</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Inherited:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">yes</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Percentages:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">N/A</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Media:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">aural</td></tr>
</tbody></table>
<p>CSS2 Reference:
<xspecref href="http://www.w3.org/TR/REC-CSS2/aural.html#propdef-azimuth" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">http://www.w3.org/TR/REC-CSS2/aural.html#propdef-azimuth</xspecref>.
</p>
</css-cited>
</div3>

<div3 id="cue-after"><head><quote>cue-after</quote></head>
<css-cited border="medium"><p>CSS2 Definition:</p>
<table border="0"><tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Value:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">&lt;uri&gt; | none | inherit </td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Initial:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">none</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Applies to:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">all elements</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Inherited:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">no</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Percentages:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">N/A</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Media:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">aural</td></tr>
</tbody></table>
<p>CSS2 Reference:
<xspecref href="http://www.w3.org/TR/REC-CSS2/aural.html#propdef-cue-after" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">http://www.w3.org/TR/REC-CSS2/aural.html#propdef-cue-after</xspecref>.
</p>
</css-cited>
</div3>

<div3 id="cue-before"><head><quote>cue-before</quote></head>
<css-cited border="medium"><p>CSS2 Definition:</p>
<table border="0"><tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Value:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">&lt;uri&gt; | none | inherit </td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Initial:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">none</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Applies to:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">all elements</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Inherited:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">no</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Percentages:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">N/A</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Media:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">aural</td></tr>
</tbody></table>
<p>CSS2 Reference:
<xspecref href="http://www.w3.org/TR/REC-CSS2/aural.html#propdef-cue-before" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">http://www.w3.org/TR/REC-CSS2/aural.html#propdef-cue-before</xspecref>.
</p>
</css-cited>
</div3>

<div3 id="elevation"><head><quote>elevation</quote></head>
<css-cited border="medium"><p>CSS2 Definition:</p>
<table border="0"><tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Value:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">&lt;angle&gt; | below | level | above | higher
| lower | inherit</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Initial:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">level</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Applies to:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">all elements</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Inherited:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">yes</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Percentages:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">N/A</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Media:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">aural</td></tr>
</tbody></table>
<p>CSS2 Reference:
<xspecref href="http://www.w3.org/TR/REC-CSS2/aural.html#propdef-elevation" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">http://www.w3.org/TR/REC-CSS2/aural.html#propdef-elevation</xspecref>.
</p>
</css-cited>
</div3>

<div3 id="pause-after"><head><quote>pause-after</quote></head>
<css-cited border="medium"><p>CSS2 Definition:</p>
<table border="0"><tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Value:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">&lt;time&gt; | &lt;percentage&gt; | inherit</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Initial:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">depends on user agent</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Applies to:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">all elements</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Inherited:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">no</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Percentages:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">see prose </td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Media:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">aural</td></tr>
</tbody></table>
<p>CSS2 Reference:
<xspecref href="http://www.w3.org/TR/REC-CSS2/aural.html#propdef-pause-after" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">http://www.w3.org/TR/REC-CSS2/aural.html#propdef-pause-after</xspecref>.
</p>
</css-cited>
</div3>
<div3 id="pause-before"><head><quote>pause-before</quote></head>
<css-cited border="medium"><p>CSS2 Definition:</p>
<table border="0"><tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Value:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">&lt;time&gt; | &lt;percentage&gt; | inherit</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Initial:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">depends on user agent</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Applies to:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">all elements</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Inherited:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">no</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Percentages:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">see prose </td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Media:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">aural</td></tr>
</tbody></table>
<p>CSS2 Reference:
<xspecref href="http://www.w3.org/TR/REC-CSS2/aural.html#propdef-pause-before" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">http://www.w3.org/TR/REC-CSS2/aural.html#propdef-pause-before</xspecref>.
</p>
</css-cited>
</div3>
<div3 id="pitch"><head><quote>pitch</quote></head>
<css-cited border="medium"><p>CSS2 Definition:</p>
<table border="0"><tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Value:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">&lt;frequency&gt; | x-low | low | medium | high
| x-high | inherit</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Initial:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">medium</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Applies to:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">all elements</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Inherited:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">yes</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Percentages:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">N/A</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Media:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">aural</td></tr>
</tbody></table>
<p>CSS2 Reference:
<xspecref href="http://www.w3.org/TR/REC-CSS2/aural.html#propdef-pitch" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">http://www.w3.org/TR/REC-CSS2/aural.html#propdef-pitch</xspecref>.
</p>
</css-cited>
</div3>
<div3 id="pitch-range"><head><quote>pitch-range</quote></head>
<css-cited border="medium"><p>CSS2 Definition:</p>
<table border="0"><tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Value:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">&lt;number&gt; | inherit</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Initial:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">50</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Applies to:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">all elements</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Inherited:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">yes</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Percentages:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">N/A</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Media:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">aural</td></tr>
</tbody></table>
<p>CSS2 Reference:
<xspecref href="http://www.w3.org/TR/REC-CSS2/aural.html#propdef-pitch-range" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">http://www.w3.org/TR/REC-CSS2/aural.html#propdef-pitch-range</xspecref>.
</p>
</css-cited>
</div3>
<div3 id="play-during"><head><quote>play-during</quote></head>
<css-cited border="medium"><p>CSS2 Definition:</p>
<table border="0"><tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Value:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">&lt;uri&gt; mix? repeat? | auto | none | inherit </td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Initial:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">auto</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Applies to:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">all elements</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Inherited:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">no</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Percentages:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">N/A</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Media:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">aural</td></tr>
</tbody></table>
<p>CSS2 Reference:
<xspecref href="http://www.w3.org/TR/REC-CSS2/aural.html#propdef-play-during" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">http://www.w3.org/TR/REC-CSS2/aural.html#propdef-play-during</xspecref>.
</p>
</css-cited>
</div3>
<div3 id="richness"><head><quote>richness</quote></head>
<css-cited border="medium"><p>CSS2 Definition:</p>
<table border="0"><tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Value:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">&lt;number&gt; | inherit</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Initial:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">50</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Applies to:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">all elements</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Inherited:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">yes</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Percentages:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">N/A</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Media:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">aural</td></tr>
</tbody></table>
<p>CSS2 Reference:
<xspecref href="http://www.w3.org/TR/REC-CSS2/aural.html#propdef-richness" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">http://www.w3.org/TR/REC-CSS2/aural.html#propdef-richness</xspecref>.
</p>
</css-cited>
</div3>
<div3 id="speak"><head><quote>speak</quote></head>
<css-cited border="medium"><p>CSS2 Definition:</p>
<table border="0"><tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Value:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">normal | none | spell-out | inherit</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Initial:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">normal</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Applies to:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">all elements</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Inherited:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">yes</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Percentages:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">N/A</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Media:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">aural</td></tr>
</tbody></table>
<p>CSS2 Reference:
<xspecref href="http://www.w3.org/TR/REC-CSS2/aural.html#propdef-speak" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">http://www.w3.org/TR/REC-CSS2/aural.html#propdef-speak</xspecref>.
</p>
</css-cited>
</div3>
<div3 id="speak-header"><head><quote>speak-header</quote></head>
<css-cited border="medium"><p>CSS2 Definition:</p>
<table border="0"><tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Value:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">once | always | inherit</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Initial:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">once</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Applies to:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">elements that have table header information</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Inherited:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">yes</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Percentages:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">N/A</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Media:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">aural</td></tr>
</tbody></table>
<p>CSS2 Reference:
<xspecref href="http://www.w3.org/TR/REC-CSS2/tables.html#propdef-speak-header" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">http://www.w3.org/TR/REC-CSS2/tables.html#propdef-speak-header</xspecref>.
</p>
</css-cited>
</div3>
<div3 id="speak-numeral"><head><quote>speak-numeral</quote></head>
<css-cited border="medium"><p>CSS2 Definition:</p>
<table border="0"><tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Value:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">digits | continuous | inherit</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Initial:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">continuous</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Applies to:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">all elements</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Inherited:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">yes</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Percentages:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">N/A</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Media:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">aural</td></tr>
</tbody></table>
<p>CSS2 Reference:
<xspecref href="http://www.w3.org/TR/REC-CSS2/aural.html#propdef-speak-numeral" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">http://www.w3.org/TR/REC-CSS2/aural.html#propdef-speak-numeral</xspecref>.
</p>
</css-cited>
</div3>
<div3 id="speak-punctuation"><head><quote>speak-punctuation</quote></head>
<css-cited border="medium"><p>CSS2 Definition:</p>
<table border="0"><tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Value:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">code | none | inherit</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Initial:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">none</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Applies to:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">all elements</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Inherited:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">yes</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Percentages:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">N/A</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Media:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">aural</td></tr>
</tbody></table>
<p>CSS2 Reference:
<xspecref href="http://www.w3.org/TR/REC-CSS2/aural.html#propdef-speak-punctuation" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">http://www.w3.org/TR/REC-CSS2/aural.html#propdef-speak-punctuation</xspecref>.
</p>
</css-cited>
</div3>
<div3 id="speech-rate"><head><quote>speech-rate</quote></head>
<css-cited border="medium"><p>CSS2 Definition:</p>
<table border="0"><tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Value:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">&lt;number&gt; | x-slow | slow | medium | fast
| x-fast | faster | slower | inherit</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Initial:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">medium</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Applies to:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">all elements</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Inherited:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">yes</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Percentages:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">N/A</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Media:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">aural</td></tr>
</tbody></table>
<p>CSS2 Reference:
<xspecref href="http://www.w3.org/TR/REC-CSS2/aural.html#propdef-speech-rate" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">http://www.w3.org/TR/REC-CSS2/aural.html#propdef-speech-rate</xspecref>.
</p>
</css-cited>
</div3>
<div3 id="stress"><head><quote>stress</quote></head>
<css-cited border="medium"><p>CSS2 Definition:</p>
<table border="0"><tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Value:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">&lt;number&gt; | inherit</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Initial:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">50</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Applies to:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">all elements</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Inherited:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">yes</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Percentages:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">N/A</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Media:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">aural</td></tr>
</tbody></table>
<p>CSS2 Reference:
<xspecref href="http://www.w3.org/TR/REC-CSS2/aural.html#propdef-stress" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">http://www.w3.org/TR/REC-CSS2/aural.html#propdef-stress</xspecref>.
</p>
</css-cited>
</div3>
<div3 id="voice-family"><head><quote>voice-family</quote></head>
<css-cited border="medium"><p>CSS2 Definition:</p>
<table border="0"><tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Value:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">[[&lt;specific-voice&gt; | &lt;generic-voice&gt;
],]* [&lt;specific-voice&gt; | &lt;generic-voice&gt; ] | inherit</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Initial:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">depends on user agent</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Applies to:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">all elements</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Inherited:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">yes</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Percentages:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">N/A</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Media:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">aural</td></tr>
</tbody></table>
<p>CSS2 Reference:
<xspecref href="http://www.w3.org/TR/REC-CSS2/aural.html#propdef-voice-family" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">http://www.w3.org/TR/REC-CSS2/aural.html#propdef-voice-family</xspecref>.
</p>
</css-cited>
</div3>
<div3 id="volume"><head><quote>volume</quote></head>
<css-cited border="medium"><p>CSS2 Definition:</p>
<table border="0"><tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Value:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">&lt;number&gt; | &lt;percentage&gt; | silent | x-soft
| soft | medium | loud | x-loud | inherit</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Initial:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">medium</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Applies to:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">all elements</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Inherited:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">yes</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Percentages:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">refer to inherited value</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Media:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">aural</td></tr>
</tbody></table>
<p>CSS2 Reference:
<xspecref href="http://www.w3.org/TR/REC-CSS2/aural.html#propdef-volume" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">http://www.w3.org/TR/REC-CSS2/aural.html#propdef-volume</xspecref>.
</p>
</css-cited>
</div3></div2>

<div2 id="common-border-padding-and-background-properties">
<head>Common Border, Padding, and Background Properties</head>
<p>The following common-border-padding-and-background-properties
are taken from CSS2. Those "border", "padding", and "background"
properties that have a before, after, start, or end suffix are writing-mode
relative and are XSL-only properties.</p>


<div3 id="background-attachment"><head><quote>background-attachment</quote></head>
<css-cited border="medium"><p>CSS2 Definition:</p>
<table border="0"><tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Value:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">scroll | fixed | inherit</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Initial:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">scroll</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Applies to:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">all elements</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Inherited:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">no</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Percentages:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">N/A</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Media:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">visual</td></tr>
</tbody></table>
<p>CSS2 Reference:
<xspecref href="http://www.w3.org/TR/REC-CSS2/colors.html#propdef-background-attachment" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">http://www.w3.org/TR/REC-CSS2/colors.html#propdef-background-attachment</xspecref>.
</p>

<glist><gitem><label>scroll</label><def><p>The background-image may scroll with the enclosing object.</p></def></gitem>
<gitem><label>fixed</label><def><p>The background-image is to be fixed within the viewable
area of the enclosing object.</p></def></gitem></glist>
<p>If a background-image is specified, this property specifies
whether it is fixed with regard to the viewport (fixed) or scrolls
along with the document (scroll).</p>
<p>Even if the image is fixed, it is still only visible when it
is in the background or padding area of the element. Thus, unless
the image is tiled ("background-repeat: repeat"), it may be invisible.</p>
<p>User agents may treat fixed as scroll. However, it is recommended
they interpret fixed correctly, at least for the HTML and BODY elements,
since there is no way for an author to provide an image only for
those browsers that support fixed. See the section on conformance
for details.</p></css-cited>
<p><emph>XSL modifications to the CSS definition:</emph></p>

<p>The last paragraph in the CSS description does not apply.</p>



</div3>

<div3 id="background-color"><head><quote>background-color</quote></head>
<css-cited border="medium"><p>CSS2 Definition:</p>
<table border="0"><tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Value:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">&lt;color&gt; | transparent | inherit</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Initial:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">transparent</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Applies to:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">all elements</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Inherited:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">no</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Percentages:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">N/A</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Media:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">visual</td></tr>
</tbody></table>
<p>CSS2 Reference:
<xspecref href="http://www.w3.org/TR/REC-CSS2/colors.html#propdef-background-color" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">http://www.w3.org/TR/REC-CSS2/colors.html#propdef-background-color</xspecref>.
</p>


<p>This property sets the background color of an element, either
a &lt;color&gt; value or the keyword transparent, to make the underlying
colors shine through.</p>
<glist><gitem><label>transparent</label><def><p>The underlying colors will shine through.</p></def></gitem>
<gitem><label>&lt;color&gt;</label><def><p>Any valid color specification.</p>
</def></gitem></glist></css-cited>
<p><emph>XSL modifications to the CSS definition:</emph></p>

<p>XSL adds an "icc-color" function as a valid value of this property.</p>


</div3>

<div3 id="background-image"><head><quote>background-image</quote></head>
<css-cited border="medium"><p>CSS2 Definition:</p>
<table border="0"><tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Value:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">&lt;uri&gt; | none | inherit</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Initial:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">none</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Applies to:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">all elements</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Inherited:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">no</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Percentages:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">N/A</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Media:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">visual</td></tr>
</tbody></table>
<p>CSS2 Reference:
<xspecref href="http://www.w3.org/TR/REC-CSS2/colors.html#propdef-background-image" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">http://www.w3.org/TR/REC-CSS2/colors.html#propdef-background-image</xspecref>.
</p>


<p>This property sets the background image of an element. When setting
a "background-image", authors should also specify a background-color
that will be used when the image is unavailable. When the image
is available, it is rendered on top of the background color. (Thus,
the color is visible in the transparent parts of the image).</p>
<p>Values for this property are either &lt;uri&gt;, to specify the
image, or "none", when no image is used.</p>
<glist><gitem><label>none</label><def><p>No image is specified.</p></def></gitem>
<gitem><label>&lt;uri&gt;</label><def>
</def></gitem></glist>

</css-cited>
</div3>

<div3 id="background-repeat"><head><quote>background-repeat</quote></head>
<css-cited border="medium"><p>CSS2 Definition:</p>
<table border="0"><tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Value:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">repeat | repeat-x | repeat-y | no-repeat | inherit</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Initial:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">repeat</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Applies to:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">all elements</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Inherited:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">no</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Percentages:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">N/A</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Media:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">visual</td></tr>
</tbody></table>
<p>CSS2 Reference:
<xspecref href="http://www.w3.org/TR/REC-CSS2/colors.html#propdef-background-repeat" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">http://www.w3.org/TR/REC-CSS2/colors.html#propdef-background-repeat</xspecref>.
</p>


<p>If a background image is specified, this property specifies whether
the image is repeated (tiled), and how. All tiling covers the content
and padding areas of a box. Values have the following meanings:</p>
<glist><gitem><label>repeat</label><def><p>The image is repeated both horizontally and vertically.</p></def></gitem>
<gitem><label>repeat-x</label><def><p>The image is repeated horizontally only.</p></def></gitem>
<gitem><label>repeat-y</label><def><p>The image is repeated vertically only.</p></def></gitem>
<gitem><label>no-repeat</label><def><p>The image is not repeated: only one copy of the image is
drawn.</p></def></gitem></glist></css-cited>
<p><emph>XSL modifications to the CSS definition:</emph></p>
<p>"Horizontal" and "vertical" are defined relative to the
reference-orientation; "horizontal" is "left" to "right", and "vertical" is
"top" to "bottom".
</p>
<note><p>Thus for a rotated area the tiling is also rotated.
It is, however, independent of the writing-mode.
</p>
</note>



</div3>

<div3 id="background-position-horizontal"><head><quote>background-position-horizontal</quote></head>
<css-cited border="thin"><p>Property Derived from a CSS2 Property.</p>
<table border="0"><tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Value:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">&lt;percentage&gt; | &lt;length&gt; |
left | center | right | inherit</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Initial:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">0%</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Applies to:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">all formatting objects to which background applies</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Inherited:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">no</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Percentages:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">refer to the size of the padding-rectangle</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Media:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">visual</td></tr>
</tbody></table>

<p>If a "background-image" has been specified, this property specifies
its initial position horizontally.</p>


<glist>
<gitem><label>&lt;percentage&gt;</label>
<def>
<p>Specifies that a point, at the given percentage across the image
from left-to-right, shall be placed at a point at the given percentage
across, from left-to-right, the area's padding-rectangle.
</p>
<note>
<p>For example
with a value of 0%, the left-edge of the
image is aligned with the left-edge of the area's padding-rectangle.
A value of 100% places the right-edge of
the image aligned with the right-edge of the padding-rectangle.
With a value
of 14%, a point 14% across the image is
to be placed at a point 14% across the padding-rectangle.</p>
</note>
</def>
</gitem>
<gitem>
<label>&lt;length&gt;</label>
<def>
<p>Specifies that the left-edge of the image shall be placed
at the specified length to the right of the left-edge of the
padding-rectangle.</p>
<note>
<p>For example
with a value of 2cm, the left-edge of the
image is placed 2cm to the right of the left-edge of the
padding-rectangle.</p>
</note>
</def>
</gitem>
<gitem><label>left</label>
<def><p>Same as 0%.</p></def>
</gitem>
<gitem><label>center</label>
<def><p>Same as 50%.</p></def>
</gitem>
<gitem><label>right</label>
<def><p>Same as 100%.</p></def>
</gitem>
</glist>


</css-cited>
</div3>

<div3 id="background-position-vertical"><head><quote>background-position-vertical</quote></head>
<css-cited border="thin"><p>Property Derived from a CSS2 Property.</p>
<table border="0"><tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Value:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">&lt;percentage&gt; | &lt;length&gt; |
top | center | bottom | inherit</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Initial:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">0%</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Applies to:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">all formatting objects to which background applies</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Inherited:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">no</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Percentages:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">refer to the size of the padding-rectangle</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Media:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">visual</td></tr>
</tbody></table>

<p>If a "background-image" has been specified, this property specifies
its initial position vertically.</p>


<glist>
<gitem><label>&lt;percentage&gt;</label>
<def>
<p>Specifies that a point, at the given percentage down the image
from top-to-bottom, shall be placed at a point at the given percentage
down, from top-to-bottom, the area's padding-rectangle.
</p>
<note>
<p>For example
with a value of 0%, the top-edge of the
image is aligned with the top-edge of the area's padding-rectangle.
A value of 100% places the bottom-edge of
the image aligned with the bottom-edge of the padding-rectangle.
With a value
of 84%, a point 84% down the image is
to be placed at a point 84% down the padding-rectangle.</p>
</note>
</def>
</gitem>
<gitem>
<label>&lt;length&gt;</label>
<def>
<p>Specifies that the top-edge of the image shall be placed
at the specified length below the top-edge of the
padding-rectangle.</p>
<note>
<p>For example
with a value of 2cm, the top-edge of the
image is placed 2cm below the top-edge of the padding-rectangle.</p>
</note>
</def>
</gitem>
<gitem><label>top</label>
<def><p>Same as 0%.</p></def>
</gitem>
<gitem><label>center</label>
<def><p>Same as 50%.</p></def>
</gitem>
<gitem><label>bottom</label>
<def><p>Same as 100%.</p></def>
</gitem>
</glist>


</css-cited>
</div3>

<div3 id="border-before-color"><head><quote>border-before-color</quote></head>
<css-cited border="thin"><p>Writing-mode Relative Equivalent of CSS2 Property.</p>
<table border="0"><tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Value:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">&lt;color&gt; | inherit</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Initial:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">the value of the 'color' property</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Applies to:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">see prose</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Inherited:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">no</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Percentages:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">N/A</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Media:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">visual</td></tr>
</tbody></table>
<p>Specifies the color of the border
on the before-edge of a block-area or inline-area.</p>
<p>See definition of property border-top-color (<specref ref="border-top-color"/>).</p>
</css-cited>
</div3>

<div3 id="border-before-style"><head><quote>border-before-style</quote></head>
<css-cited border="thin"><p>Writing-mode Relative Equivalent of CSS2 Property.</p>
<table border="0"><tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Value:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">&lt;border-style&gt; | inherit</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Initial:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">none</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Applies to:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">see prose</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Inherited:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">no</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Percentages:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">N/A</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Media:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">visual</td></tr>
</tbody></table>

<p>Specifies the border-style for the before-edge.</p>

<p>See definition of property border-top-style (<specref ref="border-top-style"/>).</p>
</css-cited>
</div3>

<div3 id="border-before-width"><head><quote>border-before-width</quote></head>
<css-cited border="thin"><p>Writing-mode Relative Equivalent of CSS2 Property.</p>
<table border="0"><tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Value:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">&lt;border-width&gt; | &lt;length-conditional&gt; | inherit</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Initial:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">medium</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Applies to:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">see prose</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Inherited:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">no</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Percentages:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">N/A</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Media:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">visual</td></tr>
</tbody></table>

<p>Specifies the border-width for the before-edge.</p>

<p>See definition of property border-top-width (<specref ref="border-top-width"/>).</p>
</css-cited>
<p><emph>XSL modifications to the CSS definition:</emph></p>
<p>The following value type has been added for XSL:</p>
<glist><gitem><label>&lt;length-conditional&gt;</label><def><p>A compound value specifying the width and any conditionality
of the border for the before-edge.</p>
<p>The .length component is a &lt;length&gt;.
The .conditionality component may be set to "discard" or "retain" to
control if the border should be 0 or retained if it's associated
edge is a leading-edge in a reference-area for areas generated from
this formatting object that have an <trait>is-first</trait> value
of "false". See <specref ref="spacecond"/> for further details.
The initial value of the .conditionality component is "retain".</p>
</def></gitem>
</glist>

<note><p>If the border-style is "none" the computed value of the width
is forced to "0pt".</p>
</note>


</div3>

<div3 id="border-after-color"><head><quote>border-after-color</quote></head>
<css-cited border="thin"><p>Writing-mode Relative Equivalent of CSS2 Property.</p>
<table border="0"><tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Value:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">&lt;color&gt; | inherit</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Initial:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">the value of the 'color' property</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Applies to:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">see prose</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Inherited:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">no</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Percentages:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">N/A</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Media:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">visual</td></tr>
</tbody></table>
<p>Specifies the color of the border
on the after-edge of a block-area or inline-area.</p>
<p>See definition of property border-top-color (<specref ref="border-top-color"/>).</p>
</css-cited>
</div3>

<div3 id="border-after-style"><head><quote>border-after-style</quote></head>
<css-cited border="thin"><p>Writing-mode Relative Equivalent of CSS2 Property.</p>
<table border="0"><tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Value:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">&lt;border-style&gt; | inherit</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Initial:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">none</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Applies to:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">see prose</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Inherited:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">no</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Percentages:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">N/A</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Media:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">visual</td></tr>
</tbody></table>

<p>Specifies the border-style for the after-edge.</p>

<p>See definition of property border-top-style (<specref ref="border-top-style"/>).</p>
</css-cited>
</div3>

<div3 id="border-after-width"><head><quote>border-after-width</quote></head>
<css-cited border="thin"><p>Writing-mode Relative Equivalent of CSS2 Property.</p>
<table border="0"><tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Value:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">&lt;border-width&gt; | &lt;length-conditional&gt; | inherit</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Initial:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">medium</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Applies to:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">see prose</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Inherited:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">no</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Percentages:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">N/A</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Media:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">visual</td></tr>
</tbody></table>

<p>Specifies the border-width for the after-edge.</p>

<p>See definition of property border-top-width (<specref ref="border-top-width"/>).</p>
</css-cited>
<p><emph>XSL modifications to the CSS definition:</emph></p>
<p>The following value type has been added for XSL:</p>
<glist><gitem><label>&lt;length-conditional&gt;</label><def><p>A compound value specifying the width and any conditionality
of the border for the after-edge.</p>
<p>The .length component is a &lt;length&gt;.
The .conditionality component may be set to "discard" or "retain" to
control if the border should be 0 or retained if it's associated
edge is a trailing-edge in a reference-area for areas generated from
this formatting object that have an <trait>is-last</trait> value
of "false". See <specref ref="spacecond"/> for further details.
The initial value of the .conditionality component is "retain".</p>
</def></gitem>
</glist>

<note><p>If the border-style is "none" the computed value of the width
is forced to "0pt".</p>
</note>


</div3>

<div3 id="border-start-color"><head><quote>border-start-color</quote></head>
<css-cited border="thin"><p>Writing-mode Relative Equivalent of CSS2 Property.</p>
<table border="0"><tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Value:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">&lt;color&gt; | inherit</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Initial:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">the value of the 'color' property</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Applies to:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">see prose</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Inherited:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">no</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Percentages:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">N/A</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Media:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">visual</td></tr>
</tbody></table>
<p>Specifies the color of the border
on the start-edge of a block-area or inline-area.</p>
<p>See definition of property border-top-color (<specref ref="border-top-color"/>).</p>
</css-cited>
</div3>

<div3 id="border-start-style"><head><quote>border-start-style</quote></head>
<css-cited border="thin"><p>Writing-mode Relative Equivalent of CSS2 Property.</p>
<table border="0"><tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Value:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">&lt;border-style&gt; | inherit</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Initial:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">none</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Applies to:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">see prose</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Inherited:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">no</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Percentages:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">N/A</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Media:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">visual</td></tr>
</tbody></table>

<p>Specifies the border-style for the start-edge.</p>

<p>See definition of property border-top-style (<specref ref="border-top-style"/>).</p>
</css-cited>
</div3>

<div3 id="border-start-width"><head><quote>border-start-width</quote></head>
<css-cited border="thin"><p>Writing-mode Relative Equivalent of CSS2 Property.</p>
<table border="0"><tbody align="left" valign="top">
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Value:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">&lt;border-width&gt; | inherit</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Initial:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">medium</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Applies to:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">see prose</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Inherited:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">no</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Percentages:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">N/A</td></tr>
<tr align="left" valign="top"><td rowspan="1" colspan="1" align="left" valign="top"><emph>Media:  </emph></td><td rowspan="1" colspan="1" align="left" valign="top">visual</td></tr>
</tbody></table>

<p>Specifies the border-width for the start-edge.</p>
<note><p>If the border-style is "none" the computed value of the width
is forced to "0pt".</p