title: Use XML Schema to extend an element rather than a complexType
body: <p>Suppose I have some schema:</p>
  
  <pre><code>&lt;xsd:schema ...&gt;
      &lt;xsd:element name="foo"&gt;
           &lt;xsd:complexType&gt;
               &lt;xsd:sequence&gt;
                   &lt;xsd:element name="fooElement" type="xs:string" /&gt;
               &lt;/xsd:sequence&gt;
           &lt;/xsd:complexType&gt;
      &lt;/xsd:element&gt;
  &lt;/xsd:schema&gt;
  </code></pre>
  
  <p>This defines some element <code>foo</code> which has inside it some element <code>fooElement</code> with type string.  I'd like to now extend element <code>foo</code> to also have an element <code>barElement</code> and call this extension <code>bar</code>.</p>
  
  <p>To complicate things, let's also suppose that someone else has defined <code>foo</code> and the schema cannot be changed.  While the example here is trivial, let's also assume that the contents of <code>foo</code> might be more complicated, and that defining a new schema isn't quite as simple as copying the element <code>fooElement</code>.</p>
  
  <p>Effectively, I'd like to define a new schema:</p>
  
  <pre><code>&lt;xsd:schema xmlns:fns="otherschema" ...&gt;
      &lt;xsd:import namespace="otherschema" /&gt;
      &lt;xsd:element name="bar"&gt;
           &lt;xsd:complexContent&gt;
               &lt;xsd:extension base="fns:foo"&gt;
                   &lt;xsd:sequence&gt;
                       &lt;xsd:element name="barElement" type="xs:string" /&gt;
                   &lt;/xsd:sequence&gt;
               &lt;/xsd:extension&gt;
           &lt;/xsd:complexContent&gt;
      &lt;/xsd:element&gt;
  &lt;/xsd:schema&gt;
  </code></pre>
  
  <p>Unfortunately <code>&lt;xsd:extension&gt;</code>'s <code>base</code> attribute only accepts XSD type arguments, not elements.  How do I extend an element? (can I extend an element?)</p>