Tim Ewald shares his solution for XML Schema versioning problems. Instead of using xs:any, which causes lots of problems, have the schema validator simply ignore nodes it doesn't recognise and validate those it does recognise. Tim says schema validators will allow you to ignore validation errors, and says he will have an example soon. The contract is:
- A service can evolve it's contract in a controlled way without breaking clients
- Clients must assume that the contract they get is a snapshot in time and the service is free to evolve it's contract in a controlled way
- An application producing an XML instance should make sure it matches the schema that application is using
- An application consuming an XML instance should assume it matches the schema that application is using plus additional elements
- If an application consuming an XML instance wants to schema validate it, it should be forgiving in how it deals with unknown elements in the stream and should not simply throw exceptions
He has his code and several more entries: