<CLASS_FIELD> : Field that defines the target class

ROLE

This element should refer to a field that belongs to the same class as the current field. The referred field should also only accept values that are names of classes of the data model. Usually a CHOICE field is used. Then, this field puts a limit on the list of available objects in the current field. These objects offered to selection to the user must belong to the target classes that are selected as values in this class field. This mechanism is only relevant if the current field has several target classes.

ATTRIBUTES

<!ATTLIST CLASS_FIELD
	  idref IDREF #REQUIRED>
Attribute Mand. Description Default
idref yes The identifier of the field that defines the target class.  

SAMPLE

For example, consider a class that has one choice field and one relation field. The first field, named classField, is a CHOICE field that offers two options whose names are those of classes of the data model, Class1 and Class2. The second field, named objectField, is a RELATION field that has two target classes, Class1 and Class2.

<CHOICE id="classField">
[...]
<OPTIONS>
	<OPTION id="optionClass1" name="Name of the class Class1"/>
	<OPTION id="optionClass2" name="Name of the class Class2"/>
</OPTIONS>
[...]
</CHOICE>

<RELATION id="objectField">
[...]
	<CLASSES idrefs="Class1 Class2"/>
	<CLASS_FIELD idref="classField"/>
[...]
</RELATION>

The class field defined inside the objectField field ensure that only objects that belong to the selected class in the classField field are offered to selection to the user.