title: QXmlSchemaValidator segfaults on XSD union
body: <p>For clarity, the following affects Qt4.7. I don't know if Qt5 is affected.</p>
  
  <p>When validating XML using <a href="https://doc.qt.io/archives/qt-4.7/qxmlschemavalidator.html" rel="nofollow noreferrer">QXmlSchemaValidator</a> I find that Qt segfaults on <a href="https://www.w3schools.com/xml/el_union.asp" rel="nofollow noreferrer">XSD unions</a></p>
  
  <p>Example:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;xs:simpleType name="dayOfWeek"&gt;
    &lt;xs:union memberTypes="xs:integer dayAsString"/&gt;
  &lt;/xs:simpleType&gt;
  
  &lt;xs:simpleType name="dayAsString"&gt;
    &lt;xs:restriction base="xs:string"&gt;
      &lt;xs:enumeration value="Monday"/&gt;
      &lt;xs:enumeration value="Tuesday"/&gt;
      &lt;xs:enumeration value="Wednesday"/&gt;
      &lt;xs:enumeration value="Thursday"/&gt;
      &lt;xs:enumeration value="Friday"/&gt;
      &lt;xs:enumeration value="Saturday"/&gt;
      &lt;xs:enumeration value="Sunday"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  </code></pre>
  
  <p>This construct validated well in other applications. I used Notepad++ with the XML Tools plugin for instance.</p>
  
  <p>But the same XSD used with QXmlSchemaValidator causes my application to crash.</p>
  
  <p>Which leaves me with the question:</p>
  
  <p>Can a union of an attribute like this be achieved in XSD in some other way?</p>