I'm currently pondering my options for the following problem:
I have a (relatively) simple but often changing configuration file for my application which I want users to be able to edit and change without have to "understand" xml. I do not want them to have know anything about encoding or understand that they have to close every node they opened. Here is an example of a section in the configuration file (defining facets for some arbitrary search engine):
<section name="facets">
<facet type="format" label="Format" max="4"/>
<facet type="marcfields" Label="Author" max="5">
<mfield name="df100" subfields="abcdjq"/>
</facet>
<facet type="language" max="4"/>
<facet type="pubdate" max="6" submax="8"/>
</section>
Editing this section, user should should be able to re-order the facets, delete facets, configure existing facets or add new ones. So far so good, but the xml is not completely free form and comes with a couple of restriction/structure:
- Facets come from a pre-defined set of types (forkamt, marcields, language & pubdate above), so when people choose to add a new one, they need to be able to choose a type.
- Each facet type comes with "parameters" - some common for all types some specific. For example in the above XML, one can edit the label & max attribute for each facet. For the "marcfields"facet, one can add sub-nodes (with two editable attributes). For the"pubdate" facet, one can edit the submax attribute.
I am looking for a way to take my configuration file and make it editable in ASP.NET web environment. All of this would be fine to program, but I except the configuration file to change often and I don't want to have to recode my site for every change. Therefore I'm looking for an open source frame work which can:
- Take an XML file with a known structure and constraint (via an XML schema or anything else).
- Generate a ASP.NET based editing environment , allowing people to safely manipulate the xml file.
- Be very friendly where people make mistakes.
Any suggestions?