You are here: Popular Formats > XML (Extensible Markup Language) Reader/Writer > xfMap > Reading the Input XML Document > Mapping Rule States (activation, execution, suspension, and de-activation)
Mapping Rule States (activation, execution, suspension, and de-activation)
This section describes the different states of a mapping rule. A mapping rule can either be activated, suspended, executing, or de-activated.
Let E be the element in the input XML document whose start-tag is being read,
let C be the context element; we define the context element to be the most recently read element for which its end-tag is yet to be read, and
let R be a mapping rule in the xfMap document that is considered for matching (see the search-sets section below, which describes when a mapping rule can be considered for matching),
then the following lists the possible states for a mapping rule R:
- R is activated, if R matches E.
- R is executing as long as it is activated and E equals C.
- R is suspended as long as it is activated and E does not equal C.
- R is de-activated after E’s end-tag is read.
Note: All mapping rules in the xfMap document are initially deactivated.