 |
|
|
 |
|
|
Thought it would be very simple to find such a file on the internet. This is the only one I found after some searcing that works for me. I have not digged into the syntax of xsl files and just needed one that works.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
|
|
XML comments are great but they have drawbacks.
I generally find it good for documenting a specific function, but sometimes, I wished there was an efficient way of linking to a more general topic, describing the overall workings of the code. It should be possible to add a link (could be some kind of unique identifier generated by VS inserted into XML comment) to a section of a document (XML,Word or any other appropriate type of document) and to be able to edit this section quickly (VS should be able to follow the link). It would be a great help to keep the more general documentation up to date!
XLM comments also makes the code a bit overloaded... but the benefits are to great to not use them.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
I spent an hour searching for this very thing today ... it was great to find your solution. Thanks for taking the time to contribute back to the community. -Mark h--p/devaustinDAHTworpressDAHTcom
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
I am trying to get the group I work with to see the value of XML commenting. I needed a basic XSLT file that I could manipulate (I am too lazy to create it from scratch).
Tracy Wallace
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Yes, when I was in a similar situation, I had to write my own - I'm glad I've spared someone the same trouble!
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Thanks for the article but I mis one thing:
I need to document methods of our web services that return structured XML in various formats.
I include output examples in hte sections but your xsl doesn't copy the XML tags.
I'm not familiar with xsl syntax, any solution?
Thanks.
Example: C#: ---- /// /// Customer gets more credits to his/her acct /// /// /// /// /// /// status"" /// if fails then extra output: /// ErrorMessage "; /// "; /// /// Example: /// /// - /// - /// false ///Invalid object name 'sr.Users'. /// /// /// /// [WebMethod] public XmlDocument BuyCredits(string CustomerID, ...)
HTML output: --------------- ... Return Value:
status"" if fails then extra output: ErrorMessage "; "; Example: - - falseInvalid object name 'sr.Users'.
...
Thanks in advance
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
In fact, your tags are technically still there - the stylesheet isn't designed to do anything special with them, so they just get ignored by whatever is displaying the data (Internet Explorer, for instance). You'll notice that your message here has suffered the same fate.
The workaround is for you to replace the leading "<" in each case with "<" - this will work fine in the output file and IntelliSense, though of course, it looks awful in the original code.
I have tried various changes to the stylesheet, but unfortunately nothing I've tried has worked so far, so for the moment, that's all I can suggest. I'll look into it further and post a solution here if I find one.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Thanks for your kind and prompt reply.
However your reply reads 'replace evry "<" with "<"' . I needed a colleague's help to realize ("View Source") that you meant 'replace every "<" with "&-l-t-;" (remove the dashes).
It worked - thanks.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
TheOF wrote: However your reply reads 'replace evry "<" with "<"' .
I should have thought of that given the way the forum interprets HTML code. I'm glad your colleague worked it out for you, and of course very pleased to hear that it worked! Thanks for the feedback.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Another feasible solution is called Doxygen
http://www.stack.nl/~dimitri/doxygen/
It generates HTML.
The primary use for doxygen is for C projects, but they have partially extended it for CSharp projects. This package works at a source code level, as opposed to a compiled IL level like SandCastle.
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
|
Just what I needed to generate some text for a Technical Design Document. It was pretty easy to modify your XSL stylesheet to return what I wanted.
One thing I found that you might want to add is some sorting. I found that by putting <xsl:sort select="@name" data-type="text" order="ascending"/> after every For-Each and every apply-template; the methods, parameters, fields, etc all came out sorted. It was a big help to me anyway.
Craig C.
C code. C code run. Run code run!
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
This is very convenient. It allowed me to make some quick documentation. I'm suprised Visual Studio doesn't have something to generate documentation in HTML or Text or whatever (instead of just intellisense), or does it...?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
I don't know if there's anything inbuilt - nothing jumped out at me when I wanted something similar, which is why I designed this template. I'm glad to hear that it was useful!
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Hi Emma,
I am using Visual Studio 2005 with '/doc' option. I downloaded your 'Documentation.xsl', then added 'xml-stylesheet' description. I opened XML, but I can't see anything on my browser (IE6).
Is your XSL file working with VS2005 correctly?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
It's working fine here ... with a little modification, though. I deleted the top blank line in the stylesheet file after getting errors in Opera and Firefox. I also noticed that to be able to see the methods within a class, I needed to at least add summary tags to the class itself. Hope it helps.
|
| Sign In·View Thread·PermaLink | 3.00/5 (3 votes) |
|
|
|
 |
