Accessibility

RoboHelp X5 and XML – Part 1: Import and Export Features

Neil Perlin

www.hyperword.com

When Microsoft announced in 1996 that the next version of Windows Help would be based on HTML rather than the older Rich Text Format (RTF), Blue Sky Software (eHelp's original name) began adding HTML support to RoboHelp. That support began as a plug-in that went through a sometimes tortuous evolution before becoming the powerful and largely stable authoring tool it is today.

We are now starting another shift—this time from HTML to XML. Once again, we're likely to go through a sometimes tortuous evolution before RoboHelp XML settles down.

This article is the first of a two-part series that examines Macromedia RoboHelp support for XML. Part 1 looks at the import and export features, while Part 2 will look at the "handlers." Both articles discuss the features' mechanics, their peculiarities, and some aspects of integrating them in a documentation workflow. These articles don't cover all the details but they will help you evaluate whether you can use RoboHelp in an XML environment.

XML support by RoboHelp X5 can be summed up in two significant points:

After reading this article, continue reading the next part, RoboHelp X5 and XML – Part 2: Using Handlers to Customize RoboHelp XML Features.

Review of XML Concepts

If you are new to XML, you should read this recap of XML basic concepts. XML is similar to HTML in some basic ways:

XML Exporting

This section discusses exporting to the predefined formats: DocBook or XHTML. Although you can export to other outputs, you'll have to create custom export handlers to do so (which I cover in Part 2).

To export, use the XML Output Options dialog box (see Figure 1). To open it, double-click the XML Output option under the Single Source Layouts folder on the Project tab.

XML Output Options dialog box

Figure 1. XML Output Options dialog box

Figure 1 shows the dialog box and the predefined export handlers. If you select either DocBook option, the Advanced button becomes active. Clicking it opens the Advance Options dialog box (see Figure 2).

Advanced (DocBook Output) Options dialog box

Figure 2. Advanced (DocBook Output) Options dialog box

Here's what the four handlers and the Advanced Options dialog box let you do:

XML Importing

This section discusses importing using the defaults. You can import other formats too, but you'll have to create custom import handlers to do so.

To import XML, use the Import XML: Select XML Import Handler dialog box (see Figure 3). To open it, select File > Import and select XML File.

Import XML: Select XML Import Handler dialog box

Figure 3. Import XML: Select XML Import Handler dialog box

Figure 3 shows the dialog box and the predefined handlers. If you select the Import XML (CSS/XSL) option, the Advanced button becomes active. Clicking it displays the Advance XML Import Options dialog box (see Figure 4).

Advanced XML Import Options dialog box

Figure 4. Advanced XML Import Options dialog box

The three handlers and the Advanced XML Import Options dialog box let you do the following:

XML file imported as text flow

Figure 5. XML file imported as text flow

XML file imported as tree view

Figure 6. XML file imported as tree view

XHTML Filename Extensions

The Export Topics to XHTML option converts topics to XHTML with an HTM extension. Technically this is fine. However, it makes it impossible to distinguish by eye between HTML and XHTML files. It's also part of a larger question regarding which extension to use for XHTML files.

The W3C's (World Wide Web Consortium) XHTML recommendation does not specify which extension to use for XHTML files. This implies that HTM is an acceptable extension. However, as I noted above, this makes it impossible to look at a filename and know whether it is in HTML or XHTML format. This will cause confusion if your company has files in both formats; a better approach is to use XHTML as the extension.

In 2000 the IETF (Internet Engineering Task Force) recommended using XHTML or XHT extensions. The IETF recommended against using the XML extension because of the risk of confusion, at the server level, over how to distribute such files (text/XML or application/XML).

Finally, one website—whose address I've since lost and have not been able to find again—suggests using XTM as the XHTML file extension. I don't recommend this option because the XTM extension is for files in the Extensible Topic Map format.

Summary Observations

RoboHelp X5 does not support native XML authoring. It acts more like a format converter. This is good if you want to share files between RoboHelp and other projects. It's less optimal if you want to create XML files, however, because you must first convert the material. This can adds steps to the procedure and create problems such as incompatible or messy code. So whether you use RoboHelp for XML work depends on your documentation workflow.

Also consider whether that documentation workflow is based on one tool. In theory, any tool that creates XML or XHTML should create the same set of code, so tool standards should not be an issue.

In reality, you'll get different XML code depending on whether you create the XML using RoboHelp, Microsoft Word, or WebWorks Publisher for Word—just to name three tools. Each tool's output works in a browser, but the codes are different. These inconsistencies may cause odd behavior or conflicts that you may have to correct. For example, I once created a file in Word 2003, saved it as XML, and imported it into RoboHelp. When I previewed the topic, a subhead was superimposed on the title but the topic appeared correctly in the final output. I'm still not sure why this happened because the code looked right. To avoid this problem in a production environment, consider establishing some authoring tool standards in your company. (Enforcing those standards may be very difficult, especially if your company grows by acquisition or has a number of disparate documentation groups.)

You may also experience odd conversion results when working with files from subject-matter experts who create Word files with all text set in Normal style, or text applied with incorrect or irrationally chosen styles. I always suggest to clients who use a word processor like Microsoft Word that they train their subject-matter experts to apply styles correctly and make style usage a standard.

RoboHelp's XML support is new and still evolving. As you could expect in such a situation, its XML features are still evolving too. However, once you get past a few points of confusion, the mechanics of the features are fairly clear. I would describe the XML feature set in RoboHelp as a good first effort.

Continue reading the next part, RoboHelp X5 and XML – Part 2: Using Handlers to Customize RoboHelp XML Features.

Thanks to Dave Beck and Raul Ramos of Macromedia for their help with my questions.

About the author

Neil Perlin is president of Hyper/Word Services of Tewksbury, MA. He has been a technical writer since 1979 and a trainer, consultant, and developer since 1985 for online formats and tools such as WinHelp, HTML Help, WebHelp, JavaHelp, CE Help, RoboHelp, and some now known only in legend. Neil provides consulting, training, and development for online help and documentation, workflow and standards, RoboHelp, RoboInfo, RoboDemo, XML, and single sourcing. You can reach him at nperlin@concentric.net.