Link to specific section of .aml file from xml documentation

Jun 13, 2012 at 1:31 PM

Hi,

I am able to link to the .aml file from the xml documentation by using the following code:

<a href="html/ff1b584d-972a-4f13-8de6-03a577bcf7a5.htm">Test</a>

where i am referencing the GUID of the .aml file.

I would just like to know if its possible to link to a specific section of the file?

I have a table and would like to link to a specific row, i have added a row id and then thought i would be able to go straight to the row by using:

<a href="html/ff1b584d-972a-4f13-8de6-03a577bcf7a5.htm#Test">Test</a>

Where Test is the id i have given the row.

Is there a way to do this?

Thanks

Editor
Jun 13, 2012 at 8:19 PM

If you're using the latest release of Sandcastle or SHFB, what you've done should work.  However, only certain MAML elements support the address attribute used to specify the ID.  In the case of tables, you need to put it on an <entry> element within the table.  For example:

<table>
  <row>
    <entry address="Row1Cell1"><para>This entry has an <codeInline>address</codeInline>
attribute that can be used as a link target.</para></entry>
    <entry><para>Row 1, Cell 2</para></entry>
    <entry><para>Row 1, Cell 3</para></entry>
  </row>
</table>

Eric

 

Jun 14, 2012 at 4:06 PM

Hi Eric,

Thanks for help thats works great now :)