title: Add restrictions on attributes of different type
body: <p>I want to do something totally simple and obvious, but I can't find any example about it on internet. All the examples I found always involve a single attribute.</p>
  
  <p>I want to create an element like this :</p>
  
  <p>
      
      
      
  
  
  <p>I have the following XSD, but I'm getting an error saying that the restriction element is misplaced or appears too often :</p>
  
  <pre><code>&lt;xs:element name="blabla"&gt;
      &lt;xs:complexType&gt;
          &lt;xs:sequence&gt;
              &lt;xs:element name="Images" minOccurs="0" maxOccurs="1"&gt;
                  &lt;xs:complexType&gt;
                      &lt;xs:sequence&gt;
                          &lt;xs:element name="image" type="imageType" 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;
  &lt;/xs:element&gt;
  
  &lt;xs:complexType name="imageType"&gt;
      &lt;xs:sequence&gt;
          &lt;xs:element name="Image" minOccurs="0" maxOccurs="unbounded"&gt;
              &lt;xs:complexType&gt;
                  &lt;xs:complexContent&gt;
                      &lt;xs:restriction base="xs:integer"&gt;
                          &lt;xs:attribute name="id" type="xs:integer" use="required" /&gt;
                      &lt;/xs:restriction&gt;
                      &lt;xs:restriction base="xs:string"&gt;
                          &lt;xs:attribute name="src" type="xs:anyURI" use="required" /&gt;
                      &lt;/xs:restriction&gt;
                  &lt;/xs:complexContent&gt;
              &lt;/xs:complexType&gt;
          &lt;/xs:element&gt;
      &lt;/xs:sequence&gt;
  &lt;/xs:complexType&gt;
  </code></pre>
  
  <p>How can I add a different restriction for each attribute ?</p>