6.4.  Validating Models

In the context of pure::variants, Model Validation is the process of checking the validity of feature, family, and variant description models. Two kinds of model validation are supported, i.e. validating the XML structure of models using a corresponding XML Schema and performing a configurable set of checks using the model check framework.

This model validation uses an XML Schema to check if the XML structure of a pure::variants model is correct. This is pure syntax check, no further analyses of the model are performed.

The XML Schema model validation is disabled per default. It can be enabled selecting option "Validate XML structure of models..." on the Variant Management->Model Handling preferences page (menu Window->Preferences ). If enabled all pure::variants models are validated when opened.

For more information about XML Schema see the W3C XML Schema Documentation .

The model check framework allows the validation of models using a configurable and extensible set of rules (called "model checks"). There are no restrictions on the complexity of model checks.

The model check framework is configured on the Variant Management->Model Validation preference page (menu Window->Preferences ). On the Check Configurations tab the model check configurations can be managed and activated (see Figure 6.25, “Model Validation Preferences Page” ).


The two default configurations "All Model Checks" and "All Element Checks" are always available. "All Model Checks" contains all model checks that perform whole model analyses. Compared with "All Element Checks" containing all checks that perform analyses on element level. The configuration "All Element Checks" is enabled per default if the pure::variants perspective is opened the first time.

A model check configuration is activated by selecting it in the Available Configurations list. If more than one configuration is selected, the checks from all selected configurations are merged into one set that becomes activated.

The checks contained in a configuration are shown in the Selected Configuration list by clicking on the name of the configuration. The checks are listed by its names followed by the list of model types supported by a check. Additionally the icon reveals if the check is enabled for automatic model validation (see the section called “Performing Model Checks” ). A brief description of a check is shown by moving the mouse pointer over the check name.

All but the two default configurations "All Model Checks" and "All Element Checks" can be deleted by clicking first on the name of the configuration and then on button Delete .

A new configuration can be created by clicking on button New . This will open the New Check Configuration dialog as shown in Figure 6.26, “New Check Configuration Dialog” .


For a new check configuration a unique name for the configuration has to be entered. The available checks are shown in the Available Checks tree and can be selected for the new configuration by clicking on the check boxes of the checks. Clicking on the root of a sub-tree selects/deselects all checks of this sub-tree.

Detailed information about a check are displayed in the Check Details area of the dialog if the name of a check is selected. The Model Types field shows the list of model types for which the corresponding check is applicable. The Description field shows the description of the check.

The same dialog appears for editing and copying check configurations using the Edit and Copy buttons. Only non-default configurations can be edited.

And with the "Enable check for..." button (or clicking on the icon of a check)