title: XSD with elements from other namespace
body: <p>I have two XSDs that are definining different documents. Say <code>A.xsd</code> defines an element <code>ElementA</code> as the root, with some complex rules. Now <code>B.xsd</code> defines an element <code>ElementB</code> that is supposed to use <code>ElementA</code> somewhere in between.</p>
  
  <p>For example I want the XML file for <code>ElementB</code> look like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;ElementB xmlns="http://example.com/namespace/for/ElementB"&gt;
    &lt;foo&gt;Bla&lt;/foo&gt;
    &lt;bar&gt;Blub&lt;/bar&gt;
    &lt;ElementA xmlns="http://example.com/namespace/for/ElementA"&gt;
      &lt;!-- ... --&gt;
    &lt;/ElementA&gt;
  &lt;/ElementB&gt;
  </code></pre>
  
  <p>Then <code>B.xsd</code> could look like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;xs:schema xmlns="http://example.com/namespace/for/ElementB" targetNamespace="http://example.com/namespace/for/ElementB" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"&gt;
    &lt;xs:element name="ElementB"&gt;
      &lt;xs:complexType&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element name="foo" type="xs:string" /&gt;
          &lt;xs:element name="bar" type="xs:string" /&gt;
  
          &lt;!-- And now I want to include ElementA somehow --&gt;
          &lt;xs:element name="ElementA" /&gt;
        &lt;/xs:sequence&gt;
      &lt;/xs:complexType&gt;
    &lt;/xs:element&gt;
  &lt;/xs:schema&gt;
  </code></pre>
  
  <p>The thing is that I don‘t really want to clone the specification of <code>ElementA</code> into <code>B.xsd</code>, as there are also documents, that just have <code>ElementA</code> as the root (i.e. <code>ElementB</code> is some kind of container document).</p>
  
  <p>So, how can I allow <code>ElementA</code> within <code>ElementB</code> while completely building on top of the already existent XSD?</p>