<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
		   xmlns="https://skjema.ft.dibk.no/hoeringogoffentligettersynuttalelse/v2"
		   targetNamespace="https://skjema.ft.dibk.no/hoeringogoffentligettersynuttalelse/v2"
		   elementFormDefault="qualified"
		   attributeFormDefault="unqualified">

	<xs:element name="HoeringOgOffentligEttersynUttalelse" type="HoeringOgOffentligEttersynUttalelseType"/>

	<xs:complexType name="HoeringOgOffentligEttersynUttalelseType">
		<xs:all>
			<xs:element name="hoeringOgOffentligEttersynReferanse" type="xs:string" minOccurs="1" maxOccurs="1" />
			<xs:element name="hoeringOgOffentligEttersynArkivreferanse" type="xs:string" minOccurs="1" maxOccurs="1" /> 
			<xs:element name="beroertPart" type="BeroertpartOgInteressentOgMyndighetType" minOccurs="1" maxOccurs="1"/>
			<xs:element name="metadata" type="MetadataType" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="hoeringstype" type="KodeType" nillable="true" minOccurs="0" maxOccurs="1">
				<xs:annotation>
					<xs:appinfo>
						<defaultCodeSpace xmlns="http://www.opengis.net/gml/3.2">https://planverk.ft-test.dibk.no/kodelister/høringstype</defaultCodeSpace>
					</xs:appinfo>
				</xs:annotation>
			</xs:element>
			<xs:element name="planprosessregel" type="KodeType" nillable="true" minOccurs="0" maxOccurs="1">
				<xs:annotation>
					<xs:appinfo>
						<defaultCodeSpace xmlns="http://www.opengis.net/gml/3.2">https://planverk.ft-test.dibk.no/kodelister/planprosessregel</defaultCodeSpace>
					</xs:appinfo>
				</xs:annotation>
			</xs:element>
			<xs:element name="kommunensSaksnummer" type="SaksnummerType" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="planforslag" type="Arealplan" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="fristForUttalelse" type="xs:dateTime" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="kommune" type="AktoerType" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="forslagsstiller" type="AktoerType" nillable="true" minOccurs="0" maxOccurs="1"/>
		</xs:all>
		<xs:attribute name="dataFormatProvider" type="xs:string" use="required" fixed="DIBK"/>
		<xs:attribute name="dataFormatId" type="xs:string" use="required" fixed="11003"/>
		<xs:attribute name="dataFormatVersion" type="xs:string" use="required" fixed="2"/>
	</xs:complexType>

	<xs:complexType name="KodeListe">
		<xs:sequence>
			<xs:element name="kode" type="KodeType" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="KodeType">
		<xs:all>
			<xs:element name="kodeverdi" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="kodebeskrivelse" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
		</xs:all>
	</xs:complexType>

	<xs:complexType name="BeroertpartOgInteressentOgMyndighetType">
		<xs:all>
			<xs:element name="partstype" type="KodeType" nillable="true" minOccurs="0" maxOccurs="1">
				<xs:annotation>
					<xs:appinfo>
						<defaultCodeSpace xmlns="http://www.opengis.net/gml/3.2">https://register.geonorge.no/kodelister/byggesoknad/partstype</defaultCodeSpace>
					</xs:appinfo>
				</xs:annotation>
			</xs:element>
			<xs:element name="foedselsnummer" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="organisasjonsnummer" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="rolle" type="KodeType" nillable="true" minOccurs="0" maxOccurs="1">
				<xs:annotation>
					<xs:appinfo>
						<defaultCodeSpace xmlns="http://www.opengis.net/gml/3.2">https://planverk.ft-test.dibk.no/kodelister/roller</defaultCodeSpace>
					</xs:appinfo>
				</xs:annotation>
			</xs:element>
			<xs:element name="navn" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="telefon" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="epost" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="adresse" type="EnkelAdresseType" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="systemReferanse" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="gjelderEiendommer" type="GjelderEiendomListe" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="merknad" type="MerknadType" nillable="true" minOccurs="0" maxOccurs="1"/>
		</xs:all>
	</xs:complexType>

	<xs:complexType name="MerknadType">
		<xs:all>
			<xs:element name="innsigelse" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="uttalelse" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
		</xs:all>
	</xs:complexType>

	<xs:complexType name="AktoerType">
		<xs:all>
			<xs:element name="partstype" type="KodeType" nillable="true" minOccurs="0" maxOccurs="1">
				<xs:annotation>
					<xs:appinfo>
						<defaultCodeSpace xmlns="http://www.opengis.net/gml/3.2">https://register.geonorge.no/kodelister/byggesoknad/partstype</defaultCodeSpace>
					</xs:appinfo>
				</xs:annotation>
			</xs:element>
			<xs:element name="foedselsnummer" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="organisasjonsnummer" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="navn" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="adresse" type="EnkelAdresseType" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="telefonnummer" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="mobilnummer" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="epost" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="kontaktperson" type="KontaktpersonType" nillable="true" minOccurs="0" maxOccurs="1"/>
		</xs:all>
	</xs:complexType>

	<xs:complexType name="KontaktpersonType">
		<xs:all>
			<xs:element name="navn" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="tittel" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="telefonnummer" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="mobilnummer" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="epost" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
		</xs:all>
	</xs:complexType>

	<xs:complexType name="EnkelAdresseType">
		<xs:all>
			<xs:element name="adresselinje1" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="adresselinje2" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="adresselinje3" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="postnr" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="poststed" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="landkode" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1">
				<xs:annotation>
					<xs:appinfo>
						<defaultCodeSpace xmlns="http://www.opengis.net/gml/3.2">https://data.ssb.no/api/klass/v1/versions/1693</defaultCodeSpace>
					</xs:appinfo>
				</xs:annotation>
			</xs:element>
		</xs:all>
	</xs:complexType>

	<xs:complexType name="EiendommensAdresseType">
		<xs:all>
			<xs:element name="adresselinje1" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="adresselinje2" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="adresselinje3" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="postnr" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="poststed" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="landkode" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1">
				<xs:annotation>
					<xs:appinfo>
						<defaultCodeSpace xmlns="http://www.opengis.net/gml/3.2">https://data.ssb.no/api/klass/v1/versions/1693</defaultCodeSpace>
					</xs:appinfo>
				</xs:annotation>
			</xs:element>
			<xs:element name="gatenavn" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="husnr" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="bokstav" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
		</xs:all>
	</xs:complexType>

	<xs:complexType name="GjelderEiendomListe">
		<xs:sequence>
			<xs:element name="gjeldereiendom" type="GjelderEiendomType" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="GjelderEiendomType">
		<xs:all>
			<xs:element name="bolignummer" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="bygningsnummer" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="eiendomsidentifikasjon" type="MatrikkelnummerType" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="adresse" type="EiendommensAdresseType" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="kommunenavn" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
		</xs:all>
	</xs:complexType>

	<xs:complexType name="MatrikkelnummerType">
		<xs:all>
			<xs:element name="kommunenummer" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1">
				<xs:annotation>
					<xs:appinfo>
						<defaultCodeSpace xmlns="http://www.opengis.net/gml/3.2">https://register.geonorge.no/sosi-kodelister/inndelinger/inndelingsbase/kommunenummer</defaultCodeSpace>
					</xs:appinfo>
				</xs:annotation>
			</xs:element>
			<xs:element name="gaardsnummer" type="xs:int" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="bruksnummer" type="xs:int" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="festenummer" type="xs:int" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="seksjonsnummer" type="xs:int" nillable="true" minOccurs="0" maxOccurs="1"/>
		</xs:all>
	</xs:complexType>

	<xs:complexType name="MetadataType">
		<xs:all>
			<xs:element name="fraSluttbrukersystem" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="prosjektnavn" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1" />
			<xs:element name="prosjektnr" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1" />
			<xs:element name="foretrukketSpraak" type="KodeType" nillable="true" minOccurs="0" maxOccurs="1">
				<xs:annotation>
					<xs:appinfo>
						<defaultCodeSpace xmlns="http://www.opengis.net/gml/3.2">https://register.geonorge.no/kodelister/byggesoknad/foretrukketspraak</defaultCodeSpace>
					</xs:appinfo>
				</xs:annotation>
			</xs:element>
		</xs:all>
	</xs:complexType>

	<xs:complexType name="Arealplan">
		<xs:all>
			<xs:element name="plannavn" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="nasjonalArealplanId" type="NasjonalArealplanIdType" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="plantype" type="KodeType" nillable="true" minOccurs="0" maxOccurs="1">
				<xs:annotation>
					<xs:appinfo>
						<defaultCodeSpace xmlns="http://www.opengis.net/gml/3.2">https://planverk.ft-test.dibk.no/kodelister/plantype</defaultCodeSpace>
					</xs:appinfo>
				</xs:annotation>
			</xs:element>
		</xs:all>
	</xs:complexType>

	<xs:complexType name="NasjonalArealplanIdType">
		<xs:all>
			<xs:element name="kommunenummer" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1">
				<xs:annotation>
					<xs:appinfo>
						<defaultCodeSpace xmlns="http://www.opengis.net/gml/3.2">https://register.geonorge.no/sosi-kodelister/inndelinger/inndelingsbase/kommunenummer</defaultCodeSpace>
					</xs:appinfo>
				</xs:annotation>
			</xs:element>
			<xs:element name="landkode" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="planId" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
		</xs:all>
	</xs:complexType>

	<xs:complexType name="SaksnummerType">
		<xs:all>
			<xs:element name="saksaar" type="xs:int" nillable="true" minOccurs="0" maxOccurs="1"/>
			<xs:element name="sakssekvensnummer" type="xs:int" nillable="true" minOccurs="0" maxOccurs="1"/>
		</xs:all>
	</xs:complexType>

</xs:schema>
