HelpSet File

When the JavaHelp system is activated by your application, the first thing it does is read the HelpSet file specified by the application. The HelpSet file defines the HelpSet for that application. A HelpSet is the set of data that comprises your help system. The HelpSet file includes the following information:
Map file The map file is used to associate topic IDs with the URL or path name of HTML topic files.
View information Information that describes the navigators being used in the HelpSet. The standard navigators are: table of contents, index, and full-text search. Information about custom navigators is included here as well.
HelpSet title The name of the top-level TOC folder.
Home ID The name of the (default) ID that is displayed when the help viewer is called without specifying an ID.
Sub-HelpSets Optional section can be used to statically include other HelpSets using the <subhelpset> tag. The HelpSets indicated using this tag are merged automatically into the HelpSet that contains the tag. More details about merging can be found in Merging HelpSets.

After your product is installed on your user's system, it must be able to find the HelpSet file. The application specifies the path to the HelpSet file when it starts the JavaHelp system. By convention, the name of the HelpSet file ends with the .hs extension.

HelpSet File Format

The format of the HelpSet file is based on the World Wide Web Consortium Extended Markup Language (XML 1.0) proposed recommendation:


   http://www.w3.org/TR/PR-xml-971208
The following is an example of a HelpSet file (description follows):


<?xml version='1.0' encoding='ISO-8859-1' ?>
<!DOCTYPE helpset
  PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 1.0//EN"
         "http://java.sun.com/products/javahelp/helpset_1_0.dtd">
<helpset version="1.0">
   <!-- title -->
   <title>Java Development Environment - Help</title>
			
   <!-- maps -->
   <maps>
     <homeID>top </homeID>
     <mapref location="Map.jhm" />
   </maps>
	
   <!-- views -->
   <view>
      <name>TOC</name>
      <label>Table Of Contents</label>
      <type>javax.help.TOCView</type>
      <data>IdeHelpTOC.xml</data>
   </view>
	
   <view>
      <name>Index</name>
      <label>Index</label>
      <type>javax.help.IndexView</type>
      <data>IdeHelpIndex.xml</data>
   </view>
	
   <view>
      <name>Search</name>
      <label>Search</label>
      <type>javax.help.SearchView</type>
         <data engine="com.sun.java.help.search.DefaultSearchEngine">
         JavaHelpSearch
         </data>
   </view>
	
   <!-- subhelpsets -->
   <subhelpset location="file:/c:/Foobar/HelpSet2.hs" />
</helpset>

The HelpSet Tags

The following table describes the HelpSet tags:
<helpset> Defines the HelpSet. It can contain all of the following tags.
<title> Names the HelpSet. This string can be accessed by the application and used in the presentation (for example, in the viewer header stripe).
<maps> Specifies the default topic and URL of the map file used in the HelpSet. Contains the following tags:
<homeID> Specifies the name of the (default) ID that is displayed when the help viewer is called if an ID is not explicitly specified.
<mapref> Specifies the map files. Note that in the 1.0 release only one map file may be specified. Contains the following attribute:
location URL of the map file.
<view> Defines the navigators used in the HelpSet. Each navigator is defined by its own <view>. May contain all of the following tags:
<name> Names the view.
<label> Specifies a label associated with the view. This string can be accessed by the application and used in the presentation (for example, in the navigator's tab).
<type> Specifies the path to the navigator class.
<data> Specifies the path to the data used by the navigator. When used with the search navigator, it contains the following attribute:
engine Path to the search engine class.
<subhelpset> This optional tag can be used to specify HelpSets you want merged with the HelpSet that contains the tag. See Merging HelpSets for more information. Contains the following attribute:
location URL of the HelpSet file to be merged.

See also:

The Map File
Table of Contents File
Index File
Creating the Full-Text Search Database