title: XML Schema Restriction With Attribute
body: <p>In XML Schema, how to make element <code>Age</code> to have <code>restriction</code> to allow writing integer with maximum value of 10 and minimum of 1, inside element <code>Age</code> but also element <code>Age</code> to have attribute ?</p>
  
  <pre><code>&lt;xsd:element name="Age"&gt;
    &lt;xsd:complexType&gt;
  here i want to have restriction to control max and min value inside Age element
      &lt;xsd:attribute name="type" type="xsd:string" use="required" /&gt;
    &lt;/xsd:complexType&gt;
  &lt;/xsd:element&gt;
  </code></pre>
  
  <p>XML Code with no warning</p>
  
  <pre><code>&lt;Age type="sth"&gt;
   5 
  &lt;/Age&gt;
  </code></pre>
  
  <p>XML Code with warning</p>
  
  <pre><code>&lt;Age type="sth"&gt;
   22
  &lt;/Age&gt;
  </code></pre>