11.2. Associations

The transformation process is specified by a collection of associations.

[152] association = (=> query-expression transform-expression priority-expression?)

[153] query-expression = expression

[154] transform-expression = expression

[155] priority-expression = expression

Each association has up to three components:

A query-expression shall evaluate to a node-list. All the nodes in the node-list returned by a query-expression shall be nodes in the current grove or shall be nodes in an auxiliary grove whose source grove is the current grove. Auxiliary groves are described in “Auxiliary Groves”. In a query-expression, the current-root procedure and current-node procedure return a singleton node-list containing the root of the current grove.

A priority-expression shall evaluate to an integer. The number specifies the priority of the association. If the priority-expression is omitted for an association, the priority of the association is 0. Larger numbers indicate higher priorities.

Each node to which an association is potentially applicable has a constituent set of nodes in the current grove. When the node is in the current grove, the constituent set contains just that node. When the node is in an auxiliary grove, then the constituent set contains the nodes in the current grove that occur in the value of the source property of the node in the auxiliary grove. An association is actually applicable to any node, n, to which it is potentially applicable unless some higher priority association applies to a node whose constituent set contains a node that is in the constituent set of n.