Presenting Validation Errors in Text Mode

Oxygen XML Editor plugin can be configured to automatically validate documents while editing in the Text mode, and actions are also available to manually validate documents on-request.

In Text mode, validation issues are marked in the following locations:
  • In the main editing pane, with the issue underlined in a color according to the type of issue.
  • In the right-side vertical stripe, with a marker that is colored according to the type of issue.
  • For attributes with detected issues, in the Attributes view, with the attribute and its value colored according to the type of issue.
The colors for each type of issue are as follows:
  • Validation Errors [Red] - By default, the underline in the editing pane, the marker in the right vertical stripe, and the foreground color of the attribute in the Attributes view are colored in red.
  • Validation Warnings [Yellow] - By default, the underline in the editing pane, the marker in the right vertical stripe, and the foreground color of the attribute in the Attributes view are colored in yellow.
  • Validation Info [Blue] - By default, the underline in the editing pane, the marker in the right vertical stripe, and the foreground color of the attribute in the Attributes view are colored in blue.
You can configure the colors and how the various types of validation problems are rendered from the Eclipse Annotations preferences page (Window ('Eclipse' on Mac OSX) > Preferences > General > Editors > Text Editors > Annotations).

Hovering over a validation issue presents a tooltip message with more details about the problem and possible quick fixes (if available for that issue).

Figure: Presenting Validation Errors in Text Mode

Also, the stripe on the right side of the editor panel is designed to display the issues found during the validation process and to help you locate them in the document. The stripe contains the following:
Upper Part of the Stripe
A success indicator square will turn green if the validation is successful or only info messages are found, red if validation errors are found, or yellow if only validation warnings are found. More details about the issues are displayed in a tool tip when you hover over indicator square. If there are numerous problems, only the first three are presented in the tool tip.
Middle Part of the Stripe
Errors are depicted with red markers, warnings with yellow markers, and info message with blue markers. If you want to limit the number of markers that are displayed, open the Preferences dialog box , go to Editor > Document checking, and specify the desired limit in the Maximum number of validation highlights option.

Clicking a marker will highlight the corresponding text area in the editor. The validation message is also displayed both in a tool tip (when hovering over the marker) and in the message area on the bottom of the application.

Bottom Part of the Stripe
Two navigation arrows () allow you to jump to the next or previous issue. The same actions can be triggered from Document > Automatic validation > Next error (Ctrl + Period (Command + Period on OS X)) and Document > Automatic validation > Previous error (Ctrl + Comma (Command + Comma on OS X)).

Status messages from every validation action are logged in the Console view (the Enable Oxygen consoles option must be selected in the View preferences page).

If you want to see all the validation messages grouped in the Results view, you should use the Validate action from the toolbar or XML menu. This action also collects the validation messages and displays them in the Problems view if the validated file is in the current workspace or in a custom Errors view if the validated file is outside the workspace.