<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:msg="http://www.broservices.nl/xsd/isbhr/2" xmlns:bhrcom="http://www.broservices.nl/xsd/bhrcommon/2" xmlns:brocom="http://www.broservices.nl/xsd/brocommon/3" xmlns:gml="http://www.opengis.net/gml/3.2" targetNamespace="http://www.broservices.nl/xsd/isbhr/2" elementFormDefault="qualified" version="1.9.0">
    <!-- importeer datatypes -->
    <import namespace="http://www.broservices.nl/xsd/brocommon/3" schemaLocation="https://schema.broservices.nl/xsd/brocommon/3/brocommon.xsd"/>
    <import namespace="http://www.broservices.nl/xsd/bhrcommon/2" schemaLocation="https://schema.broservices.nl/xsd/bhrcommon/2/bhrcommon.xsd"/>
    <import namespace="http://www.opengis.net/gml/3.2" schemaLocation="https://schema.broservices.nl/profile/gml/1.0/gml-profile.xsd"/>
    <!-- registratieverzoek, bericht van verwerking of bericht van een afwijzing -->
    <element name="registrationRequest" type="msg:RegistrationRequestType"/>
    <element name="correctionRequest" type="msg:CorrectionRequestType"/>
    <element name="intakeResponse" type="brocom:IntakeResponseType"/>
    <!-- gemeenschappelijke fout berichten -->
    <element name="parseFault" type="brocom:ParseFaultType"/>
    <!-- brondocumenten -->
    <element name="BHR_P" type="msg:BoreholeResearchType"/>
    <element name="BHR_P_BSD" type="msg:BoreholeResearchType"/>
    <!-- registration types -->
    <complexType name="RegistrationRequestType">
        <complexContent>
            <extension base="brocom:RegistrationRequestType">
                <sequence>
                    <element name="sourceDocument" type="msg:SourceDocumentType" minOccurs="1" maxOccurs="1"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    <complexType name="CorrectionRequestType">
        <complexContent>
            <extension base="brocom:CorrectionRequestType">
                <sequence>
                    <element name="correctionReason" type="msg:CorrectionReasonType" minOccurs="1" maxOccurs="1"/>
                    <element name="sourceDocument" type="msg:SourceDocumentType" minOccurs="1" maxOccurs="1"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    <complexType name="SourceDocumentType">
        <choice minOccurs="1" maxOccurs="1">
            <element ref="msg:BHR_P"/>
            <element ref="msg:BHR_P_BSD"/>
        </choice>
    </complexType>
    <complexType name="BoreholeResearchType">
        <complexContent>
            <extension base="gml:AbstractFeatureType">
                <sequence>
                    <element name="objectIdAccountableParty" type="string" minOccurs="1" maxOccurs="1"/>
                    <element name="deliveryContext" type="bhrcom:DeliveryContextType" minOccurs="1" maxOccurs="1"/>
                    <element name="surveyPurpose" type="bhrcom:SurveyPurposeType" minOccurs="1" maxOccurs="1"/>
                    <element name="discipline" type="bhrcom:DisciplineType" minOccurs="1" maxOccurs="1"/>
                    <element name="researchReportDate" type="brocom:PartialDateType" minOccurs="0" maxOccurs="1"/>
                    <element name="siteCharacteristicDetermined" type="brocom:IndicationYesNoUnknownEnumeration" minOccurs="1" maxOccurs="1"/>
                    <element name="litterLayerInvestigated" type="brocom:IndicationYesNoEnumeration" minOccurs="1" maxOccurs="1"/>
                    <element name="researchOperator" type="brocom:OrganizationType" minOccurs="0" maxOccurs="1"/>
                    <element name="deliveredLocation" type="bhrcom:DeliveredLocationType" minOccurs="1" maxOccurs="1"/>
                    <element name="deliveredVerticalPosition" type="bhrcom:DeliveredVerticalPositionType" minOccurs="1" maxOccurs="1"/>
                    <element name="boring" type="bhrcom:BoringType" minOccurs="1" maxOccurs="1"/>
                    <element name="siteCharacteristic" type="bhrcom:SiteCharacteristicType" minOccurs="0" maxOccurs="1"/>
                    <element name="boreholeSampleDescription" type="bhrcom:BoreholeSampleDescriptionType" minOccurs="0" maxOccurs="1"/>
                    <element name="boreholeSampleAnalysis" type="bhrcom:BoreholeSampleAnalysisPropertyType" minOccurs="0" maxOccurs="1"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    <complexType name="CorrectionReasonType">
        <simpleContent>
            <restriction base="gml:CodeWithAuthorityType">
                <attribute name="codeSpace" type="anyURI" use="required" fixed="urn:bro:bhr:CorrectionReason"/>
            </restriction>
        </simpleContent>
    </complexType>
</schema>
