Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Romand 14 posts 154 karma points
    Dec 19, 2017 @ 11:07
    Romand
    0

    Default xml namespace for config file

    Hey there,

    I created my first nuget package for Umbraco. I realized afterwards the installation difference between nuget style vs umbraco style.

    Anyway, I played with "config transform feature" during a nuget installation MSDN link here. This is really handy and helped me add additional information. In my case, an entry in config/dashboard.config.

    The only problem being the umbraco xml config files don't have a default namespace. During the installation process, package manager would fail for that reason.

    For the time being I added a default one such as the one below.

    <dashBoard xmlns="https://our.umbraco.org/config/dashboard">
    

    With such configuration, I can play with install/uninstall xdt features

    <?xml version="1.0" encoding="utf-8"?>
    <dashBoard xmlns="https://our.umbraco.org/config/dashboard" xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
    <section alias="DashboardIxcys" xdt:Transform="Insert" xdt:Locator="Match(alias)">
    <areas>
    <area>ixcys</area>
    </areas>
    <tab caption="Dashboards">
      <control>
        /app_plugins/ixcys/views/ixcys.dashboard.html
      </control>
    </tab>    
    </section>
    </dashBoard>
    

    This would require me to ask specifically to developpers to add such namespace beforehand installing my package.

    So my question: wouldn't it nice to have some sort of default namespace for each xml configuration file ?

    • This would help in this situation
    • This is also a convention for XML to declare a default namespace

    Thanks for your review and feedback

Please Sign in or register to post replies

Write your reply to:

Draft