i've made some additions to the srs, which we have discussed yesterday. the srs is available on the server.
generating textboxes
---------------------------------------
also i took a closer at ndoc. and i found out, that i can format the html output my way. the html output is formatted by xslt. i can modify the xslt that way, that i can quick find the position in the html doc, which the user can edit. because each c# comment tag has it's own template in the xslt. in the xslt i can add an unique identifier, which i can quickly find when the user wants to edit the documentation, thus I know where the relevant text in the html is and I can insert the textboxes there.
an example:
source code documentation:
/// <summary>
/// Returns the comment ...
/// </summary>
/// <param name="length">The length</param>
/// <returns>The comment in upper case</returns>
public string UpperCase(int length)
{
return comment.ToUpper();
}
html doc with base xslt:
<div id="nstext">
<p> Returns the comment ... </p>
<div class="syntax">public <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemStringClassTopic.htm">string</a> UpperCase(<br /> <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemInt32ClassTopic.htm">int</a> <i>length</i><br />);</div>
<h4 class="dtH4">Parameters</h4>
<dl>
<dt>
<i>length</i>
</dt>
<dd>The length</dd>
</dl>
<h4 class="dtH4">Return Value</h4>
<p>The comment in upper case</p>
…
</div>
html doc with SharedCodeDoc xslt:
<div id="nstext">
<p id=”SharedCodeDoc_summarytext”> Returns the comment ... </p>
<div class="syntax">public <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemStringClassTopic.htm">string</a> UpperCase(<br /> <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemInt32ClassTopic.htm">int</a> <i>length</i><br />);</div>
<h4 class="dtH4">Parameters</h4>
<dl>
<dt>
<i><p id=”SharedCodeDoc_paramname”>length</p></i>
</dt>
<dd><p id=”SharedCodeDoc_paramtext”>The length</p></dd>
</dl>
<h4 class="dtH4">Return Value</h4>
<p id=”SharedCodeDoc_returntext>The comment in upper case</p>
…
</div>
wiki
-----------------------------------------
I think it’s the best solution, when the system puts the new and old comment text in a xml-file. the html will also be updated, when the user presses the save button in the webinterface. when the system synchronizes the comments, it will use the xml-file. when we also save the old comment, we can compare the comment in the source file with the old command. this is important, when the ‘source code as master’ option is used. when the system has finished the synchronizing process, the xml-file will be removed if it’s empty. otherwise we have some conflicts, and the system sends the xml-file to the specified e mail address in the project settings.

2 Comments:
Looks like a feasible solution, but somehow it sounds a bit like a hack, no?
It's definitely a good thing that we can easy control the html generation, so that is a good starting point.
The other thing is that you domain diagram really has not much to do with this solution, right?
Cause you don't really work with any of these object directly. It's more of a generic html editing system.
I agree with Remy on the remarks above. I like your home grown solution but think it would be helpful to compare it with an existing WIKI engine like http://csharp-source.net/open-source/wiki-engines (Perspective is a good one)
Compare them in your design document and make a decision whether homegrown or WIKI is the best for your need.
Post a Comment
<< Home