This project has moved. For the latest updates, please go here.

custom XML comments

Feb 11, 2008 at 4:10 PM
Just wondering if it's possible to add custom XML comments to your code and have them recognized and output in the CHM file? For example, in the code below, I've added <database /> tags to cross-reference a class property to a field in the database. As it stands right now, it seems like those tags are just being ignored...

''' <summary>
''' Gets or sets the given name of the applicant.
''' </summary>
''' <value>Given name of the applicant.</value>
''' <returns></returns>
''' <remarks>The value must only contain characters.</remarks>
''' <database>PERSON.GIVEN_NAME</database>

Is this possible?
Feb 11, 2008 at 4:34 PM
I don't think the VB or C# compilers handle unknown top-level tags.
You can check the XML file that is output, and see if that contains the <database> tag you have defined.
I don't think it will, but I'm just guessing.

If the documentation XML file contains the additional tags (you could make your own post-process step to dig out the comments and put them into the XML file), then you could add steps to the XSLT files to transform your content into HTML. You would need to look at how the <example> tag is turned into HTML for example.

In other words - it's doable, but not trivial.
Feb 11, 2008 at 6:57 PM
The compiler will output the tags but the Sandcastle presentation style transformations will ignore them as they don't recognize them. You can add support for them by manually editing the presentation style transformations. See for details.