Edit online

Associating a Schema in Validation Scenarios Defined in the Document Type

To report errors and warnings during automatic and manual validations that help maintain the structural integrity of particular XML document types, Oxygen XML Editor 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:
  1. Open the Preferences dialog box (Options > Preferences) and go to Document Type Association.
  2. 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.

  3. Go to the Validation tab.
  4. Create or edit a validation scenario:
    1. To create a new validation scenario, click the New button.
    2. 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).
  5. 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), FTP(S) or a custom protocol. 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.
  6. Select the schema to be associated with the validation unit and configure the rest of the options according to your preferences.
  7. Click OK on both dialog boxes.

Result: The schema is now associated with the validation scenario you just configured for that particular document type.