Schema validation

Validation for the Schema Diagram Page is seamlessly integrated in the <oXygen/> validation framework.

Figure 4.33. XML Schema Validation

XML Schema Validation

Errors are presented by highlighting invalid component properties in the Attributes View and also directly in the diagram if the property is presented. Invalid facets for a component are highlighted in the Facets View.

Components with invalid properties are rendered by default with a red border. You can customize the error colors from the Document checking user preferences. When hovering an invalid component the tooltip will present the validation errors for that component.

When editing a value which is supposed to be a qualified or unqualified XML name you also have as you type validation of the entered value which is very useful to avoid setting not valid XML names for the given property.

If you validate the entire schema using DocumentValidate document (Alt+Shift+V V (Cmd+Alt+V V on Mac OS)) or the action available on the Validate toolbar, all validation errors will be presented. To resolve an error just click (or double click for errors from other schemas) and the corresponding schema component will be display as the diagram root so that you can easily correct the error.

Important

If the schema imports using only the namespace and without specifying the schema location and a catalog is set-up mapping the namespace to a certain location both validation and diagram will correctly identify the imported schema.

Tip

If there are unresolved references in your schema a hint will be presented suggesting the use of validation scenarios if the current edited schema is a module.