Custom Presentation Style has no CSS styling in CHM, but does in Website output

Topics: User Forum
Jan 18, 2013 at 9:57 AM

So, I've tried, but I can't figure this out. I have cloned the VS2010 Presentation style and created a new .presentation file at C:\ProgramData\EWSoftware\Sandcastle Help File Builder\Presentation Styles but the output CHM isn't styled at all (while the website output IS). Very odd and looking at the CHM's contents, I can see that style / scripts / icons copied into the CHM without problem, but for some reason aren't being used.

Any help would be appreciated. The contents of my .presentation file is below:

<?xml version="1.0" encoding="utf-8"?>
<PresentationStyles>
    <PresentationStyle ID="MyStyle" Title="My Style"
      BasePath="MyStyle">

        <Description>Custom presentation style for My Style.</Description>

        <SupportedFormats>
            <Format Type="HtmlHelp1" />
            <Format Type="MSHelp2" />
            <Format Type="MSHelpViewer" />
            <Format Type="Website" />
        </SupportedFormats>

        <HelpContent>
            <Files Source="icons\*.*" Destination="icons" />
            <Files Source="scripts\*.*" />
            <Files Source="styles\*.*" />
        </HelpContent>

        <ResourceItems Path="Content">
            <ToolResourceItems Path="SharedContent" />
        </ResourceItems>

        <DocumentModelTransformation File="%DXROOT%\ProductionTransforms\ApplyVSDocModel.xsl">
            <Parameter Name="IncludeAllMembersTopic" Value="true" />
            <Parameter Name="IncludeInheritedOverloadTopics" Value="false" />
            <Parameter Name="project" Value="{@ProjectNodeIDOptional}" />
        </DocumentModelTransformation>

        <IntermediateTOCTransformation File="%DXROOT%\ProductionTransforms\CreateVSToc.xsl" />

        <!-- NOTE: This example assumes you have made a copy ofthe SHFB configuration file. If not change the path to "%SHFBROOT%\Templates\Conceptual.config" -->
        <ConceptualBuildConfiguration File="%SHFBROOT%\Templates\Conceptual.config" />

        <!-- NOTE: This example assumes you have made a copy ofthe SHFB configuration file. If not change the path to "%SHFBROOT%\Templates\VS2005.config" -->
        <ReferenceBuildConfiguration File="%SHFBROOT%\Templates\VS2010.config" />

        <TransformComponentArguments>
            <!-- Samples:
            <Argument Key="logoFile" ForConceptualBuild="true"
                    ForReferenceBuild="true" Value=""
                    Description="An optional logo file to insert into the topic headers. Specify the filename only, omit the path.  Place the file in your project in an Icons\ folder and set the Build Action to Content.  If blank, no logo will appear in the topic headers."/>
            <Argument Key="logoHeight" ForConceptualBuild="true"
                    ForReferenceBuild="true" Value=""
                    Description="An optional logo height.  If left blank, the actual logo image height is used."/>
            <Argument Key="logoWidth" ForConceptualBuild="true"
                    ForReferenceBuild="true" Value=""
                    Description="An optional logo width.  If left blank, the actual logo image width is used."/>
            <Argument Key="logoAltText" ForConceptualBuild="true"
                    ForReferenceBuild="true" Value=""
                    Description="Optional logo alternate text.  If left blank, no alternate text is added."/>
            <Argument Key="logoPlacement" ForConceptualBuild="true"
                    ForReferenceBuild="true" Value="left"
                    Description="An optional logo placement.  Specify left, right, or above. If not specified, the default is left."/>
            <Argument Key="logoAlignment" ForConceptualBuild="true"
                    ForReferenceBuild="true" Value="left"
                    Description="An optional logo alignment when using the 'above' placement option.  Specify left, right, or center.  If not specified, the default is left."/>
            <Argument Key="complexParameter" ForConceptualBuild="false"
                    ForReferenceBuild="true"
                    Description="An example argument containing XML content">
                <extraInfo name="intValue" value="1" />
                <extraInfo name="stringValue" value="XYZ" />
            </Argument>
            -->
        </TransformComponentArguments>
    </PresentationStyle>
</PresentationStyles>

Coordinator
Jan 18, 2013 at 8:16 PM

