title: XSD Schema using maxOccurs and minOccurs in complextype
body: <p>I am writing a XSD schema file in Visual Studio 2010.  I want to define a complex type to not be required and have unlimited entires in the xml.  I used the minOccurs and maxOccurs attributes but I am getting an error in the editor that these attributes (minOccurs / maxOccurs) are not allowed.  I can add them to simple types but not complex types.  How do you define that a complex type can have 0 to many occurances?</p>
  
  <p>Here is the xsd I was using:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt;
    &lt;xs:element name="patient" minOccurs="0"  maxOccurs="unbounded"&gt;
      &lt;xs:complexType&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element name="to" type="xs:string"/&gt;
          &lt;xs:element name="from" type="xs:string"/&gt;
        &lt;/xs:sequence&gt;
      &lt;/xs:complexType&gt;
    &lt;/xs:element&gt;
  &lt;/xs:schema&gt;
  </code></pre>