From: Keiron Liddle Date: Mon, 2 Dec 2002 12:00:11 +0000 (+0000) Subject: fixed some errors X-Git-Tag: Alt-Design-integration-base~283 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0897c4f0d2cf131b08876e7b9242b913e195f6f8;p=xmlgraphics-fop.git fixed some errors git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@195702 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/documentation/content/xdocs/design/alt.design/AbsolutePosition.png.xml b/src/documentation/content/xdocs/design/alt.design/AbsolutePosition.png.xml index 46a6999a3..fbd479173 100644 --- a/src/documentation/content/xdocs/design/alt.design/AbsolutePosition.png.xml +++ b/src/documentation/content/xdocs/design/alt.design/AbsolutePosition.png.xml @@ -13,7 +13,7 @@
Properties$AbsolutePosition -
+
diff --git a/src/documentation/content/xdocs/design/alt.design/BorderCommonStyle.png.xml b/src/documentation/content/xdocs/design/alt.design/BorderCommonStyle.png.xml index e9fad3d77..71f90c1d6 100644 --- a/src/documentation/content/xdocs/design/alt.design/BorderCommonStyle.png.xml +++ b/src/documentation/content/xdocs/design/alt.design/BorderCommonStyle.png.xml @@ -13,7 +13,7 @@
Properties$BorderCommonStyle -
+
diff --git a/src/documentation/content/xdocs/design/alt.design/PropNames.png.xml b/src/documentation/content/xdocs/design/alt.design/PropNames.png.xml index 6f552009b..1a2b92f2f 100644 --- a/src/documentation/content/xdocs/design/alt.design/PropNames.png.xml +++ b/src/documentation/content/xdocs/design/alt.design/PropNames.png.xml @@ -5,6 +5,7 @@
..fo.PropNames diagram + @@ -12,7 +13,7 @@
PropNames.class -
+
diff --git a/src/documentation/content/xdocs/design/alt.design/Properties.png.xml b/src/documentation/content/xdocs/design/alt.design/Properties.png.xml index 8bcf88943..a8c2497d5 100644 --- a/src/documentation/content/xdocs/design/alt.design/Properties.png.xml +++ b/src/documentation/content/xdocs/design/alt.design/Properties.png.xml @@ -13,7 +13,7 @@
Properties.class -
+
diff --git a/src/documentation/content/xdocs/design/alt.design/PropertyConsts.png.xml b/src/documentation/content/xdocs/design/alt.design/PropertyConsts.png.xml index 2e2763026..d2da2692c 100644 --- a/src/documentation/content/xdocs/design/alt.design/PropertyConsts.png.xml +++ b/src/documentation/content/xdocs/design/alt.design/PropertyConsts.png.xml @@ -13,7 +13,7 @@
PropertyConsts.class -
+
diff --git a/src/documentation/content/xdocs/design/alt.design/VerticalAlign.png.xml b/src/documentation/content/xdocs/design/alt.design/VerticalAlign.png.xml index 400d43cf7..14e835347 100644 --- a/src/documentation/content/xdocs/design/alt.design/VerticalAlign.png.xml +++ b/src/documentation/content/xdocs/design/alt.design/VerticalAlign.png.xml @@ -13,7 +13,7 @@
Properties$VerticalAlign -
+
diff --git a/src/documentation/content/xdocs/design/alt.design/alt-properties.xml b/src/documentation/content/xdocs/design/alt.design/alt-properties.xml new file mode 100644 index 000000000..ce5396618 --- /dev/null +++ b/src/documentation/content/xdocs/design/alt.design/alt-properties.xml @@ -0,0 +1,172 @@ + + + + +
+ Implementing Properties + + + +
+ +
+ An alternative properties implementation + + The following discussion focusses on the relationship between + Flow Objects in the Flow Object tree, and properties. There + is no (or only passing) discussion of the relationship between + properties and traits, and by extension, between properties + and the Area tree. The discussion is illustrated with some + pseudo-UML diagrams. + +

+ Property handling is complex and expensive. Varying numbers of + properties apply to individual Flow Objects + (FOs) in the FO + tree but any property may effectively be + assigned a value on any element of the tree. If that property + is inheritable, its defined value will then be available to + any children of the defining FO. +

+ + (XSL 1.0 Rec) 5.1.4 Inheritance + ...The inheritable properties can be placed on any formatting + object. + +

+ Even if the value is not inheritable, it may be accessed by + its children through the inherit keyword or the + from-parent() core function, and potentially by + any of its descendents through the + from-nearest-specified-value() core function. +

+

+ In addition to the assigned values of properties, almost every + property has an initial value which is used + when no value has been assigned. +

+
+ The history problem +

