Validate an XML Document Against Schematron

To validate an XML document against a Schematron schema, select the Validate action from the Validation toolbar drop-down menu, or the Document > Validate menu, or from the Validate menu when invoking the contextual menu in the Project view.

If you want to add a persistence association between your Schematron rules and the current edited XML document, use the Associate Schema action from the Document > Schema menu or the Document toolbar. A custom processing instruction is added into the document and the validation process will take into account the Schematron rules:

PI Added by the Associate Schema Action

<?xml-model href="percent.sch" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>

The possible errors that might occur during the validation process are presented in the Errors panel at the bottom area of the Oxygen XML Editor window. Each error is flagged with a severity level that can be one of warning, error, fatal or info.

To set a severity level, Oxygen XML Editor looks for the following information:
  • The role attribute, which can have one of the following values:
    • warn or warning, to set the severity level to warning
    • error, to set the severity level to error
    • fatal, to set the severity level to fatal
    • info or information, to set the severity level to info
  • The start of the message, after trimming leading white-spaces. Oxygen XML Editor looks to match the following exact string of characters (case sensitive):
    • Warning:, to set the severity level to warning
    • Error:, to set the severity level to error
    • Fatal:, to set the severity level to fatal
    • Info:, to set the severity level to info
      Note: Displayed message does not contain the matched prefix.
  • If none of the previous rules match, Oxygen XML Editor sets the severity level to error.