Expected output format for a custom validation engine

Post here questions and problems related to oXygen frameworks/document types.
earlhood-eps
Posts: 6
Joined: Thu May 26, 2022 2:11 am

Expected output format for a custom validation engine

Post by earlhood-eps »

I am trying to register a custom validation engine into Oxygen, which is a separate executable to invoke that performs validation on the current document.

Question: What is the expected output format Oxygen expects/supports when consuming stdout/stderr of the external validator when populating the Results dialog? I see different columns present, including Location, so wonder what format is expected in order to populate the columns of the Results table, especially the Location column. It would be nice if the user has the ability to click on the location information (if I can populate it) to position cursor in the document, if that is possible.

If this information is documented, please provide a link to that information. Thanks.
Mircea
Posts: 152
Joined: Tue Mar 25, 2003 11:21 am

Re: Expected output format for a custom validation engine

Post by Mircea »

Hello,

Oxygen XML Editor supports integrating custom validation engines (external executables) and displaying their output in the Results dialog. For the Results view to properly populate columns such as "Location" and allow users to click and jump to the relevant position in the document, the external validator must output messages in a format that Oxygen can parse and link.

Oxygen expects the output messages from the external validator to follow a specific format, often referred to as the "linked output message format."
This format allows Oxygen to extract details such as file path, line, and column, and display them as clickable links in the Results view.

Key points:

Each message should include the file path, line number, and column number (if available), followed by the error or warning message.
The format should be consistent and parseable, similar to:

Code: Select all

[file path]:[line]:[column]: [message]
Example:

Code: Select all

/path/to/file.xml:12:5: Element 'foo' is not allowed here.
If the output follows this format, Oxygen will populate the "Location" column and make the message clickable, positioning the cursor at the specified location in the document.

Documentation Links:
If you follow the linked output message format, Oxygen will be able to extract location information and provide clickable links in the Results dialog. For more details and examples, refer to the linked output messages documentation.
Mircea Enachescu
<oXygen> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply