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> ...

Get Creating Effective JavaHelp now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.