title: XML Schema: Element that can contain elements or text?
body: <p>How would I define an element that can either contain plain text or contain elements? Say I wanted to somehow allow for both of these cases:</p>
  
  <pre><code>&lt;xs:element name="field"&gt;
      &lt;xs:complexType&gt;
          &lt;xs:sequence&gt;
              &lt;xs:element ref="subfield" minOccurs="0" maxOccurs="unbounded" /&gt;
          &lt;/xs:sequence&gt;
          &lt;xs:attribute name="name" type="xs:string" /&gt;
      &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  
  &lt;xs:element name="field" type="xs:string" /&gt;
  </code></pre>
  
  <p>... so that both these elements would be valid:</p>
  
  <pre><code>&lt;field name="test_field_0"&gt;
      &lt;subfield&gt;Some text.&lt;/subfield&gt;
  &lt;/field&gt;
  
  &lt;field name="test_field_1"&gt;Some more text.&lt;/field&gt;
  </code></pre>