10.1 Reflecting formatting object state by appearance

10.1.1 Dynamically changing property values

The formatting object sub-trees sensitive to state reflection are wrapped into a multi-properties object.

  • It collects the sets of properties and those descendent areas that are to be sensitive to operator interaction.

  • You may specify default values for properties to be inherited by descendent areas.

  • Each multi-property-set object captures the properties for a given state.

    • Use active-state to specify the state for the collection of properties.

  • Any, some, or all of the following states can have associated properties.

    • " link " (unvisited):

      • is true when a descendant basic-link object hasn't yet been visited;

    • " hover ":

      • is true when a descendant area is under the influence of some pointing device, yet without activation of the interactivity;

    • " focus ":

      • is true when a descendant area is the focus of operator interactivity (e.g., the user has tabbed to the hyperlink instead of using a pointing device);

    • " active ":

      • is true when a descendant area is being activated by operator interactivity (e.g. during the time the pointing device button is being pressed but not released);

    • " visited ":

      • is true when a descendant basic-link object has already been visited.

A multi-properties object is a neutral construct.

  • In general it can be used anywhere the formatting objects it wraps can be used.

The objects that are to be rendered are captured in the wrapper object.

  • It merges inherited properties with the sibling properties associated with the current state by using the merge-property-values() function.

    • Regular ancestor inheritance during formatting object tree refinement would miss the sibling multi-property-set constructs.

    • This function cannot be used with any other formatting object, nor with a wrapper that has any other parent object.

  • You may specify any other inheritable properties for descendant constructs.

The nesting of the constructs is illustrated in Figure 10-1.

Figure 10-1. Structuring multiple sets of properties for a sequence of formatting objects

graphics/10fig01.gif

10.1.2 The multi-properties object

Purpose
  • This is the collection of candidate property sets from which exactly one set influences the properties of a formatting object based on its status or the status of user interaction.

    • It supports reserved states for the basic-link object.

Content
  • ( 6.9.6 ) ( multi-property-set+, wrapper ),

  • child objects (listed alphabetically ):

    • multi-property-set ( 6.9.7 ; 269),

    • wrapper ( 6.11.2 ; 100).

Property sets
  • Common accessibility properties ( 7.4 ; 326).

Other optional property
  • id ( 7.28.2 ; 384).

Function of interest
  • merge-property-values() is used on the wrapper object that is ancestral to the formatting objects being rendered.

    • It merges the corresponding values from the properties specified for the active multi-property-set according to the current state.

Consider the need to reproduce typical browser colors for unvisited and visited links

  • blue when not yet visited,

  • purple when already visited.

Example 10-1 illustrates how this would be accomplished.

Example 10-1 An example of using dynamic formatting properties
 Line 01 <block>This is a link:      02  <multi-properties>  03   <multi-property-set active-state="link" color="blue"/>      04   <multi-property-set active-state="visited" color="purple"/>      05  <wrapper color="merge-property-values()">  06     <basic-link external-destination="http://www.CraneSoftwrights.com"      07 >http://www.CraneSoftwrights.com</basic-link>      08  </wrapper>  09  </multi-properties>  10 : end of block.      11 </block> 

10.1.3 The multi-property-set object

Purpose
  • This is the set of properties associated with a single possible state of a formatting object or user interaction.

Content
  • ( 6.9.7 ) EMPTY ,

  • referring object:

    • multi-properties ( 6.9.6 ; 268).

Required property
  • active-state ( 7.22.1 ; 345).

Optional property
  • id ( 7.28.2 ; 384).

Example 10-2 highlights where this formatting object is used in the earlier example of mimicking browser colors.

Example 10-2 An example of using dynamic formatting properties
 Line 01 <block>This is a link:      02 <multi-properties>      03  <multi-property-set active-state="link" color="blue"/>  04  <multi-property-set active-state="visited" color="purple"/>  05   <wrapper color="merge-property-values()">      06     <basic-link external-destination="http://www.CraneSoftwrights.com"      07 >http://www.CraneSoftwrights.com</basic-link>      08   </wrapper>      09 </multi-properties>      10 : end of block.      11 </block> 


Definitive XSL-FO
Definitive XSL-FO
ISBN: 0131403745
EAN: 2147483647
Year: 2002
Pages: 99
Authors: G. Ken Holman

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net