|
|
Hi ! Nice job I wanted to see it in FireFox and it told me
XML Parsing Error: xml processing instruction not at start of external entity Location: file:///D:/TP5/Projects/TpCommunicator/TpCommunicator/Documentation.xsl Line Number 6, Column 1:
I just had to put your " don't remove this header " After the first line.
Internet Explorer, as usual, is not as strict, and allow comments before |
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Thanks for the info - I must admit my PC is Microsoft-dominated, so I didn't know that could be a problem. I hope the stylesheet will prove useful for whatever "TpCommunicator" is. 
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Hello
Can someone help me! I have a problem about xslt I want to use attribute to be a condition what should I write xslt command or function this is my xml file
<assess_controls> <assess_control> << b>company_name</b>> <u>xxx</u></company_name> << b>form_name</b> <b>no</b>="<u>1</u>">form_xxx</form_name> <assesser_name>xxx</assesser_name> <control_type>xxx</control_type> <control_subgroup sub_group="1 xxx"> <activitys> <activity>xxx</activity> <comment>comment 1</comment> </activitys> </control_subgroup> <control_subgroup sub_group="2 xxx"> <activitys> <activity>xxx3 </activity> <comment>comment 3</comment> </activitys> </control_subgroup> </assess_control> <assess_control> <company_name>xxx</company_name> <form_name no="2">form_xxx</form_name> <assesser_name>yyy</assesser_name> <control_type>yyy</control_type> <control_subgroup sub_group="1 yyy"> <activitys> <activity>yyy</activity> <comment>comment 1</comment> </activitys> </control_subgroup> <control_subgroup sub_group="2 yyy"> <activitys> <activity>yyy3 </activity> <comment>comment 3</comment> </activitys> </control_subgroup> </assess_control> </assess_controls>
<big>I want to use <company_name>, <form_name> and attribute of form_name "no" and xslt if below</big>
<xsl:param name="<b>comp</b>">admin</xsl:param> <xsl:param name="<b>formname</b>">pppp</xsl:param> <xsl:param name="<b>formno</b>">1</xsl:param> <xsl:template match="/"> <HTML> <body STYLE="font-family:Arial, helvetica, sans-serif; font-size:10pt; background-color:#EEEEEE"> <xsl:apply-templates/> </body> </HTML> </xsl:template> <xsl:template match="assess_control"> <xsl:if test="company_name = <b>$comp</b>"> <xsl:if test="form_name = <b>$formname</b>"> <xsl:apply-templates select= "form_name"/> <table class = "borders" border = "1"> <tr class = "largebluetext"> <td><xsl:value-of select="company_name"/></td> <td><xsl:value-of select="control_type"/></td> <td><xsl:value-of select="control_group"/></td></tr> <tr><td><xsl:value-of select ="form_name"/></td></tr> </table> <xsl:apply-templates select ="control_subgroup "/> <xsl:value-of select="@sub_group"/> </xsl:if> </xsl:if> </xsl:template> <xsl:template match="form_name"> <xsl:if test="<b>$formno</b>"> <table><tr><td>no: <xsl:value-of select="@no"/></td></tr></table> </xsl:if> </xsl:template>
<xsl:template match="control_subgroup"> <span class="blacktext"> <xsl:value-of select="@sub_group"/> </span> <xsl:for-each select="activitys"> <table class = "borders" border = "1"> <tr class = "largeyellowtext"> <td class = "borders1"><xsl:value-of select="activity"/></td> <td class = "borders2"><xsl:value-of select="score"/></td> <td class = "borders3"><xsl:value-of select="comment"/></td></tr> </table> </xsl:for-each> </xsl:template>
</xsl:stylesheet>
The problem is I can't specify form_name[@no] I want. What wrong of my xslt code?
Thank you very much
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
|
|
I admit that u have done a wonderful work but its too basic and cumbersome. Have u ever tried NDoc utility... it gives u documentation based on MSDN design or Javadoc design anything that u r comfortable with.
the link for the site is:
NDoc
NDoc generates class library documentation from .NET assemblies and the XML documentation files generated by the C# compiler (or with an add-on tool for VB.NET).
NDoc uses pluggable documenters to generate documentation in several different formats, including the MSDN-style HTML Help format (.chm), the Visual Studio .NET Help format (HTML Help 2), and MSDN-online style web pages.
If you're new to NDoc, the Programmer's Reference provides an example of NDoc's output.
NDoc's source code is freely available under a certified Open Source license. We welcome everyone to use our software in the hopes that they can provide feedback, submit bug reports and fixes, or even join us as a developer!
thanxs
Maharishi
Nothing is Impossible. Even impossible spells "i m possible"
|
| Sign In·View Thread·PermaLink | 5.00/5 (1 vote) |
|
|
|
 |
|
|
maharishi_b wrote: I admit that u have done a wonderful work but its too basic and cumbersome. Have u ever tried NDoc utility... it gives u documentation based on MSDN design or Javadoc design anything that u r comfortable with.
I did actually see some references to NDoc while I was looking for a ready made XSLT stylesheet. It looks very useful for generating actual professional documentation. But all I wanted was a very basic way of doing a quick transformation of the XML into something more legible without actually converting it into another document format. So I think the two solutions cater for quite different needs.
Thanks for the feedback and the link; I'm sure it'll be useful for people who need something more sophisticated.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |