How xoom:set special form works

xoom:set special form breaks with the declarative nature of XoomXML, by presenting a set of procedural instructions for Xoom to follow during deployment. The best way to understand how xoom:set special form does this is with an example.


Here is an extract of XoomXML generated by the ExtractAgentInstancesForXoomSet.xsl transformation. This generates xoom:set instructions for every Agent Instance.

In this example we want to deploy changes to just one Agent Instance, _TEST TASKS Purge Agent 30 days.

The first step is to open the results of the transformation in a text editor, and to delete all the other <xoom:set> elements which, in this case, are irrelevant to our purposes (see diagram below).

xoom:set special form requires that all key values of the parent item must be present, so that the parent item can be identified. In this instance these are: <Owner>, <Category>, <SubCategory> and <Name> (even though <Name> in this instance is undefined) – outlined in red, below.

xoom:set special form requires that all key values are present

Each <xoom:set> element contains a select attribute (in versions of Xoom < 3.6, an xpath attribute), which takes the value of an XPath to the desired node, in this case a particular Agent Instance (outlined in red, below).

A select attribute takes the value of an XPath to the required node
When <xoom:set> instructions are deployed, Xoom follows the following procedure.
  1. Xoom tries to resolve the XPath specified by each select attribute. If it finds a node successfully, Xoom replaces the content of the node with the body of <xoom:set>.
  2. If Xoom can't find a node, it finds the parent node (in this instance Agent), creates a new child node (in this case an Agent Instance) and populates that with the content of <xoom:set>.

xoom:set special form contains the following elements