Integrating a new transform type
Plug-ins may integrate an entire new transform type. The new transform type can be very simple, such as an XHTML build that creates an additional control file; it can also be very complex, adding any number of new processing steps.
The transtype extension point is used to define a new "transtype", or transform type, which makes use of targets in your Ant extensions. When a transform type is defined, the build expects Ant code to be integrated to define the transform process. The Ant code must define a target based on the name of the transform type; if the transform type is "mystuff", the Ant code must define a target named dita2mystuff.
- Add new value to list of valid transformation type names.
- Declare transtype as a print type.
The following feature defines a transform type of "newtext" and declares it as a print type; using this transform type will cause the build to look for a target dita2newtext, defined in a related Ant extension from the third feature:
<plugin id="com.example.newtext"> <feature extension="dita.conductor.transtype.check" value="newtext"/> <feature extension="dita.transtype.print" value="newtext"/> <feature extension="dita.conductor.target.relative" file="antWrapper.xml"/> </plugin>