<commit_before><?xml version="1.0" encoding="UTF-8"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           targetNamespace="http://doctrine-project.org/schemas/phpcr-odm/phpcr-mapping"
           xmlns:phpcr="http://doctrine-project.org/schemas/phpcr-odm/phpcr-mapping"
           elementFormDefault="qualified">

    <xs:annotation>
        <xs:documentation><![CDATA[
       This is the XML Schema for the object/document
       mapping file used by the Doctrine PHPCR-ODM.
     ]]></xs:documentation>
    </xs:annotation>

    <xs:element name="doctrine-mapping">
        <xs:complexType>
            <xs:choice>
                <xs:element name="mapped-superclass" type="phpcr:mapped-superclass" minOccurs="0" maxOccurs="unbounded" />
                <xs:element name="document" type="phpcr:document" minOccurs="0" maxOccurs="unbounded" />
                <xs:any minOccurs="0" maxOccurs="unbounded" namespace="##other"/>
            </xs:choice>
            <xs:anyAttribute namespace="##other"/>
        </xs:complexType>
    </xs:element>

    <xs:complexType name="emptyType">
        <xs:choice>
            <xs:any minOccurs="0" maxOccurs="unbounded" namespace="##other"/>
        </xs:choice>
        <xs:anyAttribute namespace="##other"/>
    </xs:complexType>

    <xs:complexType name="cascade-type">
        <xs:choice>
            <xs:element name="cascade-all" type="phpcr:emptyType" minOccurs="0"/>
            <xs:element name="cascade-persist" type="phpcr:emptyType" minOccurs="0"/>
            <xs:element name="cascade-merge" type="phpcr:emptyType" minOccurs="0"/>
            <xs:element name="cascade-remove" type="phpcr:emptyType" minOccurs="0"/>
            <xs:element name="cascade-detach" type="phpcr:emptyType" minOccurs="0"/>
            <xs:element name="cascade-refresh" type="phpcr:emptyType" minOccurs="0"/>
            <xs:element name="cascade-translation" type="phpcr:emptyType" minOccurs="0"/>
            <xs:any minOccurs="0" maxOccurs="unbounded" namespace="##other"/>
        </xs:choice>
        <xs:anyAttribute namespace="##other"/>
    </xs:complexType>

    <xs:complexType name="mixin">
        <xs:attribute name="type" type="xs:NMTOKEN"/>
    </xs:complexType>

    <xs:complexType name="mixins">
        <xs:choice>
            <xs:element name="mixin" type="phpcr:mixin" minOccurs="1" maxOccurs="unbounded" />
        </xs:choice>
    </xs:complexType>

    <xs:complexType name="option" mixed="true">
        <xs:choice minOccurs="0" maxOccurs="unbounded">
            <xs:element name="option" type="phpcr:option"/>
            <xs:any minOccurs="0" maxOccurs="unbounded" namespace="##other"/>
        </xs:choice>
        <xs:attribute name="name" type="xs:NMTOKEN" use="required"/>
        <xs:anyAttribute namespace="##other"/>
    </xs:complexType>

    <xs:complexType name="options">
        <xs:choice>
            <xs:element name="option" type="phpcr:option" minOccurs="0" maxOccurs="unbounded"/>
            <xs:any minOccurs="0" maxOccurs="unbounded" namespace="##other"/>
        </xs:choice>
        <xs:anyAttribute namespace="##other"/>
    </xs:complexType>

    <xs:simpleType name="lifecycle-callback-type">
        <xs:restriction base="xs:token">
            <xs:enumeration value="prePersist"/>
            <xs:enumeration value="postPersist"/>
            <xs:enumeration value="preUpdate"/>
            <xs:enumeration value="postUpdate"/>
            <xs:enumeration value="preRemove"/>
            <xs:enumeration value="postRemove"/>
            <xs:enumeration value="postLoad"/>
            <xs:enumeration value="preFlush"/>
            <xs:enumeration value="preMove"/>
            <xs:enumeration value="postMove"/>
            <xs:enumeration value="onFlush"/>
            <xs:enumeration value="postFlush"/>
            <xs:enumeration value="onClear"/>
            <xs:enumeration value="loadClassMetadata"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:complexType name="lifecycle-callback">
        <xs:choice>
            <xs:any minOccurs="0" maxOccurs="unbounded" namespace="##other"/>
        </xs:choice>
        <xs:attribute name="type" type="phpcr:lifecycle-callback-type" use="required" />
        <xs:attribute name="method" type="xs:NMTOKEN" use="required" />
        <xs:anyAttribute namespace="##other"/>
    </xs:complexType>

    <xs:complexType name="lifecycle-callbacks">
        <xs:choice>
            <xs:element name="lifecycle-callback" type="phpcr:lifecycle-callback" minOccurs="1" maxOccurs="unbounded" />
            <xs:any minOccurs="0" maxOccurs="unbounded" namespace="##other"/>
        </xs:choice>
        <xs:anyAttribute namespace="##other"/>
    </xs:complexType>

    <!--
    TODO:  http://www.doctrine-project.org/jira/browse/PHPCR-108
    <xs:complexType name="document-listener">
        <xs:choice><commit_msg>loadClassMetadata is not a lifecycle callback, only an event<commit_after><?xml version="1.0" encoding="UTF-8"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           targetNamespace="http://doctrine-project.org/schemas/phpcr-odm/phpcr-mapping"
           xmlns:phpcr="http://doctrine-project.org/schemas/phpcr-odm/phpcr-mapping"
           elementFormDefault="qualified">

    <xs:annotation>
        <xs:documentation><![CDATA[
       This is the XML Schema for the object/document
       mapping file used by the Doctrine PHPCR-ODM.
     ]]></xs:documentation>
    </xs:annotation>

    <xs:element name="doctrine-mapping">
        <xs:complexType>
            <xs:choice>
                <xs:element name="mapped-superclass" type="phpcr:mapped-superclass" minOccurs="0" maxOccurs="unbounded" />
                <xs:element name="document" type="phpcr:document" minOccurs="0" maxOccurs="unbounded" />
                <xs:any minOccurs="0" maxOccurs="unbounded" namespace="##other"/>
            </xs:choice>
            <xs:anyAttribute namespace="##other"/>
        </xs:complexType>
    </xs:element>

    <xs:complexType name="emptyType">
        <xs:choice>
            <xs:any minOccurs="0" maxOccurs="unbounded" namespace="##other"/>
        </xs:choice>
        <xs:anyAttribute namespace="##other"/>
    </xs:complexType>

    <xs:complexType name="cascade-type">
        <xs:choice>
            <xs:element name="cascade-all" type="phpcr:emptyType" minOccurs="0"/>
            <xs:element name="cascade-persist" type="phpcr:emptyType" minOccurs="0"/>
            <xs:element name="cascade-merge" type="phpcr:emptyType" minOccurs="0"/>
            <xs:element name="cascade-remove" type="phpcr:emptyType" minOccurs="0"/>
            <xs:element name="cascade-detach" type="phpcr:emptyType" minOccurs="0"/>
            <xs:element name="cascade-refresh" type="phpcr:emptyType" minOccurs="0"/>
            <xs:element name="cascade-translation" type="phpcr:emptyType" minOccurs="0"/>
            <xs:any minOccurs="0" maxOccurs="unbounded" namespace="##other"/>
        </xs:choice>
        <xs:anyAttribute namespace="##other"/>
    </xs:complexType>

    <xs:complexType name="mixin">
        <xs:attribute name="type" type="xs:NMTOKEN"/>
    </xs:complexType>

    <xs:complexType name="mixins">
        <xs:choice>
            <xs:element name="mixin" type="phpcr:mixin" minOccurs="1" maxOccurs="unbounded" />
        </xs:choice>
    </xs:complexType>

    <xs:complexType name="option" mixed="true">
        <xs:choice minOccurs="0" maxOccurs="unbounded">
            <xs:element name="option" type="phpcr:option"/>
            <xs:any minOccurs="0" maxOccurs="unbounded" namespace="##other"/>
        </xs:choice>
        <xs:attribute name="name" type="xs:NMTOKEN" use="required"/>
        <xs:anyAttribute namespace="##other"/>
    </xs:complexType>

    <xs:complexType name="options">
        <xs:choice>
            <xs:element name="option" type="phpcr:option" minOccurs="0" maxOccurs="unbounded"/>
            <xs:any minOccurs="0" maxOccurs="unbounded" namespace="##other"/>
        </xs:choice>
        <xs:anyAttribute namespace="##other"/>
    </xs:complexType>

    <xs:simpleType name="lifecycle-callback-type">
        <xs:restriction base="xs:token">
            <xs:enumeration value="prePersist"/>
            <xs:enumeration value="postPersist"/>
            <xs:enumeration value="preUpdate"/>
            <xs:enumeration value="postUpdate"/>
            <xs:enumeration value="preRemove"/>
            <xs:enumeration value="postRemove"/>
            <xs:enumeration value="postLoad"/>
            <xs:enumeration value="preFlush"/>
            <xs:enumeration value="preMove"/>
            <xs:enumeration value="postMove"/>
            <xs:enumeration value="onFlush"/>
            <xs:enumeration value="postFlush"/>
            <xs:enumeration value="onClear"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:complexType name="lifecycle-callback">
        <xs:choice>
            <xs:any minOccurs="0" maxOccurs="unbounded" namespace="##other"/>
        </xs:choice>
        <xs:attribute name="type" type="phpcr:lifecycle-callback-type" use="required" />
        <xs:attribute name="method" type="xs:NMTOKEN" use="required" />
        <xs:anyAttribute namespace="##other"/>
    </xs:complexType>

    <xs:complexType name="lifecycle-callbacks">
        <xs:choice>
            <xs:element name="lifecycle-callback" type="phpcr:lifecycle-callback" minOccurs="1" maxOccurs="unbounded" />
            <xs:any minOccurs="0" maxOccurs="unbounded" namespace="##other"/>
        </xs:choice>
        <xs:anyAttribute namespace="##other"/>
    </xs:complexType>

    <!--
    TODO:  http://www.doctrine-project.org/jira/browse/PHPCR-108
    <xs:complexType name="document-listener">
        <xs:choice>
{'fraction_non_alphanumeric': 0.16867222050807365, 'fraction_numerical': 0.0063766327265247355, 'mean_word_length': 2.988515176374077, 'pattern_counts': {'":': 0, '<': 192, '<?xml version=': 2, '>': 190, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7564044', 'n_tokens_mistral': 3086, 'n_tokens_neox': 2980, 'n_words': 459}