<?xml version="1.0" encoding="UTF-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="a" type="aType"/>
  <xs:complexType name="bType">
    <xs:sequence>
      <xs:element type="xs:QName" name="c" xmlns:xs="http://www.w3.org/2001/XMLSchema"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="dType">
    <xs:sequence>
      <xs:element name="c">
        <xs:simpleType>
          <xs:restriction base="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema">
            <xs:enumeration value="baz:foo"/>
            <xs:enumeration value="baz:foo this should not be a qName"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="aType">
    <xs:sequence>
      <xs:element type="bType" name="b"/>
      <xs:element type="dType" name="d" maxOccurs="unbounded" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>
</xs:schema>