Archived 10 October 1996.
Last updated: 26 November 1996.

HelpIndex: Index File Format 0

This paper describes the file format of a help index file, as used by the PHD HelpIndex applet.

This is the obsolete format variant defined for use with HelpIndex version 1.2.x or lower, although it is still recognised by later versions. Please refer to the latest format definition.

This documentation is Copyright © 1996 PHD Computer Consultants Ltd.

Format Code 0.

An index file primarily has a list of index records that the user looks up. To make the file smaller, short-cuts reference records defining a individual URLs.

The index file consists of a series of plain text lines. Each line is a record, split into fields by a semi-colon delimiter. The first field has an integer indicating the record type.

An index file consists of one line of record type zero (0), followed by zero or more lines of types one (1) or two (2). Blank lines and lines with errors are ignored. All fields are necessary in each record.

Comments may be added as extra fields in each record.

Record Type Description
0: Header Defines the index file format in use and the date the index was created.
Currently there is only one format code: 0, this format.
FieldDescription
10
2Format code (integer)
3Creation date (string)
1: URL Define a URL for later use in type 2 records.
FieldDescription
11
2URL number (integer); usually this increments from 1 for each type 1 record
3Actual URL link (string); usually without a #anchor tag
4URL title (string)
2: Index Item
Define an actual index entry.
FieldDescription
12
2Index (string). Something the user searches for
3URL title (string)
May be a short-cut to a type 1 record, optionally with additional characters.
The first additional character should not be a digit.
4URL link (string)
May be a short-cut to a type 1 record,
optionally appended with #anchor name.

Short-cuts

Short-cuts are used to reduce the size of index files.

Index Items records (Type 2) may contain short-cuts in their URL title and URL link fields. A short-cut is an ampersand character & followed by the type 1 record URL number.

In an Index Items record, the URL title field may simply contain a short-cut, optionally with additional characters. The first additional character should not be a digit.
The URL title is taken from the corresponding type 1 record.

In an Index Items record, the URL link field may simply contain or start with a short-cut. For short-cuts, the URL link is taken from the corresponding type 1 record. Any following #anchorname in the field is appended to the URL link. This allows you to use anchor names within pages easily.

Example

0;0;13 September 1996;      format record

1;1;hello.html;Hello world; define a url
2;welcome;&1;&1;            reference it once 
2;About us;&1;&1#us;        reference it again with an anchor name
2;PHD;&1 (About us);&1#us;  reference same anchor with a different index

1;2;us.html;More about us
2;About us (more);&2;&2

2;Sales;sales information;sales.html#top

HelpIndex    PHD