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:

  1. 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.
  2. 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.
  3. 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:

5. Explanation of Properties with Percentages

  1. alignment-adjust: area height for fo:external-graphic/fo:instream-foreign-object, font-size for fo:character, line-height for all others;
  2. background-position: ignore because property is a shorthand;
  3. background-position-horizontal: horizontal size of padding rectangle;
  4. background-position-vertical: vertical size of padding rectangle;
  5. baseline-shift: line-height of parent area;
  6. 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);
  7. bottom: height of containing block;
  8. column-gap: inline-progression-dimension of region;
  9. column-width: as previous;
  10. content-height: intrinsic height;
  11. content-width: intrinsic width;
  12. end-indent: inline-progression-dimension of containing reference area;
  13. extent: corresponding height or width of page viewport area;
  14. font-size: parent font-size;
  15. height: height of containing block;
  16. inline-progression-dimension: corresponding dimension of closest area ancestor generated by a block-level formatting object (yes, also block-level);
  17. last-line-end-indent: inline-progression-dimension of closest ancestor block area (which is not a line area also);
  18. leader-length: inline-progression-dimension of content-rectangle of parent area;
  19. leader-pattern-width: inline-progression-dimension of content-rectangle of parent area;
  20. left: width of containing block;
  21. line-height: element's computed font-size;
  22. max-height: ignore because property is a shorthand;
  23. max-width: ignore because property is a shorthand;
  24. min-height: ignore because property is a shorthand;
  25. min-width: ignore because property is a shorthand;
  26. provisional-distance-between-starts: inline-progression-dimension of closest ancestor block-area that is not a line-area;
  27. provisional-label-separation: inline-progression-dimension of closest ancestor block-area that is not a line-area;
  28. right: width of containing block;
  29. space-end: inline-progression-dimension of the closest ancestor block-area;
  30. space-start: inline-progression-dimension of the closest ancestor block-area;
  31. start-indent: inline-progression-dimension of containing reference area;
  32. text-altitude: font's em height;
  33. text-depth: font's em height;
  34. text-indent: width of containing block;
  35. top: height of containing block;
  36. vertical-align: line-height of element;
  37. 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:

  1. letter-spacing
  2. line-height
  3. space-after
  4. space-before
  5. space-end
  6. space-start
  7. 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.

  1. case-name
  2. case-title
  3. character
  4. column-number
  5. column-width
  6. content-type
  7. destination-placement-offset
  8. ends-row
  9. external-destination
  10. flow-name
  11. format
  12. grouping-separator
  13. grouping-size
  14. id
  15. indicate-destination
  16. internal-destination
  17. letter-value
  18. marker-class-name
  19. master-name
  20. master-reference
  21. media-usage
  22. number-columns-repeated
  23. number-columns-spanned
  24. number-rows-spanned
  25. region-name
  26. retrieve-boundary
  27. retrieve-class-name
  28. retrieve-position
  29. rule-thickness
  30. show-destination
  31. starting-state
  32. starts-row
  33. switch-to
  34. table-omit-footer-at-break
  35. table-omit-header-at-break
  36. target-presentation-context
  37. target-processing-context
  38. target-stylesheet

8. Inheritable properties

  1. border-collapse
  2. border-separation
  3. caption-side
  4. color
  5. country
  6. direction
  7. display-align
  8. empty-cells
  9. end-indent
  10. font-family
  11. font-selection-strategy
  12. font-size
  13. font-size-adjust
  14. font-stretch
  15. font-style
  16. font-variant
  17. font-weight
  18. glyph-orientation-horizontal
  19. glyph-orientation-vertical
  20. hyphenate
  21. hyphenation-character
  22. hyphenation-keep
  23. hyphenation-ladder-count
  24. hyphenation-push-character-count
  25. hyphenation-remain-character-count
  26. intrusion-displace
  27. keep-together
  28. language
  29. last-line-end-indent
  30. leader-alignment
  31. leader-length
  32. leader-pattern
  33. leader-pattern-width
  34. letter-spacing
  35. linefeed-treatment
  36. line-height
  37. line-height-shift-adjustment
  38. line-stacking-strategy
  39. orphans
  40. provisional-distance-between-starts
  41. provisional-label-separation
  42. reference-orientation
  43. relative-align
  44. rule-style
  45. rule-thickness
  46. score-spaces
  47. script
  48. start-indent
  49. text-align
  50. text-align-last
  51. text-indent
  52. text-transform
  53. visibility
  54. white-space-collapse
  55. white-space-treatment
  56. widows
  57. word-spacing
  58. wrap-option
  59. 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().

  1. Border and padding (portion of CBPB in table below)
  2. Spaces and margins (CMPB and CMPI in table below)
  3. Height and width (HW in table below)
  4. Overconstrained Geometry
    Adjust end-indent (if necessary) so that
    start-indent + end-indent + inline-progression-dimension = inline-progression-dimension of closest ancestor ref area
  5. 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.


    Bit positions:012 34
    simple-page-master:  CMPB  
    initial-property-set: CBPB   
    region-body: CBPB   
    region-after:  CBPB   
    region-before: CBPB   
    region-start: CBPB   
    region-end: CBPB   
    block: CBPBCMPB  
    table-and-caption: CBPBCMPB  
    list-block:  CBPBCMPB  
    list-item: CBPBCMPB  
    block-container: CBPBCMPB HW
    table: CBPBCMPB 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 CMPIHW
    instream-foreign-object: CBPB CMPIHW
    inline: CBPB CMPIHW
    inline-container: CBPB CMPIHW
    table-caption: CBPB  HW
    table-cell: CBPB  HW
    table-row:B*   HWBPD