DITA Validate and Check For Completeness
The Validate and Check For Completeness action that is available on the toolbar of the DITA Maps Manager view provides the ability to validate a DITA map or a DITA Open Toolkit project file with a large array of settings. The settings dialog box has an Export settings option that can be used to export the settings to an XML configuration file. Once the settings are exported, you can use the validateCheckDITA.sh script (found in the scripts subfolder inside Oxygen's installation directory) to run a validation on a DITA map or DITA Open Toolkit project file and report the results in a separate XML document.
Sample Command-Line Arguments for the Validate and Check for Completeness Script:
sh scripts/validateCheckDITA.sh -i inputFile [-c contextId] [-s settingsFile] [-r reportFile]
A public example of using such a script as a GitHub action for reporting errors in pull
requests on DITA project can be found here: https://github.com/oxygenxml/blog/blob/master/.github/workflows/validate-check-completion.yml. The GitHub action calls a Gradle script target named
runValidation: https://github.com/oxygenxml/blog/blob/master/build/build.gradle.
Installing DITA OT Specialization Plugins
If you are using specialized DITA XML content, you must install extra plugins in the
DITA-OT publishing engine bundled with the all-platforms distribution
of Oxygen XML Developer. To do that, you can copy your DITA-OT specialization plugins to
the OXYGEN_ALL_PLATFORMS_FOLDER/frameworks/dita/DITA-OT/plugins folder,
then open a command line console in the DITA-OT/bin folder, and execute
the dita --install command to install the extra plugins in the DITA OT.
Using Schematron Rules For Validation
In the application's DITA Maps Manager view, you can configure the Validate and Check For Completeness dialog box's settings to reference a custom Schematron schema. The settings dialog box has an Export settings option that can be used to export the settings to an XML configuration file. Once you have this configuration file, you can provide it as a parameter in the validation script as exemplified above.