title: XML schema attribute dependancies
body: <p>I'd like to ask if it's possible in XML xsd schema declare dependant attributes...</p>
  
  <p>Example:</p>
  
  <pre><code>&lt;xsd:simpleType name="packCategories"&gt;
   &lt;xsd:restriction base="xsd:byte"&gt;
    &lt;xsd:minInclusive value="0"/&gt;
    &lt;xsd:maxInclusive value="4"/&gt;
   &lt;/xsd:restriction&gt;
  &lt;/xsd:simpleType&gt;
  
  &lt;xs:element name="pack"&gt;
   &lt;xs:complexType&gt;
     &lt;!-- elements go here --&gt;
     &lt;xs:attribute type="packCategories" name="category" use="required"/&gt;
     &lt;xs:attribute type="xs:string" name="explanation" use="optional"/&gt;
   &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  </code></pre>
  
  <p>Everything seems fine here, HOWEVER, i want the explanation attribute to be MANDATORY if category attribute is equal to 4. Is that possible? Maybe with elements then?</p>