Integrating a DITA Specialization
A DITA specialization can have its document type defined with any of the following::
- DTD - For configuration and specialization tutorials, see http://dita4practitioners.github.io/dita-specialization-tutorials/. A small sample plugin is also available here: https://github.com/oxygenxml-incubator/dita-ot-specialization-plugin-sample/.
- XSD - For configuration and specialization tutorials, see http://dita4practitioners.github.io/dita-specialization-tutorials/.
- Relax NG - For more information, see the following presentation: Creating DITA-OT Constraint/Specialization Plugins. For Relax NG coding requirements, see https://www.oxygenxml.com/dita/1.3/specs/archSpec/base/relax-ng-requirements.html.
A DITA specialization may optionally include specialized processing, that is new XSLT
template rules that match the extension part of the @class
attribute values of
the new elements, and thus extend the default processing available in the DITA Open
Toolkit.
To integrate a DITA specialization into Oxygen XML Editor, use one of the following methods:
DITA-OT Plugin Method
CAUTION: Oxygen XML Editor support
engineers do not officially offer support and troubleshooting assistance for custom DITA-OT
distributions or custom installed DITA-OT plugins. If you discover any issues or inconsistent
behavior while using a custom DITA-OT or a DITA-OT that contains custom DITA-OT plugins, you
should revert to the default built-in DITA-OT.
If the DITA specialization is available as a DITA Open Toolkit plugin, follow this procedure:
- Copy the additional plugin to the location of the DITA-OT version you are
using (by default, DITA-OT-DIR\plugins
directory).Important: The application needs to have full write access permissions to the DITA-OT directory.
- If Oxygen XML Editor was installed in the default location, you may need to restart and run it as an administrator.
- Select the Configure Transformation Scenario(s) action from the DITA Maps Manager toolbar (you could also use the same action on the main toolbar or open the Transformation Scenarios view).
- Select the Integrate/Install DITA-OT Plugins transformation scenario.Tip: If you don't see that scenario in the Configure Transformation Scenario(s) dialog box or Transformation Scenarios view, click the Settings button and select the Show all scenarios option, but don't forget to change it back to Show only the scenarios available for the editor after you are finished with this procedure.
- Apply the scenario.
- Check the Results panel at the bottom of the application to make sure the build was successful.
- Restart Oxygen XML Editor with your normal permissions.
Tip: Oxygen XML Editor detects new document
templates contributed by the DITA-OT plugin as long as you do the following:
- Create a new folder called template_folders inside your DITA OT plugin's folder. For example: DITA-OT-DIR\plugins\my_custom_plugin\template_folders.
- Create one or more subfolders inside the template_folders directory that contain the new document templates. The new document templates found in those subfolders will be available in the New document wizard.
Alternative Methods
If the DITA specialization is not available as a DITA-OT plugin, you have the following
options:
- If the DTDs that define the extension elements are located in a folder outside the DITA Open Toolkit folder, add new rules to the DITA-OT catalog file. These rules are meant for resolving the DTD references from the DITA files that use the specialized elements to that folder. This allows for correct resolution of DTD references to your local DTD files and is needed for both validation and transformation of the DITA maps or topics. The DITA-OT catalog file is called catalog-dita.xml and is located in the root folder of the DITA Open Toolkit.
- If there is specialized processing provided by XSLT stylesheets that override the
default stylesheets from DITA-OT, these new stylesheets must be called from the DITA-OT
Ant build scripts. Important: If you are using DITA specialization elements in your DITA files, it is recommended that you activate the Enable DTD/XML Schema processing in document type detection option in the Document Type Association preferences page.
- You could create your own document templates, store them in a custom directory, then add that directory to the list of template directories that Oxygen XML Editor uses by adding the directory to the list in the Document Templates Preferences page.