Accessibility

Table of Contents

RoboHelp X5 and XML – Part 2: Using Handlers to Customize RoboHelp XML Features

Handler Overview

Two significant points to be aware of regarding the RoboHelp handler feature:

  • XML usage is still evolving in the RoboHelp community, thus, Macromedia wasn’t able to create handlers for all XML formats. Instead, Macromedia created handlers for the common formats and added an editor for you to create your own handlers. This provides a lot of flexibility since you can essentially create any handlers you need.
  • That flexibility has a price: the need for coding skills. Taking advantage of the handler editing capabilities requires the creation of BAT, XSL, or DLL files. Many other features now taken for granted were once highly complex; but at the moment, handler operations are far more complex than other RoboHelp features.

RoboHelp comes with some pre-defined handlers for the most common forms of XML, primarily DocBook and XHTML. You can modify these handlers, if necessary, to support import of XHTML files with XHT extensions, for example. You can also create entirely new handlers for other, less common forms of XML, such as DITA.

Typically, you work with handlers in three ways.

  • You can use one of the existing handlers for import or export:

    1. Select the XML Output option under Single Source Layouts on the Project tab.
    2. Select an export handler from the XML Output Options dialog box or select File/Import/XML File…
    3. Select the file to import and select the desired import handler from the Import XML: Select XML Import Handler dialog box. Both of these steps are mechanically simple; I described them in the previous article.
  • You can edit or delete an existing handler or import a new one. Use the XML Handler Manager (Figure 1) by selecting Tools > XML Handler Manager.

    Figure 1. The XML Handler Manager (shown with expanded listings)

  • You can create a new handler or modify an existing handler’s settings. Use the Handler Description File Editor (Figure 2), available from the XML Handler Manager or by double-clicking HDF Editor within the RoboHelp Tools tab.

    The Handler Description File Editor (shown with expanded listings)

    Figure 2. The Handler Description File Editor (shown with expanded listings)

The Handler Description File (HDF) serves two purposes:

  • It’s a category that contains individual handlers. Figure 2, for example, shows the DocBook HDF that contains three handlers: import DocBook as topics, export project, and topics to DocBook.
  • It contains the various control files that execute the imports and exports.

Be aware that the Handler Description File Editor is a separate application. You must transfer the HDFs and handlers to RoboHelp before you can use them to import and export XML.