5.5. XML formats

The col xml format describes individual collections of individual chm files that are used to group content into aggregations.

You can access a DTD that describes this XML format or read on for a more human-oriented description.

The outer element is XML, immediately inside this is the HTMLHelpCollection element, which is the true container for the other elements.

First in the HTMLHelpCollection element come several meta-data elements:

These are followed by a Folders element, which contains a single Folder element.

Each Folder element contains a TitleString element, a FolderOrder element (numerical) and 0 or more Folder elements. The value attribute of the TitleString element contains the string to display in the contents pane and the value attribute of the FolderOrder element stores the order in which its parent Folder element is put into the contents pane at the current Folder depth. If two Folder elements with the same parent have the same value attribute of the FolderOrder element then the one that occurs earlier in the file will come first in the contents pane.

Terminal Folder elements have TitleString elements with a value attribute of the form "=chmstem", where chmstem is the file-name stem of a chm file. Terminal Folder elements also have a LangId element whose value attribute is a numerical language identifier.

hhcolreg.dat stores information on collections on the machine.

You can access a DTD that describes this XML format or read on for a more humane description.

The outer element is XML, immediately inside this is the HTMLHelpDocInfo element, which is the true container for the other elements.

First in the HTMLHelpDocInfo element comes the meta-data element NextCollectionId. The value attribute of this element stores the value that the ColNum of the next Collection will have if another collection is ever added.

Then come the following three container elements; Collections, Locations and DocCompilations.

The Collections element contains any number of Collection elements. Each Collection element contains a single ColNum element and a single ColName element. The value attribute of the ColNum element stores a unique number that identifies the collection. The value attribute of the ColName element stores the full path to the .col file for this collection.

The Locations element contains any number of Location elements. Each Location element contains one of each of the LocColNum, LocName, TitleString, LocPath and Volume elements. The table below explains the content and purpose of the value attribute of each of these elements.

The DocCompilations element contains any number of DocCompilation elements. Each DocCompilation element contains one of each of the DocCompId, DocCompLanguage and LocationHistory elements. The value attribute of the DocCompId element stores an identifier which is used in terminal Folder elements in the col files and is usually the stem of the CHM/CHI file for this element. The value attribute of the DocCompLanguage element stores the LCID. The LocationHistory element contains one of each of the ColNum, TitleLocation, IndexLocation, QueryLocation, LocationRef, Version, LastPromptedVersion, TitleSampleLocation, TitleQueryLocation and SupportsMerge elements, which are all described in the table below.