Skip to Main Content
Creating Effective JavaHelp
book

Creating Effective JavaHelp

by Kevin Lewis
June 2000
Intermediate to advanced content levelIntermediate to advanced
192 pages
4h 53m
English
O'Reilly Media, Inc.
Content preview from Creating Effective JavaHelp

Creating the HelpSet File

Take a look at the HelpSet file for the Aviation JavaHelp sample. I like to keep filenames simple, so I named it HelpSet.hs. Another good name would be Aviation.hs. Regardless of what you name the HelpSet file, you must use the .hs filename extension; the HelpSet Viewer won’t open it otherwise.

Using a text editor, open the file HelpSet.hs. It contains the following code:

<?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>Aviation Information</title>
  <maps>
    <homeID>intro</homeID>
    <mapref location="Map.jhm"/>
  </maps>
  <view>
    <name>TOC</name>
    <label>Aviation TOC</label>
    <type>javax.help.TOCView</type>
    <data>TOC.xml</data>
  </view>
  <view>
    <name>Index</name>
    <label>Aviation Index</label>
    <type>javax.help.IndexView</type>
    <data>Index.xml</data>
  </view>
  <view>
    <name>Search</name>
    <label>Aviation Word Search</label>
    <type>javax.help.SearchView</type>
  <data engine="com.sun.java.help.search.DefaultSearchEngine">
      JavaHelpSearch
    </data>
  </view>
</helpset>

This code demonstrates both HelpSet data tags and navigation component tags. I explain how to use tags to merge HelpSets in Chapter 6.

Understanding the HelpSet Data Elements

The HelpSet file begins with two optional declarations. The XML declaration (<?xml ...) and the document type definition, or DTD (<!DOCTYPE ...), identify this file as an XML ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Expert One-on-One™ J2EE™ Development without EJB™

Expert One-on-One™ J2EE™ Development without EJB™

Rod Johnson, Juergen Hoeller
Pro JavaFX 9: A Definitive Guide to Building Desktop, Mobile, and Embedded Java Clients

Pro JavaFX 9: A Definitive Guide to Building Desktop, Mobile, and Embedded Java Clients

Johan Vos, Stephen Chin, Weiqi Gao, James Weaver, Dean Iverson

Publisher Resources

ISBN: 1565927192Supplemental ContentCatalog PageErrata