Remove anchor ID from TOC entries

Anchor numbers (referenced as <a name="239043"...) are used throughout your output in most formats. They function as destination markers for links and cross-references. Without them, these links just open the requested document and show the top of the file, whereas a link that includes the anchor name would (in most browsers) scroll to the appropriate paragraph.

Sometimes, though, it's desirable to remove the anchor reference on some links. For example, one user implemented context-sensitive help with the Microsoft HTML Help format by using HTML file names instead of map IDs. Because the CHM table of contents contains references to the anchor name for each entry, the TOC was not synchronized when only a file name was called.

In this instance, the solution was to remove the XSL code which adds the link anchor to the TOC entry. To repeat this solution, follow these steps:


This modification can be applied in other areas, and in other formats. Anywhere you see the # sign added to a variable, along with the linkid attribute, it means the anchor name of a referenced paragraph is being added to the link to that topic file. The most common locations are in toc.xsl and content.xsl. Search for "linkid," and you should find most of the instances where this syntax is used, should you need to modify i


CategorySolutionsOutputChm

LaurenLever/@Solutions/Output/Microsoft HTML Help 1.x/Remove Anchor ID (last edited 2009-06-02 19:17:39 by LaurenLever)