The Help Attributes Component is used to used to insert additional MSHelp:Attr attributes into the XML data island in each generated API help topic. This is useful for adding extra DocSet and other attributes to the topics that are not added by the default Sandcastle transformations. Be aware that the Sandcastle transformations add ApiLocation, ApiType, DevLang, Locale, and TopicType attributes with appropriate values to each generated API topic so there is no need to add them again using this component.

The following is the default configuration for the help attributes component. It should be inserted into the configuration file after the TransformComponent.

CopyExample Configuration
<!-- MS Help 2 attribute configuration.  This must appear after
     the TransformComponent. -->
<component type="SandcastleBuilder.Components.MSHelpAttrComponent"
  assembly="{@SHFBFolder}SandcastleBuilder.Components.dll">
    <!-- Additional attributes.  If no attributes are specified,
         the component will do nothing. -->
    <attributes>
        <!-- The "name" attribute is required.  The "value" attribute
             is optional. -->
        <attribute name="DocSet" value="NETFramework" / >
        <attribute name="DocSet" value="{@HtmlHelpName}" / >
        <attribute name="TargetOS" value="Windows" / >
    </attributes>
</component>

The example given above is taken from the Sandcastle Help File Builder's configuration file. When used with it, the replacement tag {@SHFBFolder} is used to insert the help file builder's folder in the file path. This is replaced at build time with the appropriate value. If using the component in your own build scripts, replace the tag with a relative or absolute path to the component assembly.

There must be at least one attribute element within the attributes element for the component to do anything. Each attribute element has a name and value attribute that specify the name and value of the MSHelp:Attr entry added to each topic.

Tip

For filtering to work correctly in Help 2 files, you should add the attributes shown in the example above as the minimum set. Replace the "{@HtmlHelpName}" value with the name of your documentation set.

See Also