Element Domain Specialization Step 5: Extend DITA Open Toolkit XHTML Processor
Per the documentation of the types in the XML domain, we need to create XSLT templates for each of the different mentions to produce the appropriate output effects.
Because the XML domain only defines specializations of <keyword>
, the XSLT required is quite simple and requires very little knowledge of XSLT itself.
The Open Toolkit is designed to allow extension of base functionality through "plugins." This allows you to create processing specific to your specialization and then easily deploy it without directly modifying the base Toolkit processes. All Toolkit transformation types should provide appropriate extension points for plugins, but not all do. However, both the HTML and PDF transformation types do provide the extension points you need to easily add processing for new specializations.
- Create an empty starting XSLT stylesheet in a directory you control (that is, outside the scope of the DITA Open Toolkit) and add an import of the base Toolkit-supplied HTML transform.
- Create type-specific match templates for the element types in the XML domain.
- Package the transform as an Open Toolkit plugin.
- Deploy the plugin and test it.