Skip navigation header
Oracle Help File Formats Table of Contents
Contents
Previous topic
Previous
Next topic
Next

Helpset File

The helpset file is an XML file that organizes project-level information about the helpset. For example, it points to other control files to be used for the helpset, including map, table of contents, index, associative links, and search. These references are used, in part to define the set of navigational views that Oracle Help uses to construct the user interface.

(Older versions of OHJ used a "helpbook" file and a HelpBook object. Helpbooks are still supported in current versions of OHJ; however, it is preferrable in current versions to use helpsets (helpset file and HelpSet object). See Adding the Help Data for information about programming OHJ with helpbooks vs. helpsets.)

The helpset file consists of the following elements and their child elements:

This topic also shows a sample helpset file.

The <helpset> Element

The contents of a helpset file are entirely contained within a single <helpset> element.That is, a helpset file must begin with <helpset> and end with </helpset>. Only one <helpset> element is allowed in a helpset file.

The <title> Element

The <title> element assigns a name to the helpset. For example:


  <title>API Reference</title>

Under certain conditions, this title is displayed in the Oracle Help user interface as the name of the helpset. For example, it is displayed in the drop-down list of helpsets when Oracle Help is implemented to display a list of merged helpsets (instead of concatenating them). For more information about his feature, see the following:

The <maps> Element

The <maps> element points to one or more map files, which are used to map topic IDs to topic files. The <maps> element has the following child elements:

Element Description
<mapref>

The location of a map file for this book. When more than one map file is specified, they are merged. Each <mapref> item is searched in order and a merged map is constructed. <mapref> has the following attributes:

location - The URL of the map file relative to the helpset.

class - [optional] A class whose location is the base location for the map file. Any path information in the location attribute is relative to this base location.

<homeID>

The ID (defined in the map file) of a topic that is used in some cases as the default topic for the helpset. That is, if no topic is specified when OHJ is launched, this topic is displayed by default. The <homeID> element is functional only in the following OHJ implementations:

  • OHJ Documentation Viewer. (The OHJ Documentation Viewer is installed when you install OHJ.)
  • When OHJ is implemented so that the navigator window and the topic window are docked by default.

The <homeID> element is not used in OHW.

Example:


  <maps>
    <mapref location="main_map.xml"/>
    <mapref location="tutorial/tut_map.xml"/>
  </maps> 

The <wintype> Element

The <wintype> element defines the characterisics of one or more windows that can be used by OHJ to display topics, including size, screen placement, text color, and background color. See OHJ Topic Windows for examples of how this looks in the OHJ user interface. OHW ignores this element. This information is also ignored if topics are displayed directly in a web browser.

The helpset file can have any number of <wintype> sections; one for each window type. The <wintype> tag has one valid attribute:

default - If true, the current window type is the default window type to be used if a topic file does not designate a window type. If false, this window type is not a default and will not be used except when explicitly listed in the map file. When the default attribute is not present, its value is assumed to be false.

The <wintype> element can have the following child elements:

Element Description

<name>

The name of this window type. This name is used to associate topics with the window type. If multiple windows are defined in a helpset, they must have unique names.
<height> The height of the window. A numeric value indicates a distance in pixels. A numeric value followed by a percent sign (%) indicates a percentage of the visible screen.
<width> The width of the window in pixels. A numeric value indicates a distance in pixels. A numeric value followed by a percent sign (%) indicates a percentage of the visible screen.
<x> The horizontal position of the window. A numeric value indicates a distance in pixels. A negative value indicates distance between the right edge of the window and the right edge of the screen. A numeric value followed by a percent sign (%) indicates a percentage of the visible screen.
<y> The vertical position of the window in pixels. A numeric value indicates a distance in pixels. A negative value indicates distance between the bottom edge of the window and the bottom of the screen. A numeric value followed by a percent sign (%) indicates a percentage of the visible screen.
<textfg> The six-digit hexadecimal RGB value of the foreground color of the text in the window. A preceding # on the value may be present, but is ignored. For any single topic, a foreground color specified in the HTML topic file or CSS will override this value.
<linkfg> The six -digit hexadecimal RGB value of the foreground color of the links in the window. A preceding # on the value may be present but is ignored. For any single topic, a link color specified in the HTML topic file or CSS will override this value.
<bg> The six -digit hexadecimal RGB value of the background color of the window. A preceding # on the value may be present but is ignored. For any single topic, a background color specified in the HTML topic file or CSS will override this value.
<title> Text that appears in the title bar of the window. A <title> tag in the HTML topic file will override this text.
<toolbar> Defines the buttons to display in the window's toolbar. A five-digit hexadecimal value which is the sum of one or more of the following:

00004    Turns off the default buttons on the toolbar.
00040    Adds a URL address textfield - to display the current URL.
00400    Add the Navigator button.
02000    Add the Print button.
04000    Add the Back and Forward buttons.
08000    Add the Search button.
10000    Add the Dock/Undock buttons.

A preceding # on the value may be present but is ignored.

Note that attributes specified in HTML topic content files always take precedence over attributes specified in the <wintype> section of the helpset.

