Accessibility

Table of Contents

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

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:

  • Export Project to DocBook (Content Only): Exports topics to XML files, creates separate files for any graphics, and creates XML files for the browse, index, TOC, see also, and glossary control files—plus a log file. This option does not export any DHTML or formatting data.
  • Export Project to DocBook (Full-Featured Export): Similar to the previous option but also exports the project's CSS and DHTML JavaScript file, providing the full project in DocBook form. (You can open the topics in a browser but they won't be formatted, even though this option exported the CSS file. To display the topics with correct formatting, convert the DocBook to a viewable format, such as HTML, PDF, or PostScript.)
  • Export Topics to DocBook (Content Only): Exports the topics, graphics, and summary log file.
  • Export Topics to DocBook (Full-Featured Export): Similar to the previous option but also exports the project's CSS file and DHTML JavaScript file, providing all the topics in DocBook form. As with the Export Project to DocBook (Full-Featured Export) option, you must convert the topics to HTML, PDF, or PostScript in order for them to appear with correct formatting.

    Whichever DocBook option you choose depends on the files you need. For example, if you want to output the entire project for use online, you'd probably select the Export Project to DocBook (Full-Featured Export) option. If you want just the topics for PostScript, you'd probably select the Export Topics to DocBook (Content Only) option. Define which files you need and then try the options to find the appropriate one.

    Note: For more information about DocBook, see DocBook: The Definitive Guide by Norman Walsh and Leonard Muellner (O'Reilly & Associates, 1999) or read Writing Documentation Using DocBook: A Crash Course, suggested by Dave Beck of the Macromedia development group.

  • Export Project to XHTML: Converts topics to XHTML with an HTM extension. (Note that this can cause trouble. See the note below about changing the extension and the discussion in the "XML Import" and "XHTML Filename Extensions" sections.) This option also exports the graphics, CSS, and JavaScript, and creates XML files for the browse, index, TOC, see also, and glossary control files—plus a log file.

    This option displays the topics properly formatted in a browser because it also exports the CSS file and adds the following reference in each topic's <head> section:

    <link rel="stylesheet" href="<nameofcss>.css" type="text/css" /> 

    If you open the HTML files in a text editor, such as Notepad, you'll see the reference to the CSS file and the namespace declaration for XHTML in the <html> tag.

    (Although the topics are formatted correctly when displayed in Microsoft Internet Explorer, the "start file" that this option creates does not open the output in the tri-pane window, as WebHelp does. This is because the Export Project to XHTML option is one of those open-ended outputs I mentioned in the introduction. It does not display a finished product, like WebHelp, but instead outputs a set of files for you to process further to create your finished product.)

    Note: You can change the XHTML file extension from HTM to another file extension by opening the XML Handler Manager to the Advanced page for the desired handler and changing the extension in the Export Topic File Extension field. (See the discussion about the XML filename extensions later in this article.)

  • Export Topics to XHTML: Similar to the previous option but only exports the topics, graphics, CSS, JavaScript, and log file.

    The XHTML export option you use depends on the files you need. For example, if you want to output the project for use online, you'd likely select the Export Project to DocBook (Full-Featured Export) option and plan on additional processing. If you want just the topics for PostScript, you'd likely select the Export Topics to DocBook (Content Only) option.