Altova XMLSpy 2024 Enterprise Edition

One or more Schema Rule Set files (.xml files) can be assigned to the active XML Schema (.xsd file). This is done via the Schema tab of the Info Window (screenshot below).

SchemaRuleAssignments

 

Adding Rule Sets for extended validation

To add a Schema Rule Set file, click the context menu ContextMenuButton button. This pops up a menu (see screenshot above) in which you can select how you wish to add Schema Rule Set files to the XML Schema. The following options are available:

Add Predefined Rule Set: You can select from a list of predefined Schema Rule Sets that have been supplied with XMLSpy. These Rule Set files are saved in the Extended Schema Validation folder in the XMLSpy application folder. Any Rule Set file added to this folder will be displayed in the Predefined Rule Set dialog and will be available for addition.

Browse for Existing Rule Set: You can browse for a non-predefined Schema Rule Set file.

Create a New Rule Set: Pops up the Schema Rule Editor, in which you can edit the Schema Rules in a Schema Rule Set file. How to work with the Schema Rules Editor is described in the section, Defining a Rule Set. After you save a Schema Rule Set file created via this command, it is added to the listing for the active XML Schema (see screenshot below).

SchemaRuleSetsAdded

Any number of Schema Rule Sets can be added (see screenshot above). When more than one Schema Rule Set is assigned to an XML Schema, the rules in all the added Schema Rule Sets are used when the XML Schema is validated in Schema View (XML | Validate).

 

Enabling and disabling extended schema validation

Extended schema validation can be enabled or disabled by clicking the Enable Extended Schema Validation check box.

 

Editing and removing Rule Sets

Individual Rule Sets assigned to an XML Schema can be managed via the context menu that appears on clicking the context menu ContextMenuButton  button (screenshot below).

SchemaRuleSetsAddedMenu

The following options are available:

 

Apply Rule Set to imported and included schemas: If a Rule Set is applied, rules in it will be used for all schemas that the main schema imports or includes.

Edit Rule: Opens the Schema Rule Set in the Schema Rules Editor.

Remove Rule Set: Removes the Rule Set from the list of added Rule Sets.

Remove Rule Set and delete from disk: This command is enabled for all non-predefined Rule Sets. In addition to removing the Rule Set from the list of added Rule Sets, this command also deletes the Rule Set.

 

© 2017-2023 Altova GmbH