XML syntax to specify dimension hierarchy

The XML elements available to external_dimensions.dtd allow a flexible XML syntax to describe a dimension hierarchy. There are three different syntax approaches you can choose from when building the hierarchy structure of your externally-created dimension.

All three approaches are supported by external_dimensions.dtd. Each provides a slightly different syntax structure to define a dimension and express the parent/child relationship among dimensions and dimension values. The three syntax choices are as follows:

You can use only one of the three approaches to describe a hierarchy within a single XML file. In other words, do not mix different syntax structures within one file. Any node element without a parent node describes a new dimension. You can describe as many dimensions as necessary in a single XML file.

The following examples show each approach to building a dimension hierarchy. The these examples are semantically equivalent: each describes the same dimension and child dimension values.

Example of using nested node elements

This example shows nested dimension values red and blue within the dimension color:

<node name="color" id="1">
	<node name="red" id="2"/>
	<node name="blue" id="3"/>
</node>

Example of using parent attributes

This example shows the red and blue dimension values using the parent attribute. The value of the parent attribute references the ID for the dimension color:

<node name="color" id="1"/>
<node id="2" name="red" parent="1"/>
<node id="3" name="blue" parent="1"/>

Example of using child elements

This example uses child elements to indicate that red and blue are dimension values of the color dimension. The ID of each child element references the ID of the red and blue nodes:

<node name="color" id="1">
	<child id="2"/>
	<child id="3"/>
</node>
<node name="red" id="2"/>
<node name="blue" id="3"/>