title: restrict Attribute value based on a list defined in the XML itself
body: <p>recently i encountered a situation in a configuration file where i need to have an attribute with a value from a list of values specified in my document.</p>
  
  <p>e.g</p>
  
  <pre><code>&lt;SeverityList&gt;
      &lt;Severity name="SAFETY" /&gt;
      &lt;Severity name="ERROR" /&gt;
      &lt;Severity name="WARNING" /&gt;
      &lt;Severity name="INFO" /&gt;
  &lt;/SeverityList&gt;
  </code></pre>
  
  <p>this list of severities comes as a part of the system configurations but is subject to change from user to user, and during the lifetime of the hospital.  </p>
  
  <p>later on in the same XML document, i have tests, that each has a Severity,
  this severity MUST BE one of the options above.</p>
  
  <p>e.g.</p>
  
  <pre><code>&lt;Test name="patient_dosage_test" severity="SAFETY" /&gt; &lt;!-- O.K --&gt;
  &lt;Test name="room_temperature" severity="WTF_SEV" /&gt; &lt;!-- FAIL Validation --&gt;
  </code></pre>
  
  <p><em>I would like to emphasize</em>:<br>
  1. The Severity list is subject to change<br>
  2. The Severity list is used in XSLT to reformat something later on.</p>
  
  <p>Thanks</p>