Data Islands

The first layer of the WAB relates to managing XML data in the context of an XML DOM. A fairly common use of this is for a node in one DOM to 'manage' another DOM, or at least provide a point of connection between one DOM and another.

Any node in the DOM can be a point of connection to this data, as indicated by the presence of the instance property.

A pointer to the DOM node referred to by an element's instance property can be obtained either directly on the connecting node, or via the document.instance function. The single parameter is an ID.

In mark-up, an instance element serves the purpose of a connecting node. There are two ways to use the instance:

  1. the entity can be specified inline as children of instance;
  2. the instance could be empty, indicating an uninitialised instance.

NOTE: The data will be flexible in the way that XSLT is. So all of these are valid:

<instance>hello, world!</instance>
<instance>
  <node>1</node>
</instance>
<instance>
  <node>1</node>
  <node>2</node>
  <node>3</node>
</instance>