<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns="http://toepasbare-regels.omgevingswet.overheid.nl/v1/manifest.xsd"
  targetNamespace="http://toepasbare-regels.omgevingswet.overheid.nl/v1/manifest.xsd"
  elementFormDefault="qualified"
>
  <xs:element name="manifest">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="bestanden">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="bestand" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="naam" type="nietLegeString"/>
                    <xs:element name="type" type="bestandstype"/>
                    <xs:element name="contenttype" type="contenttype"/>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:complexType name="bestandstype">
    <xs:simpleContent>
      <xs:extension base="enumBestandstype">
        <xs:attribute name="versie" type="xs:string"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:simpleType name="enumBestandstype">
    <xs:restriction base="xs:string">
      <xs:enumeration value="manifest"/>
      <xs:enumeration value="opdracht"/>
      <xs:enumeration value="activiteit"/>
      <xs:enumeration value="toepasbareRegels"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="contenttype">
    <xs:restriction base="xs:string">
      <xs:enumeration value="application/xml"/>
      <xs:enumeration value="application/json"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="nietLegeString">
    <xs:restriction base="xs:string">
      <xs:minLength value="1"/>
    </xs:restriction>
  </xs:simpleType>

</xs:schema>