Is it possible to merge two pages created by SandCastle into a single main page?

For each class in the project, SandCastle creates (among others) two pages:

  • The main page, called as T_class_full_name, with the description, Syntax, Inheritance Hierarchy and See Also
  • The members page, called as AllMembers_T_class_full_name, with Constructors, Methods, Fields, etc.

Is there a way to merge these two together - with the members page being appended to the main page?


I can't provide a working answer for this, but I can offer some ideas that may work if someone is willing to hack around with it:

1. The config htmlBody.xsl defines some of the structure including a section with a test for members: <xsl:if test="$subgroup='members'"> If this was turned on at the class level (or just set to true it might give you an idea on how that output is produced. (I do not think there will be a magic bullet setting here).

2. here is (I think) where links to the member subgroups are added, I would also play around with this:

<!-- add a link to the member list section for this subgroup -->
<a href="#{$elementVisibility}Toggle" onclick="OpenSection({$elementVisibility}Toggle)">

3. I have other ideas trying to play around with the structure, but I would need to hack at it to provide any clear answer. I am not even close to sure that the htmlBody.xsl is the place to do this. If I actually had a need here I think I could achieve your goal easiest by doing the following:

  • Generate the documentation in the standard way
  • Parse the generated documentation and merge the two using a DOM / XML parser (i.e. merge the two in code and output a new single page HTML document with the URLs updated to anchors on the current page)

The nice thing is that there is a consistent naming scheme used in the generated files and links, so I would think it would be easier to write this process and update all the links to be anchors than it would to mess around too much with the templates. I actually think this would be pretty easy to accomplish for someone experienced with that type of document manipulation.

Caveat: I am not even close to a SandCastle expert, having only used it minimally and over a year ago. I have also not spent anytime before today considering how I would hack it, only using it out of the box. I would not even have responded to this except for the lack of other responses. There may be a supported config way to accomplish this, but I as a casual user cannot even think how to approach it.

I am also making some assumptions here about how the HTML output would look based on my experience with the SHFB. I may be over-reaching there as well. I no longer have a project which I can generate sandcastle documentation from, but if someone can post a link to some HTML output from SandCastle and is interested in this approach I would be happy to help further.