O'Reilly logo

Creating Effective JavaHelp by Kevin Lewis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating HelpSet Data and Navigation Files

A HelpSet contains a set of topic files, along with a number of data and navigation files. The topic files are in HTML format; the data and navigation files are in XML (Extensible Markup Language) format. XML looks similar to HTML, but has application-specific tags, such as <mapID> and <tocitem>, instead of HTML’s standardized document-formatting tags, such as <head> and <p>.

Each data and navigation file contains XML elements, most of which take the following form:

<element-name  attr-name="attr-value"  attr-name="attr-value"/>

Here, “attr” means "attribute.” Each element can have any number of attributes, including none at all. The value of each attribute must be enclosed in single or double quotes. XML elements are like HTML tags (at least as far as JavaHelp is concerned).

Creating the HelpSet File

Using your text editor, create the file HelpSet.hs in the MyJavaHelp directory, with the following contents. Be sure the capitalization is correct: XML is case-sensitive!

<?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>My JavaHelp System</title> <maps> <mapref location="Map.jhm"/> <homeID>overview</homeID> </maps> <view> <name>TOC</name> <label>TOC</label> <type>javax.help.TOCView</type> <data>TOC.xml</data> </view> <view> <name>Index</name> <label>Index</label> <type>javax.help.IndexView</type> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required