Properties
1. Introduction.
Approximately 250-260 properties are applicable to
the FOs that we are interested in. There is not much commonality,
but the majority of the properties are rather simple.
Properties will classify into a number of categories (such as
Length, LengthConditional, Space, etc). They will be primarily
responsible for initializing themselves.
foFormattingObject parses no attribute values, but is responsible
for assembling components for any one property into an array of
char *. There are not many compound properties; the rule of
thumb will be that as components are encountered during assembly,
they will be placed into the array in exactly the same positions
as they have in the specification property description.
2. Base Class.
All properties will inherit from foProperty, sometimes
at one remove. foFormattingObject makes utility methods for expression
parsing available to all properties.
3. Generic Types and Representation.
When an attribute value (or
an array of attribute values, for compound datatypes) is passed to
a property constructor, it will be resolved or promoted into the
following, _if_ that is the final type of the property:
| Generic Type | Represented As |
| <integer> | int |
| <number> | float |
| <length> | long (micrometers assumed) |
| <length-range> | 3 long values (minimum, optimum, maximum)
(micrometers assumed) |
| <length-conditional> | long (micrometers assumed),
enum conditionality |
| <length-bp-ip-direction> | 2 long values (micrometers assumed) |
| <space> | 3 long values (minimum, optimum, maximum)
(micrometers assumed), bool+int for
precedence, enum conditionality |
| <keep> | 3 values, each either "auto", "always",
or an int |
| <percentage> | whatever the final type is (usually length) |
| <color> | 3 unsigned short (red, green, blue)
(no ICC profiles for the moment) |
| <country> | enum country |
| <language> | enum language |
Not all of the generic types above require a base class representation.
This is only necessary if there is logic elsewhere that needs to treat
with properties as a general type. Spaces are really the principal
example, since any property may interact (resolve) with
another.
4. Properties lists in the formatting objects
Each formatting object has three lists:
- Specified properties - the actual raw string values as obtained from the
attributes. This is unique to this FO. Keys for properties are the property
names, values are the raw string values, plus sets of components in the case
of compound properties. Keys for the components are the component names,
values are the raw string values.
- The inheritable set - the inheritable properties, with values as they
apply to _this_ FO. The keys (property names) do _not_ vary from FO to FO;
the values (property instances) may or may not. Note that property instances
are called for because these are computed/actual values.
- The actual set - these are the properties that apply to _this_ FO. The
keys are property names; the values are property instances.
Relationships and Rules:
- The specified properties keys will be a subset of the actual set keys,
and a subset of the inheritable set keys.
- The inheritable set keys overlap with the actual set keys. They
intersect. Neither is a subset of the other.
- Property values may (will often) change during inheritance.
- The list of property names is maintained so we actually know what properties
apply to the current FO, when we build up the actual set, and reconcile the
actual set with the inheritable set.
5. Explanation of Properties with Percentages
- alignment-adjust: area height for
fo:external-graphic/fo:instream-foreign-object, font-size for fo:character,
line-height for all others;
- background-position: ignore because property is a shorthand;
- background-position-horizontal: horizontal size of padding rectangle;
- background-position-vertical: vertical size of padding rectangle;
- baseline-shift: line-height of parent area;
- block-progression-dimension: corresponding dimension of closest area
ancestor generated by a block-level formatting object (in case you're
wondering, yes, area traits include this kind of info);
- bottom: height of containing block;
- column-gap: inline-progression-dimension of region;
- column-width: as previous;
- content-height: intrinsic height;
- content-width: intrinsic width;
- end-indent: inline-progression-dimension of containing reference area;
- extent: corresponding height or width of page viewport area;
- font-size: parent font-size;
- height: height of containing block;
- inline-progression-dimension: corresponding dimension of closest area
ancestor generated by a block-level formatting object (yes, also
block-level);
- last-line-end-indent: inline-progression-dimension of closest ancestor
block area (which is not a line area also);
- leader-length: inline-progression-dimension of content-rectangle of
parent area;
- leader-pattern-width: inline-progression-dimension of content-rectangle
of parent area;
- left: width of containing block;
- line-height: element's computed font-size;
- max-height: ignore because property is a shorthand;
- max-width: ignore because property is a shorthand;
- min-height: ignore because property is a shorthand;
- min-width: ignore because property is a shorthand;
- provisional-distance-between-starts: inline-progression-dimension of
closest ancestor block-area that is not a line-area;
- provisional-label-separation: inline-progression-dimension of closest
ancestor block-area that is not a line-area;
- right: width of containing block;
- space-end: inline-progression-dimension of the closest ancestor
block-area;
- space-start: inline-progression-dimension of the closest ancestor
block-area;
- start-indent: inline-progression-dimension of containing reference area;
- text-altitude: font's em height;
- text-depth: font's em height;
- text-indent: width of containing block;
- top: height of containing block;
- vertical-align: line-height of element;
- width: width of containing block.
6. Space-like properties.
These are all the properties which have as the most complex
type, and therefore are stored and treated as such:
- letter-spacing
- line-height
- space-after
- space-before
- space-end
- space-start
- word-spacing
Note: for the margin-* properties we will have to assume a mapping from
the of the margin to the _optimum_ component of the
corresponding space-*.
7. Properties with no "inherit" keyword.
- case-name
- case-title
- character
- column-number
- column-width
- content-type
- destination-placement-offset
- ends-row
- external-destination
- flow-name
- format
- grouping-separator
- grouping-size
- id
- indicate-destination
- internal-destination
- letter-value
- marker-class-name
- master-name
- master-reference
- media-usage
- number-columns-repeated
- number-columns-spanned
- number-rows-spanned
- region-name
- retrieve-boundary
- retrieve-class-name
- retrieve-position
- rule-thickness
- show-destination
- starting-state
- starts-row
- switch-to
- table-omit-footer-at-break
- table-omit-header-at-break
- target-presentation-context
- target-processing-context
- target-stylesheet
8. Inheritable properties
- border-collapse
- border-separation
- caption-side
- color
- country
- direction
-
display-align
-
empty-cells
-
end-indent
-
font-family
-
font-selection-strategy
-
font-size
-
font-size-adjust
-
font-stretch
-
font-style
-
font-variant
-
font-weight
-
glyph-orientation-horizontal
-
glyph-orientation-vertical
-
hyphenate
-
hyphenation-character
-
hyphenation-keep
-
hyphenation-ladder-count
-
hyphenation-push-character-count
-
hyphenation-remain-character-count
-
intrusion-displace
-
keep-together
-
language
-
last-line-end-indent
-
leader-alignment
-
leader-length
-
leader-pattern
-
leader-pattern-width
-
letter-spacing
-
linefeed-treatment
-
line-height
-
line-height-shift-adjustment
-
line-stacking-strategy
-
orphans
-
provisional-distance-between-starts
-
provisional-label-separation
-
reference-orientation
-
relative-align
-
rule-style
-
rule-thickness
-
score-spaces
-
script
-
start-indent
-
text-align
-
text-align-last
-
text-indent
-
text-transform
-
visibility
-
white-space-collapse
-
white-space-treatment
-
widows
-
word-spacing
-
wrap-option
-
writing-mode
9. Corresponding Properties.
This section categorizes the corresponding properties
and their applicability to various FO's. It is the basis for
efficient processing of same in foFormattingObject::initProperties().
- Border and padding (portion of CBPB in table below)
-
border-after-color
-
border-before-color
-
border-end-color
-
border-start-color
-
border-after-style
-
border-before-style
-
border-end-style
-
border-start-style
-
border-after-width
-
border-before-width
-
border-end-width
-
border-start-width
-
padding-after
-
padding-before
-
padding-end
-
padding-start
- Spaces and margins (CMPB and CMPI in table below)
-
space-after
-
space-before
-
space-start
-
space-end
-
margin-top
-
margin-bottom
-
margin-left
-
margin-right
-
start-indent
-
end-indent
- Height and width (HW in table below)
-
height
-
min-height
-
max-height
-
width
-
min-width
-
max-width
-
inline-progression-dimension
-
block-progression-dimension
- Overconstrained Geometry
Adjust end-indent (if necessary) so that
start-indent + end-indent + inline-progression-dimension =
inline-progression-dimension of closest ancestor ref area
- Applicability to FOs
Only basic-link from the dynamic effects group is classified.
All other objects, from other groups, if _not_ listed here, have
none of the corresponding properties to worry about.
Legend
- CMPB: margin-*, space-after, space-before, start-indent, end-indent
-
CMPI: space-end, space-start
-
CBPB: Common Border, Padding, Background
-
B*: borders depending on 'border-collapse'
-
HW: Height/Width above
-
HWBPD: block-progression-direction portion of HW
| Bit positions: | 0 | 1 | 2 | 3 | 4 |
| simple-page-master: | | | CMPB | | |
| initial-property-set: | | CBPB | | | |
| region-body: | | CBPB | | | |
| region-after: | | CBPB | | | |
| region-before: | | CBPB | | | |
| region-start: | | CBPB | | | |
| region-end: | | CBPB | | | |
| block: | | CBPB | CMPB | | |
| table-and-caption: | | CBPB | CMPB | | |
| list-block: | | CBPB | CMPB | | |
| list-item: | | CBPB | CMPB | | |
| block-container: | | CBPB | CMPB | | HW |
| table: | | CBPB | CMPB | | HW |
| title: | | CBPB | | CMPI | |
| character: | | CBPB | | CMPI | |
| leader: | | CBPB | | CMPI | |
| page-number: | | CBPB | | CMPI | |
| page-number-citation: | | CBPB | | CMPI | |
| basic-link: | | CBPB | | CMPI | |
| external-graphic: | | CBPB | | CMPI | HW |
| instream-foreign-object: | | CBPB | | CMPI | HW |
| inline: | | CBPB | | CMPI | HW |
| inline-container: | | CBPB | | CMPI | HW |
| table-caption: | | CBPB | | | HW |
| table-cell: | | CBPB | | | HW |
| table-header: | B* | | | | |
| table-footer: | B* | | | | |
| table-body: | B* | | | | |
| table-column: | B* | | | | |
| table-row: | B* | | | | HWBPD |