Persistent Reference-Sets

A reference-set is removed from the r-stack and destroyed as soon as its originating mapping rule is deactivated. If there is a need to keep references for a longer period then its reference-set can be made to persist on the sets that still reside in the r-stack. A reference-set whose originating mapping rule is being deactivated can be made to persist either at the top or at the bottom of the r-stack.

The persist attribute in the <references> element allows a reference-set to be persisted beyond the deactivation of its originating mapping rule. The valid values for the persist attribute are true and false. A reference-set is not persisted by default, so an absent persist attribute has the same effect as setting it to false.

<references persist=”true|false”>
...
</references>

By default, a persistent reference-set persists in the set at the top of the r-stack. This persistent set will be destroyed as soon as its containing set is also destroyed. For convenience, the xfMap allows a set to be persisted in the set at the bottom of the r-stack. The <references> element’s optional persist-in attribute can be used to control this. The valid values for the persist-in attribute are parent and base. Setting the persist-in attribute to base allows a set to be persisted at the bottom of the r-stack. By default, a persistent reference-set will be persisted in the set at the top of the stack – this is the same as setting the persist-in attribute to parent.

<references persist=”true” persist-in=”parent|base”>
...
</references>

A reference-set persisting in another reference-set overwrites the references in the host set.

Persist options may also be set with xfMap expression elements via <data name=”...”> children elements. The value for the name attribute may be persist or persist-in.

For example:

<references>
  <data name=”persist”>
    ... expression or expression sequence evaluating to “true” or “false” ...
  </data>
  <data name=”persist-in”>
    ... expression or expression sequence evaluating to “parent” or “base” ...
  </data>
  ...
</references>