# Wednesday, June 18, 2003

Scott Hanselman writes:

Schema Versioning: Changing a namespace is not versioning, it is new type creation. [meta-douglasp]

Ok...I can see that point of view...then does versioning (as we hope to know it) simply not exist in the world of Schema?

I would say that versioning does exist in the world of Schema, but you do have to work for it.  It is certainly true that there is no standard way of handling schema versioning.  There are ways to deal with it yourself, but they do require some forethought. 

You can add version attributes to the elements in your schema, and leave them open using xsd:any or xsd:string, etc.  Doug Purdy had some good suggestions in his TechEd presentation (WEB400: Loose Coupling and Serialization Patterns).  The bottom line is that you have to leave yourself an out in the schema, and add a version attribute, and you have to do those things up front in the first version.  By their very nature it’s not the kind of thing you can start in version 2 when you discover that you need to add something.  That’s the biggest hurdle right there.  You have to anticipate version 2 while you’re writing version 1.  Granted, it’s usually a safe assumption that things will change, and it’s not too much extra work to build in the flexibility, but it does require some work and some additional planning.