Generate CHM without source code?

Sep 29, 2010 at 11:21 AM

Is it possible to generate a CHM using a set of xml-files only? Are there any examples showing how to do this?

I have implemented a scripting engine in my native application. Due to the structure of the binding between native cvode and the scripting core I see no way of putting xml comments directly in the source code. Hence, I want to keep a set of xml files where I update the documentation - always outside the source code. I know Sandcastle supports "xml comment files", but I'm not sure where to start.

I'm thinking of something like a TOC.xml, script_api_abc.xml, script_api_def.xml, etc... Then Sandcastle would take these well-formatted xml files and output a nice CHM file.

Sep 29, 2010 at 12:58 PM

Are the components (DLL or EXE) for the script_api_abc.xml, script_api_def.xml coded in .NET?

Best regard,

Sep 29, 2010 at 1:25 PM

No, the components are written in native C++ code.

If native code is supported, putting the whole documentation in one single script.cpp file is not an option (all binding to the scripting language is made inside one file). I believe an external xml is the better choice.

Sep 29, 2010 at 4:23 PM

The Sandcastle reference build process will required a managed assembly.
If you need to use the Sandcastle, you can do what Microsoft itself does, use the MAML (the conceptual reference topics).

Best regards,

Nov 27, 2010 at 9:54 PM
Edited Dec 4, 2010 at 9:40 AM

Actually, the binary assembly is necessary just to build the reflection.xml - the type hierarchy of the assembly. If you generate it on your own, you need not feed the assembly to Sandcastle. I tried it but had to dropped it later because the project was cancelled. Here we are what I did: I commented the sources using doxygen (javadoc) syntax. I had doxygen generate an XML file extracted from all sources. I converted this XML to a reflextion.xml-fake and a set of documentation XML files. Then I had Sandcastle chew it. Then I modified SHFB to accept relection.xml files instead of DLLs. It worked quite good but the work on generation of the fake-reflextion.xml was not finished. Also, Sandcastle expects managed code - it looked kind of weird to browse C++ documentation as a faked .NET... I realized that Sandcastle may not be suitable for (native) C++. Finally, I was more satisfied with styling the doxygen's output to make it resemble NDoc (earlier MSDN style).

   --- Ferda