Share via


Collection Definition (.Hxc) File

Defines basic collection properties and to point to other files that contain collection data. When using Microsoft Help Workshop, the file is automatically added to a new Help project and is automatically updated when you save or compile the project.

In addition to defining a Help collection at authoring and compiling time, the .HxC file unifies multiple Help files as a single collection at both registration and run time by providing the following information:

  • Markup, the root element of which (<MSHelp>) defines the basic properties of a Help project, such as the title and version of the project.

  • Pointers to the table of contents (TOC), index, attribute, virtual topic, and sample definition files.

  • Registration information needed to view the compiled Help (.HxS) file on a machine.

  • Monikers used for navigation to project items.

  • A pointer to an include (.HxF) file, which tracks the location of files compatible with Internet Explorer 5.0 or later, such as HTML and graphics files, to be included in a project. For information, see Include (.Hxf) File.

  • Instructions for the compiler, such as what type of output file will be generated and the level at which errors will be logged and displayed.

    The product of all Help collections is the compiled Help (.HxS) file. The following types of collections can be created:

    • Single Help file collection

    The most common way to package Help is as a compiled Help file, which is an entire Help collection that has been compressed into a single .HxS file. In this case, the .HxC file resides within the .HxS file.

    • Multiple Help file collection

    Another possibility is to package Help as a multiple Help file collection that contains several .HxS files and one .HxC file that defines the entire collection. Multiple Help file collections appear to the user as one document and share a common table of contents and index.

    Note

    Microsoft Help Workshop does not support multiple Help file collections. The text editor may be used to construct the .HxC file required by these collections.

You should plan how to package and deploy your Help during the authoring process. For more information, see Redistributing Help Files.

Note

The file consists of tags, each of which contains one or more attributes.

Choose an attribute to see its corresponding topic.

Comments indicate which attributes are required.

Where applicable, defined choices are displayed in parentheses.

All attribute values must be enclosed in quotation marks.

As with all XML documents, the tags and attributes in this file are case-sensitive.

Example

The following example shows the basic structure of a collection definition file.

<?xml version="1.0"?>

<!DOCTYPE HelpCollection SYSTEM "MS-Help://Hx/Resources/HelpCollection.DTD">

<HelpCollection

   Id Attribute = ""

   DTDVersion Attribute = "1.0" <!-- Required -->

   FileVersion Attribute = ""

   LangId Attribute = ""

   Font Attribute = ""

   FontSize Attribute = ""

   Charset Attribute = ""

   Title Attribute = ""

   Copyright = ""

>

   <CompilerOptions <!-- Can appear 0 or 1 times -->

      CompileResult Attribute = (Hxs | HxiHxs)

      OutputFile Attribute = ""

      CreateFullTextIndex Attribute = (Yes | No)

      StopWordFile Attribute = ""

      BreakerId Attribute = ""

      SampleStagingDir Attribute = ""

      <IncludeFile <!-- Can appear 0 or more times -->

         File Attribute = "" <!-- Required -->

      />

   >

   </CompilerOptions>

<AttributeDef <!-- Can appear 0 or more times -->

   File Attribute = "" <!-- Required -->

   Owner Attribute = ""

/>

<VTopicDef <!-- Can appear 0 or more times -->

   File Attribute = "" <!-- Required -->

/>

<TOCDef <!-- Can appear 0 or more times -->

   File Attribute = "" <!-- Required -->

/>

<FTSIndex <!-- DO NOT USE. -->

   File Attribute = ""

/>

<KeywordIndexDef <!-- Can appear 0 or more times -->

   File Attribute = "" <!-- Required -->

/>

<SampleDef <!-- Can appear 0 or more times -->

   File Attribute = "" <!-- Required -->

/>

<ItemMoniker <!-- Can appear 0 or more times -->

   Name Attribute = "" <!-- Required -->

   ProgId Attribute = "" <!-- Required -->

   InitData Attribute = ""

/>

<ToolData <!-- Can appear 0 or more times -->

   Name Attribute = "" <!-- Required -->

   Value Attribute = "" <!-- Required -->

>

</HelpCollection>

Note

The respective values assigned to the Title and Id attributes should not exceed 2000 characters. If this limit is exceeded, the value is truncated. The compiler does not issue an error or warning at this time.

To edit the .HxC file manually, it must be opened in a text editor, such as Notepad, outside the Visual Studio IDE, and the edits must valid in the sense defined by the collection definition file DTD.

If more than one <SampleDef> element is defined, the compiler will read only the last one.

The <FTSIndex> element is not functional, but has been left in the DTD for compatibility purposes.

See Also

Concepts

Viewing the DTDs

Help Project Files

Reference

Help XML Tags

Other Resources

Help XML Attributes