是否可以将 SandCastle 创建的两个页面合并到一个主页中?
对于项目中的每个类,SandCastle 创建(除其他外)两个页面:
- 主页面,称为
T_class_full_name
,其中包含描述、语法、继承层次结构和另请参阅 - 成员页面,称为
>AllMembers_T_class_full_name
,包含构造函数、方法、字段等。
有没有办法将这两者合并在一起 - 将成员页面
附加到主页?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我无法为此提供有效的答案,但我可以提供一些想法,如果有人愿意解决这个问题,这些想法可能会起作用:
1。
配置 htmlBody.xsl 定义了一些结构,包括一个包含成员测试的部分:
如果在类级别(或者只是设置为 true 它可能会让您了解如何生成输出。(我不认为这里会有灵丹妙药设置)。2。
这是(我认为)添加到成员子组的链接的地方,我也会尝试这个:
3。
我还有其他想法尝试使用该结构,但我需要对其进行破解才能提供任何明确的答案。我什至不确定 htmlBody.xsl 是否是执行此操作的地方。如果我真的有需要,我想我可以通过执行以下操作最简单地实现您的目标:
好的一点是,生成的文件和链接中使用了一致的命名方案,因此我认为编写此过程和更新会更容易所有的链接都是锚点,而不是与模板搞乱太多。实际上,我认为对于具有此类文档操作经验的人来说,这将是相当容易完成的。
警告:我什至都不是 SandCastle 专家,一年多前我只使用过它最少的内容。在今天之前我也没有花时间考虑如何破解它,只是开箱即用。如果没有其他回应,我什至不会回应这一点。可能有一种受支持的配置方法来完成此操作,但作为一个临时用户,我什至不知道如何处理它。
我还根据我使用 SHFB 的经验,对 HTML 输出的外观做出了一些假设。我也可能在这方面做得太过分了。我不再有一个可以生成 sandcastle 文档的项目,但如果有人可以发布 Sandcastle 的一些 HTML 输出的链接,并且对这种方法感兴趣,我将很乐意提供进一步的帮助。
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:
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:
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.