You are here: Popular FormatsXML (Extensible Markup Language) Reader/WriterxfMapFeature Mapping RulesGeometry Builder States (activation, execution, suspension, and de-activation)

Geometry Builder States (activation, execution, suspension, and de-activation)

Similar to mapping rules a geometry builder may be activated, set on execution, suspended, and de-activated.

Let R be the mapping rule containing a <geometry> element having a activate attribute that specifies the geometry builder B, and

let E be the element whose start-tag is being read from the input XML document stream,

then:

  1. B is activated when R is activated, (recall that R is activated when R is the first mapping rule in an active-search-set matching E),
  2. B is executing as long as E is the context element,
  3. B is suspended when E is not the context element

Note: B if suspended, may again be set to the execution state. For example, when a mapping rule R1, matching a child element of E, say E1, contains a <geometry> element with no activate attribute. The <geometry> element in R1 then indicates to the XML Reader that B should again be executing and that the geometry data parameters in R1 should be given to B. This mechanism is provided for input XML documents that might structured their information in a segmented manner, say: 
            <line>
            <coord>2.9,3.4</coord>
             ...
            </line>
so that a separate mapping rule must be defined to match each <coord> element to complete one polyline feature.

  1. B is de-activated after E is completely read.

Note: Note: A geometry builder can only be executing or suspended if it is not de-activated.