Output Formats » Sun JavaHelp » Sun JavaHelp Files » Helpset .hs File in Sun JavaHelp
Helpset .hs File in Sun JavaHelp
The helpset .hs file contains configuration information in XML format that Sun JavaHelp needs to display your help system. The following figure shows a sample helpset file:
<?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>Interesting help project</title> 
  <maps> 
    <homeID>home</homeID> 
    <mapref location="test.jhm" /> 
  </maps> 
  <view> 
    <name>TOC</name> 
    <label>Interesting help project</label> 
    <type>javax.help.TOCView</type> 
    <data>testt.xml</data> 
  </view> 
  <view> 
    <name>Index</name> 
    <label>Index</label> 
    <type>javax.help.IndexView</type> 
    <data>testi.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> 
</helpset> 
The helpset file begins with an XML declaration. The next part of the file, as shown in the following sample, defines the help version, the title of the help, and the location of the mapping file that is used to support context-sensitive help:
<helpset version="1.0"> 
  <title>Interesting help project</title> 
  <maps> 
    <homeID>home</homeID> 
    <mapref location="test.jhm" /> 
  </maps> 
The remaining sections of the file define several views, such as the table of contents (TOC), index, and search. Each <view> tag includes several tags that define the view, such as the <name> tag that specifies the name of the view and the <data> tag that specifies the data file for the view.
You can also define your own views in Sun JavaHelp by overriding the template.hs file. For example, you can create an alternate list of topics and provide that list as a separate view.
Was this helpful?
Last modified date: 11/30/2021