[Mono-docs-list] MonoDoc helpsource improvement

Joshua Tauberer tauberer@for.net
Fri, 09 May 2003 17:00:12 -0400


Hey, all.  I've been a lurker on the main Mono lists for a while.

I spent some time procrastinating the last few days by taking a look at 
the MonoDoc browser.  It needed some work in the HTML formatting, but I 
hesitated to try to work with formatting XML in C#. Since it was already 
using XSLT for some things, it seemed only natural to me to use XSLT for 
all of the formatting for the ECMA documentation files.

So, I wrote a drop-in replacement class for EcmaHelpSource that uses a 
beefed-up version of mono-ecma.xsl to do all of the formatting.  This 
seems a lot cleaner to me: keeping code and presentation entirely 
separate, and using XSLT for what it was meant to do.

While doing that, I made some improvements.  It now presents hyperlinked 
versions of member signatures (e.g. a method's argument types are 
hyperlinked to the type's documentation pages).  (Though this is missing 
some things.)

To get all that to work, I also had to implement 
M:Namespace.Type.MemberName(ArgType1,ArgType2)-style URLs.  So, with the 
new class/xsl the documentation is all properly hyperlinked together. 
(Unfortunately it's a very slow implementation.  I'm guessing this is 
why those links weren't working before.  Until more information is added 
to what's kept in the nodes, I'm not sure a faster system is possible.)

All in all, the changes make MonoDoc's HTML presentation nearly 
finished-quality and the presentation should be more easily maintainable.

It'd be great if someone could take a look at this and see if it'll be 
useful for Mono.  (I hope so, since I spent a lot of time on it!)

     There's one new sourcefile: ecma-helpsource-new.cs
     Updated mono-ecma.xsl
     Updated provider.cs to use the EcmaHelpSourceNew class and also 
corrects a bug in RootTree::MemberLookup.

I originally sent this with the files attached a few days ago, but it 
was too large.  I've uploaded the first two files and a patch for 
provider.cs (against current CVS) to http://taubz.for.net/monodoc.

Thanks.

-- 
- Joshua Tauberer

http://taubz.for.net

** Nothing Unreal Exists **