I work on a medium sized project that has a central XML schema defining what types of XML documents the system will be able to process. There are about 800 of these documents, and many of them are very large.
The schema itself has evolved over the years and comes in several versions. Each document clearly indicates within the markup what schema version it is targeting.
In order to keep the schema clean, I want to know what features of the schema are no longer in use. E.g. "Complex type A appears 3 times across 2 documents". So that I can remove those features in future versions with minimal impact. I'm hoping for a python script, but a packaged software solution could be useful too, or something in a different language is fine. I can split the sets of files by schema version myself if needed, so the minimal requirements would be:
- One schema file
- One or more xml files that are valid according to that schema
- How many times, and in how many files, each schema type is used
- Format does not matter, csv, python dictionary, all good as long as it is structured.