Excel-DNA/IntelliSense

Allow use of XInclude in `IntelliSense.xml` files

Mo-Gul opened this issue · 2 comments

I usually have several modules with functions in my AddIns which could also be used separately. To not make the .IntelliSense.xml file big and easier manageable, it would be great it would be possible to use XInclude. That would offer the possibility to write an own XML file for each module.

I already gave it a try but was unsuccessful to make it work. Thus I either do something wrong or XInclude is currently not supported. The main .IntelliSense.xml file looks like

<IntelliSense xmlns="http://schemas.excel-dna.net/intellisense/1.0"
              xmlns:xi="http://www.w3.org/2001/XInclude">
    <FunctionInfo>
        <xi:include href="IntelliSense/modFunctions1.xml"/>
        <xi:include href="IntelliSense/modFunctions2.xml"/>
    </FunctionInfo>
</IntelliSense>

and the "sub" .xml files look like

<Function Name="MyVBAFunction" Description="A function described in XML">
    <Argument Name="FirstArg" Description="Whatever you want to put in here" />
    <Argument Name="AnotherArg" Description="Actually the second arg" />
</Function>
<Function Name="AnotherFunction" Description="A function described in XML">
    <Argument Name="FirstArg" Description="Whatever you want to put in here" />
    <Argument Name="AnotherArg" Description="Actually the second arg" />
</Function>

Because I stumbled over it by chance, maybe this helps to add my feature request ...

(As I stated elsewhere I am unable to program in .NET, but will be happy to test.)

I again stumbled over something related and just want to post it here for later reference.

I saw https://github.com/maxtoroq/dotnet-xml#parsers were (amongst others) the project https://github.com/keimpema/Mvp.Xml.NetStandard is listed, which provides an XML parser being able to also parse XInclude statements.

I can just hope that changing the XML parser from I guess

using System.Xml;
using System.Xml.Serialization;

to the referenced parser is relatively easy, so that the requested feature would be available.

(I am not sure, if https://csharp.hotexamples.com/de/examples/Mvp.Xml.XInclude/XIncludingReader/-/php-xincludingreader-class-examples.html shows some usage examples of this class.)