title: XSD inheritance design
body: <p>I have this in my xsd:</p>
  
  <p>
          
      </p>
  
  <pre><code>&lt;xsd:simpleType name="line_action"&gt;
      &lt;xsd:restriction base="xsd:string"&gt;
          &lt;xsd:enumeration value="add"/&gt;
          &lt;xsd:enumeration value="delete"/&gt;
          &lt;xsd:enumeration value="remove"/&gt;
          &lt;xsd:enumeration value="suspend"/&gt;
          &lt;xsd:enumeration value="restore"/&gt;
          &lt;xsd:enumeration value="update"/&gt;
      &lt;/xsd:restriction&gt;
  &lt;/xsd:simpleType&gt;
  
  &lt;xsd:simpleType name="action_enum_5"&gt;
      &lt;xsd:restriction base="tns:line_action"&gt;
          &lt;xsd:enumeration value="add"/&gt;
          &lt;xsd:enumeration value="remove"/&gt;
      &lt;/xsd:restriction&gt;
  &lt;/xsd:simpleType&gt;
  
  
      &lt;xsd:element name="call_forward_dont_answer"&gt;
          &lt;xsd:complexType&gt;
              &lt;xsd:complexContent&gt;
                  &lt;xsd:restriction base="tns:basic_option"&gt;
                      &lt;xsd:sequence&gt;
                          &lt;xsd:element name="paths" type="tns:path_type"/&gt;
                          &lt;xsd:element name="number_of_rings" type="tns:number_of_rings_type"/&gt;
                          &lt;xsd:element name="ring_to_number" type="tns:telephone_number_type"/&gt;
                      &lt;/xsd:sequence&gt;
                      &lt;xsd:attribute name="action" type="tns:action_enum_5"/&gt;
                  &lt;/xsd:restriction&gt;
              &lt;/xsd:complexContent&gt;
          &lt;/xsd:complexType&gt;
      &lt;/xsd:element&gt;
  </code></pre>
  
  <p>So for call_forward_dont_answer, I want to extend basic option and a few more elements/fields, but then the action should only be add and Remove.  If I do extension then I can't change the attribute type, but then if I do restriction then I can't add new elements/fields?</p>
  
  <p>What should I do?</p>