title: How do I extend a base schema with custom elements while remaining open to change from new versions?
body: <p>Given an XSD as follows:</p>
  
  <pre><code>&lt;xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"  xmlns:std="http://..." targetNamespace="..."&gt;
    &lt;xs:element name="SomeRootNode" type="std:SomeRootNodeType" /&gt;
    ...
  &lt;/xs:schema&gt;
  </code></pre>
  
  <p>that defines some elements which allow any child from a different namespace.</p>
  
  <p>I want to extend this schema with my own and insert child elements and attributes of specific elements in the base document. For example, myElementX or myAttributeY must have parent node std:SomeRootNode. The combined document should then be capable of allowing any third parties to continue to extend the document in any way already allowed by the base schema, but for elements and attributes from my namespace I want to validate that all elements and attributes have the correct parent nodes and appear only in the allowed places in the base document.</p>
  
  <p>How can this be achieved?</p>
  
  <p>I hope there is a clean solution that does not resort to redefining the base schema I am extending. I want to be able to easily adapt if new versions of the base schema are released. I do not want to have to change mine with new redefinitions each time a new version of the base document is released (unless it has breaking changes for my design).</p>