How to hook a custom validator into a Document Type framework?
Post here questions and problems related to oXygen frameworks/document types.
-
hostchick
- Posts: 1
- Joined: Wed Oct 15, 2025 10:55 am
- Location: https://stickhook.io
How to hook a custom validator into a Document Type framework?
Hi admin,
I'm developing a custom Document Type in Oxygen XML and would like to integrate a custom validation engine (not based on XSD/RelaxNG/DTD).
Is there a way to hook a custom validator into the framework so that:
It runs automatically during document editing (on save or on demand)?
Validation results are displayed in the Problems panel like standard errors?
If possible, could you point me to a sample plugin or API interface to implement this?
Thanks in advance!
I'm developing a custom Document Type in Oxygen XML and would like to integrate a custom validation engine (not based on XSD/RelaxNG/DTD).
Is there a way to hook a custom validator into the framework so that:
It runs automatically during document editing (on save or on demand)?
Validation results are displayed in the Problems panel like standard errors?
If possible, could you point me to a sample plugin or API interface to implement this?
Thanks in advance!
-
tavy
- Posts: 396
- Joined: Thu Jul 01, 2004 12:29 pm
Re: How to hook a custom validator into a Document Type framework?
Hello,
To create a custom validator in Oxygen XML Editor, you have two main options:
1. Configure an External Validation Engine
You can add an external validator (such as a command-line tool) via the Custom Validation Engines preferences:
- Go to Options > Preferences > Editor > Document Validation > Custom Validation Engines.
- Click New to add a custom validator.
- Specify the Name, Executable path, Working directory, and Command-line arguments for your tool.
- You can use editor variables like ${cf} (current file), ${ds} (detected schema), etc., in your command-line arguments.
Once configured, your custom validator will appear in the Validation toolbar drop-down menu and can be used to validate documents.
See more details here: https://www.oxygenxml.com/doc/versions/ ... ation.html
2. Implement a Validator Plugin
If you want deeper integration, you can create a plugin:
- Implement the ro.sync.exml.plugin.validator.ValidatorPluginExtension interface in your plugin.
- In your plugin descriptor, add:
After installing the plugin, your custom engine will be available in validation scenarios.
See plugin extension details here: https://www.oxygenxml.com/doc/versions/ ... nsion.html
For more on configuring and using custom validators, see the Custom Validators documentation: https://www.oxygenxml.com/doc/versions/ ... ation.html
Best Regards,
Octavian
To create a custom validator in Oxygen XML Editor, you have two main options:
1. Configure an External Validation Engine
You can add an external validator (such as a command-line tool) via the Custom Validation Engines preferences:
- Go to Options > Preferences > Editor > Document Validation > Custom Validation Engines.
- Click New to add a custom validator.
- Specify the Name, Executable path, Working directory, and Command-line arguments for your tool.
- You can use editor variables like ${cf} (current file), ${ds} (detected schema), etc., in your command-line arguments.
Once configured, your custom validator will appear in the Validation toolbar drop-down menu and can be used to validate documents.
See more details here: https://www.oxygenxml.com/doc/versions/ ... ation.html
2. Implement a Validator Plugin
If you want deeper integration, you can create a plugin:
- Implement the ro.sync.exml.plugin.validator.ValidatorPluginExtension interface in your plugin.
- In your plugin descriptor, add:
Code: Select all
<extension type="DocumentValidator" class="my.validator.plugin.extension"/>See plugin extension details here: https://www.oxygenxml.com/doc/versions/ ... nsion.html
For more on configuring and using custom validators, see the Custom Validators documentation: https://www.oxygenxml.com/doc/versions/ ... ation.html
Best Regards,
Octavian
Octavian Nadolu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “SDK-API, Frameworks - Document Types”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service