title: XML schema multiple attribute
body: <p>I'm trying to create a required elements which has different sub elements. Example XMl file like this:</p>
  <pre><code>&lt;datamodel&gt;
      &lt;info name=&quot;user&quot;&gt;
          &lt;userRight&gt;add user&lt;/userRight&gt;
      &lt;/info&gt;
      &lt;info name=&quot;admin&quot;&gt;
          &lt;role&gt;manager&lt;/role&gt;
      &lt;/info&gt;
  &lt;/datamodel&gt;
  </code></pre>
  <p>I currently have the following xml schema.</p>
  <pre><code>&lt;xs:schema attributeFormDefault=&quot;unqualified&quot; elementFormDefault=&quot;qualified&quot; xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;
    &lt;xs:element name=&quot;datamodel&quot;&gt;
      &lt;xs:complexType&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element name=&quot;info&quot; maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot; &gt;
            &lt;xs:complexType&gt;
              &lt;xs:sequence&gt;
                &lt;xs:element type=&quot;xs:string&quot; name=&quot;userRight&quot; minOccurs=&quot;0&quot;/&gt;
                &lt;xs:element type=&quot;xs:string&quot; name=&quot;role&quot; minOccurs=&quot;0&quot;/&gt;
              &lt;/xs:sequence&gt;
              &lt;xs:attribute type=&quot;xs:string&quot; name=&quot;name&quot; use=&quot;optional&quot; fixed=&quot;user&quot;/&gt;
            &lt;/xs:complexType&gt;
          &lt;/xs:element&gt;
          &lt;xs:element name=&quot;info&quot; maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot;&gt;
            &lt;xs:complexType&gt;
              &lt;xs:sequence&gt;
                &lt;xs:element type=&quot;xs:string&quot; name=&quot;userRight&quot; minOccurs=&quot;0&quot;/&gt;
                &lt;xs:element type=&quot;xs:string&quot; name=&quot;role&quot; minOccurs=&quot;0&quot;/&gt;
              &lt;/xs:sequence&gt;
              &lt;xs:attribute type=&quot;xs:string&quot; name=&quot;name&quot; use=&quot;optional&quot; fixed=&quot;admin&quot;/&gt;
            &lt;/xs:complexType&gt;
          &lt;/xs:element&gt;
        &lt;/xs:sequence&gt;
      &lt;/xs:complexType&gt;
    &lt;/xs:element&gt;
  &lt;/xs:schema&gt;
  </code></pre>
  <p>However given XML schema will not work with example XML file which I have. How can I modify the schema for validate such a XML?</p>