The following <wintype> element defines a window to be used for tutorial topics:


  <wintype default=false>
    <name>Tutorial</name>
    <height>50%</height>
    <width>200</width>
    <x>10</x>
    <y>10</y>
    <textfg>000000</textfg>
    <linkfg>0000cc</linkfg>
    <bg>ffffff</bg>
    <title>Tutorial</title>
    <toolbar>06004</toolbar>
  </wintype>

This example defines a window type called "Tutorial" with a default height that is 50% of the screen height and a default width of 200 pixels. This window will display 10 pixels from the top and left side of the screen. The background of the window will be white with black text and blue links. The title bar of this window will read "Tutorial." The window's toolbar will contain Print, Back, and Forward buttons.

The <links> Element

The <links> element points to one or more link files, which are used to associate multiple targets with link IDs. The <links> element has the following child element:

Element Description
<linkref>

The location of a map file for this book. When more than one map file is specified, they are merged. Each <linkref> item is searched in order and a merged link database is constructed. <linkref> has the following attributes:

location - The URL of the link file relative to the helpset.

class - [optional] A class whose location is the base location for the map file. Any path information in the location attribute is relative to this base location.

For example:


  <links>
    <linkref location="linkfile1.xml"/>   
    <linkref location="linkfile2.xml"/>   
  </links>   

The <view> Element

The <view> element specifies how Oracle Help should render navigational "views." A navigational view is a representation of the data in the navigation control files (such as table of contents, index, and search) plus the user interface controls for navigating through them. Oracle Help includes Java classes to render standard types of views. Each type of view is presented on its own tab: by default the Contents tab, the Index tab, and the Search tab.

A helpset can include multiple views of each type. That is, the user interface can display multiple tables-of-contents tabs, index tabs, and so forth. Oracle Help can also merge views of the same type. It does this by merging all views of the same type that have the same label. (See the discussions of the <type> and <label> elements in the following table.) Views with the same type and label are merged as follows:

The <view> element can have the following child elements:

Element Description
<label> The label displayed on the navigator tab in the user interface. This label is optional. If no label is provided, Oracle Help uses "Contents," "Index," and "Search" for the appropriate tabs. The <label> element supports the following attribute:

image - [optional] An ID in the map file that is associated with an image file. The image appears next to the label text in the navigator tab.

<title> A title for the view. This title appears in different places in the different navigational views:
  • In the table of contents, the title is displayed as the title of the top-level node. All top-level nodes from the table of contents file (or from multiple TOC files, if they are merged) are then placed under this title node. If a title is not provided for a TOC view, then all top-level nodes in the TOC definition appear as top-level nodes in the table of contents view.

  • In the search and index views, the title is displayed as the Source location for any topics listed as the result of a search or from choosing an index item. If a title is not provided for a search or index view, the Source location is blank.

The title tag supports the following attribute:

image - [optional] An ID in the map file that is associated with an image file. If provided for a table-of-contents view, the image appears next to the text for the top-level node. If provided for an index or search view, the image is ignored.

<type> The name of the Java class to be used as the user interface for this view. The following types are provided with the default implementation:

oracle.help.navigator.tocNavigator.TOCNavigator
oracle.help.navigator.keywordNavigator.KeywordNavigator
oracle.help.navigator.searchNavigator.SearchNavigator

(If JavaHelp types are specified, Oracle Help maps these correctly to Oracle Help types.)

<data> The path to the data used by this view, in other words, to the pertinent navigational control file, such as table-of-contents file, index file, or search file. The contents of this element can be a file name or a URL. The <data> element supports the following attributes:

class - [optional] A class whose location is the base location for the data file. Any path information is relative to this base location, including any references to HTML files.

engine - The name of the Java class to process the data file. A different engine is required for each of the file types supported by Oracle Help, including Oracle Help's XML formats (based on the JavaHelp formats), the MS HTML Help HHC/HHK file formats, and the TOC/TOK formats supported by earlier versions of OHJ. The following table lists valid engine values for each view type:

Type oracle.help.navigator.tocNavigator.TOCNavigator:

Engine Description
oracle.help.engine.XMLTOCEngine (default) Oracle Help XML table of contents (extension of JavaHelp TOC)
oracle.help.engine.HHCEngine Microsoft HTMLHelp 1.x table of contents
oracle.help.engine.TOCEngine Table of contents from previous versions of OHJ

Type oracle.help.navigator.keywordNavigator.KeywordNavigator:

Engine Description
oracle.help.engine.XMLIndexEngine (default) Oracle Help XML keyword index (extension of JavaHelp keyword index)
oracle.help.engine.HHKEngine Microsoft HTMLHelp keyword index
oracle.help.engine.TOKEngine Keyword index from previous versions of OHJ

Type oracle.help.navigator.searchNavigator.SearchNavigator:

Engine Description
oracle.help.engine.SearchEngine (default) Oracle help text search database

