This project has moved. For the latest updates, please go here.

Links in MS Help 2 don't work

Topics: User Forum
Jan 21, 2013 at 7:02 AM


I have a problem with links in the MS Help 2 format. Only the In-page links (<link xlink:href="#intro">Back to Intro</link> are working. Links to another topic or the class library don't work. In the source code of the help 2 file, the links are inserted (<mshelp:link keywords="7ca49077-e231-45fa-92c4-410c72828410" tabindex="0">ADI .NET Development</mshelp:link>), but in the Help Viewer they are not shown.

The problem only occurs with MS Help 2. In Help 1 and Help Viewer the links are working fine.

Can you help me to solve the problem?


Jan 21, 2013 at 7:11 AM

Additional information: I use the VS2010 style.

Jan 23, 2013 at 2:40 AM
Edited Jan 23, 2013 at 2:40 AM

The VS2010 style was designed for MS Help Viewer and is missing the required stylesheet link and a stylesheet entry needed to make the links work in Help 2.  It can be fixed by applying the following changes to these VS2010 presentation style files:

Add this style to the end of the file:

/* Supports XLinks */
  text-decoration: underline;
  color: #0000ff;
  hoverColor: #3366ff;
  filterString: ;

Replace the "branding-stylesheet" template at line 189 with this one:

<xsl:template match="xhtml:link[@rel='stylesheet']" name="branding-stylesheet">
  <xsl:if test="$self-branded != 'false'">
    <xsl:element name="link" namespace="{$xhtml}">
      <xsl:attribute name="type">text/css</xsl:attribute>
      <xsl:attribute name="rel">stylesheet</xsl:attribute>
      <xsl:attribute name="href">
          <xsl:when test="$downscale-browser">
              <xsl:when test="starts-with(@href,'ms-help:')">
                <xsl:value-of select="@href"/>
                <xsl:value-of select="branding:BackslashesToFrontslashes(concat($contentFolder,'/',@href))"/>
            <xsl:value-of select="branding:BuildContentPath($contentFolder,@href)"/>

Insert the following at line 78 inside the <head> element in the "t_document" template:

<link rel="stylesheet" type="text/css" href="ms-help://Hx/HxRuntime/HxLink.css" />

Insert the following at line 107 inside the <head> element in the "/" (document header) template:

<link rel="stylesheet" type="text/css" href="ms-help://Hx/HxRuntime/HxLink.css" />

This enables the topic links in Help 2.  For other formats, the stylesheet link is handled as it is for the other
presentations styles (removed in MS Help Viewer output, ignored in the other formats).



Feb 6, 2013 at 6:38 AM
Thank you for your answer. Have you planned to fix this "issue" in a new version of SHB?
Feb 6, 2013 at 3:00 PM
Yes, the changes are in place though there is no date for the next release yet, probably in a month or so. For the time being the changes can be applied to the same files in the current version.