title: Specific restrictions
body: <p>I was wondering if there was any way to put an enummeration of restrictions in an XSD, let me explain.</p>
  <p>There should be 3 posible type of attributes (in this case ID): it can either be &quot;aDigit&quot;, &quot;cDigit&quot;,&quot;mDigit&quot; (Just because I want to create different codes for different type of vehicles)</p>
  <p>I have thought of something like this but I know it cannot be done like this.</p>
  <pre><code> &lt;xs:attribute name=&quot;id&quot; use=&quot;required&quot;&gt;
              &lt;xs:simpleType&gt;
                  &lt;xs:restriction base=&quot;xs:string&quot;&gt;
                      &lt;xs:pattern value=&quot;c[0-9]&quot;/&gt;
                      &lt;xs:pattern value=&quot;a[0-9]&quot;/&gt;
                      &lt;xs:pattern value=&quot;m[0-9]&quot;/&gt;
                  &lt;/xs:restriction&gt;
              &lt;/xs:simpleType&gt;
   &lt;/xs:attribute&gt;      
  </code></pre>
  <p>Is there any way I could do something like this? Thank you in advance</p>