title: In XSD schema definition, how to create an array of another custom defined type inside a type definition?
body: <p>I have a address type, </p>
  
  <pre><code>&lt;xs:complexType name="AddressType"&gt;
      &lt;xs:sequence&gt;
          &lt;xs:element name="state" type="xs:string" minOccurs ="0" maxOccurs ="1"/&gt;
          &lt;xs:element name="pincode" type="xs:string" minOccurs ="0" maxOccurs ="1"/&gt;
      &lt;/xs:sequence&gt; 
  &lt;/xs:complexType&gt;
  </code></pre>
  
  <p>How to create a PERSON type which includes an array of Address Type
  Something like this:</p>
  
  <pre><code>&lt;xs:complexType name="PersonType"&gt;
      &lt;xs:sequence&gt;
          &lt;xs:element name="name" type="xs:string" minOccurs ="0" maxOccurs ="1"/&gt;
          &lt;xs:element name="id" type="xs:string" minOccurs ="1" maxOccurs ="1"/&gt;
          &lt;xs:element name="addresses"&gt;
              &lt;xs:complexType&gt;
                 &lt;xs:sequence&gt;
                     &lt;xs:element name="address" type="AddressType" minOccurs ="0" maxOccurs ="unbounded"/&gt;    
                 &lt;/xs:sequence&gt;
              &lt;/xs:complexType&gt;
          &lt;/xs:element&gt;   
      &lt;/xs:sequence&gt; 
  &lt;/xs:complexType&gt;
  </code></pre>
  
  <p>Am I doing it the right way ?</p>