Hi all,
I am thinking about rewriting a schema with lots of standalone complex types in it, into one where the complex types extend other base types more sensibly. The rationale for this is partly conceptual - because most of these types are specific instances of a domain object with a definite hierarchical structure - and partly practical, because we're using JAXB-generated classes to handle the XML reading logic and it's impossible to write methods for common functionality without either reflection or a lot of instanceof
and casting. Bleh.
So my primary question is whether anyone is aware of a good way to test two XSD schemas for functional equivalence? If I perform this schema refactoring correctly, the set of documents considered valid should be exactly the same for the two schemas despite the fact the files themselves would be very different. This sounds like the kind of thing that a testing framework could help with; I know there are tools that will suggest test inputs for JUnit tests, and I was wondering whether there might be any tools to generate edge case XML documents to test for validity against the old and new schemata?
And as an aside - if this is a terrible idea (or if there are better alternatives), then stop me now. :-)
Thanks for your attention.