+ The difficulty and expense of handling properties comes from + this univeral inheritance possibility. The list of properties + which are assigned values on any particular FO + element will not generally be large, but a current value is + required for each property which applies to the FO + being processed. +

+

+ The environment from which these values may be selected + includes, for each FO, for each applicable property, + the value assigned on this FO, the value which + applied to the parent of this FO, the nearest value + specified on an ancestor of this element, and the initial + value of the property. +

+
+
+ Data requirement and structure +

+ This determines the minimum set of properties and associated + property value assignments that is necessary for the + processing of any individual FO. Implicit in this + set is the set of properties and associated values, + effective on the current FO, that were assigned on + that FO. +

+

+ This minimum requirement - the initial value, the + nearest ancestor specified value, the parent computed value + and the value assigned to the current element - + suggests a stack implementation. +

+
+
+ Stack considerations +

+ One possibility is to push to the stack only a minimal set + of required elements. When a value is assigned, the + relevant form or forms of that value (specified, computed, + actual) are pushed onto the stack. As long as each + FO maintains a list of the properties which were + assigned from it, the value can be popped when the focus of + FO processing retreats back up the FO tree. +

+

+ The complication is that, for elements which are not + automatically inherited, when an FO is encountered + which does not assign a value to the + property, the initial value must either be already at the + top of the stack or be pushed onto the stack. +

+

+ As a first approach, the simplest procedure may be to push a + current value onto the stack for every element - initial + values for non-inherited properties and the parental value + otherwise. Then perform any processing of assigned values. + This simplifies program logic at what is hopefully a small + cost in memory and processing time. It may be tuned in a + later iteration. +

+
+ Stack implementation +

+ Initial attempts at this implementation have used + LinkedLists as the stacks, on the assumption + that +

+
    + +
  • random access would not be required
  • +
  • + pushing and popping of list elements requires nearly + constant (low) time +
  • +
  • no penalty for first addition to an empty list
  • +
  • efficient access to both bottom and top of stack
  • +
+

+ However, it may be required to perform stack access + operations from an arbitrary place on the stack, in which + case it would probably be more efficient to use + ArrayLists instead. +

+
+
+
+ Class vs instance +

+ An individual stack would contain values for a particular + property, and the context of the stack is the property class + as a whole. The property instances would be represented by + the individual values on the stack. If properties are to be + represented as instantiations of the class, the stack + entries would presumably be references to, or at least + referenced from, individual property objects. However, the + most important information about individual property + instances is the value assigned, and the relationship of + this property object to its ancestors and its descendents. + Other information would include the ownership of a property + instance by a particular FO, and, in the other + direction, the membership of the property in the set of + properties for which an FO has defined values. +

+

+ In the presence of a stack, however, none of this required + information mandates the instantiation of properties. All + of the information mentioned so far can be effectively + represented by a stack position and a link to an + FO. If the property stack is maintained in + parallel with a stack of FOs, even that link is + implicit in the stack position. +

+
+

+ Next: property classes overview. +

+
+ +
+ diff --git a/src/documentation/content/xdocs/design/alt.design/alt.properties.xml b/src/documentation/content/xdocs/design/alt.design/alt.properties.xml deleted file mode 100644 index a1e7fcf09..000000000 --- a/src/documentation/content/xdocs/design/alt.design/alt.properties.xml +++ /dev/null @@ -1,172 +0,0 @@ - - - - -
- Implementing Properties - - - -
- -
- An alternative properties implementation - - The following discussion focusses on the relationship between - Flow Objects in the Flow Object tree, and properties. There - is no (or only passing) discussion of the relationship between - properties and traits, and by extension, between properties - and the Area tree. The discussion is illustrated with some - pseudo-UML diagrams. - -

- Property handling is complex and expensive. Varying numbers of - properties apply to individual Flow Objects - (FOs) in the FO - tree but any property may effectively be - assigned a value on any element of the tree. If that property - is inheritable, its defined value will then be available to - any children of the defining FO. -

- - (XSL 1.0 Rec) 5.1.4 Inheritance - ...The inheritable properties can be placed on any formatting - object. - -

- Even if the value is not inheritable, it may be accessed by - its children through the inherit keyword or the - from-parent() core function, and potentially by - any of its descendents through the - from-nearest-specified-value() core function. -

-

- In addition to the assigned values of properties, almost every - property has an initial value which is used - when no value has been assigned. -

-
- The history problem -

- The difficulty and expense of handling properties comes from - this univeral inheritance possibility. The list of properties - which are assigned values on any particular FO - element will not generally be large, but a current value is - required for each property which applies to the FO - being processed. -

-