The conceptual.config file used by SHFB has one remaining dependency on the style name related to applying branding.  For now, copy %SHFBROOT%\Templates\Conceptual.config to your .\MyStyle folder, edit it, and change all references to VS2010 to MyStyle.  Update the reference in the presentation style configuration file by removing the path so it uses your custom copy of conceptual.config.  When you build, it will then apply branding to the conceptual topics once again.

Eric

 

Jan 18, 2013 at 8:51 PM

Thanks Eric!

Yes, that fixed the problem. Just to help out others, here is my updated .presentation file and conceptual.config files which seem to fix this problem:

MyStyle.presentation:

<?xml version="1.0" encoding="utf-8"?>
<PresentationStyles>
    <PresentationStyle ID="MyStyle" Title="My Style"
      BasePath="MyStyle">

        <Description>Custom presentation style for My Style.</Description>

        <SupportedFormats>
            <Format Type="HtmlHelp1" />
            <Format Type="MSHelp2" />
            <Format Type="MSHelpViewer" />
            <Format Type="Website" />
        </SupportedFormats>

        <HelpContent>
            <Files Source="icons\*.*" Destination="icons" />
            <Files Source="scripts\*.*" />
            <Files Source="styles\*.*" />
        </HelpContent>

        <ResourceItems Path="Content">
            <ToolResourceItems Path="SharedContent" />
        </ResourceItems>

        <DocumentModelTransformation File="%DXROOT%\ProductionTransforms\ApplyVSDocModel.xsl">
            <Parameter Name="IncludeAllMembersTopic" Value="true" />
            <Parameter Name="IncludeInheritedOverloadTopics" Value="false" />
            <Parameter Name="project" Value="{@ProjectNodeIDOptional}" />
        </DocumentModelTransformation>

        <IntermediateTOCTransformation File="%DXROOT%\ProductionTransforms\CreateVSToc.xsl" />

        <!-- NOTE: This example assumes you have made a copy ofthe SHFB configuration file. If not change the path to "%SHFBROOT%\Templates\Conceptual.config" -->
        <ConceptualBuildConfiguration File="conceptual.config" />

        <!-- NOTE: This example assumes you have made a copy ofthe SHFB configuration file. If not change the path to "%SHFBROOT%\Templates\VS2005.config" -->
        <ReferenceBuildConfiguration File="%SHFBROOT%\Templates\VS2010.config" />

        <TransformComponentArguments>
            <!-- Samples:
            <Argument Key="logoFile" ForConceptualBuild="true"
                    ForReferenceBuild="true" Value=""
                    Description="An optional logo file to insert into the topic headers. Specify the filename only, omit the path.  Place the file in your project in an Icons\ folder and set the Build Action to Content.  If blank, no logo will appear in the topic headers."/>
            <Argument Key="logoHeight" ForConceptualBuild="true"
                    ForReferenceBuild="true" Value=""
                    Description="An optional logo height.  If left blank, the actual logo image height is used."/>
            <Argument Key="logoWidth" ForConceptualBuild="true"
                    ForReferenceBuild="true" Value=""
                    Description="An optional logo width.  If left blank, the actual logo image width is used."/>
            <Argument Key="logoAltText" ForConceptualBuild="true"
                    ForReferenceBuild="true" Value=""
                    Description="Optional logo alternate text.  If left blank, no alternate text is added."/>
            <Argument Key="logoPlacement" ForConceptualBuild="true"
                    ForReferenceBuild="true" Value="left"
                    Description="An optional logo placement.  Specify left, right, or above. If not specified, the default is left."/>
            <Argument Key="logoAlignment" ForConceptualBuild="true"
                    ForReferenceBuild="true" Value="left"
                    Description="An optional logo alignment when using the 'above' placement option.  Specify left, right, or center.  If not specified, the default is left."/>
            <Argument Key="complexParameter" ForConceptualBuild="false"
                    ForReferenceBuild="true"
                    Description="An example argument containing XML content">
                <extraInfo name="intValue" value="1" />
                <extraInfo name="stringValue" value="XYZ" />
            </Argument>
            -->
        </TransformComponentArguments>
    </PresentationStyle>
</PresentationStyles>

MyStyle\conceptual.config:

