This project has moved and is read-only. For the latest updates, please go here.

How is <referenceLink> converted to HTML?

Topics: Developer Forum
Sep 21, 2008 at 9:58 PM
I've created my own presentation style by modifying "Prototype". So far so good, but I can't find anywhere how <referenceLink> elements are converted to HTML. I'm trying to do two things:

1) Show member table method links as e.g. "MyMethod" instead of "MyMethod(String)"

The vs2005 presentation style uses the first form, but appears to construct referenceLinks equivalently to the Prototype style, which uses the second form.

2) Change link appearance

I could style them by wrapping all instances of <referenceLink> with <span class="referenceLink"> but I'd rather find how <referenceLink> is transformed to <a> and modify that.

Thanks for any pointers,

Sep 22, 2008 at 12:31 AM
Edited Sep 22, 2008 at 12:31 AM
The actual links created from the referenceLink elements are controlled by the ResolveReferenceLinks2 build component.  It outputs links based on the link type (set by the ProjectLinkType property (project links) and the  SdkLinkType property (framework links) in SHFB), whether or not it can resolve the link, and the attributes on the referenceLink element.

You may be able to control the format of the link and link text via the attributes added to the referenceLink element.  You'll need to download the Sandcastle code and example the Apply() method in the component and the supporting class that it uses (ReferenceLinkInfo2).  If that isn't enough to get what you need, you may have to modify and recompile the component code.  Unfortunately in this instance, you can't just derive a new class and override Apply() as you also have to pull in a lot of the code for the supporting elements that it uses in the index which are private or internal.

Sep 22, 2008 at 3:30 PM
Thanks for the pointers. The answers:

1) To show member table method links as e.g. "MyMethod" instead of "MyMethod(String)", use <referenceLink ... show-parameters="false" />

2) There is no referenceLink attribute to change link appearance. I styled them by wrapping all instances of <referenceLink> with <span class="referenceLink">.