Reference With Syntax

Sandcastle MAML

Collapse image Expand Image Copy image CopyHover image

This document type is used for reference with syntax topics.

Reference With Syntax File Format

Below is an example of a Reference With Syntax topic file.

Reference With Syntax Topic  Copy imageCopy
<?xml version="1.0" encoding="utf-8"?>
<topic id="00000000-0000-0000-0000-000000000000" revisionNumber="1">
  <developerReferenceWithSyntaxDocument
    xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5"
    xmlns:xlink="http://www.w3.org/1999/xlink">

    <!--
    <summary>
      <para>Optional summary abstract</para>
    </summary>
    -->

    <!-- NOTE: This is similar to the API reference documentation which is
         produced by the reference build.  You should probably just use that
         instead of this. -->
    <introduction>
      <!-- Uncomment this to generate an outline of the section and sub-section
           titles.  Specify a numeric value as the inner text to limit it to
           a specific number of sub-topics when creating the outline.  Specify
           zero (0) to limit it to top-level sections only.  -->
      <!-- <autoOutline /> -->

      <para>Required introduction</para>
    </introduction>

    <syntaxSection>
      <sections>
        <section>
          <title>Syntax section title</title>
          <content>
            <para>Syntax content</para>
          </content>
        </section>
      </sections>
      <legacySyntax>
        <parameterReference>Parameter reference</parameterReference>
      </legacySyntax>
    </syntaxSection>

    <!-- <parameters>Optional parameters info</parameters> -->
    <!-- <returnValue>Optional return value info</returnValue> -->
    <!-- <exceptions>Optional exception info</exceptions> -->
    <!-- <languageReferenceRemarks>Optional language reference remarks</languageReferenceRemarks> -->
    <!-- <codeExample>Optional code example</codeExample> -->
    <!-- <dotNetFrameworkEquivalent>Optional .NET Framework equivalent info</dotNetFrameworkEquivalent> -->
    <!-- <requirements>Optional requirements info</requirements> -->

    <!-- Add one or more top-level section elements.  These are collapsible.
         If using <autoOutline />, add an address attribute to identify
         it so that it can be jumped to with a hyperlink. -->
    <section address="Section1">
      <title>Optional section title</title>
      <content>
        <!-- Uncomment this to create a sub-section outline
        <autoOutline /> -->
        <para>Add one or more sections with content</para>
      </content>
    </section>

    <relatedTopics>
      <!-- One or more of the following:
           - A local link
           - An external link
           - A code entity reference

      <link xlink:href="Other Topic's ID">Link text</link>
      <externalLink>
          <linkText>Link text</linkText>
          <linkAlternateText>Optional alternate link text</linkAlternateText>
          <linkUri>URI</linkUri>
      </externalLink>
      <codeEntityReference>API member ID</codeEntityReference>

      Examples:

      <link xlink:href="00e97994-e9e6-46e0-b420-5be86b2f8278">Some other topic</link>

      <externalLink>
          <linkText>Sandcastle Help File Builder on CodePlex</linkText>
          <linkAlternateText>Go to CodePlex</linkAlternateText>
          <linkUri>http://SHFB.CodePlex.com</linkUri>
      </externalLink>

      <codeEntityReference>T:TestDoc.TestClass</codeEntityReference>
      <codeEntityReference>P:TestDoc.TestClass.SomeProperty</codeEntityReference>
      <codeEntityReference>M:TestDoc.TestClass.#ctor</codeEntityReference>
      <codeEntityReference>M:TestDoc.TestClass.#ctor(System.String,System.Int32)</codeEntityReference>
      <codeEntityReference>M:TestDoc.TestClass.ToString</codeEntityReference>
      <codeEntityReference>M:TestDoc.TestClass.FirstMethod</codeEntityReference>
      <codeEntityReference>M:TestDoc.TestClass.SecondMethod(System.Int32,System.String)</codeEntityReference>
      -->
    </relatedTopics>
  </developerReferenceWithSyntaxDocument>
</topic>

See Also

Other Resources