Linking from reference to MAML and vice versa

Jul 25, 2008 at 12:27 PM

I am looking for a way to link from reference documenation to MAML content and from MAML content to reference documentation. Is there a possibility to do this?

Of course I might use an external link, but this is quite annoying ... e.g., I would like to be able to link from MAML to reference documentation using something like link="T:Foo.Bar.MyMethod" or from reference to MAML using MAML's topic IDs ...

Is this possible?


Jul 25, 2008 at 1:46 PM
Edited Jul 25, 2008 at 2:02 PM
>>Golo: Is this possible?

For  Conceptual to Reference use the <codeEntityReference>, with the following examples

1. For method use
you can use Overload:Foo.Bar.MyMethod if you want to to link to the overloaded page

2. For interfaces, classes, structure

3. For namespaces use

For the Reference to the Conceptual, use the <see> tag, with the MAML conceptual help topic ids.
NOTE: This last method is not robust, since it depends on the file extension of the MAML output file. But if you plan to generate only *.htm files this should not be a problem. Otherwise, we hope to provide a better way in the Sandcastle Assist Project effort with a new link component - not available yet.

Edited: I mean codeEntityReference not codeReference - sorry.

Best regards,

Jul 25, 2008 at 6:16 PM
Hi Golo,

Check out the MAML guide for more information:

- Dave
Jul 26, 2008 at 12:55 AM
Thanks for your replies :-)
Aug 11, 2008 at 7:23 AM
Is there a way to refer not to the namespace summary page, but to the root of the namespaces page?
Aug 11, 2008 at 10:43 AM

>>rhelliwellIs there a way to refer not to the namespace summary page, but to the root of the namespaces page?

If you mean the root container, then 

<codeEntityReference>R:Project</codeEntityReference> is not supported, I do not know if there is a work around
other than a adding it to the link component, ResolveReferenceLinksComponent2.
In  particular, the TargetCollection and LinkTextResolver, which has the NamespaceTarget, TypeTarget and MemberTarget
for resolving the namespaces, types and members.

Best regards,

Aug 11, 2008 at 12:26 PM

Hi rhlliwell,

You can use an external link:

A link to the <externalLink>
</externalLink> topic.

The GUID for the R:Project node never changes (and neither does any other topic GUID for that matter) so use the exact linkUri specified in my example.  (If you're not using GUID file names then you'll have to find the correct file name and use that instead.)

If you've applied the Sandcastle Styles patch an external link has the side effect of opening in a new window, but you can explicitly change that behavior using a linkTarget element: 

A link to the <externalLink>
<linkTarget>_self</linkTarget> </externalLink> topic.

- Dave

Aug 11, 2008 at 7:28 PM
Thanks Dave. Yep that's exactly what I was after.