Reference-Sets

A reference-set contains references that may be accessed by other mapping rules through the <refexpr> expression wherever an expression sequence is allowed. A reference-set is defined in a reference mapping rule by the <references> element.

The <references> element may contain zero or more <reference> elements. Each <reference> element defines a single reference in the set. In addition, each reference may belong to a particular named group, so that several references in a set may have the same name as long as they belong to different groups. An optional group-name attribute in a <reference> element names the group for a reference. References defined without a group-name belong in the default group of a reference-set.

<mapping match=”...”>
	<references>
	<!-- Defined 2 references in group-1 -->
		<reference group-name=”group-1”>
		...
		</reference>
		<reference group-name=”group-1”>
		...
		</reference>
		...
		<!-- Define a reference in the default group -->
		<reference>
		</reference>
	</references>
</mapping>
A reference has a name and a value. The name and value for each reference are specified through expression sequences. 
<reference>
	<name> ... some expression sequence ... </name>
	<value> ... some expression sequence ... </value>
</reference>

A reference has a name and a value. The name and value for each reference are specified through expression sequences.

<reference>
	<name> ... some expression sequence ... </name>
	<value> ... some expression sequence ... </value>
</reference>

The name along with the reference’s group-name together form the handle for the interested value we wish to store. The value of a reference can be accessed with an refexpr expression, that is, the value for a stored reference can be accessed wherever an expression sequence is allowed.

The r-stack, the stack of constructed reference-sets, is searched from top to bottom for stored references. Therefore, newer reference-sets having the same reference handles as previous constructed and non-destroyed references-sets always override older references.