title: How to create pattern for attribute and for element text?
body: <p>I need to use pattern for an attribute and for text. But how?
  Some example of my XML:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;main&gt;
    &lt;Number attribute="45454"&gt;a&lt;/Number&gt;
    &lt;Number attribute="66666"&gt;b&lt;/Number&gt;
    &lt;Model attribute="12476"&gt;c&lt;/Model&gt;
    &lt;Model attribute="12476"&gt;c&lt;/Model&gt;
  &lt;/main&gt;
  </code></pre>
  
  <p>Text contains only one letter:</p>
  
  <pre><code>      &lt;xs:element maxOccurs="unbounded" name="Number"&gt;
         &lt;xs:simpleType&gt;
            &lt;xs:restriction base="xs:string"&gt;
              &lt;xs:pattern value="[a-zA-Z]{1}"/&gt;
            &lt;/xs:restriction&gt;
          &lt;/xs:simpleType&gt;
        &lt;/xs:element&gt;
  </code></pre>
  
  <p>Attribute contains 5 digits:</p>
  
  <pre><code>&lt;xs:element maxOccurs="unbounded" name="Model"&gt;
    &lt;xs:complexType&gt;
      &lt;xs:simpleContent&gt;
        &lt;xs:extension base="xs:string"&gt;
          &lt;xs:attribute name="attribute"&gt;
            &lt;xs:simpleType&gt;
              &lt;xs:restriction base="xs:integer"&gt;
                &lt;xs:pattern value="\d{5}"/&gt;
              &lt;/xs:restriction&gt;
            &lt;/xs:simpleType&gt;
          &lt;/xs:attribute&gt;
        &lt;/xs:extension&gt;
      &lt;/xs:simpleContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  </code></pre>
  
  <p>I can restrict only attribute or text, not both. How i can do it?</p>