In the following example, two table of contents tabs are created, one labeled User's Guide and the other labeled Reference. They both use the XML file format for the table of contents (specified in the <data> element), but they have different values in the <label> element. If both of the labels were the same, the table of contents files, ug_toc.xml and ref_toc.xml, would be combined into a single table of contents, and it would be shown in a single tab.


  <view>
    <label>User's Guide</label>
    <type>oracle.help.navigator.tocNavigator.TOCNavigator</type>
    <data engine="oracle.help.engine.XMLTOCEngine">ug_toc.xml</data>
  </view>
  
  <view>
    <label>Reference</label>
    <type>oracle.help.navigator.tocNavigator.TOCNavigator</type>
    <data engine="oracle.help.engine.XMLTOCEngine">ref_toc.xml</data>
  </view>
  

In the following example, only one table of contents tab is created, even though the two views use different file formats (XML vs. HHC) and different data engines. That is because the label and the type are the same. One advantage of this feature is that you can merge help systems using the old format with help systems using the new one without compromising the way the tabs are presented.


  <view>
    <label>Table of Contents</label>
    <type>oracle.help.navigator.tocNavigator.TOCNavigator</type>
    <data engine="oracle.help.engine.XMLTOCEngine">new_toc.xml</data>
  </view>
  
  <view>
    <label>Table of Contents</label>
    <type>oracle.help.navigator.tocNavigator.TOCNavigator</type>
    <data engine="oracle.help.engine.HHCEngine"old_toc.hhc</data>
  </view>
  

The next example shows one view each for a table of contents, an index, and a search. They do not have labels, so Oracle Help creates three tabs with the default labels, Contents, Index, and Search. Each view contains a <title> element with the value "User's Guide." This produces the following results:

This feature is useful when you merge several helpsets. It helps to keep the user oriented by reducing the number of top-level nodes in the table of contents and by showing the sources of topics found when using the index and search.



  <view>
    <title>User's Guide</title>
    <type>oracle.help.navigator.tocNavigator.TOCNavigator</type>
    <data engine="oracle.help.engine.XMLTOCEngine">ug_toc.xml</data>
  </view>

  <view>
    <title>User's Guide</title>
    <type>oracle.help.navigator.keywordNavigator.KeywordNavigator</type>
    <data engine="oracle.help.engine.XMLIndexEngine">ugindex.xml</data>
  </view>
  
  
  <view>
    <title>User's Guide</title>
    <type>oracle.help.navigator.searchNavigator.SearchNavigator</type>
    <data engine="oracle.help.engine.SearchEngine">search.idx</data>
  </view>

The <subhelpset> Element

The <subhelpset> element is used to include other helpsets with the one defined in this helpset file. The views from combined subhelpsets are merged in the same way mutlitple views are merged in a single helpset. That is, subhelpset views with the same <type> and <label> are merged. See <view>, above, for more information

The <subhelpset> element supports the following attributes:

location - Specifies the URL of the helpset to be merged.

class - [optional] A class whose location is the base location for the subhelpset file. Any path information in the location attribute is relative to this base location.

Sample Helpset File

The following listing shows a sample helpset with all of the sections discussed above, including five views: two tables of contents, two keyword indexes, and a text search.


  <?xml version='1.0'?>
  <helpset version="1.1">
  
  <maps>
    <mapref location="topics.xml"/>
  </maps>
  
  <wintype>
    <name>Tutorial</name>
    <height>50%</height>
    <width>200</width>
    <x>10</x>
    <y>10</y>
    <title>Tutorial</title>
    <toolbar>06004</toolbar>
  </wintype>
       
  <links>
    <linkref location="linkfile1.xml"/>
    <linkref location="linkfile2.xml"/>
  </links>
  
  <view>
    <label image="tocgif">Table of Contents</label>
    <title image="uggif">Forms User's Guide</title>
    <type>oracle.help.navigator.tocNavigator.TOCNavigator</type>
    <data engine="oracle.help.engine.XMLTOCEngine">ugcontents.xml</data>
  </view>
  
  <view>
    <label>Keyword Index</label>
    <type>oracle.help.navigator.keywordNavigator.KeywordNavigator</type>
    <data engine="oracle.help.engine.XMLIndexEngine">ugindex.xml</data>
  </view>
  
  <view>
    <label image="tocgif">Table of Contents</label>
    <title image="dggif">Forms Developer's Guide</title>
    <type>oracle.help.navigator.tocNavigator.TOCNavigator</type>
    <data engine="oracle.help.engine.HHCEngine"
      class="oracle.forms.documentation.dev">
      dgcontents.hhc   
    </data>
  </view>
  
  <view>
    <label>Keyword Index</label>
    <type>oracle.help.navigator.keywordNavigator.KeywordNavigator</type>
    <data engine="oracle.help.engine.HHKEngine"  
      class="oracle.forms.documentation.dev">
      dgindex.hhk</data>
  </view>
  
  <view>
    <label>Search</label>
    <title>Forms Documentation</title>
    <type>oracle.help.navigator.searchNavigator.SearchNavigator</type>
    <data engine="oracle.help.engine.SearchEngine"  
      class="oracle.forms.documentation.dev">
      search.idx</data>
  </view>
  
  <subhelpset location="prodsup.hs"/>
  <subhelpset location="advanced.hs"/>
  </helpset>