title: What are the best practices for versioning XML schemas?
body: <p>I often have to design XML schemas for different XML-bases import routines. It is clear that XML schemas will evolve over time or they could contain bugs to be fixed, so it is important to capture the schema's version and to have some mechanism to bind against a specific version.</p>
  
  <p>Currently I have two scenarios:</p>
  
  <ol>
  <li><p>The bug is found within the schema and all schema instances must comply with the fixed version.</p></li>
  <li><p>The schema upgraded and should be considered as preferable but an old one should be also supported.</p></li>
  </ol>
  
  <p>Finally I came up with storing version information within the namespace of schema:</p>
  
  <pre><code>targetNamespace="http://schemas.company.com/Geodesy/2010/River.xsd"
  </code></pre>
  
  <p>When fixing a bug I fix it in the same namespace but if I'm about to upgrade a schema then I need to create a new namespace but with upgrade month added:</p>
  
  <pre><code>targetNamespace="http://schemas.company.com/Geodesy/2010/01/River.xsd"
  </code></pre>
  
  <p>And if I have more than one upgrade in a month then just append a day too:</p>
  
  <pre><code>targetNamespace="http://schemas.company.com/Geodesy/2010/01/17/River.xsd"
  </code></pre>
  
  <p>Do you know any better approach?</p>