- The environment from which these values may be selected - includes, for each FO, for each applicable property, - the value assigned on this FO, the value which - applied to the parent of this FO, the nearest value - specified on an ancestor of this element, and the initial - value of the property. -

-
-
- Data requirement and structure -

- This determines the minimum set of properties and associated - property value assignments that is necessary for the - processing of any individual FO. Implicit in this - set is the set of properties and associated values, - effective on the current FO, that were assigned on - that FO. -

-

- This minimum requirement - the initial value, the - nearest ancestor specified value, the parent computed value - and the value assigned to the current element - - suggests a stack implementation. -

-
-
- Stack considerations -

- One possibility is to push to the stack only a minimal set - of required elements. When a value is assigned, the - relevant form or forms of that value (specified, computed, - actual) are pushed onto the stack. As long as each - FO maintains a list of the properties which were - assigned from it, the value can be popped when the focus of - FO processing retreats back up the FO tree. -

-

- The complication is that, for elements which are not - automatically inherited, when an FO is encountered - which does not assign a value to the - property, the initial value must either be already at the - top of the stack or be pushed onto the stack. -

-

- As a first approach, the simplest procedure may be to push a - current value onto the stack for every element - initial - values for non-inherited properties and the parental value - otherwise. Then perform any processing of assigned values. - This simplifies program logic at what is hopefully a small - cost in memory and processing time. It may be tuned in a - later iteration. -

-
- Stack implementation -

- Initial attempts at this implementation have used - LinkedLists as the stacks, on the assumption - that -

