[Mono-docs-list] XHtml provider, mono handbook provider

Miguel de Icaza miguel@ximian.com
28 May 2003 00:00:07 -0400


Hello,

> Please find attached code that adds 2 providers to the monodoc browser -
> one is a generic XHtml provider that works by looking at a table of
> contents in an XML file, (which I gather from Johannes is standard
> Microsoft "HTML Help" TOC format). It then adds the files that are
> referenced in that TOC to the .zip, as well as building the .tree.

Good job!  The code looks good, please commit to CVS.

> 4) I'm not sure if I've coded the "xhtml:" URL prefixes correctly. 
> 5) I've commented out the line in assembler.cs that sorts the nodes.
> 6) There are some weird entities in the mono handbook source, (like
>  ) that I'm not convinced should be there.
> 
> I plan to (eventually) address the first 3 of those issues. As I'm not
> sure when I'll get chance, I thought it best to offer up the code in
> case others have more time to improve it.
> 
> Miguel/browser-hackers, I'd appreciate if you could comment on 4 & 5 -
> it works for the mono handbook, but I don't know if everything will
> still Just Work if people create lots of providers based on the xhtml
> provider.

If you use "xhtml:" in the links you generate, you will need to be able
to tell the various help sources appart, or as you noticed, the
resolution will fail.

The trick I used in the old ecma-provider, was to use the
HelpSource.SourceID, and the urls look like this:

	source-id:N:ecma:....

Just prefix every one of your links with "source-id:NNN", and things
will work as they should.  The trick is that you will need to do some
XPath processing at runtime and replace the nodes.

> There's a transcript of roughly how to use the patched assembler/browser
> below. I know it's something of a pain to get going atm, but please
> shout if you have any problems...

It looks fine.  We should integrate these into a makefile in the Mono
tutorial tree, so I can run that before making a Monodoc release. 

And now is a good time for me to go and review the other pending
Monodoc patch to get the About box in place.

Miguel