I've worked on projects that have very complex XML configuration, and one problem that's faced is maintaining the internal consistency of the XML.
In this case I don't mean the strict XML schema consistency, but rather the higher level relation between the nodes used. Most problems were caused by implicit linking between information encoded in the XML, and implicit relation of that information to the codebase. Examples might be:
- XML node data implicitly linked to enums in code
- Business objects in the same config that are related (in that they share information that needs to be consistent) without any explicit relation between them
- Code in XML to be compiled and parsed at runtime
It struck me that a) this might become a practice of increasing frequency and b) that in some cases we're implicitly creating a new coding language that's not compile-time checked -- and in fact has few checks at all until it's run.
Is anyone else out there facing similar scenarios, and are there any tools or approaches that make the problem more tractable? I'd like some general examples that are technology-agnostic -- my own specific experience has been with C# and with config for proprietary systems.
Note: although I have an answer to this below, I've no intent of taking my own as the final answer.