OmniHelp generation

For topic (text) information, OmniHelp uses HTML 4.01 files conforming to current W3C Recommendations. (It can also accept XHTML, but this can cause problems with CSS in some browsers.) OmniHelp requires one addition to the <head> of such files:

<script language="JavaScript" type="text/javascript" src="ohmain.js">

</script>

Synchronized contents

This script tag links in OmniHelp CSS support, and keeps the Contents synchronized when you click links in the topic pane. OmniHelp can load HTML files from any source in the topic pane, via links from an OmniHelp topic. However, if a file is not listed by name in the Contents, the Contents display remains where it was when the previous file loaded; Prev, Next, Back, and Fwd buttons have no effect; and the Related topics feature is not available. The Index and Search panes are usable normally, as are the Start and Hide/Show buttons.

Navigation data files

Project-specific navigation information is contained in four data files; a fifth data file is used for context-sensitive help. The data files are named for the project, with the following suffixes:

[spacer]

.ohc

Table of contents

.ohk

Topic index

.ohs

Search index

.ohl

Related topics

.oha

CSH identifiers

All data files use a similar format: JavaScript two-dimensional arrays that require no parsing by the OmniHelp code; the arrays are used directly. For example, here is part of the .ohc data for a sample project:

[2,"9 Using markers for HTML markup","htmlmark.htm#Xae1015982"],

[3,"9.1 Working with FrameMaker markers","ae999397.htm#Xae1015686"],

[3,"9.2 Adding custom marker types","ae999029.htm#Xae999029"],

And here is part of the .ohk data for the same project:

[1,"title, HTML attribute"],

[2,"for images, assigning via marker"],

[3,"ae999029.htm#Xae1003420",3],

The last index line (last line in the.ohk data sample) refers back to the topic in the last contents line (last line in the.ohc data sample), but to a different point within that topic, via the final “3” (the index of the contents item).

Start-up and project files

OmniHelp uses two additional files with project-specific content:

[spacer]

_project.htm

Project file: contains the title displayed for the project

.ohx

Settings file: contains all customizable JavaScript variables

Mif2Go generates these two project-specific files, as well as the five .oh* data files. A Help author can optionally use a template file, ohtpl.ini, to customize the _project and .ohx files. The OmniHelp distribution includes sample files _OmniHelp.htm and OmniHelp.ohx for manual editing, if Mif2Go is not used to generate OmniHelp.

Control files

The rest of the OmniHelp files are fixed in content, although they can of course be modified by anyone willing to invest the time to understand the JavaScript they contain. For the usual HTML output, these files are:

[spacer]

ohstart.js

Start-up script, included by reference in _project.htm

ohmain.js

CSS-setting script, included by reference in all topic files

ohframe.js

Framesetting script, referenced from ohframe.htm

ohtop.htm
ohtop.js

Top navigation-pane loader and script

ohctrl.htm

Main control file, which loads into an invisible frame; directs most OmniHelp operations with six script files:

ohctrl.js
ohtoc.js
ohidx.js
ohfts.js
ohrel.js
ohmerge.js

Control
Contents
Index
Search
Related topics
Merge

ohmerged.htm
ohmerged.js

Run-time project merging loader and script

ohlang*.js

Three language-dependent files that contain all visible UI text

ohctrl.css

CSS used for navigation control, with variants named:

ohctie.css
ohctn4.css
ohctn6.css

Internet Explorer 4 and up
Netscape 4.x
Netscape 6 and up

ohdr.css

Sample CSS used for main topic panel, with variants as above.

ohnav.htm
ohnavctrl.htm
ohmain.htm

Placeholder HTML used during frameset construction to prevent browser difficulties (particularly with IE).

ohtc1.gif
...
ohtc13.gif

Icons used for expanding Contents and Index, not used for Netscape 4.x

For the alternative XHTML output, the following ox*.htm files replace oh*.htm files: oxctrl, oxframe, oxmain, oxmerged, oxnav, oxnavctrl, and oxtop. In addition, oxlang.js replaces ohlang.js.