d.Create a map file (sampleInterview.jhm) in the default directory.

The JavaHelp system uses IDs from a map file to identify both the location and the HTML files that it loads for the More Info system. Each More Info file must have a corresponding entry in the map file of the form

<mapID target=name” url=”location/filename.html”/> .

The following example shows the contents of the map file used in the Simple Test Suite.

<!DOCTYPE map PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp Map Version 1.0//EN" "http://java.sun.com/products/javahelp/map_1_0.dtd">

<map version="1.0">

<!-- SampleInterview -->

<mapID target="SampleInterview.hello" url="SampleInterview/sampleStringValue.html"/> </map>

The target attribute defines a unique ID for the topic file. The url attribute defines the path to and name of the HTML topic file (relative to the map file). The .html files in the map file example are the More Info files.

You can also view the sampleInterview.jhm map file in the following location:

SimpleTestSuite/src/sample/suite/help/default

38 Java ME TCK Framework Developer’s Guide • July 2007

Page 58
Image 58
Sun Microsystems 1.2 manual MapID target=name url=location/filename.html