- - -
  • random access would not be required
  • -
  • - pushing and popping of list elements requires nearly - constant (low) time -
  • -
  • no penalty for first addition to an empty list
  • -
  • efficient access to both bottom and top of stack
  • -
    -

    - However, it may be required to perform stack access - operations from an arbitrary place on the stack, in which - case it would probably be more efficient to use - ArrayLists instead. -

    -
    -
    -
    - Class vs instance -

    - An individual stack would contain values for a particular - property, and the context of the stack is the property class - as a whole. The property instances would be represented by - the individual values on the stack. If properties are to be - represented as instantiations of the class, the stack - entries would presumably be references to, or at least - referenced from, individual property objects. However, the - most important information about individual property - instances is the value assigned, and the relationship of - this property object to its ancestors and its descendents. - Other information would include the ownership of a property - instance by a particular FO, and, in the other - direction, the membership of the property in the set of - properties for which an FO has defined values. -

    -

    - In the presence of a stack, however, none of this required - information mandates the instantiation of properties. All - of the information mentioned so far can be effectively - represented by a stack position and a link to an - FO. If the property stack is maintained in - parallel with a stack of FOs, even that link is - implicit in the stack position. -

    -
    -

    - Next: property classes overview. -

    -
    - -
    - diff --git a/src/documentation/content/xdocs/design/alt.design/book.xml b/src/documentation/content/xdocs/design/alt.design/book.xml index 2324a6d33..864c3989b 100644 --- a/src/documentation/content/xdocs/design/alt.design/book.xml +++ b/src/documentation/content/xdocs/design/alt.design/book.xml @@ -18,7 +18,7 @@ - + diff --git a/src/documentation/content/xdocs/design/alt.design/classes-overview.xml b/src/documentation/content/xdocs/design/alt.design/classes-overview.xml index b5e2be845..c0c7a5fac 100644 --- a/src/documentation/content/xdocs/design/alt.design/classes-overview.xml +++ b/src/documentation/content/xdocs/design/alt.design/classes-overview.xml @@ -82,7 +82,7 @@ static data and methods have been split tentatively into three:

    -
    PropNames
    @@ -191,7 +191,7 @@

    Previous: alt.properties + "alt-properties.html" >alt.properties

    Next:
    Figure 1

    -
    +

    For example, think of a page-production method working on a complex page-sequence-master. diff --git a/src/documentation/content/xdocs/design/alt.design/footnotes.xml b/src/documentation/content/xdocs/design/alt.design/footnotes.xml index 16179c5f9..42c467dda 100644 --- a/src/documentation/content/xdocs/design/alt.design/footnotes.xml +++ b/src/documentation/content/xdocs/design/alt.design/footnotes.xml @@ -28,7 +28,7 @@ Footnotes and galleys

    In the structure described in the introduction to FOP galleys, + "galleys.html" >introduction to FOP galleys, footnotes would be pre-processed as galleys themselves, but they would remain attached as subtrees to their points of invocation in the main text. Allocation to a @@ -38,7 +38,7 @@

    When footnotes are introduced, the communication between galleys and layout manager, as mentioned above, would be + "galleys.html#pre-processing" >above, would be affected. The returned information would two b-p-d values: the primary line-area b-p-d impact and the footnote b-p-d impact. The distinction is necessary for two reasons; to @@ -56,7 +56,7 @@

    This note assumes a galley, as discussed elsewhere, flowing text with + "galleys.html" >elsewhere, flowing text with footnotes and possibly other blocks into a possibly multi-column area. The logic of flowing into multiple columns is trivially applied to a single column. The galley @@ -100,7 +100,7 @@ and totals for each column.

    Figure 1 Columns before first footnote.

    -
    @@ -109,7 +109,7 @@ Figure 2 Adding a line area with first footnote.

    -

    Columns are balanced dynamically in the galley preliminary @@ -127,7 +127,7 @@ Figure 3 Adding a line area with next footnote.

    -
    diff --git a/src/documentation/content/xdocs/design/alt.design/galleys.xml b/src/documentation/content/xdocs/design/alt.design/galleys.xml index f7ae3cbb9..2cedc4802 100644 --- a/src/documentation/content/xdocs/design/alt.design/galleys.xml +++ b/src/documentation/content/xdocs/design/alt.design/galleys.xml @@ -93,7 +93,7 @@ "../layout.html" >layout managers already proposed, the layout tree acts as a bridge between the FO Tree and the Area Tree. If the elements of + "../areas.html" >Area Tree. If the elements of the FO Tree are FO nodes, and the elements of the Area Tree are Area nodes, representing areas to be drawn on the output medium, the elements of the layout tree are galley @@ -178,7 +178,7 @@

    Figure 1

    -

    Once this pre-processing has been achieved, it is diff --git a/src/documentation/content/xdocs/design/alt.design/keeps.xml b/src/documentation/content/xdocs/design/alt.design/keeps.xml index ffb29f5f1..d7fc973c7 100644 --- a/src/documentation/content/xdocs/design/alt.design/keeps.xml +++ b/src/documentation/content/xdocs/design/alt.design/keeps.xml @@ -72,7 +72,7 @@ Figure 1

    -

    The three basic links are: diff --git a/src/documentation/content/xdocs/design/alt.design/properties-classes.xml b/src/documentation/content/xdocs/design/alt.design/properties-classes.xml index 3345cadfa..c077be44b 100644 --- a/src/documentation/content/xdocs/design/alt.design/properties-classes.xml +++ b/src/documentation/content/xdocs/design/alt.design/properties-classes.xml @@ -12,7 +12,7 @@

    fo.Properties and the nested properties classes -
    Nested property classes diff --git a/src/documentation/content/xdocs/design/alt.design/spaces.xml b/src/documentation/content/xdocs/design/alt.design/spaces.xml index f2426347b..40b028aaa 100644 --- a/src/documentation/content/xdocs/design/alt.design/spaces.xml +++ b/src/documentation/content/xdocs/design/alt.design/spaces.xml @@ -58,7 +58,7 @@ Figure 1.)

    Figure 1

    -
    Figure 1 assumes a block-progression-direction of top to @@ -126,7 +126,7 @@

    Figure 2

    -
    diff --git a/src/documentation/content/xdocs/design/alt.design/user-agent-refs.xml b/src/documentation/content/xdocs/design/alt.design/user-agent-refs.xml index 47fe45f94..0b7a85951 100644 --- a/src/documentation/content/xdocs/design/alt.design/user-agent-refs.xml +++ b/src/documentation/content/xdocs/design/alt.design/user-agent-refs.xml @@ -485,7 +485,7 @@ value to a "reasonable" value based on the font size of the element.

    - +

    ... When an element contains text that is rendered in more than one font, user agents should determine @@ -741,7 +741,8 @@

    7.26.5 "border-separation" - +
    + <length-bp-ip-direction>

    ... Rows, columns, row groups, and column groups cannot have borders (i.e., user agents must diff --git a/src/documentation/content/xdocs/design/alt.design/xml-parsing.xml b/src/documentation/content/xdocs/design/alt.design/xml-parsing.xml index 6151dae74..c6d758f63 100644 --- a/src/documentation/content/xdocs/design/alt.design/xml-parsing.xml +++ b/src/documentation/content/xdocs/design/alt.design/xml-parsing.xml @@ -40,7 +40,7 @@ callback must complete before the next is called.

    Figure 1

    -
    +

    In the process of parsing, the hierarchical structure of the original FO tree is flattened into a number of streams of @@ -104,7 +104,7 @@ footprint. This occurs when the approach is generalised to modularise FOP processing.

    Figure 2

    -
    +

    The most useful change that this brings about is the switch from passive to active XML element @@ -220,7 +220,7 @@ processes.

    Figure 3

    -
    +