开发者

How to generate mediawiki-ready documentation from reflection and xml comments

Could someone suggest a good workflow that,

  • Independently on the number of disparate tools that could be required
  • and how much manual work would have to be performed,

could allow me to incorporate my project documentation (reflection + xml c开发者_如何转开发omments) into mediawiki syntax, which I would then use to incorporate on my development team wikia?


There is going to be some manual labor involved, but it should be doable using the resources outlined below.

My first thought was just doing some googling, by which I came across http://www.mediawiki.org/wiki/Alternative_parsers. All of these parsers seem to take data and convert it to XML, not from XML, also none of them are .NET based, which may not be super important in the long run if no coding had been involved. Who knows though, there may be something here worth looking at.

Then I found http://www.mediawiki.org/wiki/Manual:Importing_XML_dumps. I figure if you can import data in an XML format then all you really need to know is what the schema is so that you can reformat your data in the appropriate way. The best thing is that this page has a link to http://www.mediawiki.org/wiki/Manual:XML_Import_file_manipulation_in_CSharp, a C# example of how to work with Media Wiki XML Import files. Given the example it seems like only a small step to create the classes required for generating the required xml from scratch and dumping your data in. Here is a link to the official schema documentation: http://www.mediawiki.org/xml/export-0.3.xsd.

Depending on whether you want to write PHP or not another option presents itself. You could write an XMLTransform Extension, as talked about here: http://www.ehartwell.com/TechNotes/MediaWikiXmlExtension.htm. This site seems to say that you could keep your XML in it's native format and write a custom XSL sheet to display the contents in the desired format.

Good luck!


You could use sandcastle to create a webpage from your source code http://documentation.sandcastle.codeplex.com

You have to enable the XML generation of your projects in your project settings. The generated XML can be used in sandcastle to generate some cool documentation for example as an webpage.


I would look at using doxygen, to generate XML and then process the resulting XML (XSLT or the tool[s] of your choice) into something suitable for your needs.

If you've installed graphviz, doxygen can use its dot tool to generate various diagrams as well. Here's an example (from the KDE docs) of a class hierarchy diagram generated by doxygen: http://api.kde.org/playground-api/graphics-apidocs/cirkuit/src/lib/html/inherits.html

Another, slight less flamboyant one (from IBM): http://www.icu-project.org/apiref/icu4c/classUMemory.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