title: XSD and polymorphism
body: <p>I am kinda repeating this question bit the 1st time it was asked incorrectly.</p>
  
  <p>I have this:</p>
  
  <pre><code>&lt;xsd:complexType name="A"&gt;
          &lt;xsd:sequence&gt;
              &lt;xsd:element name="options" type="options"/&gt;
          &lt;/xsd:sequence&gt;
  &lt;/xsd:complexType&gt;
  
  &lt;xsd:complexType name="B"&gt;  
      &lt;xsd:complexContent&gt;
              &lt;xsd:element name="options" type="ex_options"/&gt;
      &lt;/xsd:complexContent&gt;
  &lt;/xsd:complexType&gt;
  
  &lt;xsd:complexType name="options"&gt;
      &lt;xsd:sequence&gt;
          ...some options
      &lt;/xsd:sequence&gt;
  &lt;/xsd:element&gt;
  
  &lt;xsd:complexType name="ex_options"&gt;
      &lt;xsd:complexContent&gt;
           &lt;xsd:extension base="options"&gt;
               &lt;xsd:sequence&gt;
                ...some more options
                &lt;/xsd:sequence&gt;
            &lt;/xsd:extension&gt;
       &lt;/xsd:complexContent&gt;
   &lt;/xsd:element&gt;
  </code></pre>
  
  <p>So basically I have class A with an inner class of options
  Class B inherits from class A and I want B.options to inherit from A.options so that when we do webservices we only need to pass a and when we call getOptions it will return the right object B.options.  Currently with the way the xsd stands I get an error saying multiple elements with name options with different types appear in the model group.  The errors is in the B type.</p>