9.1. Nodal Properties

A property of a class may be a subnode property. The declared data type of a subnode property shall be nodal. When a node exhibits a value for a subnode property, all the nodes in the value of the property are in the same grove as the node exhibiting the value. The values of subnode properties of nodes in the grove can be viewed as connecting all the nodes in the grove into a single tree with labeled branches. More precisely,

This tree is referred to as the subnode tree. It is often useful for applications to deal with certain subtrees of the subnode tree in which all the children of a node occur as part of the value of a single property of the node. For this purpose, one property of the class can be distinguished as the children property for the class. This is done indirectly by making one property the content property for the class. If the data type of this property is nodal, then this is the children property, otherwise the primitive data type of the data type shall be char or string and the property is the data property of the node. The term children as applied to a node refers to the nodes occurring as the value of the children property. The data of a node that has a children property is the data of each of its children separated by the value of the data separator property, if any, of the class. A node has a parent if its origin has a children property which includes that node in its value; if a node does have a parent, its parent will be the same as its origin. The term tree without qualification refers to the tree formed using these parent/children relationships. The ancestors of a node comprise the parent of the node, if any, together with the ancestors of the parent of the node. The tree root of a node, x, is x if x has no ancestors or otherwise is the node that is an ancestor of x and that has no ancestors. The siblings of a node are an empty set for the grove root and are otherwise the nodes in the value of the origin-to-subnode relationship property of the node's origin other than the node itself.

NOTE 21: A node can have siblings even if it does not have a parent because its origin-to-subnode relationship property need not be the children property of its origin.

The subtree of a node is the node together with the subtrees of its children. The descendants of a node are the subtrees of children of the node. A total ordering called tree order is defined on the set of nodes in the subtree of any node: this ordering corresponds to a pre-order traversal of the subtree in which a node is visited before its children.

There are two possibilities for properties with a declared data type that is nodal but which are not subnode properties: