Edit online

Validating XML Documents

Oxygen XML Web Author automatically checks the document for errors. The errors and warnings reported by the validation engine include problems found in the following:
  • The structural integrity and well-formedness of the document.
  • A set of best practice rules (such as a maximum number of words in a paragraph).

Presenting Validation Problems in the Editing Panel

In the editing panel, the validation errors appear underlined in red, while warnings are underlined in yellow. On a desktop device, if you hover the mouse over the errors or warnings, a tooltip is displayed that provides more information about the problem.

Validation Side Panel

Details about the validation problems are also presented in the Validation side panel. If not displayed, click the arrow button () on the far right side of the editor.

A red marker shows the number of errors found in the document. Each detected problem is listed in its own box in this side panel and each box has a colored left border that indicates the type of problem.
  • Red – Indicates a validation error.
  • Yellow - Indicates a validation warning.
  • Blue - Indicates an informational message.
If you click (or tap) a validation item in this side panel, that particular problem is highlighted in the editor. Similarly, if the cursor is located at a location in the document where there is a problem, that particular validation item is highlighted in the Validation side panel. The editor and the side panel are automatically synced in real time.
Figure 1. Validation Side Panel

Quick Fixes to Solve Validation Problems

Oxygen XML Web Author also includes support for Quick Fixes that help you resolve validation issues that appear in XML documents by offering you proposals for automatically solving the issues with one click.

For any validation item that has a detected Quick Fix, the proposals are listed in the Validation side panel as links. On a desktop device, these links also appear in the tooltip that is displayed when hovering over a problem in the editor.

For information about common errors that appear in XML documents that are validated against DTD, XSD, or Relax NG schemas, see Quick Fixes for DTD, XSD, and Relax NG Errors.

Oxygen XML Web Author also supports Schematron Quick Fixes. A developer can create custom Schematron Quick Fixes to help impose Authoring rules and provide quick solutions to fix errors. For more information, see the Schematron Quick Fixes (SQF) section in the Oxygen XML Editor User Manual. There is also an interesting Blog post written on this subject available at: https://blog.oxygenxml.com/topics/SchematronBCs.html.

Note: Quick Fixes cannot be applied to read-only documents.