<configuration verbosity="{@BuildAssemblerVerbosity}">
    <dduetools>
        <builder>
            <components>

                <!-- Create skeleton document -->
                <component type="Microsoft.Ddue.Tools.CopyFromFileComponent"
                    assembly="{@SandcastlePath}ProductionTools\BuildComponents.dll">
                    <data file="{@PresentationPath}Transforms\skeleton_conceptual.xml" />
                    <copy source="/*" target="/" />
                </component>

                <!-- Copy in comments -->
                <component type="Microsoft.Ddue.Tools.CopyFromIndexComponent"
                    assembly="{@SandcastlePath}ProductionTools\BuildComponents.dll">
                    <index name="comments" value="/topic" key="@id">
                        <data files="ddueXml\*.xml" />
                    </index>
                    <copy name="comments" source="/topic" target="/document" />
                </component>

                <!-- Resolve tokens -->
                <component type="Microsoft.Ddue.Tools.SharedContentComponent"
                    assembly="{@SandcastlePath}ProductionTools\BuildComponents.dll">
                    <context prefix="ddue" name="http://ddue.schemas.microsoft.com/authoring/2003/5" />
                    <content file="HelpFileBuilderTokens.tokens" />
                    {@TokenFiles}
                    <replace elements="/*//ddue:token" item="string(.)" />
                </component>

                <!-- Copy in metadata attributes -->
                <component type="Microsoft.Ddue.Tools.CopyFromIndexComponent"
                    assembly="{@SandcastlePath}ProductionTools\BuildComponents.dll">
                    <index name="metadata" value="/metadata/topic" key="@id">
                        <data files="_ContentMetadata_.xml" />
                    </index>
                    <copy name="metadata" source="*" target="/document/metadata" />
                    <copy name="metadata" key="string('*')" source="*" target="/document/metadata" />
                </component>

                <!-- Resolve code snippets -->
                <component type="Microsoft.Ddue.Tools.ExampleComponent"
                    assembly="{@SandcastlePath}ProductionTools\BuildComponents.dll">
                    {@CodeSnippetsFiles}
                    <colors language="VisualBasic">
                        <color pattern="^\s*'[^\r\n]*" class="comment" />
                        <color pattern="\"[^"\r\n]*\"" class="literal" />
                        <color pattern="\b((AddHandler)|(AddressOf)|(Alias)|(And)|(AndAlso)|(As)|(Boolean)|(ByRef)|(Byte)|(ByVal)|(Call)|(Case)|(Catch)|(CBool)|(CByte)|(CChar)|(CDate)|(CDec)|(CDbl)|(Char)|(CInt)|(Class)|(CLng)|(CObj)|(Const)|(Continue)|(CSByte)|(CShort)|(CSng)|(CStr)|(CType)|(CUInt)|(CULng)|(CUShort)|(Date)|(Decimal)|(Declare)|(Default)|(Delegate)|(Dim)|(DirectCast)|(Do)|(Double)|(Each)|(Else)|(ElseIf)|(End)|(EndIf)|(Enum)|(Erase)|(Error)|(Event)|(Exit)|(False)|(Finally)|(For)|(Friend)|(From)|(Function)|(Get)|(GetType)|(GetXMLNamespace)|(Global)|(GoSub)|(GoTo)|(Handles)|(If)|(Implements)|(Imports)|(In)|(Inherits)|(Integer)|(Interface)|(Is)|(IsNot)|(Let)|(Lib)|(Like)|(Long)|(Loop)|(Me)|(Mod)|(Module)|(MustInherit)|(MustOverride)|(MyBase)|(MyClass)|(Namespace)|(Narrowing)|(New)|(Next)|(Not)|(Nothing)|(NotInheritable)|(NotOverridable)|(Object)|(Of)|(On)|(Operator)|(Option)|(Optional)|(Or)|(OrElse)|(Overloads)|(Overridable)|(Overrides)|(ParamArray)|(Partial)|(Private)|(Property)|(Protected)|(Public)|(RaiseEvent)|(ReadOnly)|(ReDim)|(REM)|(RemoveHandler)|(Resume)|(Return)|(SByte)|(Select)|(Set)|(Shadows)|(Shared)|(Short)|(Single)|(Static)|(Step)|(Stop)|(String)|(Structure)|(Sub)|(SyncLock)|(Then)|(Throw)|(To)|(True)|(Try)|(TryCast)|(TypeOf)|(Variant)|(Wend)|(UInteger)|(ULong)|(UShort)|(Until)|(Using)|(When)|(Where)|(While)|(Widening)|(With)|(WithEvents)|(WriteOnly)|(Xor)|(#Const)|(#Else)|(#ElseIf)|(#End)|(#If))\b" class="keyword" />
                    </colors>
                    <colors language="CSharp">
                        <color pattern="/\*(.|\n)+?\*/" class="comment" />
                        <color pattern="\"[^"\r\n]*\"" class="literal" />
                        <color pattern="//[^\r\n]*" class="comment" />
                        <color pattern="\b((abstract)|(as)|(ascending)|(base)|(bool)|(break)|(by)|(byte)|(case)|(catch)|(char)|(checked)|(class)|(const)|(continue)|(decimal)|(default)|(delegate)|(descending)|(do)|(double)|(else)|(enum)|(equals)|(event)|(explicit)|(extern)|(false)|(finally)|(fixed)|(float)|(for)|(foreach)|(from)|(get)|(goto)|(group)|(if)|(implicit)|(in)|(int)|(interface)|(internal)|(into)|(is)|(join)|(let)|(lock)|(long)|(namespace)|(new)|(null)|(object)|(operator)|(on)|(orderby)|(out)|(override)|(params)|(partial)|(private)|(protected)|(public)|(readonly)|(ref)|(return)|(sbyte)|(sealed)|(select)|(set)|(short)|(sizeof)|(stackalloc)|(static)|(string)|(struct)|(switch)|(this)|(throw)|(true)|(try)|(typeof)|(uint)|(ulong)|(unchecked)|(unsafe)|(ushort)|(using)|(value)|(var)|(vield)|(virtual)|(volatile)|(void)|(where)|(while))\b" class="keyword" />
                    </colors>
                    <colors language="ManagedCPlusPlus">
                        <color pattern="/\*(.|\n)+?\*/" class="comment" />
                        <color pattern="\"[^"\r\n]*\"" class="literal" />
                        <color pattern="//[^\r\n]*" class="comment" />
                        <color pattern="\b((abstract)|(array)|(bool)|(break)|(case)|(catch)|(char)|(class)|(const)|(continue)|(default)|(delegate)|(delete)|(deprecated)|(dllexport)|(dllimport)|(do)|(double)|(else)|(enum)|(event)|(explicit)|(extern)|(false)|(finally)|(float)|(for)|(friend)|(gcnew)|(generic)|(goto)|(if)|(initonly)|(inline)|(int)|(interface)|(literal)|(long)|(mutable)|(naked)|(namespace)|(new)|(noinline)|(noreturn)|(nothrow)|(novtable)|(nullptr)|(operator)|(private)|(property)|(protected)|(public)|(ref)|(register)|(return)|(safecast)|(sealed)|(selectany)|(short)|(signed)|(sizeof)|(static)|(struct)|(switch)|(template)|(this)|(thread)|(throw)|(true)|(try)|(typedef)|(typeid)|(typename)|(union)|(unsigned)|(using)|(uuid)|(value)|(virtual)|(void)|(volatile)|(while))\b" class="keyword" />
                    </colors>
                    <colors language="FSharp">
                        <color pattern="\(\*(.|\n)+?\*\)" class="comment" />"
                        <color pattern="\"[^"\r\n]*\"" class="literal" />
                        <color pattern="//[^\r\n]*" class="comment" />
                        <color pattern="\b((abstract)|(and)|(as)|(asr)|(assert)|(atomic)|(base)|(begin)|(break)|(checked)|(class)|(component)|(const)|(constraint)|(constructor)|(continue)|(default)|(delegate)|(do)|(done)|(downcast)|(downto)|(eager)|(elif)|(else)|(end)|(event)|(exception)|(extern)|(external)|(false)|(finally)|(fixed)|(for)|(fun)|(function)|(functor)|(global)|(if)|(in)|(include)|(inherit)|(inline)|(interface)|(internal)|(land)|(lazy)|(let)|(lor)|(lsl)|(lsr)|(lxor)|(match)|(member)|(method)|(mixin)|(mod)|(module)|(mutable)|(namespace)|(new)|(null)|(object)|(of)|(open)|(or)|(override)|(parallel)|(private)|(process)|(protected)|(public)|(pure)|(rec)|(return)|(sealed)|(sig)|(static)|(struct)|(tailcall)|(then)|(to)|(trait)|(true)|(try)|(type)|(upcast)|(use)|(val)|(virtual)|(void)|(volatile)|(when)|(while)|(with)|(yield))\b" class="keyword" />
                    </colors>
                </component>

                <!-- Code block component configuration.  This must appear before the TransformComponent. -->
                <component type="SandcastleBuilder.Components.CodeBlockComponent"
          assembly="{@SHFBFolder}SandcastleBuilder.Components.dll" id="Code Block Component">
                    <!-- Base path for relative filenames in source attributes (optional) -->
                    <basePath value="{@HtmlEncProjectFolder}" />

                    <!-- Base output paths for the files (required).  These should match the parent folder of the output
                             path of the HTML files (see each of the SaveComponent instances below). -->
                    <outputPaths>
                        {@HelpFormatOutputPaths}
                    </outputPaths>

                    <!-- Allow missing source files (Optional).  If omitted, it will generate errors if referenced source
                             files are missing. -->
                    <allowMissingSource value="false" />

                    <!-- Remove region markers from imported code blocks.  If omitted, region markers in imported code
                             blocks are left alone. -->
                    <removeRegionMarkers value="false" />

                    <!-- Code colorizer options (required).
                             Attributes:
                                    Language syntax configuration file (required)
                                    XSLT stylesheet file (required)
                                    CSS stylesheet file (required)
                                    Script file (required)
                                    Disabled (optional, leading whitespace normalization only)
                                    Default language (optional)
                                    Enable line numbering (optional)
                                    Enable outlining (optional)
                                    Keep XML comment "see" tags within the code (optional)
                                    Tab size override (optional, 0 = Use syntax file setting)
                                    Use language name as default title (optional) -->
                    <colorizer syntaxFile="{@SHFBFolder}Colorizer\highlight.xml"
                            styleFile="{@SHFBFolder}Colorizer\highlight.xsl" stylesheet="{@SHFBFolder}Colorizer\highlight.css"
                            scriptFile="{@SHFBFolder}Colorizer\highlight.js" disabled="{@DisableCodeBlockComponent}"
                            language="cs" numberLines="false" outlining="false" keepSeeTags="false" tabSize="0"
                            defaultTitle="true" />
                </component>

                <!-- Transform -->
                <component type="Microsoft.Ddue.Tools.TransformComponent"
                    assembly="{@SandcastlePath}ProductionTools\BuildComponents.dll">
                    <transform file="{@PresentationPath}Transforms\main_conceptual.xsl">
                        <argument key="metadata" value="true" />
                        <argument key="languages">
                            {@SyntaxFiltersDropDown}
                        </argument>
                        {@TransformComponentArguments}
                    </transform>
                </component>

                <!-- Multi-format output component.  This must wrap the component set unique to each output file format. -->
                <component type="SandcastleBuilder.Components.MultiFormatOutputComponent"
          assembly="{@SHFBFolder}SandcastleBuilder.Components.dll" id="Multi-format Output Component">
                    <!-- This defines the formats to generate -->
                    <build formats="{@HelpFileFormat}" />

                    <!-- This defines the set of components for HTML Help 1 files -->
                    <helpOutput format="HtmlHelp1">
                        <!-- Resolve shared content -->
                        <component type="Microsoft.Ddue.Tools.SharedContentComponent"
                            assembly="{@SandcastlePath}ProductionTools\BuildComponents.dll">
                            <content file="{@ResourceItemsFolder}shared_content.xml" />
                            <content file="{@ResourceItemsFolder}feedBack_content.xml" />
                            <content file="{@ResourceItemsFolder}conceptual_content.xml" />
                            <!-- These must be last in order to override other elements! -->
                            <content file="SharedBuilderContent.xml" />
                            <content file="PresentationStyleBuilderContent.xml" />
                            {@ResourceItemFiles}
                        </component>

                        <!-- Resolve art links -->
                        <component type="Microsoft.Ddue.Tools.ResolveArtLinksComponent"
                            assembly="{@SandcastlePath}ProductionTools\BuildComponents.dll">
                            <targets input="Media" baseOutput=".\Output\HtmlHelp1" outputPath="string('media')" link="../media"
                                map="_MediaContent_.xml" />
                        </component>

                        <!-- Resolve conceptual links -->
                        <component type="Microsoft.Ddue.Tools.ResolveConceptualLinksComponent"
              assembly="{@SandcastlePath}ProductionTools\BuildComponents.dll" showBrokenLinkText="true">
                            <targets base="xmlComp" type="Local" />
                        </component>

                        <!-- Resolve reference links -->
                        <component type="Microsoft.Ddue.Tools.ResolveReferenceLinksComponent2"
              assembly="{@SandcastlePath}ProductionTools\BuildComponents.dll" locale="{@Locale}"
                            linkTarget="{@SdkLinkTarget}">
                            <targets base="{@SandcastlePath}Data\Reflection" recurse="true" files="*.xml"
                                type="{@HtmlSdkLinkType}" />
                            <targets files="reflection.xml" type="Local" />
                        </component>

                        <!-- Conditionally apply Microsoft Help Viewer branding -->
                        <component type="Microsoft.Ddue.Tools.IfThenComponent"
                            assembly="{@SandcastlePath}ProductionTools\BuildComponents.dll">
                            <if condition="contains('{@PresentationStyle}','vs2010') or contains('{@PresentationStyle}','VS2010') or contains('{@PresentationStyle}','MyStyle')"/>
                            <then>
                                <component type="Microsoft.Ddue.Tools.BrandingComponent"
                                    assembly="{@SandcastlePath}ProductionTools\BuildComponents.dll">
                                    <data branding-content="branding" help-output="HtmlHelp1" locale="{@Locale}"
                                                catalog-product-id="{@CatalogProductId}" catalog-version="{@CatalogVersion}"
                                                vendor-name="{@VendorName}"/>
                                   
                                </component>
                            </then>
                        </component>

                        <!-- Save the result -->
                        <component type="Microsoft.Ddue.Tools.SaveComponent"
                            assembly="{@SandcastlePath}ProductionTools\BuildComponents.dll">
                            <save base="Output\HtmlHelp1\html" path="concat($key,'.htm')" indent="{@IndentHtml}"
                                omit-xml-declaration="true" add-xhtml-namespace="false" />
                        </component>
                    </helpOutput>

                    <!-- This defines the set of components for MS Help 2 files -->
                    <helpOutput format="MSHelp2">
                        <!-- Resolve shared content -->
                        <component type="Microsoft.Ddue.Tools.SharedContentComponent"
                            assembly="{@SandcastlePath}ProductionTools\BuildComponents.dll">
                            <content file="{@ResourceItemsFolder}shared_content.xml" />
                            <content file="{@ResourceItemsFolder}feedBack_content.xml" />
                            <content file="{@ResourceItemsFolder}conceptual_content.xml" />
                            <!-- These must be last in order to override other elements! -->
                            <content file="SharedBuilderContent.xml" />
                            <content file="PresentationStyleBuilderContent.xml" />
                            {@ResourceItemFiles}
                        </component>

                        <!-- Insert additional MS Help 2 attributes -->
                        <component type="SandcastleBuilder.Components.MSHelpAttrComponent"
              assembly="{@SHFBFolder}SandcastleBuilder.Components.dll" id="MS Help 2 Attributes">
                            {@HelpAttributes}
                        </component>

                        <!-- Resolve art links -->
                        <component type="Microsoft.Ddue.Tools.ResolveArtLinksComponent"
                            assembly="{@SandcastlePath}ProductionTools\BuildComponents.dll">
                            <targets input="Media" baseOutput=".\Output\MSHelp2" outputPath="string('media')" link="../media"
                                map="_MediaContent_.xml" />
                        </component>

                        <!-- Resolve conceptual links -->
                        <component type="Microsoft.Ddue.Tools.ResolveConceptualLinksComponent"
              assembly="{@SandcastlePath}ProductionTools\BuildComponents.dll" showBrokenLinkText="true">
                            <targets base="xmlComp" type="Index" />
                        </component>

                        <!-- Resolve reference links -->
                        <component type="Microsoft.Ddue.Tools.ResolveReferenceLinksComponent2"
              assembly="{@SandcastlePath}ProductionTools\BuildComponents.dll" locale="{@Locale}"
                            linkTarget="{@SdkLinkTarget}">
                            <targets base="{@SandcastlePath}Data\Reflection" recurse="true" files="*.xml"
                                type="{@MSHelp2SDKLinkType}" />
                            <targets files="reflection.xml" type="Index" />
                        </component>

                        <!-- Conditionally apply Microsoft Help Viewer branding -->
                        <component type="Microsoft.Ddue.Tools.IfThenComponent"
                            assembly="{@SandcastlePath}ProductionTools\BuildComponents.dll">
                            <if condition="contains('{@PresentationStyle}','vs2010') or contains('{@PresentationStyle}','VS2010') or contains('{@PresentationStyle}','MyStyle')"/>
                            <then>
                                <component type="Microsoft.Ddue.Tools.BrandingComponent"
                                    assembly="{@SandcastlePath}ProductionTools\BuildComponents.dll">
                                    <data branding-content="branding" help-output="MSHelp2" locale="{@Locale}"
                                                catalog-product-id="{@CatalogProductId}" catalog-version="{@CatalogVersion}"
                                                vendor-name="{@VendorName}"/>
                                   
                                </component>
                            </then>
                        </component>

                        <!-- Save the result -->
                        <component type="Microsoft.Ddue.Tools.SaveComponent"
                            assembly="{@SandcastlePath}ProductionTools\BuildComponents.dll">
                            <save base="Output\MSHelp2\html" path="concat($key,'.htm')" indent="{@IndentHtml}"
                                omit-xml-declaration="true" add-xhtml-namespace="false" />
                        </component>
                    </helpOutput>

                    <!-- This defines the set of components for MS Help Viewer files -->
                    <helpOutput format="MSHelpViewer">
                        <!-- Resolve shared content -->
                        <component type="Microsoft.Ddue.Tools.SharedContentComponent"
                            assembly="{@SandcastlePath}ProductionTools\BuildComponents.dll">
                            <content file="{@ResourceItemsFolder}shared_content_mshc.xml" />
                            <content file="{@ResourceItemsFolder}feedBack_content.xml" />
                            <content file="{@ResourceItemsFolder}conceptual_content.xml" />
                            <!-- These must be last in order to override other elements! -->
                            <content file="SharedBuilderContent.xml" />
                            <content file="PresentationStyleBuilderContent.xml" />
                            {@ResourceItemFiles}
                        </component>

                        <!-- Resolve art links -->
                        <component type="Microsoft.Ddue.Tools.ResolveArtLinksComponent"
                            assembly="{@SandcastlePath}ProductionTools\BuildComponents.dll">
                            <targets input="Media" baseOutput=".\Output\MSHelpViewer" outputPath="string('media')" link="media"
                                map="_MediaContent_.xml" />
                        </component>

                        <!-- Resolve conceptual links -->
                        <component type="Microsoft.Ddue.Tools.ResolveConceptualLinksComponent"
              assembly="{@SandcastlePath}ProductionTools\BuildComponents.dll" showBrokenLinkText="true">
                            <targets base="xmlComp" type="Id" />
                        </component>

                        <!-- Resolve reference links -->
                        <component type="Microsoft.Ddue.Tools.ResolveReferenceLinksComponent2"
              assembly="{@SandcastlePath}ProductionTools\BuildComponents.dll" locale="{@Locale}"
                            linkTarget="{@SdkLinkTarget}">
                            <targets base="{@SandcastlePath}Data\Reflection" recurse="true" files="*.xml"
                                type="{@MSHelpViewerSdkLinkType}" />
                            <targets files="reflection.xml" type="Id" />
                        </component>

                        <!-- Add Microsoft Help Viewer metadata -->
                        <component type="Microsoft.Ddue.Tools.MSHCComponent"
              assembly="{@SandcastlePath}ProductionTools\BuildComponents.dll">
                            <data topic-version="{@TopicVersion}" toc-file="_ConceptualTOC_.xml"
                toc-parent="{@TocParentId}" toc-parent-version="{@TocParentVersion}" locale="{@Locale}" />
                        </component>

                        <!-- Conditionally apply Microsoft Help Viewer branding -->
                        <component type="Microsoft.Ddue.Tools.IfThenComponent"
                            assembly="{@SandcastlePath}ProductionTools\BuildComponents.dll">
                            <if condition="contains('{@PresentationStyle}','vs2010') or contains('{@PresentationStyle}','VS2010') or contains('{@PresentationStyle}','MyStyle')"/>
                            <then>
                                <component type="Microsoft.Ddue.Tools.BrandingComponent"
                                    assembly="{@SandcastlePath}ProductionTools\BuildComponents.dll">
                                    <data branding-content="Output\MSHelpViewer_branding" help-output="MSHelpViewer"
                                                locale="{@Locale}" catalog-product-id="{@CatalogProductId}"
                                                catalog-version="{@CatalogVersion}" vendor-name="{@VendorName}"/>
                                   
                                </component>
                            </then>
                        </component>

                        <!-- Save the result -->
                        <component type="Microsoft.Ddue.Tools.SaveComponent"
                            assembly="{@SandcastlePath}ProductionTools\BuildComponents.dll">
                            <save base="Output\MSHelpViewer\html" path="concat($key,'.htm')" indent="{@IndentHtml}"
                                omit-xml-declaration="false" add-xhtml-namespace="true" />
                        </component>
                    </helpOutput>

                    <!-- This defines the set of components for websites -->
                    <helpOutput format="Website">
                        <!-- Resolve shared content -->
                        <component type="Microsoft.Ddue.Tools.SharedContentComponent"
                            assembly="{@SandcastlePath}ProductionTools\BuildComponents.dll">
                            <content file="{@ResourceItemsFolder}shared_content.xml" />
                            <content file="{@ResourceItemsFolder}feedBack_content.xml" />
                            <content file="{@ResourceItemsFolder}conceptual_content.xml" />
                            <!-- These must be last in order to override other elements! -->
                            <content file="SharedBuilderContent.xml" />
                            <content file="PresentationStyleBuilderContent.xml" />
                            {@ResourceItemFiles}
                        </component>

                        <!-- Resolve art links -->
                        <component type="Microsoft.Ddue.Tools.ResolveArtLinksComponent"
                            assembly="{@SandcastlePath}ProductionTools\BuildComponents.dll">
                            <targets input="Media" baseOutput=".\Output\Website" outputPath="string('media')" link="../media"
                                map="_MediaContent_.xml" />
                        </component>

                        <!-- Resolve conceptual links -->
                        <component type="Microsoft.Ddue.Tools.ResolveConceptualLinksComponent"
              assembly="{@SandcastlePath}ProductionTools\BuildComponents.dll" showBrokenLinkText="true">
                            <targets base="xmlComp" type="Local" />
                        </component>

                        <!-- Resolve reference links -->
                        <component type="Microsoft.Ddue.Tools.ResolveReferenceLinksComponent2"
              assembly="{@SandcastlePath}ProductionTools\BuildComponents.dll" locale="{@Locale}"
                            linkTarget="{@SdkLinkTarget}">
                            <targets base="{@SandcastlePath}Data\Reflection" recurse="true" files="*.xml"
                                type="{@WebsiteSdkLinkType}" />
                            <targets files="reflection.xml" type="Local" />
                        </component>

                        <!-- Conditionally apply Microsoft Help Viewer branding -->
                        <component type="Microsoft.Ddue.Tools.IfThenComponent"
                            assembly="{@SandcastlePath}ProductionTools\BuildComponents.dll">
                            <if condition="contains('{@PresentationStyle}','vs2010') or contains('{@PresentationStyle}','VS2010') or contains('{@PresentationStyle}','MyStyle')"/>
                            <then>
                                <component type="Microsoft.Ddue.Tools.BrandingComponent"
                                    assembly="{@SandcastlePath}ProductionTools\BuildComponents.dll">
                                    <data branding-content="branding" help-output="Website"
                                                locale="{@Locale}" catalog-product-id="{@CatalogProductId}"
                                                catalog-version="{@CatalogVersion}" vendor-name="{@VendorName}"/>
                                   
                                </component>
                            </then>
                        </component>

                        <!-- Save the result -->
                        <component type="Microsoft.Ddue.Tools.SaveComponent"
                            assembly="{@SandcastlePath}ProductionTools\BuildComponents.dll">
                            <save base="Output\Website\html" path="concat($key,'.htm')" indent="{@IndentHtml}"
                                omit-xml-declaration="true" add-xhtml-namespace="false" />
                        </component>
                    </helpOutput>
                </component>

            </components>
        </builder>
    </dduetools>
</configuration>