To report errors and warnings during automatic and manual validations that help maintain the
structural integrity of particular XML document types, Oxygen XML Author Eclipse plugin uses rules
defined in the schema that is detected in the validation scenarios that are associated to each
particular document type.
To associate a schema in validation scenarios defined in the
framework (document type) configuration,
follow these steps:
- Open the
Preferences dialog box and go to
Document Type Association.
-
Select your particular document type and click the Edit or
Duplicate button to modify an existing framework
(or use the New button to create a new one).
Step Result: This opens a Document
type configuration dialog box.
- Go to the Validation tab.
- Create or edit a validation scenario:
- To create a
new validation scenario, click the
New button.
- To edit the
properties of an existing validation scenario, select it and click the
Edit button (you can also use the
Duplicate button to copy an existing
scenario and edit its properties).
-
Add or configure validation units according to your needs and click the
Specify
Schema button.
Step Result: The Specify Schema dialog box is
displayed:
Figure 1. Specify Schema Dialog Box
The Specify Schema dialog box contains the following
options:
- Use detected schema
- Uses the schema detected for the particular document.
- Use custom schema
- Allows you to specify the schema using the following options:
-
URL - Allows you to specify or select a URL for the schema. It also
keeps a history of the last used schemas. The URL must point to the schema file that can be
loaded from the local disk or from a remote server through HTTP(S) or SFTPS. You can specify the URL by using the text
field, the history drop-down, the
Insert Editor
Variables button, or the browsing actions in the
Browse drop-down list.
-
Schema type - Select a possible schema type from this combo box that
is populated based on the extension of the schema file that was entered in the
URL field. The possible schema types are: XML Schema, DTD, Relax
NG, Relax NG Compact, Schematron, or NVDL.
- Embedded Schematron rules - If you have selected XML Schema or
Relax NG schemas with embedded Schematron rules and you want to use those embedded rules,
select this option.
-
Public ID - Allows you to specify a public ID if you have selected a
DTD.
- Extensions- Opens a dialog box that allows you to specify Java extension JARs to be used during the
validation.
- Schematron phase - If you select a Schematron schema, this
drop-down list allows you to select a Schematron phase that you want to use for validation.
The listed phases are defined in the Schematron document.
- Select the schema to be associated with the validation unit and configure the rest of
the options according to your preferences.
- Click OK on both dialog boxes.
Result: The schema is now associated with the validation scenario you just configured
for that particular document type.