Ant Extensions for WebHelp Responsive
The WebHelp Responsive plugin provides extension points that allow you to implement custom
Ant targets to perform additional operations before and after certain processing stages. The
following extension points are available in WebHelp Responsive:
- whr-init-pre
- Runs a custom Ant target before the
whr-init
processing stage. - whr-init-post
- Runs a custom Ant target after the
whr-init
processing stage. - whr-collect-indexterms-pre
- Runs a custom Ant target before the
whr-collect-indexterms
processing stage. - whr-collect-indexterms-post
- Runs a custom Ant target after the
whr-collect-indexterms
processing stage. - whr-toc-xml-pre
- Runs a custom Ant target before the
whr-toc-xml
processing stage. - whr-toc-xml-post
- Runs a custom Ant target after the
whr-toc-xml
processing stage. - whr-context-help-map-pre
- Runs a custom Ant target before the
whr-context-help-map
processing stage. - whr-context-help-map-post
- Runs a custom Ant target after the
whr-context-help-map
processing stage. - whr-sitemap-pre
- Runs a custom Ant target before the
whr-sitemap
processing stage. - whr-sitemap-post
- Runs a custom Ant target after the
whr-sitemap
processing stage. - whr-copy-resources-pre
- Runs a custom Ant target before the
whr-copy-resources
processing stage. - whr-copy-resources-post
- Runs a custom Ant target after the
whr-copy-resources
processing stage. - whr-create-topic-pages-pre
- Runs a custom Ant target before the
whr-create-topic-pages
processing stage. - whr-create-topic-pages-post
- Runs a custom Ant target after the
whr-create-topic-pages
processing stage. - whr-create-main-page-pre
- Runs a custom Ant target before the
whr-create-main-page
processing stage. - whr-create-main-page-post
- Runs a custom Ant target after the
whr-create-main-page
processing stage. - whr-create-search-page-pre
- Runs a custom Ant target before the
whr-create-search-page
processing stage. - whr-create-search-page-post
- Runs a custom Ant target after the
whr-create-search-page
processing stage. - whr-create-indexterms-page-pre
- Runs a custom Ant target before the
whr-create-indexterms-page
processing stage. - whr-create-indexterms-page-post
- Runs a custom Ant target after the
whr-create-indexterms-page
processing stage. - whr-search-index-pre
- Runs a custom Ant target before the
whr-search-index
processing stage. - whr-search-index-post
- Runs a custom Ant target after the
whr-search-index
processing stage.
To use Ant extension points for WebHelp Responsive, follow these steps:
- In the DITA-OT-DIR/plugins/ folder, create a folder for this plugin (for example, com.oxygenxml.webhelp.responsive.custom.ant.extensions).
- Create a plugin.xml file (in the folder you created in step
1) that extends the WebHelp Responsive plugin and specifies an Ant extension point with
your custom Ant project file that contains the new build targets. For
example:
<plugin id="com.oxygenxml.webhelp.responsive.custom.ant.extensions"> <require plugin="com.oxygenxml.webhelp.responsive"/> <feature extension="ant.import" file="custom_build_file.xml"/> </plugin>
- Create the custom_build_file.xml file (in the folder you created in step 1) that
contains your custom Ant project implementing one or more extension
points:
<project name="custom.ant.extensions.integrator" basedir="."> <target name="custom-whr-init-pre" extensionOf="whr-init-pre"> <echo>Extension point that executes before whr-init</echo> </target> <target name="custom-whr-init-post" extensionOf="whr-init-post"> <echo>Extension point that executes after whr-init</echo> </target> </project>
- Integrate the plugin into the DITA-OT. In the DITA-OT-DIR/bin
directory of the DITA Open Toolkit, run one of the following
scripts, depending on your operating system:
DITA-OT-DIR/bin/dita.bat --install
sh DITA-OT-DIR/bin/dita --install
- Execute a DITA Map to WebHelp Responsive transformation script.