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

    <xs:complexType name="SomeType">
        <xs:sequence>
            <xs:element name="SomeElement" type="SomeOtherType" maxOccurs="unbounded" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="SomeOtherType">
        <xs:sequence>
            <xs:element name="SomeOtherElement" type="xs:string" maxOccurs="unbounded" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="SomeRestrictedType">
        <xs:complexContent>
            <xs:restriction base="SomeType">
                <xs:sequence>
                    <xs:element name="SomeElement" type="SomeOtherRestrictedType"
                        maxOccurs="unbounded" />
                </xs:sequence>
            </xs:restriction>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="SomeOtherRestrictedType">
        <xs:complexContent>
            <xs:restriction base="SomeOtherType">
                <xs:sequence>
                    <xs:element name="SomeOtherElement" type="xs:string" maxOccurs="5" />
                </xs:sequence>
            </xs:restriction>
        </xs:complexContent>
    </xs:complexType>

</xs:schema>
