Edit online

Oxygen XML Editor includes a built-in default validator used for validating HTML documents. It is based upon the W3C HTML Validator and the HTML documents are validated against the W3C HTML5 specification. The validator in Oxygen XML Editor only supports HTML5 structure. It presents the errors in the editor similar to XML documents. It also checks the embedded CSS content and the warnings and errors are presented similar to the CSS editor.

Validating HTML Against a Schematron

It is also possible to validate HTML documents against a Schematron schema. Besides the default HTML validator, Oxygen XML Editor also includes a built-in HTML Schematron Validator engine. There are several ways to validate an HTML document against a Schematron:
  • Configure a Validation Scenario - You can create or edit a validation scenario, change the File type column to HTML Document, change the Validation engine column to HTML Schematron Validator, and specify the Schematron document in the Schema column.
  • Manually Validate a Single Document - You can use the use the Validate with action from the Validation drop-down menu on the toolbar. This opens a dialog box where you can specify the Schematron document to validate the current document against.
  • Batch Validate Multiple Documents - You can select multiple HTML documents in the Project view, right-click, and use the use the Validate with schema action from the Validate submenu. This opens a dialog box where you can specify the Schematron document to validate the selected documents against.
  • The Schematron must use the HTML5 namespace to reference the elements from the instance.
  • Implicit HTML elements (i.e. <html>, <body>, <tbody>) must be included in an XPath expression in the Schematron document, even if they are missing from the HTML document.
Tip: The Oxygen XML Editor installation directory includes a samples folder that contains numerous sample files to help you learn about features, certain file types, and XML technologies. For example, inside the samples folder, there is an html folder with a schematron subfolder where you can find some samples that illustrate HTML validation against a Schematron schema.

Validating HTML Against Other Types of Schema

If your HTML document is XML well-formed, you could also configure a validation scenario to validate it as an XML document against other types of schemas. You would create or edit a validation scenario, make sure the File type column is set to XML Document, select the appropriate Validation engine, and specify the schema document in the Schema column.