How to show up the flagsSummary

Topics: General Questions, Sandcastle
Mar 24, 2010 at 6:30 AM
Edited Mar 24, 2010 at 6:31 AM

The FlagsAttribute was used on the Enum, and how can i show up the flagsSummary  item(defined in reference_content.xml file) in my document, please help!

BTW: My English is not good enough, sorry.

Mar 26, 2010 at 7:00 AM


It seems that the flagsSummary content item is currently only used in main_reference.xsl, but that particular transformation isn't being used at all by Sandcastle.  Currently, Sandcastle uses main_sandcastle.xsl for reference builds.  You may want to try updating that file to insert the flagsSummary content item.

  1. Open the main_sandcastle.xsl file, found in your DocProject or DocSite under the Help\Presentation\Style\Transforms\ folder.
  2. Locate the line near the top of the file that renders the XML documentation summary.  It will look like this: <xsl:apply-templates select="/document/comments/summary" />
  3. Insert the following XSL immediately before the line that renders the summary.  (The following XSL was taken from main_reference.xsl and altered slightly to enable the hyperlink.)
<!-- Flags attribute boilerplate -->
<xsl:if test="/document/reference/attributes/attribute/type[@api='T:System.FlagsAttribute']">
    <include item="flagsSummary">
      <parameter><see cref="T:System.FlagsAttribute" /></parameter>

Note that I haven't actually tested this, so it may require some modifications to work correctly.

- Dave

Mar 29, 2010 at 8:17 AM

thank you for your replay, i'm tring to do it.

BTW: its a good project !