Collection-Level File Overview
When you plug one registered namespace into another, several different files are required so that the Help files display correctly after registration. These are referred to as collection-level files, and they consist of the following:
Collection definition (.HxC) file for the child namespace; for details, see Collection-Level .HxC File
Table of contents (.HxT) file for the child namespace; for details, see Collection-Level .HxT File.
Keyword index (.HxK) file for each index in the child namespace; for details, see Collection-Level .HxK File.
Attribute definition (.HxA) file for the child namespace; for details, see Collection-Level .HxA File.
You will need to create these files, based on the child namespace that is being plugged in. The following sections discuss each collection-level file type in detail.
Note
Any child namespace that is to be plugged into another namespace must first be registered as a multiple .HxS collection using a master collection definition (.HxC) file. This is required even if you only have a single .HxS file.
Collection-level files should not reference DTDs in the <!DocType> element. For example the <!DocType> element for the .HxC file would look like the following: <!DocType HelpCollection>.
If the collection-level .HxT file is omitted the plug-in will fail. If the .HxK files are omitted, the corresponding index will not appear in the parent collection.
Collection-level .HxC File
The collection-level .HxC file contains one reference for each of the other collection-level files. For example, the <TOCDef> element refers to the collection-level .HxT, the <KeywordIndexDef> element refers to the collection-level .HxK, and so forth. The <ItemMoniker> tags are also required, and can be taken from the .HxC file that was used to compile the .HxS file. The <CompilerOptions> and <IncludeFile> elements are ignored at registration time, and should be omitted. The following example shows a simple .HxC for a Help project with one TOC and two indexes.
<?xml version="1.0"?>
<!DOCTYPE HelpCollection>
<HelpCollection
DTDVersion = "1.0"
LangId = "1033"
Title = " HelpCol_A Collection"
>
<TOCDef File = "HelpCol.HxT"/>
<KeywordIndexDef File = "HelpCol_K.HxK"/>
<KeywordIndexDef File = "HelpCol_A.HxK"/>
<ItemMoniker Name = "!DefaultTOC"
ProgId = "HxDs.HxHierarchy"
InitData = "TOC"/>
<ItemMoniker Name = "!DefaultKeywordIndex"
ProgId = "HxDs.HxIndex"
InitData = "K"/>
<ItemMoniker Name = "!DefaultAssociativeIndex"
ProgId = "HxDs.HxIndex"
InitData = "A"/>
</HelpCollection>
Collection-level .HxT File
The collection-level .HxT file contains a reference to the title ID that each .HxS file in the child namespace was registered with. At run time, the registration services use this information to pull the correct .HxT file from each .HxS file. The following example shows an .HxT file for a child namespace with two .HxS files (HelpCol_A and HelpCol_B).
<?xml version="1.0"?>
<!DOCTYPE HelpTOC>
<HelpTOC
DTDVersion = "1.0"
Id = "HelpCol_TOC"
LangId = "1033"
PluginStyle = "Flat"
>
<HelpTOCNode Id = "IDA" NodeType = "TOC" Url="HelpCol_A"/>
<HelpTOCNode Id = "IDB" NodeType = "TOC" Url="HelpCol_B"/>
</HelpTOC>
Nodes within this file should use a value of "TOC" for the NodeType Attribute so that the child TOCs are merged correctly at run time.
Collection-level .HxK File
The collection-level .HxK file contains a reference for an index for an .HxS file belonging to the child namespace. Each index should have its own corresponding collection-level .HxK file. For example, if an .HxS file had an .HxK file defined for its keyword index and one for an associative index, it would need two collection-level .HxK files. The following example shows a collection-level .HxK file for a keyword index.
<?xml version="1.0"?>
<!DOCTYPE HelpIndex>
<HelpIndex
DTDVersion = "1.0"
Name = "K"
Id = "HelpCol_K"
AutoInclude = "Yes"
Merge = "Yes"
Sort = "Yes"
Title = "Keyword Index"
Visible = "Yes"
LangId = "1033"
>
</HelpIndex>
Collection-level .HxA File
The collection-level .HxA file only needs to contain attributes and values that will be exposed to the user, such as through a filter editing tool. You can take the data for this file from the .HxA file that was used to compile the .HxS file. The following example shows an .HxA file containing one attribute, which in turn contains a single value.
<?xml version="1.0"?>
<!DOCTYPE HelpAttributes>
<HelpAttributes DTDVersion="1.0" >
<AttName
Name = "Attribute Name"
>
<AttVal
Name = "Attribute Value"
/>
</AttName>
</HelpAttributes>
See Also
Concepts
Adding Help Files to a Windows Installer Package