Overview of WebHelp DITA-OT Processing Stages
The WebHelp Responsive plugin inherits the multi-stage processing mode from the DITA-OT publishing engine. Each stage in the process examines some or all of the content. Some stages result in temporary files that are used in later steps, while other stages result in updated copies of the DITA content. Most of the processing takes place in a temporary working directory, and the source files themselves are never modified.
The most important steps (Ant targets) in the WebHelp Responsive transformation process are:
- whr-init
-
Creates a set of initializations required by the next processing steps such as: initialize the plugin Java CLASSPATH, load the Oxygen Publishing Template, or set the default values for various properties.
- preprocess
- This is a step defined in the
DITA Open Toolkit processor representing a set of
sub-steps that typically runs at the beginning of every DITA-OT transformation. Each step or stage corresponds to an Ant
target in the build pipeline; the
preprocess
target calls the entire set of steps. - whr-detect-lang
- Detects the documentation language by looking into the DITA map file. If not detected,
it uses the value of the
default.language
parameter. - whr-collect-indexterms
-
Collects the index terms from DITA topics and write them in WebHelp Output Directory/index.xml. The index.xml file is used later by the whr-create-indexterms-page step to generate the index terms HTML page (WebHelp Output Directory/indexTerms.html).
- whr-create-props-file
-
Serializes the transformation parameters in XML and JS formats so they can be used in the next XSLT processing steps or JavaScript.
You can read the value of a WebHelp transformation parameter from your XSLT extension stylesheets by using the
getParameter(param.name)
function from thehttp://www.oxygenxml.com/functions
namespace. - whr-toc-xml
- Generates the
toc.xml
file in the temporary directory. - whr-nav-links
- Generates the navigational links for all DITA topics such as menu, table of contents, or breadcrumb links.
- whr-context-help-map
- Generates the
context-help-map.xml
file in the output folder. This file is used by the Context-Sensitive WebHelp Responsive system. - whr-sitemap
- Generates the
sitemap.xml
file in the output folder. This file is used for Search Engine Optimization. - whr-copy-resources
- Copies all the resources (logo, favicon, JavaScript files, CSS files, etc.) that are needed by the WebHelp transformation to the output folder.
- whr-create-topic-pages
-
Generates an HTML file for each DITA topic.
Implementation is done by running an XSLT transformation that processes the topic layout page with DITA-OT-DIR/plugins/com.oxygenxml.webhelp.responsive/templates/xsl/dita2webhelp/dita2webhelp.xsl XSLT file for all DITA topics. You can extend this step by using the
com.oxygenxml.webhelp.xsl.dita2webhelp
extension point. - whr-create-main-page
-
Generates the WebHelp main page (index.html) in the output folder.
Implementation is done by running an XSLT transformation that processes the main layout page with the DITA-OT-DIR/plugins/com.oxygenxml.webhelp.responsive/templates/xsl/mainFiles/createMainPage.xsl XSLT file. You can extend this step by using the
com.oxygenxml.webhelp.xsl.createMainPage
extension point. - whr-create-search-page
-
Generates the WebHelp search results page (search
.html
) in the output folder.Implementation is done by running an XSLT transformation that processes the search results page with DITA-OT-DIR/plugins/com.oxygenxml.webhelp.responsive/templates/xsl/mainFiles/createSearchPage.xsl XSLT file. You can extend this step by using the
com.oxygenxml.webhelp.xsl.createSearchPage
extension point. - whr-create-indexterms-page
-
Generates the WebHelp index terms HTML page (
indexTerms.html
) in the output folder.Implementation is done by running an XSLT transformation that transforms the WebHelp Output Directory/index.xml generated by the
whr-collect-indexterms
step with DITA-OT-DIR/plugins/com.oxygenxml.webhelp.responsive/templates/xsl/mainFiles/createIndextermsPage.xsl XSLT file. You can extend this step by using thecom.oxygenxml.webhelp.xsl.createIndexTermsPage
extension point. - whr-search-index
-
Processes the generated HTML (for all DITA topics) to generate an index file. This index is used to implement the WebHelp search function.