title: XML schema complexType within an complexType
body: <p>I am writing XSD for the following XML:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;?xml-stylesheet type="text/xsl" href="WS.xslt" ?&gt;
  &lt;interface name="WS"&gt;
      &lt;package&gt;com.example&lt;/package&gt;
      &lt;import&gt;java.rmi.RemoteException&lt;/import&gt;
      &lt;import&gt;java.io.*&lt;/import&gt;
          &lt;abstract_method name="login"&gt;
              &lt;modifier&gt;public&lt;/modifier&gt;
              &lt;arguments&gt;
                  &lt;parameter type="int"&gt;id&lt;/parameter&gt;
                  &lt;parameter type="String"&gt;pass&lt;/parameter&gt;
              &lt;/arguments&gt;
              &lt;return&gt;boolean&lt;/return&gt;
          &lt;/abstract_method&gt;
          &lt;abstract_method name="send"&gt;
              &lt;modifier&gt;private&lt;/modifier&gt;
              &lt;arguments&gt;
                  &lt;parameter type="String"&gt;subject&lt;/parameter&gt;
                  &lt;parameter type="String"&gt;message&lt;/parameter&gt;
              &lt;/arguments&gt;
              &lt;exceptions&gt;
                  &lt;exception&gt;IOException&lt;/exception&gt;
                  &lt;exception&gt;RemoteException&lt;/exception&gt;
              &lt;/exceptions&gt;
              &lt;return&gt;void&lt;/return&gt;
          &lt;/abstract_method&gt;
  &lt;/interface&gt;        
  </code></pre>
  
  <p>My current XSD:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;xsd:schema  xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
      &lt;xsd:complexType name ="WebServiceInterface"&gt;
      &lt;xsd:sequence&gt;
      &lt;xsd:element name ="package" type="xsd:string"/&gt;
      &lt;xsd:element name ="import" minOccurs="0" maxOccurs="unbounded"/&gt;
      &lt;xsd:complexType name ="abstract_method" minOccurs="0" maxOccurs= "unbounded"&gt;
          &lt;xsd:element name ="modifier" type="xsd:string"/&gt;
          &lt;xsd:complexType name="arguments"&gt;
              &lt;xsd:element name ="parameters" minOccurs="0" maxOccurs= "unbounded"/&gt;
          &lt;/xsd:complexType&gt;
          &lt;xsd:complexType name ="exceptions"&gt;
              &lt;xsd:element name ="exception" minOccurs="0" maxOccurs="unbounded"/&gt;
          &lt;/xsd:complexType&gt;
          &lt;xsd:element name = "return"/&gt;
      &lt;/xsd:complexType&gt;
      &lt;/xsd:sequence&gt;
      &lt;/xsd:complexType&gt;
  &lt;/xsd:schema&gt;
  </code></pre>
  
  <p>Error Message:</p>
  
  <blockquote>
    <p>"S4s-elt-must-match.1: The Content Of 'sequence' Must
    Match (annotation?, (element | Group | Choice | Sequence | Any)*). A
    Problem Was Found Starting At: ComplexType."</p>
  </blockquote>
  
  <p>How do I include the interface without this error?</p>