<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

  <xs:element name="root">
    <xs:complexType>
      <xs:sequence >
        <xs:element name="b" type="xs:boolean" maxOccurs="unbounded" />
        <xs:element name="b01" type="Boolean01" maxOccurs="unbounded" />
        <xs:element name="bTF" type="BooleanTrueFalse" maxOccurs="unbounded" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:simpleType name="Boolean01">
    <xs:restriction base="xs:boolean">
      <xs:pattern value="0" />
      <xs:pattern value="1" />
    </xs:restriction>
  </xs:simpleType>
  
  <xs:simpleType name="BooleanTrueFalse">
    <xs:restriction base="xs:boolean">
      <xs:pattern value="true" />
      <xs:pattern value="false" />
    </xs:restriction>
  </xs:simpleType>

</xs:schema>
