MINI MINI MANI MO

Path : /opt/oracle/product/18c/dbhomeXE/md/admin/
File Upload :
Current File : //opt/oracle/product/18c/dbhomeXE/md/admin/sdoinspirexsd.sql

Rem
Rem $Header: sdo/admin/sdoinspirexsd.sql /main/9 2017/01/19 10:34:08 sravada Exp $
Rem
Rem sdoinspirexsd.sql
Rem
Rem Copyright (c) 2014, 2017, Oracle and/or its affiliates. 
Rem All rights reserved.
Rem
Rem    NAME
Rem      sdoinspirexsd.sql - <one-line expansion of the name>
Rem
Rem    DESCRIPTION
Rem      This follows same way as sdogrxml.sql for CSW202+:
Rem      - Defines the system table MDSYS.SDO_XSD_TABLE (old name MDSYS.CSW_XSD_TABLE$) for CSW202+
Rem        by loading INSPIRE XSDS.
Rem
Rem    NOTES
Rem      - The gmd.xsd and GML 3.2.1 XSDs and their dependent XSDs are published 
Rem        now only in sdoiso19139xsd.sql (old name sdocswiso191153xml.sql). Thus, next, we may need to resolve this
Rem        dependency in case User wants only INSPIRE XSDs. Shared XSDs may be
Rem        handled in a file called sdocswsharedxml.xsd.
Rem      - We still have a few more XSDs that we may want to add later:
Rem           <import namespace="http://www.opengis.net/gmlcov/1.0" schemaLocation="http://schemas.opengis.net/gmlcov/1.0/coverage.xsd"/>
Rem           <xs:import namespace="http://www.w3.org/1999/xhtml/datatypes/"  schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml-datatypes-1.xsd"/>
Rem           <xs:import namespace="http://www.w3.org/1999/xhtml/datatypes/"  schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml-link-1.xsd"/>
Rem           <import namespace="http://www.opengis.net/swe/2.0" schemaLocation="http://schemas.opengis.net/sweCommon/2.0/swe.xsd"/>
Rem           <import namespace="http://www.opengis.net/samplingSpatial/2.0" schemaLocation="http://schemas.opengis.net/samplingSpatial/2.0/spatialSamplingFeature.xsd"/>
Rem           <import namespace="http://www.opengis.net/om/2.0" schemaLocation="http://schemas.opengis.net/om/2.0/observation.xsd"/>
Rem           <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
Rem      - We use now only English version enum_eng.xsd which is included by the
Rem        root xsd of INSPIRE XSDs ie, common_common_common_1_0.xsd. Other languages
Rem        will come next.
Rem      - mu (maritimeunits.xsd) has problems.
Rem
Rem
Rem    BEGIN SQL_FILE_METADATA 
Rem    SQL_SOURCE_FILE: sdo/admin/sdoinspirexsd.sql
Rem    SQL_SHIPPED_FILE: md/admin/sdoinspirexsd.sql
Rem    SQL_PHASE: SDOINSPIREXSD
Rem    SQL_STARTUP_MODE: NORMAL 
Rem    SQL_IGNORABLE_ERRORS: NONE 
Rem    SQL_CALLING_FILE: sdo/admin/sdowfscs.sql
Rem    END SQL_FILE_METADATA
Rem
Rem    MODIFIED   (MM/DD/YY)
Rem    sravada     01/11/17 - bug 25370681
Rem    bkazar      12/09/16 - Get rid of acronmys at the end of XSD file names
Rem    bkazar      12/04/16 - No adding mu (maritimeunits.xsd) XSD for now.
Rem    bkazar      02/03/16 - More editorial changes
Rem    bkazar      02/01/16 - Editorial changes
Rem    bkazar      01/27/16 - More non-ASCII characters
Rem    bkazar      01/22/16 - Bug 22571473 (non-ASCII characters)
Rem    czechar     08/14/15 - add SQL file metadata
Rem    bkazar      06/19/15 - Renamings: This file was sdocswinspirexml.sql and renamed as sdoinspirexsd.sql.
Rem    bkazar      06/18/15 - Created
Rem    bkazar      01/06/15 - Add XSDs
Rem    bkazar      12/23/14 - Created
Rem

@@?/rdbms/admin/sqlsessstart.sql

----------------------------------------------------------------------------
-- Description:
-- Loads the INSPIRE XSDS into MDSYS.SDO_XSD_TABLE
----------------------------------------------------------------------------

declare

    insert_stmt  VARCHAR2(10000);
    schemaclob   CLOB;
    amt          NUMBER;
    buf          VARCHAR2(32767);
    pos          NUMBER;

BEGIN

    ---------------
    -- INSPIRE XSD
    ---------------
    -- Register dependent XSDs first:
    -- Use 301,302,...,399 for dependent XSDs for its XSD_ID.
    
    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 301;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (301, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/ac-mf/3.0/atmosphericconditionsandmeteorologicalgeographicalfeatures.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 301 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as atmosphericconditionsandmeteorologicalgeographicalfeatures_ac_mf_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:ac-mf="http://inspire.ec.europa.eu/schemas/ac-mf/3.0" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" targetNamespace="http://inspire.ec.europa.eu/schemas/ac-mf/3.0" elementFormDefault="qualified" version="3.0rc1">
	<import namespace="http://inspire.ec.europa.eu/schemas/base/3.3" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd"/>
	<!--XML Schema document created by ShapeChange-->
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);
    
    
    
    
    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 302;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (302, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/act-core/3.0/activitycomplex_core.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 302 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as activitycomplex_core_act_core_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:act-core="http://inspire.ec.europa.eu/schemas/act-core/3.0" xmlns:ad="urn:x-inspire:specification:gmlas:Addresses:3.0" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:base2="http://inspire.ec.europa.eu/schemas/base2/1.0" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:sc="http://www.interactive-instruments.de/ShapeChange/AppInfo" targetNamespace="http://inspire.ec.europa.eu/schemas/act-core/3.0" elementFormDefault="qualified" version="3.0">
	<import namespace="http://inspire.ec.europa.eu/schemas/base/3.3" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/base2/1.0" schemaLocation="http://inspire.ec.europa.eu/schemas/base2/1.0/BaseTypes2.xsd"/>
	<import namespace="http://www.interactive-instruments.de/ShapeChange/AppInfo" schemaLocation="http://portele.de/ShapeChangeAppinfo.xsd"/>
	<import namespace="http://www.isotc211.org/2005/gmd" schemaLocation="http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<import namespace="urn:x-inspire:specification:gmlas:Addresses:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/ad/3.0/Addresses.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="ActivityComplex" type="act-core:ActivityComplexType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
activity complex

-- Definition --
A "single unit", both technically and economically, under the management control of the same legal entity (operator), covering activities as those listed in the Eurostat NACE classification, products and services. Activity Complex includes all infrastructure, equipment and materials. It must represent the whole area, at the same or different geographical location, managed by a "single unit".

-- Description --
NOTE 1 This class describes the minimal set of elements necessary to describe and identify geographically a legal entity and the activities taken place on it under the context of a Environmental purposes.

NOTE 2 "Activity Complex" could be assimilated to terms described on the legislation as Facility, Establishment, Plant, Holding, Organization ,Farm, Extractive Industries or Aquaculture Production Business among others

EXAMPLE i.e. an Agro-business that is legally registered under the Emissions Directive.</documentation>
		</annotation>
	</element>
	<complexType name="ActivityComplexType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Name --
INSPIRE identifier

-- Definition --
External object identifier of the "Activity Complex".

-- Description --

NOTE  An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="thematicId" type="base2:ThematicIdentifierPropertyType" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
thematic identifier

-- Definition --
Thematic Activity Complex identifier.

-- Description --
NOTE  It may be the identification code provided or maintained by the Member States public authority to identify the object in the context of specific or general thematic scopes. 

EXAMPLE  Assigned National PRTR Code.</documentation>
						</annotation>
					</element>
					<element name="name" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
name

-- Definition --
Descriptive name of the '||'&'||'amp;ldquo;Activity Complex'||'&'||'amp;rdquo;.

-- Description --
NOTE 1 Several names in different languages may be expressed.

NOTE 2 It is recommended that the language of the name (part of the Geographical/Name data type) be filled whenever possible.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="string">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="geometry" type="gml:GeometryPropertyType">
						<annotation>
							<documentation>-- Name --
geometry

-- Definition --
The geometry used to define the extent or position of the "Activity Complex".

-- Description --
NOTE 1 Based on the provided description, different geometries could be used to represent the Activity Complex as a one legal whole.
EXAMPLE  1 E-prtr geometry is given by a single point based on Geographical Coordinates (see below). In other levels of detail or depending on the Data Provider this could be represented [e.g.] by a Multi-poligon.

EXAMPLE 2 PRTR - Legal act example: " ... the latitude and longitude coordinates within an arc of 5 minutes that avoid the direct identification of an individual holding....".</documentation>
						</annotation>
					</element>
					<element name="function" type="act-core:FunctionPropertyType" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
function

-- Definition --

Activities performed by the activity complex. Function is described by the activity and potentially complemented with information about inputs and outputs as result of it.

-- Description -- 
NOTE  The Activity described as part of the Function"Activity Complex" should be recorded using a controlled vocabulary where a particular controlled vocabulary is in use within a given context, such as SIC codes in the UK, it is acceptable to use these, however, the preferred choice for European interoperability is whenever possible NACE [NACE].</documentation>
						</annotation>
					</element>
					<element name="validFrom" nillable="true">
						<annotation>
							<documentation>-- Name --
valid from

-- Definition --
The time when the activity complex started to exist in the real world.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="validTo" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
valid to

-- Definition --
The time when the activity complex no longer exists in the real world.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="beginLifespanVersion" nillable="true">
						<annotation>
							<documentation>-- Name --
begin lifespan version

-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.

-- Description --
NOTE This date is recorded to enable the generation of change only update files.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="endLifespanVersion" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
end lifespan version

-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.

-- Description --
NOTE This date is recorded primarily for those systems which "close" an entry in the spatial data set in the event of an attribute change.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="ActivityComplexPropertyType">
		<sequence minOccurs="0">
			<element ref="act-core:ActivityComplex"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="Function" type="act-core:FunctionType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
function

-- Definition --
The function of something expressed as an activity and optional input and/or output.

-- Description -- 
NOTE  Depending on the scope it can refer to different activities (co-incineration, Collection, exploration, incineration, interim disposal, management, recycling, primary production, primary treatment, recovery , recycling, release, storage, use, waste management, etc) and Inputs and Outputs (sludge, substance, tailings, technical products, urban waste water, volatile organic compound, waste, WEEE from private households, etc).</documentation>
		</annotation>
	</element>
	<complexType name="FunctionType">
		<sequence>
			<element name="activity" type="gml:ReferenceType" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Name --
activity

-- Definition --
Categorized description of individual or organized set of technically related processes that are carried out by a economical unit, private or public, profit or non profit character.

-- Description --
NOTE  The Activity described as part of the Function for '||'&'||'amp;ldquo;Activity Complex'||'&'||'amp;rdquo; should be recorded using a controlled vocabulary where a particular controlled vocabulary is in use within a given context, such as SIC codes in the UK, it is acceptable to use these, however, the preferred choice for European interoperability is whenever possible NACE [NACE].</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">IR</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="input" type="gml:ReferenceType" nillable="true" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Name --
input

-- Definition --
A  classified or registered type of material or something immaterial, that enters a technical and economical unit according to its function. 

-- Description --
NOTE  Depending on the thematic scope it can contain different values including terms as Biomass, Bio-Waste, Fuel, Organic Solvents, Waste Water, Waste for disposal or recovery, Primary Materials, ..</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">IR</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="output" type="gml:ReferenceType" nillable="true" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Name --
output

-- Definition --
A  classified or registered type of material or something immaterial, that leaves a technical and economical unit according to its function, ".

-- Description --
NOTE Depending on the thematic scope it can contain different values including terms as Registered Pollutants, Waste, Processed Products, leakage, etc.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">IR</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="description" type="gmd:PT_FreeText_PropertyType" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Name --
description

-- Definition --
A more detailed description of the function.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="FunctionPropertyType">
		<sequence>
			<element ref="act-core:Function"/>
		</sequence>
	</complexType>
	<element name="InputOutputAmount" type="act-core:InputOutputAmountType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
amount of input or output

-- Definition --
Type and, where available, measurable amount of a classified or registered material that enters or leaves a technical and economical unit.
-- Description -- 
NOTE Depending on the thematic scope it can refer to different terms as Biomass, Bio-Waste, Fuel, Organic Solvents, Waste Water, Waste for disposal or recovery, Primary Materials, etc.</documentation>
		</annotation>
	</element>
	<complexType name="InputOutputAmountType">
		<sequence>
			<element name="inputOutput" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Name --
input/output

-- Definition --
A  classified or registered type of material or something immaterial, that enters a technical and economical unit according to its function.

-- Description -- 
NOTE Depending on the thematic scope it can contain different values including terms as Biomass, Bio-Waste, Fuel, Organic Solvents, Waste Water, Waste for disposal or recovery, Primary Materials, etc.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">IR</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="amount" nillable="true">
				<annotation>
					<documentation>-- Name --
amount

-- Definition --
The amount (such as a volume or mass) of the classified or registered material that enters or leaves a technical and economical unit.</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="gml:MeasureType">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
		</sequence>
	</complexType>
	<complexType name="InputOutputAmountPropertyType">
		<sequence>
			<element ref="act-core:InputOutputAmount"/>
		</sequence>
	</complexType>
	<element name="Capacity" type="act-core:CapacityType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
capacity

-- Definition --
A quantification of an actual or potential ability to perform an activity, that typically does not change, does not change often, or does not change to a significant degree.

-- Description --
NOTE  Capacity could refer depending of the thematic scope to different concepts included on the legislation as "emission limits", "capacity incineration", "livestock units", "nominal capacity", "objective estimation data", "rate of desulphurization" or "recycling rate".</documentation>
		</annotation>
	</element>
	<complexType name="CapacityType">
		<sequence>
			<element name="activity" type="gml:ReferenceType" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Name --
activity

-- Definition --
Categorized description of individual or organized set of technically related processes that are carried out by a economical unit, private or public, profit or non profit character.

-- Description --
NOTE The Activity described as part of the Function for '||'&'||'amp;ldquo;Activity Complex'||'&'||'amp;rdquo; should be recorded using a controlled vocabulary where a particular controlled vocabulary is in use within a given context, such as SIC codes in the UK, it is acceptable to use these, however, the preferred choice for European interoperability is whenever possible NACE [NACE].</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">IR</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="input" type="act-core:InputOutputAmountPropertyType" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Name --
input

-- Definition --
Measurable  information about parameters related with the inputs related with the activity carried out by the Activity Complex.

-- Description --
NOTE  Depending on the thematic scope it can contain different values including terms as Registered Pollutants, Waste, Processed Products, leakage, etc.</documentation>
				</annotation>
			</element>
			<element name="output" type="act-core:InputOutputAmountPropertyType" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Name --
output

-- Definition --
Measurable information about parameters related with the outputs derived from the activity carried out by the '||'&'||'amp;ldquo;Activity Complex'||'&'||'amp;rdquo;.

-- Description --
NOTE  Depending on the thematic scope it can contain different values including terms as Registered Pollutants, Waste, Processed Products, leakage, etc.</documentation>
				</annotation>
			</element>
			<element name="time" type="time" minOccurs="0">
				<annotation>
					<documentation>-- Name --
time

-- Definition --
The duration of time to which the specified capacity refers, such as 1 year for an annual capacity.

-- Description --
NOTE Total capacities are specified without duration of time.</documentation>
				</annotation>
			</element>
			<element name="description" type="gmd:PT_FreeText_PropertyType" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Name --
description

-- Definition --
A description of the capacity.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="CapacityPropertyType">
		<sequence>
			<element ref="act-core:Capacity"/>
		</sequence>
	</complexType>
	<element name="Permission" type="act-core:PermissionType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
permission

-- Definition --
Official Decision (formal consent) granting authorization to operate all or part of an Activity Complex, subject to certain conditions which guarantee that the installations or parts of installations on the same site operated by the same operator comply with the requirements fixed by a competent authority. A permit may cover one or more functions and fix parameters of capacity. The term could be extended to other kind of certificates or documents of special relevance depending of the scope (e.g. ISO, EMAS, National Quality Standards, etc).

The term may be extended to other kind of certificates or documents of special relevance depending of the scope (e.g. ISO, EMAS, National Quality Standards, etc).

-- Description --
NOTE This terms is referred in several legislative acts as '||'&'||'amp;ldquo;permit'||'&'||'amp;rdquo; , '||'&'||'amp;ldquo;authorization'||'&'||'amp;rdquo;, '||'&'||'amp;ldquo;development consent'||'&'||'amp;rdquo; or '||'&'||'amp;ldquo;exploration permit'||'&'||'amp;rdquo; among others.

EXAMPLE 1 '||'&'||'amp;ldquo;'||'&'||'amp;hellip;a [written] decision by which the competent authority grants permission to operate all or part of an installation'||'&'||'amp;rdquo; ;
EXAMPLE 2 '||'&'||'amp;ldquo;.. the decision of the competent authority or authorities which entitles the developer to proceed with the project..'||'&'||'amp;rdquo;.</documentation>
		</annotation>
	</element>
	<complexType name="PermissionType">
		<sequence>
			<element name="Id" type="base2:ThematicIdentifierPropertyType" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Name --
identifier

-- Definition --
Identifying reference to the permission.</documentation>
				</annotation>
			</element>
			<element name="relatedParty" nillable="true" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Name --
related party

-- Definition --
Parties related to the permission granted to the activity complex open to many different roles, such as Competent Authorities or Company among others

-- Description --
NOTE Include concepts described on the legislation such as Operator, Company, Port Authority, Agent, Holder, Competent Authority or Keeper.</documentation>
				</annotation>
				<complexType>
					<sequence>
						<element ref="base2:RelatedParty"/>
					</sequence>
					<attribute name="nilReason" type="gml:NilReasonType"/>
				</complexType>
			</element>
			<element name="decisionDate" nillable="true">
				<annotation>
					<documentation>-- Name --
decision date

-- Definition --
Temporal reference that complement the definition of the permission.

-- Description --
NOTE For permissions that become effective immediately, the decision date and the start of the validity period coincide. It may however be a duration of years or decades that separates a decision date from the validity period. For example, a permission decided in 2012 may allow the recovery of waste at a particular site starting from the year

EXAMPLE  Legal resolutions used to refer to a specific day from which the referred resolution and the emitted permission starts to be valid.</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="dateTime">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
			<element name="dateFrom" nillable="true">
				<annotation>
					<documentation>-- Name --
date from

-- Definition --
A date starting from which the permission applies and is valid.</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="dateTime">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
			<element name="dateTo" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Name --
date to

-- Definition --
A date up to which the permission applies and is valid.</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="dateTime">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
			<element name="description" type="gmd:PT_FreeText_PropertyType" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Name --
description

-- Definition --
A description of the permission.</documentation>
				</annotation>
			</element>
			<element name="permittedFunction" nillable="true" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Name --
permitted function

-- Definition --
Function/s for which the permission is granted. Function is as described by the Activity and potentially complemented by information about the Inputs and Outputs derived from the same.

-- Description --
NOTE Functions permitted according to the permission, such as a permit for a landfill.</documentation>
				</annotation>
				<complexType>
					<sequence>
						<element ref="act-core:Function"/>
					</sequence>
					<attribute name="nilReason" type="gml:NilReasonType"/>
				</complexType>
			</element>
			<element name="permittedCapacity" nillable="true" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Name --
permitted capacity

-- Definition --
Maximum amounts of activity input and/or output according to the permission, 

-- Description --
NOTE The physical capacities of a facility may exceed the permitted capacities. 
EXAMPLE Incineration of at most 100000 tons of residual waste per year.</documentation>
				</annotation>
				<complexType>
					<sequence>
						<element ref="act-core:Capacity"/>
					</sequence>
					<attribute name="nilReason" type="gml:NilReasonType"/>
				</complexType>
			</element>
		</sequence>
	</complexType>
	<complexType name="PermissionPropertyType">
		<sequence>
			<element ref="act-core:Permission"/>
		</sequence>
	</complexType>
	<element name="ActivityComplexDescription" type="act-core:ActivityComplexDescriptionType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
activity complex description

-- Definition --
Additional information about an activity complex, including its description, address, contact and related parties.</documentation>
		</annotation>
	</element>
	<complexType name="ActivityComplexDescriptionType">
		<sequence>
			<element name="description" type="gmd:PT_FreeText_PropertyType" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Name --
description

-- Definition --
A complementary definition of the "Activity Complex" and its characteristics.

-- Description --
NOTE  Free text to include or refer any complementary information about the Activity Complex or its characteristics.</documentation>
				</annotation>
			</element>
			<element name="address" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Name --
address

-- Definition --
An address for the activity complex, i.e., an address where the activities occur.</documentation>
				</annotation>
				<complexType>
					<sequence>
						<element ref="ad:AddressRepresentation"/>
					</sequence>
					<attribute name="nilReason" type="gml:NilReasonType"/>
				</complexType>
			</element>
			<element name="contact" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Name --
contact

-- Definition --
Contact information for the activity complex.</documentation>
				</annotation>
				<complexType>
					<sequence>
						<element ref="base2:Contact"/>
					</sequence>
					<attribute name="nilReason" type="gml:NilReasonType"/>
				</complexType>
			</element>
			<element name="relatedParty" nillable="true" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Name --
related party

-- Definition --
Information on Parties related to the Activity Complex. It is open to many different roles, such as owners, operators or Competent Authorities.

-- Description --
NOTE 1 The term covers concepts described on the legislation such as Operator, Company, Port Authority, Agent, Holder, Collector, Producer, Competent Authority or Keeper.</documentation>
				</annotation>
				<complexType>
					<sequence>
						<element ref="base2:RelatedParty"/>
					</sequence>
					<attribute name="nilReason" type="gml:NilReasonType"/>
				</complexType>
			</element>
		</sequence>
	</complexType>
	<complexType name="ActivityComplexDescriptionPropertyType">
		<sequence>
			<element ref="act-core:ActivityComplexDescription"/>
		</sequence>
	</complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 303;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (303, empty_clob(), 'INSPIRE', 'urn:x-inspire:specification:gmlas:Addresses:3.0/addresses.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 303 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as addresses_ad_3_0.xsd
    -- Needed to separate this xsd into two pieces due to its size>32767.
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:ad="urn:x-inspire:specification:gmlas:Addresses:3.0" xmlns:au="urn:x-inspire:specification:gmlas:AdministrativeUnits:3.0" xmlns:base="urn:x-inspire:specification:gmlas:BaseTypes:3.2" xmlns:bui="urn:x-inspire:specification:gmlas:Buildings:0.0" xmlns:cp="urn:x-inspire:specification:gmlas:CadastralParcels:3.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:gn="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" xmlns:tn="urn:x-inspire:specification:gmlas:CommonTransportElements:3.0" targetNamespace="urn:x-inspire:specification:gmlas:Addresses:3.0" elementFormDefault="qualified" version="3.0.1">
	<annotation>
		<documentation>Application schema for Addresses</documentation>
	</annotation>
	<import namespace="urn:x-inspire:specification:gmlas:BaseTypes:3.2" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.2/BaseTypes.xsd"/>
	<import namespace="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/gn/3.0/GeographicalNames.xsd"/>
	<import namespace="urn:x-inspire:specification:gmlas:CadastralParcels:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/cp/3.0/CadastralParcels.xsd"/>
	<import namespace="urn:x-inspire:specification:gmlas:AdministrativeUnits:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/au/3.0/AdministrativeUnits.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<import namespace="urn:x-inspire:specification:gmlas:Buildings:0.0" schemaLocation="http://inspire.ec.europa.eu/schemas/bu/0.0/Buildings.xsd"/>
	<import namespace="urn:x-inspire:specification:gmlas:CommonTransportElements:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/tn/3.0/CommonTransportElements.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="Address" type="ad:AddressType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Definition --
An identification of the fixed location of property by means of a structured composition of geographic names and identifiers.

-- Description --
NOTE 1 The spatial object, referenced by the address, is defined as the "addressable object". The addressable object is not within the application schema, but it is possible to represent the address'' reference to a cadastral parcel or a building through associations. It should, however, be noted that in different countries and regions, different traditions and/or regulations determine which object types should be regarded as addressable objects. 

NOTE 2 In most situations the addressable objects are current, real world objects. However, addresses may also reference objects which are planned, under construction or even historical.

NOTE 3 Apart from the identification of the addressable objects (like e.g. buildings), addresses are very often used by a large number of other applications to identify object types e.g. statistics of the citizens living in the building, for taxation of the business entities that occupy the building, and the utility installations. 

NOTE 4 For different purposes, the identification of an address can be represented in different ways (see example 3). 

EXAMPLE 1 A property can e.g., be a plot of land, building, part of building, way of access or other construction,

EXAMPLE 2 In the Netherlands the primary addressable objects are buildings and dwellings which may include parts of buildings, mooring places or places for the permanent placement of trailers (mobile homes), in the UK it is the lowest level of unit for the delivery of services, in the Czech Republic it is buildings and entrance doors. 

EXAMPLE 3 Addresses can be represented differently. In a human readable form an address in Spain and an address in Denmark could be represented like this: "Calle Mayor, 13, Cortijo del Marques, 41037, Ecija, Sevilla, Espana" ("e" in Marques has the acute accent, "E" in Ecija has the acute accent, "n" has the tilde accent) or "Wildersgade 60A, st. th, 1408 Copenhagen K., Denmark".</documentation>
		</annotation>
	</element>
	<complexType name="AddressType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Definition --
External object identifier of the address.

-- Description --
NOTE 1 An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the addressable object. 

NOTE 2 The primary purpose of this identifier is to enable links between various sources and the address components.

EXAMPLE An address spatial object from Denmark could carry this identifier: 
Namespace: DK_ADR
Local identifier: 0A3F507B2AB032B8E0440003BA298018
Version identifier: 12-02-2008T10:05:01+01:00</documentation>
						</annotation>
					</element>
					<element name="alternativeIdentifier" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
External, thematic identifier of the address spatial object, which enables interoperability with existing legacy systems or applications. 

-- Description --
NOTE 1 Compared with the proper identifier of the address, the alternative identifier is not necessarily persistent in the lifetime of the address spatial object. Likewise it is usually not globally unique and in general does not include information on the version of the address spatial object. 

NOTE 2 Often alternative address identifiers are composed by a set of codes that, e.g., identify the region and the municipality, the thoroughfare name and the address number. These alternative identifiers will not remain persistent e.g. in the case of the merging of two municipalities. 

EXAMPLE In Denmark many legacy systems (e.g. in the Statistics Denmark or the Central Business Register) uses as address identification the three digit municipality code plus the four character street name code plus the address number.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="string">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="position" type="ad:GeographicPositionPropertyType" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Position of a characteristic point which represents the location of the address according to a certain specification, including information on the origin of the position.</documentation>
						</annotation>
					</element>
					<element name="status" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Validity of the address within the life-cycle (version) of the address spatial object. 

-- Description --
NOTE This status relates to the address and is not a property of the object to which the address is assigned (the addressable object).</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="gml:CodeType">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="locator" type="ad:AddressLocatorPropertyType" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Human readable designator or name.</documentation>
						</annotation>
					</element>
					<element name="validFrom" nillable="true">
						<annotation>
							<documentation>-- Definition --
Date and time of which this version of the address was or will be valid in the real world. 

-- Description --
NOTE This date and time can be set in the future for situations where an address or a version of an address has been decided by the appropriate authority to take effect for a future date.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="validTo" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Date and time at which this version of the address ceased or will cease to exist in the real world.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="beginLifespanVersion" nillable="true">
						<annotation>
							<documentation>-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.

-- Description --
NOTE This date is recorded to enable the generation of change only update files.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="endLifespanVersion" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.

-- Description --
NOTE This date is recorded primarily for those systems which "close" an entry in the spatial data set in the event of an attribute change.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="parcel" type="gml:ReferenceType" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Cadastral parcel that this address is assigned to or associated with.  

-- Description --
NOTE An address could potentially have an association to zero, one or several cadastral parcels. Also it is possible (but this is not expressed in this application schema) that several addresses are associated to a single cadastral parcel.

EXAMPLE In the street "Wildersgade" in Copenhagen, Denmark, the address designated as "Wildersgade 66, 1408 Kobenhavn K" ("o" has the stroke accent) is associated to the cadastral parcel identifier "81" in the district of "Christianshavn".</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">cp:CadastralParcel</targetElement>
							</appinfo>
						</annotation>
					</element>
					<element name="parentAddress" type="gml:ReferenceType" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
The main (parent) address with which this (sub) address is tightly connected.

-- Description --
NOTE 1 The relationship between a set of subaddresses and the main address most often means that the sub addresses use the same locator and address components (for example , thoroughfare name, address area, post code) as the parent address. For each sub address additional address locators are then included for identification, like e.g. flat number, floor identifier, door number. 

NOTE 2 In some countries several levels of parent-, sub- and sub-sub-addresses exist. In other countries the concept of parent addresses does not exist; all addresses are thus of the same level. 

EXAMPLE 1 In a Spanish city the address "Calle Gran Via 8" ("i" has the acute accent) is a parent address where the locator "8" represents the building. In the building, the sub address "Calle Gran Via 8, door 3" represents a sub-address, while the more detailed sub-sub address "Calle Gran Via 8, door 3, staircase A, floor 5, dwelling 1" represents the address of a specific dwelling. 

EXAMPLE 2 In Denmark the legislation on addresses define two types of addresses: the parent "access level" and the sub "unit level". In the city of Copenhagen "Wildersgade 60A" is a parent access address that represents a specific entrance to a building. Inside the entrance, subaddresses using floor and door designators identifies the individual dwellings like e.g. "Wildersgade 60A, 1st floor, left door". 

EXAMPLE 3 In The Netherlands only one level of addresses exists. </documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">ad:Address</targetElement>
							</appinfo>
						</annotation>
					</element>
					<element name="building" type="gml:ReferenceType" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Building that the address is assigned to or associated with. 

 -- Description --
NOTE An address could potentially have an association to zero, one or several buildings. Also it is possible (but this is not expressed in this application schema) that several addresses are associated to a single building.

EXAMPLE In Praha, The Czech Republic, the address designated "Na Pankraci 1690/125" (ending "a" has the acute accent) is associated to a specific building in the street, in this case the building with number 1690 in the district (cz: cast obce) "Nusle".</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">bui:Building</targetElement>
							</appinfo>
						</annotation>
					</element>
					<element name="component" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Represents that the address component is engaged as a part of the address.

-- Description --
EXAMPLE For the address designated "Calle Mayor, 13, Cortijo del Marques, 41037, Ecija, Sevilla, Espana" the six address components "Calle Mayor", "Cortijo del Marques" ("e" has the acute accent), "41037", "Ecija" ("E" has the acute accent), "Sevilla" and "Espana" ("n" has the tilde accent) are engaged as address components.</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">ad:AddressComponent</targetElement>
							</appinfo>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence/>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="AddressPropertyType">
		<sequence minOccurs="0">
			<element ref="ad:Address"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="AddressLocator" type="ad:AddressLocatorType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Definition --
Human readable designator or name that allows a user or application to reference and distinguish the address from neighbour addresses, within the scope of a thoroughfare name, address area name, administrative unit name or postal designator, in which the address is situated.

-- Description --
NOTE 1 The most common locators are designators like an address number, building number or flat identifier as well as the name of the property, complex or building.

NOTE 2 The locator identifier(s) are most often only unambiguous and meaningful within the scope of the adjacent thoroughfare name, address area name or post code. 

NOTE 3 The locator could be composed of one or more designators e.g., address number, address number suffix, building number or name, floor number, flat or room identifier. In addition to these common locator types, also narrative or descriptive locators are possible.

NOTE 4 The locators of an address could be composed as a hierarchy, where one level of locators identifies the real property or building while another level of locators identifies the flats or dwellings inside the property. 

EXAMPLE 1 In a Spanish city a "site-level" locator could identify a building on the thoroughfare name "Calle Gran Via" ("i" has the acute accent) using the address number "8". If the building has four entrance doors, the door number "3" could be the "access-level" locator. The 3rd door could, via two staircases "A" and "B", give access to a number of floors, identified by a number "1" to "5" on which a number of dwellings are situated, also identified by numbers "1" to "3"; The "unit level" locator will thus composed of staircase-, floor- and dwelling identification e.g. "staircase A, floor 5, dwelling 1". In total, the three parent-child levels of locators uniquely identify the dwelling. 

EXAMPLE 2 In Copenhagen an "access level" locator could identify a specific entrance door in a building on the thoroughfare name "Wildersgade" using the address number "60A" (In Denmark the optional suffix is a part of the address number). The entrance door gives access to a number of floors, e.g, "st", "1", "2", "3", on which two dwellings are situated "tv" and "th". The "unit level" locator will thus be composed by a floor- and a door identifier: "2. th." (2nd floor, door to the right). In total, the two parent-child levels of locators uniquely identify the dwelling. 

EXAMPLE 3 In The Netherlands only one level of locators exists. The individual apartment within a large complex, a dwelling, a part of other kinds of buildings (for example an office), a mooring place or a place for the permanent placing of trailers are addressable objects which must have an address. This address is the only level of the locator. This locator could be composed by three attributes the house number, plus optionally an additional house letter, plus optionally an additional housenumber suffix.

EXAMPLE 4 Sometimes the building name is an alternative identifier to the address number e.g. the house located in "Calle Santiago, 15, Elizondo-Baztan, Navarra, Spain" (the second "a" in Baztan has the acute accent) is also identified by the building name "Urtekoetxea"</documentation>
		</annotation>
	</element>
	<complexType name="AddressLocatorType">
		<sequence>
			<element name="designator" type="ad:LocatorDesignatorPropertyType" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Definition --
A number or a sequence of characters that uniquely identifies the locator within the relevant scope(s). </documentation>
				</annotation>
			</element>
			<element name="name" type="ad:LocatorNamePropertyType" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Definition --
A geographic name or descriptive text associated to a property identified by the locator.

-- Description --
NOTE 1 The locator name could be the name of the property or complex (e.g. an estate, hospital or a shopping mall), of the building or part of the building (e.g. a wing), or it could be the name of a room inside the building.

NOTE 2 As locator name it is also possible to use a description that allows a user to identify the property in question. 

NOTE 3 The locator name could be an alternative addition to the locator designator (e.g. the address number) or it could be an independent identifier. 

EXAMPLE In the address "Calle Santiago, 15, Elizondo-Baztan, Navarra, Spain" (the second "a" in Baztan has the acute accent) the building name "Urtekoetxea" is an alternative to the building identifier "3".</documentation>
				</annotation>
			</element>
			<element name="level" type="gml:CodeType">
				<annotation>
					<documentation>-- Definition --
The level to which the locator refers.</documentation>
				</annotation>
			</element>
			<element name="withinScopeOf" type="gml:ReferenceType" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Definition --
The address component that defines the scope within which the address locator is assigned according to rules ensuring unambiguousness. 

-- Description --
NOTE 1 For the assignment of unambiguous locators (e.g. address numbers) different rules exists in different countries and regions. According to the most common rule, an address number should be unique within the scope of the thoroughfare name. In other areas the address number is unique inside an address area name (e.g. the name of the village) or postal designator (e.g. the post code). In some areas even a combination of rules are applied: e.g. addresses with two locators, each of them referencing to a separate address component. 

NOTE 2 Locators that has the level of unit (like e.g. floor identifier and door or unit identifiers) are most often assigned so that they are unambiguous within the more narrow scope of the property or building; for these locators the association should therefore not be populated. 

EXAMPLE 1 In a typical European address dataset, parts of the addresses have locators which are unambiguous within the scope of the road name (thoroughfare name) while others are unambiguous within the name ogf the village or district (address area name). 

EXAMPLE 2 In Lithuania and Estonia a concept of "corner addresses" exists. Corner addresses have two address numbers (designators) each of them referring to a thoroughfare name (primary and secondary street name). E.g. in Vilnius the address designated "A. Stulginskio gatve 4 / A. Smetonos gatve 7" is situated on the corner of the two streets. 

EXAMPLE 3 In the Czech Republic in some cities an address has two locator designators: A building number which refers to the address area (district, cz: "cast obce") and a address number that refers to the thoroughfare name. As an example in Praha for address designated "Na Pankraci 1690/125, Nusle" (ending "a" has the acute accent) the designator "1690" is a building number unique within the address area (cz cast obce) "Nusle", while the "125" is an address number that has the thoroughfare name as its scope.</documentation>
					<appinfo>
						<targetElement xmlns="http://www.opengis.net/gml/3.2">ad:AddressComponent</targetElement>
					</appinfo>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="AddressLocatorPropertyType">
		<sequence>
			<element ref="ad:AddressLocator"/>
		</sequence>
	</complexType>
	<element name="AddressComponent" type="ad:AddressComponentType" abstract="true" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Definition --
Identifier or geographic name of a specific geographic area, location, or other spatial object which defines the scope of an address.

-- Description --
NOTE 1 Four different subclasses of address components are defined: 
o    Administrative unit name, which may include name of country, name of municipality, name of district
o    Address area name like e.g. name of village or settlement 
o    Thoroughfare name, most often road name  
o    Postal descriptor 
In order to construct an address, these subclasses are often structured hierarchically.

NOTE 2 It is the combination of the address locator and the address components, which makes a specific address spatial object readable and unambiguous for the human user. 

EXAMPLE The combination of the locator "13" and the address components "Calle Mayor" (thoroughfare name), "Cortijo del Marques" (address area name), "41037" (postal descriptor), "Ecija", "Sevilla" and "Espana" (administrative unit names) (where "e" in Marques has the acute accent, "E" in Ecija has the acute accent, "n" has the tilde accent) makes this specific address spatial object readable and unambiguous.</documentation>
		</annotation>
	</element>
	<complexType name="AddressComponentType" abstract="true">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
External object identifier of the address component.

-- Description --
NOTE 1 An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon. 

NOTE 2 The primary purpose of this identifier is to enable links between various sources and the address components.

EXAMPLE An address component spatial object from Denmark could carry this identifier: 
Namespace: DK_ADR
Local identifier: 0A3F507B2AB032B8E0440003BA298018
Version identifier: 12-02-2008T10:05:01+01:00</documentation>
						</annotation>
					</element>
					<element name="alternativeIdentifier" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
External, thematic identifier of the address component spatial object, which enables interoperability with existing legacy systems or applications. 

-- Description --
NOTE Compared with a proper identifier of the address component, the alternative identifier is not necessarily persistent in the lifetime of the component spatial object. Likewise it is usually not globally unique and in general does include information on the version of the spatial object. 

EXAMPLE 1 National or regional sector-specific identifiers (like e.g. a number- or letter code) for administrative units, address areas (localities, villages, sub-divisions) or thoroughfare names, which are used by a number of existing legacy systems. 

EXAMPLE 2 In Denmark the four character municipal "road name code" (0001-9899) is only unique within the present municipality, thus if two municipalities merge, it is necessary to assign new road name codes.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="string">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="beginLifespanVersion" nillable="true">
						<annotation>
							<documentation>-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set. 

-- Description --
NOTE This date is recorded to enable the generation of change only update files. </documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="endLifespanVersion" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.

-- Description --
NOTE This date is recorded primarily for those systems which "close" an entry in the spatial data set in the event of an attribute change.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="status" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Validity of the address component within the life-cycle (version) of the address component spatial object. 

-- Description --
NOTE This status relates to the address component and is not a property of the object to which the address is assigned (the addressable object).</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="gml:CodeType">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="validFrom" nillable="true">
						<annotation>
							<documentation>-- Definition --
Date and time of which this version of the address component was or will be valid in the real world. 

-- Description --
NOTE This date and time can be set in the future for situations where an address component or a version of an address component has been decided by the appropriate authority to take effect for a future date.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="validTo" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Date and time at which the address component ceased or will cease to exist in the real world.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="situatedWithin" type="gml:ReferenceType" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Another address component within which the geographic feature represented by this address component is situated.

-- Description --
NOTE 1 The association enables the application schema to express that the subtypes of address components in the dataset form a hierarchy e.g. like: thoroughfare name within municipality within region within country 

NOTE 2 The representation of the hierarchy facilitates queries e.g. for a specific thoroughfare name within a given municipality or postcode. It is also necessary where the application schema is used to create or update, for example , a gazetteer which is based on the hierarchical structure of the address components. 

NOTE 3 The multiplicity of the association allows it to express that a thoroughfare name is situated in a certain municipality and in a certain postcode. It is also possible to express, for example, that some thoroughfare names cross borders between municipalities and thus is situated within more than one municipality.

EXAMPLE 1 In Spain many spatial objects of the thoroughfare name "Calle Santiago" exist. The association can express that one of the spatial objects is situated within in the municipality of Albacete. From the same example the municipality name "Albacete" is situated within the administrative name (region) of "Castilla La Mancha".

EXAMPLE 2 In Denmark, several address area names entitled "Strandby" exists. In order to identify a specific spatial object it is necessary to know that the relevant spatial object is situated e.g. in the municipality of "Frederikshavn".</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">ad:AddressComponent</targetElement>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="AddressComponentPropertyType">
		<sequence minOccurs="0">
			<element ref="ad:AddressComponent"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="PartOfName" type="ad:PartOfNameType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Definition --
A part of the full name resulting from the subdivision of the thoroughfare name into separate, semantic parts, using the same language and script as the full thoroughfare name.

-- Description --
NOTE Each part of the name must be qualified by using the type attribute.</documentation>
		</annotation>
	</element>
	<complexType name="PartOfNameType">
		<sequence>
			<element name="part" type="string">
				<annotation>
					<documentation>-- Definition --
The character string that expresses the separate part of the name using the same language and script as the full thoroughfare name.</documentation>
				</annotation>
			</element>
			<element name="type" type="gml:CodeType">
				<annotation>
					<documentation>-- Definition --
A classification of the part of name according to its semantics (meaning) in the complete thoroughfare name. </documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="PartOfNamePropertyType">
		<sequence>
			<element ref="ad:PartOfName"/>
		</sequence>
	</complexType>';
            
        
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    
    pos := pos + amt;
    buf :=        
'	<element name="AddressAreaName" type="ad:AddressAreaNameType" substitutionGroup="ad:AddressComponent">
		<annotation>
			<documentation>-- Definition --
An address component which represents the name of a geographic area or locality that groups a number of addressable objects for addressing purposes, without being an administrative unit.

-- Description --
NOTE 1 In some countries and regions an address area is a true subdivision of an administrative unit (most often a municipality), so that every address area is fully inside the municipality and so that every part of the municipality is within an address area. In other countries, the concept of address area names is less strict and based on local tradition or specific needs. 

NOTE 2 In some situations an address area name is not required to obtain unambiguousness; instead the purpose is to make the complete address more informative and descriptive, adding a well known place name (e.g. of a village or community) to the address. This is particularly useful if the municipality or post code covers a large area. 

EXAMPLE 1 In Sweden a "Kommundel" (en: Municipal sub division) is a type of address area names that ensures that street names are unique within the sub division. 

EXAMPLE 2 In Spain an "Entidad de poblacion" (en: population entity, second "o" has the acute accent) has the same function. It is the general address area which depending on its characteristics can be classified as "Entidad Singular" (en: singular entity) or "Entidad Colectiva" (en: collective entity). Moreover, according to the population distribution, these areas can contain one or several "Nucleo de poblacion" (en: population core, "u" and the second "o" have the acute accent) and/or "Poblacion diseminada" (en: scattered population, second "o" has the acute accent).

EXAMPLE 3 In Denmark "Supplerende bynavn" (en: Supplementary town name) is sometimes compulsory to ensure uniqueness of street names within the post code, sometimes it is just useful extra information, that makes the address more informative.</documentation>
		</annotation>
	</element>
        <complexType name="AddressAreaNameType">
		<complexContent>
			<extension base="ad:AddressComponentType">
				<sequence>
					<element name="name" type="gn:GeographicalNamePropertyType" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Proper noun applied to the address area. 

-- Description --
NOTE The data type allows names in different languages and scripts as well as inclusion of alternative name, alternative spellings, historical name and exonyms.</documentation>
						</annotation>
					</element>
					<element name="namedPlace" type="gml:ReferenceType" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
The named place that this address area name represents.  

-- Description --
NOTE In order to populate this association, it is important that the area covered by the identified Named Place is exactly the same as the area covered by the address area name in question; if this is not the case the association would result in an inconsistency.

EXAMPLE The geographical name "Huskvarna", which represents a part of the municipality of Jonkoping (both "o" have the diaeresis accent) in Sweden, is the source of the address area name, "Huskvarna".</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">gn:NamedPlace</targetElement>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="AddressAreaNamePropertyType">
		<sequence minOccurs="0">
			<element ref="ad:AddressAreaName"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="ThoroughfareName" type="ad:ThoroughfareNameType" substitutionGroup="ad:AddressComponent">
		<annotation>
			<documentation>-- Definition --
An address component which represents the name of a passage or way through from one location to another. 

-- Description --
NOTE 1 A thoroughfare can, e.g., be a road or a waterway

NOTE 2 Thoroughfare names includes names of squares and of cul de sacs, and they can also represent the network of smaller roads or paths e.g. in a small village or settlement.</documentation>
		</annotation>
	</element>
	<complexType name="ThoroughfareNameType">
		<complexContent>
			<extension base="ad:AddressComponentType">
				<sequence>
					<element name="name" type="ad:ThoroughfareNameValuePropertyType" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Name of the thoroughfare.

-- Description --
NOTE 1 The name can optionally include an often used alternative name, alternative spelling of the name, a historic name or spelling, which is still in use. It may also optionally include a subdivision of the name into parts.

NOTE 2 Most often thoroughfares are roads, in this situation the thoroughfare name is the road name.  

NOTE 3 The data type also allows a representation of the thoroughfare name in separate parts e.g. "rue" + "de la" + "Paix"</documentation>
						</annotation>
					</element>
					<element name="transportLink" type="gml:ReferenceType" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
One or several transport network links to which the spatial object of the thoroughfare name has been designated.

-- Description --
EXAMPLE The thoroughfare name "Na Pankraci" (ending "a" has the acute accent) in Praha, The Czech Republic, has been designated as a road name for a number of road links (street segments) in the city.</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">tn:TransportLink</targetElement>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="ThoroughfareNamePropertyType">
		<sequence minOccurs="0">
			<element ref="ad:ThoroughfareName"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="ThoroughfareNameValue" type="ad:ThoroughfareNameValueType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Definition --
Proper noun applied to thoroughfare optionally including a subdivision of the name into parts.

-- Description --
NOTE 1 The data type allows names in different languages and scripts as well as inclusion of alternative name, alternative spellings, historical name and exonyms. 

NOTE 2 The data type allows optionally a representation of the thoroughfare name subdivided into separate, semantic parts e.g. "Avenue" + "de la" + "Poste".</documentation>
		</annotation>
	</element>
	<complexType name="ThoroughfareNameValueType">
		<sequence>
			<element name="name" type="gn:GeographicalNamePropertyType">
				<annotation>
					<documentation>-- Definition --
Proper noun applied to the thoroughfare.

-- Description --
NOTE 1 The complete name of the thoroughfare must be applied in this attribute, including type, prefix or qualifier, like for example "Avenue de la Poste", "Calle del Christo Canneregio" or "Untere Quai". The name part attribute enables a representation of the name subdivided into separate semantic parts.

NOTE 2 The data type allows names in different languages as well as inclusion of exonyms. </documentation>
				</annotation>
			</element>
			<element name="nameParts" nillable="true" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Definition --
One or several parts into which the thoroughfare name can be subdivided.

-- Description --
NOTE 1 This is a definition which is consistent with that adopted by the UPU

NOTE 2 A subdivision of a thoroughfare name into semantic parts could improve parsing (e.g. of abbreviated or misspelled names) and for sorting of address data for example for postal delivery purposes. It could also improve the creation of alphabetically sorted street gazetteers. 

NOTE 3 The data type requires that each part of the subdivided thoroughfare name is qualified with information on the semantics e.g. if it is a thoroughfare type (e.g., Rua, Place, Calle, Street), a prefix (e.g., da, de la, del), a qualifier (e.g., Unterer, Little) or if it is the core of the name, which would normally be used for sorting or indexing. 

NOTE 4 In some countries or regions and for some thoroughfare names it is not feasible or it does not add value to subdivide the thoroughfare name into parts.

EXAMPLE In France the thoroughfare name "Avenue de la Poste" could be subdivided into these parts: "Avenue" + "de la" + "Poste".</documentation>
				</annotation>
				<complexType>
					<sequence>
						<element ref="ad:PartOfName"/>
					</sequence>
					<attribute name="nilReason" type="gml:NilReasonType"/>
				</complexType>
			</element>
		</sequence>
	</complexType>
	<complexType name="ThoroughfareNameValuePropertyType">
		<sequence>
			<element ref="ad:ThoroughfareNameValue"/>
		</sequence>
	</complexType>
	<element name="AddressRepresentation" type="ad:AddressRepresentationType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Definition --
Representation of an address spatial object for use in external application schemas that need to include the basic, address information in a readable way.

-- Description --
NOTE 1 The data type includes the all necessary readable address components as well as the address locator(s), which allows the identification of the address spatial objects, e.g., country, region, municipality, address area, post code, street name and address number. It also includes an optional reference to the full address spatial object. 

NOTE 2 The datatype could be used in application schemas that wish to include address information e.g. in a dataset that registers buildings or properties.</documentation>
		</annotation>
	</element>
	<complexType name="AddressRepresentationType">
		<sequence>
			<element name="adminUnit" type="gn:GeographicalNamePropertyType" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Definition --
The name or names of a unit of administration where a Member State has and/or exercises jurisdictional rights, for local, regional and national governance.</documentation>
				</annotation>
			</element>
			<element name="locatorDesignator" type="string" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Definition --
A number or a sequence of characters which allows a user or an application to interpret, parse and format the locator within the relevant scope. A locator may include more locator designators.</documentation>
				</annotation>
			</element>
			<element name="locatorName" type="gn:GeographicalNamePropertyType" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Definition --
Proper noun(s) applied to the real world entity identified by the locator.</documentation>
				</annotation>
			</element>
			<element name="addressArea" nillable="true" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Definition --
The name or names of a geographic area or locality that groups a number of addressable objects for addressing purposes, without being an administrative unit.</documentation>
				</annotation>
				<complexType>
					<sequence>
						<element ref="gn:GeographicalName"/>
					</sequence>
					<attribute name="nilReason" type="gml:NilReasonType"/>
				</complexType>
			</element>
			<element name="postName" nillable="true" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Definition --
One or more names created and maintained for postal purposes to identify a subdivision of addresses and postal delivery points. </documentation>
				</annotation>
				<complexType>
					<sequence>
						<element ref="gn:GeographicalName"/>
					</sequence>
					<attribute name="nilReason" type="gml:NilReasonType"/>
				</complexType>
			</element>
			<element name="postCode" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Definition --
A code created and maintained for postal purposes to identify a subdivision of addresses and postal delivery points. </documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="string">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
			<element name="thoroughfare" nillable="true" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Definition --
The name or names of a passage or way through from one location to another like a road or a waterway. </documentation>
				</annotation>
				<complexType>
					<sequence>
						<element ref="gn:GeographicalName"/>
					</sequence>
					<attribute name="nilReason" type="gml:NilReasonType"/>
				</complexType>
			</element>
			<element name="addressFeature" type="gml:ReferenceType" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Definition --
Reference to the address spatial object.
</documentation>
					<appinfo>
						<targetElement xmlns="http://www.opengis.net/gml/3.2">ad:Address</targetElement>
					</appinfo>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="AddressRepresentationPropertyType">
		<sequence>
			<element ref="ad:AddressRepresentation"/>
		</sequence>
	</complexType>
	<element name="GeographicPosition" type="ad:GeographicPositionType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Definition --
The position of a characteristic point which represents the location of the address according to a certain specification, including information on the origin of the position.</documentation>
		</annotation>
	</element>
	<complexType name="GeographicPositionType">
		<sequence>
			<element name="geometry" type="gml:PointPropertyType">
				<annotation>
					<documentation>-- Definition --
The position of the point expressed in coordinates in the chosen spatial reference system.</documentation>
				</annotation>
			</element>
			<element name="specification" nillable="true">
				<annotation>
					<documentation>-- Definition --
Information defining the specification used to create or derive this geographic position of the address.</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="gml:CodeType">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
			<element name="method" nillable="true">
				<annotation>
					<documentation>-- Definition --
Description of how and by whom the geographic position of the address was created or derived.

-- Description --
NOTE The geographic position could be created manually by the address authority itself, by an independent party (e.g. by field surveying or digitizing of paper maps) or it could be derived automatically from the addressable object or from other Inspire features.</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="gml:CodeType">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
			<element name="default" type="boolean">
				<annotation>
					<documentation>-- Definition --
Specifies whether or not this position should be considered as the default.

-- Description --
NOTE As a member state may provide several positions of an address, there is a need to identify the commonly used (main) position. Preferrably, the default position should be the one with best accuracy.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="GeographicPositionPropertyType">
		<sequence>
			<element ref="ad:GeographicPosition"/>
		</sequence>
	</complexType>
	<element name="LocatorName" type="ad:LocatorNameType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Definition --
Proper noun applied to the real world entity identified by the locator.

-- Description --
NOTE The locator name could be the name of the property or complex, of the building or part of the building, or it could be the name of a room inside a building.</documentation>
		</annotation>
	</element>
	<complexType name="LocatorNameType">
		<sequence>
			<element name="name" type="gn:GeographicalNamePropertyType" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Definition --
The identifying part of the locator name. 

-- Description --
NOTE 1 The data type allows names in different languages and scripts as well as inclusion of alternative name, alternative spellings, historical name and exonyms.

NOTE 2 The locator name could be the name of the property or complex, of the building or part of the building (e.g. a wing), or it could be the name of a room or similar inside the building.  

NOTE 3 The locator name sometimes refer to the name of the family or business entity which at present or in the past has owned or occupied the property or building; although this is the case the locator name must not be confused with the name of the addressee(s).

NOTE 4 As locator name it is also possible to use a descriptive text that allows a user to identify the property in question.

EXAMPLE 1 The "Radford Mill Farm" in Timsbury, Bath, UK; The allotment house area "Brumleby" in Copenhagen, Denmark, the university campus "Cite Universitaire" (where "e" in Cite has the acute accent), in Paris, France. 

EXAMPLE 2 "Millers House" in Stromness, Orkney Isles, UK; "Ulla''s Pension" in Niederfell, Rheinland-Pfalz, Germany.

EXAMPLE 3 "Multi-storey car park at Southampton Magistrates Courts" in Southampton, UK.</documentation>
				</annotation>
			</element>
			<element name="type" type="gml:CodeType">
				<annotation>
					<documentation>-- Definition --
The type of locator value, which enables an application to interpret, parse or format it according to certain rules.

-- Description --
NOTE The type enables a user or an application to understand if the name "Radford Mill Farm" is for example a name of a specific site or of a building.
</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="LocatorNamePropertyType">
		<sequence>
			<element ref="ad:LocatorName"/>
		</sequence>
	</complexType>
	<element name="LocatorDesignator" type="ad:LocatorDesignatorType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Definition --
A number or a sequence of characters that uniquely identifies the locator within the relevant scope(s). The full identification of the locator could include one or more locator designators.

-- Description --
NOTE 1 Locator designators are often assigned according to a set of commonly known rules which enables a user or application to "parse" the information: Address numbers are most often assigned in ascending order with odd and even numbers on each side of the thoroughfare. In a building, the floor identifier represents the level according to the traditions within the area, e.g., 1, 2, 3. 

NOTE 2 Several types of locator designators exist, such as: Address number, address number suffix, building identifier, building name. A locator could be composed by an ordered set of these. 

EXAMPLE In Paris, France a locator could be composed by two locator designators: address number "18" and address number suffix: "BIS".</documentation>
		</annotation>
	</element>
	<complexType name="LocatorDesignatorType">
		<sequence>
			<element name="designator" type="string">
				<annotation>
					<documentation>-- Definition --
The identifying part of the locator designator composed by one or more digits or other characters. 

-- Description --
NOTE The value is often a descriptive code assigned according to certain well known rules e.g. like ascending odd and even address numbers along the thoroughfare, or like floor identifiers: 0, 1, 2, 3.  

EXAMPLE Address number "2065", Address number suffix "B", Floor identifier "7" door identifier "B707" are all locator attribute values.</documentation>
				</annotation>
			</element>
			<element name="type" type="gml:CodeType">
				<annotation>
					<documentation>-- Definition --
The type of locator value, which enables an application to interpret, parse or format it according to certain rules.

-- Description --
NOTE The type enables a user or an application to understand if the value "A" is e.g. an identifier of a specific building, door, staircase or dwelling.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="LocatorDesignatorPropertyType">
		<sequence>
			<element ref="ad:LocatorDesignator"/>
		</sequence>
	</complexType>
	<element name="PostalDescriptor" type="ad:PostalDescriptorType" substitutionGroup="ad:AddressComponent">
		<annotation>
			<documentation>-- Definition --
An address component which represents the identification of a subdivision of addresses and postal delivery points in a country, region or city for postal purposes. 

-- Description --
NOTE 1 The postal descriptor is specified by means of a post code and/or names of the associated post office, town or area.

NOTE 2 In some countries post codes are seen as a proper geographic subdivision of the country, in other countries the post code is regarded only as an attribute that characterizes a (usually small) number of adjacent postal delivery points and addresses. 

NOTE 3 The postal descriptors are created and developed on the basis of postal requirements (e.g. efficient sorting, logistics, transport and distribution). Consequently, there is not often a tight relationship between the postal areas and administrative units in the same area.

NOTE 4 The structure schema and formats of national postal descriptor systems are different. Sometimes (for example in the UK) the post code itself is the only information required for a valid address; in other situations both the post code and the associated name of post office or town is required. Sometimes there is a simple relationship between the code and the name; in other situations a set of postcodes are associated with a single post office or town.

NOTE 5 In some countries like e.g. The Republic of Ireland, no post code system currently exists, therefore the postal descriptor is only represented by the name of the post town. 

EXAMPLE 1 In the UK the post code "EC4M 7DR" is sufficient, as a postal descriptor, while the related town name "London" is informative, but not necessary in the postal address. 

EXAMPLE 2 In Sweden all postcodes starting with "80" are related to the postal name "Gavle" ("a" has the diaeresis accent). Therefore in the postal descriptor "802 74 Gavle", the postcode "802 74" bears all postal necessary information, while the town name "Gavle" is extra information. 

EXAMPLE 3 In Denmark, outside the centre of Copenhagen, each postcode has a 1:1 relationship to one post name only: Postcode "6372" relates to the village "Bylderup-Bov". 

EXAMPLE 4 In Germany the lowest level of the Postal descriptor (the 5 digit Postleitzahl) often does not fall within an administrative unit (e.g. municipality). The Postleitzahl is handled completely independent from the hierarchal systematic of the addresses. In addition, some "Postleitzahlen" represent not a delivery area, but institutions with a big amount of post.</documentation>
		</annotation>
	</element>
	<complexType name="PostalDescriptorType">
		<complexContent>
			<extension base="ad:AddressComponentType">
				<sequence>
					<element name="postName" type="gn:GeographicalNamePropertyType" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
One or more names created and maintained for postal purposes to identify a subdivision of addresses and postal delivery points. 

-- Description --
NOTE 1 Often the post name (or names) is a supplementary identification of the post office to which the associated post code belongs. For example it may be the name of the town in which the office is situated. In other situations the post name could be an independent descriptor without any post code or it could be a postal subdivision connected to a parent postal descriptor (post code and post name). 

NOTE 2 In some countries like e.g. Spain and The Netherlands, no post names exit therefore the postal descriptor is only represented by the post code. 

NOTE 3 Even though the post name is the same as the name of an administrative unit or an address area, the area covered are not necessarilythe same.</documentation>
						</annotation>
					</element>
					<element name="postCode" type="string" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
A code created and maintained for postal purposes to identify a subdivision of addresses and postal delivery points. 

-- Description --
NOTE 1 The structure, schema and formats of post codes are different in different countries. Often the components of the post code are hierarchical, e.g. when the first character(s) identifies the region covered by the post code and the next characters define the subdivision. 

NOTE 2 In some countries, e.g., The Republic of Ireland, no post codes exists therefore the postal descriptor is only represented by the post name (e.g. town name).

EXAMPLE In the UK postcodes starting with W cover the Western (W1) and Paddington (W2-14) districts of the London postal district. In Sweden all postcodes starting with "80" are related to the postal name "Gavle" ("a" has the diaeresis accent).</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="PostalDescriptorPropertyType">
		<sequence minOccurs="0">
			<element ref="ad:PostalDescriptor"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="AdminUnitName" type="ad:AdminUnitNameType" substitutionGroup="ad:AddressComponent">
		<annotation>
			<documentation>-- Definition --
An address component which represents the name of a unit of administration where a Member State has and/or exercises jurisdictional rights, for local, regional and national governance.</documentation>
		</annotation>
	</element>
	<complexType name="AdminUnitNameType">
		<complexContent>
			<extension base="ad:AddressComponentType">
				<sequence>
					<element name="name" type="gn:GeographicalNamePropertyType" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Official, geographical name of the administrative unit, given in different languages where required.

-- Description --
NOTE The data type allows names in different languages and scripts as well as inclusion of alternative name, alternative spellings, historical name and exonyms.</documentation>
						</annotation>
					</element>
					<element name="level" type="gml:CodeType">
						<annotation>
							<documentation>-- Definition --
The level of administration in the national administrative hierarchy.</documentation>
						</annotation>
					</element>
					<element name="adminUnit" type="gml:ReferenceType" nillable="true">
						<annotation>
							<documentation>-- Definition --
The administrative unit that is the source of the content of the administrative unit name.

-- Description --
EXAMPLE The administrative unit (municipality) "Gavle" ("a" has the diaeresis accent) in Sweden is the source of the address component administrative unit name, "Gavle".</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">au:AdministrativeUnit</targetElement>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="AdminUnitNamePropertyType">
		<sequence minOccurs="0">
			<element ref="ad:AdminUnitName"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
</schema>';


    amt := length(buf);
    
    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 304;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (304, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/af/3.0/agriculturalandaquaculturefacilities.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 304 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as agriculturalandaquaculturefacilities_af_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:act-core="http://inspire.ec.europa.eu/schemas/act-core/3.0" xmlns:af="http://inspire.ec.europa.eu/schemas/af/3.0" xmlns:gml="http://www.opengis.net/gml/3.2" targetNamespace="http://inspire.ec.europa.eu/schemas/af/3.0" elementFormDefault="qualified" version="3.0">
	<annotation>
		<documentation>-- Description --

core model, harmonised toward the the core general faciclity model.</documentation>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/act-core/3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/act-core/3.0/ActivityComplex_Core.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="FarmAnimalSpecies" type="af:FarmAnimalSpeciesType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
farm animal

-- Definition --
Identifies an animal or group of animals of the same species kept on the specific site.</documentation>
		</annotation>
	</element>
	<complexType name="FarmAnimalSpeciesType">
		<sequence>
			<element name="livestock" type="gml:ReferenceType" nillable="true" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Name --
livestock 

-- Definition --
Define the presence of livestock species in the site.

-- Description --
The terrestic species are coded specified  according to  regulation (EC) No 1165/2008.</documentation>
				</annotation>
			</element>
			<element name="aquaculture" type="gml:ReferenceType" nillable="true" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Name --
aquaculture 

-- Definition --
Define the presence of aquaculture species in the site.

-- Description --
Aquaculture species  are listed in aquacultureSpecies attribute.
The allowed values for this code list comprise only the values specified in the February 2012 version of the ASFIS (Aquatic Sciences and Fisheries Information System) List of Species for Fishery Statistics Purposes maintained by FAO.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="FarmAnimalSpeciesPropertyType">
		<sequence>
			<element ref="af:FarmAnimalSpecies"/>
		</sequence>
	</complexType>
	<element name="Site" type="af:SiteType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
Site
-- Definition --
All land  at a same or distinct geographic location under the management control of a holding covering activities, products and services. This includes all infrastructure, equipment and materials. The geometry of the site  must be a point or a surface. Mulitpoint or multisurface is not allowed.

-- Description --
The  site  can be represented by a point or by a surface.
the site can have only one geometry.</documentation>
		</annotation>
	</element>
	<complexType name="SiteType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="geometry" type="gml:GeometryPropertyType">
						<annotation>
							<documentation>-- Name --
geometry
-- Definition --
The geometry defining the extent or position of the site.

-- Description --
The geometry must be a GM_surface, when it includes installations, plots or buildings with a polygon type geometry.
In case the site only includes single object  with a point type geometry, the site can have a GM_point geometry.</documentation>
						</annotation>
					</element>
					<element name="activity" type="gml:ReferenceType" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
activity
-- Definition --
The classification of the economic activity of the site, according to the NACE rev. 2.0 coding.

-- Description --
Accessible at Eurostat repository from URL 
http://ec.europa.eu/eurostat/ramon/nomenclatures/index.cfm?
TargetUrl=LST_CLS_DLD'||'&'||'amp;StrNom=NACE_REV2
'||'&'||'amp;StrLanguageCode=EN'||'&'||'amp;StrLayoutCode=HIERARCHIC.


The valid nace codes are 
first level
01 and 03
second level
01.1 - 01.6  and 03.2
third level 
01.11 -  01.64  and 03.21 - 03.22</documentation>
						</annotation>
					</element>
					<element name="includesAnimal" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<complexType>
							<sequence>
								<element ref="af:FarmAnimalSpecies"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="SitePropertyType">
		<sequence minOccurs="0">
			<element ref="af:Site"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="Holding" type="af:HoldingType" substitutionGroup="act-core:ActivityComplex">
		<annotation>
			<documentation>-- Name --
Holding
-- Definition --
The whole area and all infrastructures included on it, covering the same or different  "sites", under the control  of an operator to perform  agricultural or aquaculture activities. 
The holding includes one specialisation of ActivityComplex, ie. Activity. the values of ActivityType are expressed conform the classification of the economic activity of the holding, according to the NACE rev. 2.0 coding.
Holding is a thematic extension of the generic Class '||'&'||'amp;ldquo;Activity Complex'||'&'||'amp;rdquo; shared with other thematic areas describing entities related with Economical Activities (Legal Entity Class '||'&'||'amp;ndash; Business).

-- Description --
Accessible at Eurostat repository from URL  
http://ec.europa.eu/eurostat/ramon/nomenclatures/index.cfm? 
TargetUrl=LST_CLS_DLD'||'&'||'amp;StrNom=NACE_REV2 
'||'&'||'amp;StrLanguageCode=EN'||'&'||'amp;StrLayoutCode=HIERARCHIC. 

The valid nace codes are 
first level
01 and 03
second level
01.1 - 01.6  and 03.2
third level 
01.11 -  01.64  and 03.21 - 03.22


01.7  hunting trapping an related services is exclude.
02.    forestry and logging are excluded
03.1  fishing is excluded.</documentation>
		</annotation>
	</element>
	<complexType name="HoldingType">
		<complexContent>
			<extension base="act-core:ActivityComplexType">
				<sequence>
					<element name="contains" type="af:SitePropertyType" maxOccurs="unbounded"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="HoldingPropertyType">
		<sequence minOccurs="0">
			<element ref="af:Holding"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 305;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (305, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/am/3.0/areamanagementrestrictionregulationzone.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 305 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as areamanagementrestrictionregulationzone_am_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:am="http://inspire.ec.europa.eu/schemas/am/3.0" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:base2="http://inspire.ec.europa.eu/schemas/base2/1.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:gn="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" xmlns:sc="http://www.interactive-instruments.de/ShapeChange/AppInfo" targetNamespace="http://inspire.ec.europa.eu/schemas/am/3.0" elementFormDefault="qualified" version="3.0">
	<annotation>
		<documentation>-- Name --
area management restriction and regulation zones

-- Definition --
The Area Management Restriction and Regulation Zones application schema contains the spatial object that represents zones or areas established to protect the environment via management, restriction or regulation.</documentation>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/base/3.3" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/base2/1.0" schemaLocation="http://inspire.ec.europa.eu/schemas/base2/1.0/BaseTypes2.xsd"/>
	<import namespace="http://www.interactive-instruments.de/ShapeChange/AppInfo" schemaLocation="http://portele.de/ShapeChangeAppinfo.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<import namespace="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/gn/3.0/GeographicalNames.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="ManagementRestrictionOrRegulationZone" type="am:ManagementRestrictionOrRegulationZoneType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
management restriction or regulation zone

-- Definition --
Area managed, restricted or regulated in accordance with a legal requirement related to an environmental policy or a policy or activity that may have an impact on the environment at any level of administration (or used for reporting at international, European, national, regional and local) levels.</documentation>
		</annotation>
	</element>
	<complexType name="ManagementRestrictionOrRegulationZoneType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Name --
inspireID

-- Definition --
External object identifier of the spatial object.

-- Description -- 
An external object identifier is a unique object identifier published by the responsible body, which may be used by external application to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.

NOTE: ManagementRestrictionOrRegulationZone spatial objects commonly perform the role/function of '||'&'||'lt;i'||'&'||'gt;"Reporting Unit"'||'&'||'lt;/i'||'&'||'gt; for non-spatial reported data. The reported data shall contain object references to ManagementRestrictionOrRegulationZones. Therefore, all spatial objects shall be assigned an inspireID.</documentation>
						</annotation>
					</element>
					<element name="thematicId" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
thematic identifier

-- Definition --
Descriptive unique object identifier applied to spatial objects in a defined information theme. 

-- Description --
Some management, restriction or regulation zones may be assigned multiple thematic identifiers. These may have been established to meet the reporting requirements of different legislative instruments at International, European or at Member State levels.  

Where multiple thematicIDs exist all should be provided. This shall allow any external dataset that uses thematicIDs to referencing to the zone to continue to be linked to the spatial object.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="base2:ThematicIdentifier"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="name" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
name

-- Definition --
A geographical name that is used to identify the management, restriction or  regulation zone in the real world. It provides a ''key'' for implicitly associating different representations of the object.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="gn:GeographicalName"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="geometry" type="gml:GeometryPropertyType">
						<annotation>
							<documentation>-- Name
geometry

-- Definition --
The geometry representing the spatial extent of the spatial object.

-- Description --
The geometry of a Management Area, Restriction or Regulation Zone can be defined using any geometry representation. Typically this shall be either a GM_Surface or GM_MultiSurface. 

NOTE: Where a zone forms as a polygon, this should be encoded as a GM_Surface or GM_MultiSurface not a GM_Curve.</documentation>
						</annotation>
					</element>
					<element name="zoneType" type="gml:ReferenceType" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
zone type

-- Definition --
High level classification defining the type of management, restriction or regulation zone.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="specialisedZoneType" type="gml:ReferenceType" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
specialised zone type

-- Definition --
Additional classification value which further specialises the type of management, regulation or restriction zone relevant to the domain. 

-- Description -- 
NOTE: This value should be derived from a relevant domain-specific controlled vocabulary, where available.

EXAMPLE 1: A ManagementRestrictionOrRegulationZone where the zoneType value = airQualityManagementZone could be further classified as either:
'||'&'||'lt;ul'||'&'||'gt;
	'||'&'||'lt;li'||'&'||'gt; specialisedZoneType = agglomeration or '||'&'||'lt;/li'||'&'||'gt;
	'||'&'||'lt;li'||'&'||'gt; specialisedZoneType =nonAgglomeration'||'&'||'lt;/li'||'&'||'gt;
'||'&'||'lt;/ul'||'&'||'gt;

EXAMPLE 2: A ManagementRestrictionOrRegulationZone where the zoneType value = sensitiveArea could be further classified as either:
 specialisedZoneType = lessSensitiveArea
 specialisedZoneType = lessSensitiveNitrates
 specialisedZoneType = lessSensitiveEutrophic
 specialisedZoneType = lessSensitiveShellfish</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">technicalGuidance</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="designationPeriod" type="gml:TimePeriodPropertyType" nillable="true">
						<annotation>
							<documentation>-- Name --
designation period

-- Definition --
Time period defining when the management, restriction or regulation zone was legally designated or became effective in the real world.

-- Description --
NOTE: designationPeriod uses the ISO 19108 TM_Period which is comprised of two properties - gml:beginPosition and gml:endPosition. 
If the zone shall remain in force for an indeterminate period of time then the endPosition/indeterminatePosition="unknown" can be used to state that the zone is still effective.</documentation>
						</annotation>
					</element>
					<element name="environmentalDomain" type="gml:ReferenceType" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
environmental domain

-- Definition --
Classification of the environment domain(s) for which, through the establishment of the zone, certain environmental objectives shall be reached.

-- Description --
A zone may be established within one environmental domain (e.g. water) or may to cover a wide range of environmental objectives that cross-cut several domains. For example, Marine Regions may relate to water,  land use, sustainable development.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="competentAuthority" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
competent authority

-- Definition --
Description of the organisation(s) responsible for managing, restricting or regulating measures or activities within the zone.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="base2:RelatedParty"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="beginLifespanVersion" nillable="true">
						<annotation>
							<documentation>-- Name --
begin lifespan version

-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="endLifespanVersion" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
end lifespan version

-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="plan" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Reference to, or citation of a plan (management or action plan) that describes the environmental objectives and measures that shall be undertaken in the zone to protect the environment.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="base2:DocumentCitation"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
					<element name="legalBasis" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Reference to, or citation of the legal instrument or document that required the establishment of the zone.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="base2:LegislationCitation"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
					<element name="relatedZone" type="gml:ReferenceType" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Reference to a related management, regulation or restriction zone.  

-- Description --
EXAMPLE 1: River basin districts (RBD) exist at three levels:
1) International River Basin District
2) National River Basin District
3) River Basin District Sub units.

An international RBD may contain one or more national RBD and/or River Basin Sub Units.

A national RBD may be related to an International RBD and one or more RBD sub-units.

EXAMPLE 2:  A WFDWaterBody may be related to a River Basin District.</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">am:ManagementRestrictionOrRegulationZone</targetElement>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="ManagementRestrictionOrRegulationZonePropertyType">
		<sequence minOccurs="0">
			<element ref="am:ManagementRestrictionOrRegulationZone"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 306;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (306, empty_clob(), 'INSPIRE', 'urn:x-inspire:specification:gmlas:AdministrativeUnits:3.0/administrativeunits.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 306 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as administrativeunits_au_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?><schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:au="urn:x-inspire:specification:gmlas:AdministrativeUnits:3.0" xmlns:base="urn:x-inspire:specification:gmlas:BaseTypes:3.2" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:gn="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" xmlns:stat="urn:x-inspire:specification:gmlas:StatisticalUnits:0.0" elementFormDefault="qualified" targetNamespace="urn:x-inspire:specification:gmlas:AdministrativeUnits:3.0" version="3.0">
  <import namespace="urn:x-inspire:specification:gmlas:StatisticalUnits:0.0" schemaLocation="http://inspire.ec.europa.eu/schemas/su/0.0/StatisticalUnits.xsd"/>
  <import namespace="urn:x-inspire:specification:gmlas:BaseTypes:3.2" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.2/BaseTypes.xsd"/>
  <import namespace="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/gn/3.0/GeographicalNames.xsd"/>
  <import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
  <import namespace="http://www.isotc211.org/2005/gmd" schemaLocation="http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd"/>
  <!--XML Schema document created by ShapeChange-->
  <element name="ResidenceOfAuthority" substitutionGroup="gml:AbstractObject" type="au:ResidenceOfAuthorityType">
    <annotation>
      <documentation>-- Definition --
Data type representing the name and position of a residence of authority.
</documentation>
    </annotation>
  </element>
  <complexType name="ResidenceOfAuthorityType">
    <sequence>
      <element name="name" type="gn:GeographicalNamePropertyType">
        <annotation>
          <documentation>-- Definition --
Name of the residence of authority.
</documentation>
        </annotation>
      </element>
      <element name="geometry" nillable="true" type="gml:PointPropertyType">
        <annotation>
          <documentation>-- Definition --
Position of the residence of authority.
</documentation>
        </annotation>
      </element>
    </sequence>
  </complexType>
  <complexType name="ResidenceOfAuthorityPropertyType">
    <sequence>
      <element ref="au:ResidenceOfAuthority"/>
    </sequence>
  </complexType>
  <element name="AdministrativeUnit" substitutionGroup="gml:AbstractFeature" type="au:AdministrativeUnitType">
    <annotation>
      <documentation>-- Definition --
Unit of administration where a Member State has and/or exercises jurisdictional rights, for local, regional and national governance.
</documentation>
    </annotation>
  </element>
  <complexType name="AdministrativeUnitType">
    <complexContent>
      <extension base="gml:AbstractFeatureType">
        <sequence>
          <element name="geometry" type="gml:MultiSurfacePropertyType">
            <annotation>
              <documentation>-- Definition --
Geometric representation of spatial area covered by this administrative unit.</documentation>
            </annotation>
          </element>
          <element name="nationalCode" type="string">
            <annotation>
              <documentation>-- Definition --
Thematic identifier corresponding to the national administrative codes defined in each country.
</documentation>
            </annotation>
          </element>
          <element name="inspireId" type="base:IdentifierPropertyType">
            <annotation>
              <documentation>-- Definition --
External object identifier of the spatial object.

-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.
</documentation>
            </annotation>
          </element>
          <element name="nationalLevel" type="gml:CodeType">
            <annotation>
              <documentation>-- Definition --
Level in the national administrative hierarchy, at which the administrative unit is established.</documentation>
            </annotation>
          </element>
          <element maxOccurs="unbounded" name="nationalLevelName" nillable="true" type="gmd:LocalisedCharacterString_PropertyType">
            <annotation>
              <documentation>-- Definition --
Name of the level in the national administrative hierarchy, at which  the administrative unit is established.</documentation>
            </annotation>
          </element>
          <element name="country" type="gmd:Country_PropertyType">
            <annotation>
              <documentation>-- Definition --
Two-character country code according to the Interinstitutional style guide published by the Publications Office of the European Union.  
  
</documentation>
            </annotation>
          </element>
          <element maxOccurs="unbounded" name="name" type="gn:GeographicalNamePropertyType">
            <annotation>
              <documentation>-- Definition --
Official national geographical name of the administrative unit, given in several languages where required.</documentation>
            </annotation>
          </element>
          <element maxOccurs="unbounded" name="residenceOfAuthority" nillable="true">
            <annotation>
              <documentation>-- Definition --
Center for national or local administration.
</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="au:ResidenceOfAuthority"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element name="beginLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="endLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element maxOccurs="3" name="NUTS" nillable="true" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
NUTS region that topologically contains this administrative unit.

-- Description --
NOTE 1 NUTS regions are Territorial units for statistics defined in the framework of the Regulation (EC) No 1059/2003 of the European Parliament and of the Council of 26 May 2003 (see hhtp:ec.europe.eu/eurostat/ramon/nuts/home_regions_de.html).

NOTE 2 Each administrative unit at lowest level is topologically covered by a certain NUTS3 region established for statistical purposes. Each NUTS3 region belongs to a specific NUTS2 region that is a part of NUTS1 region. The administrative unit at lowest level can refer the corresponding regions from all three levels: NUTS3, NUTS2, and NUTS1. </documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">stat:NUTSRegion</targetElement>
              </appinfo>
            </annotation>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="condominium" nillable="true" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
Condominium administered by this administrative unit 

-- Description --
NOTE Condominiums may only exist at state level and can be administered only by administrative units at the highest level of the national administrative hierarchy (i.e. countries).</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">au:Condominium</targetElement>
                <reversePropertyName xmlns="http://www.opengis.net/gml/3.2">au:admUnit</reversePropertyName>
              </appinfo>
            </annotation>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="lowerLevelUnit" nillable="true">
            <annotation>
              <documentation>-- Definition --
Units established at a lower level of the national administrative hierarchy which are administered by this administrative unit. 

-- Description --
NOTE For administrative units at the lowest level of the national hierarchy no lower level unit exists. 

CONSTRAINT Each administrative unit except for the lowest level units shall refer to its lower level units
</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">au:AdministrativeUnit</targetElement>
                <reversePropertyName xmlns="http://www.opengis.net/gml/3.2">au:upperLevelUnit</reversePropertyName>
              </appinfo>
            </annotation>
            <complexType>
              <complexContent>
                <extension base="gml:AbstractMemberType">
                  <sequence/>
                  <attributeGroup ref="gml:AssociationAttributeGroup"/>
                </extension>
              </complexContent>
            </complexType>
          </element>
          <element minOccurs="0" name="upperLevelUnit" nillable="true" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
A unit established at a higher level of national administrative hierarchy that this administrative unit administers. 

-- Description --
NOTE Administrative units at the highest level of national hierarchy (i.e. the country) do not have upper level units. 

CONSTRAINT Each administrative unit at the level other than ''1st order'' (i.e. nationalLevel '||'&'||'lt;'||'&'||'gt; ''1st order'') shall refer their upper level unit.
</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">au:AdministrativeUnit</targetElement>
                <reversePropertyName xmlns="http://www.opengis.net/gml/3.2">au:lowerLevelUnit</reversePropertyName>
              </appinfo>
            </annotation>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="administeredBy" nillable="true" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
Administrative units established at same level of national administrative hierarchy which are co-administered by this administrative unit. 
</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">au:AdministrativeUnit</targetElement>
                <reversePropertyName xmlns="http://www.opengis.net/gml/3.2">au:coAdminister</reversePropertyName>
              </appinfo>
            </annotation>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="coAdminister" nillable="true" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
A unit established at same level of national administrative hierarchy that administers this administrative unit.
</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">au:AdministrativeUnit</targetElement>
                <reversePropertyName xmlns="http://www.opengis.net/gml/3.2">au:administeredBy</reversePropertyName>
              </appinfo>
            </annotation>
          </element>
          <element maxOccurs="unbounded" name="boundary" nillable="true" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
The administrative boundaries between this administrative unit and all the units adjacent to it.

-- Description --
NOTE Administrative boundary corresponds to the curve established between the  nodes  at lowest level of territory division  in Member State. Thus, it does not necessairly represents boundary in political terms, but just part of it. </documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">au:AdministrativeBoundary</targetElement>
                <reversePropertyName xmlns="http://www.opengis.net/gml/3.2">au:admUnit</reversePropertyName>
              </appinfo>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="AdministrativeUnitPropertyType">
    <sequence minOccurs="0">
      <element ref="au:AdministrativeUnit"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="AdministrativeBoundary" substitutionGroup="gml:AbstractFeature" type="au:AdministrativeBoundaryType">
    <annotation>
      <documentation>-- Definition --
A line of demarcation between administrative units.</documentation>
    </annotation>
  </element>
  <complexType name="AdministrativeBoundaryType">
    <complexContent>
      <extension base="gml:AbstractFeatureType">
        <sequence>
          <element name="geometry" type="gml:CurvePropertyType">
            <annotation>
              <documentation>-- Definition --
Geometric representation of border line.</documentation>
            </annotation>
          </element>
          <element name="inspireId" type="base:IdentifierPropertyType">
            <annotation>
              <documentation>-- Definition --
External object identifier of the spatial object.

-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.
</documentation>
            </annotation>
          </element>
          <element name="country" type="gmd:Country_PropertyType">
            <annotation>
              <documentation>-- Definition --
Two-character country code according to the Interinstitutional style guide published by the Publications Office of the European Union.  
  
</documentation>
            </annotation>
          </element>
          <element maxOccurs="6" name="nationalLevel" type="gml:CodeType">
            <annotation>
              <documentation>-- Definition --
The hierarchy levels of all adjacent administrative units this boundary is part of.</documentation>
            </annotation>
          </element>
          <element name="legalStatus" nillable="true">
            <annotation>
              <documentation>-- Definition --
Legal status of this administrative boundary. 

-- Description --
NOTE The legal status is considered in terms of political agreement or disagreement of the administrative units separated by this boundary.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="au:LegalStatusValueType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="technicalStatus" nillable="true">
            <annotation>
              <documentation>-- Definition --
The technical status of the administrative boundary.

-- Description --
NOTE The technical status of the boundary is considered in terms of its topological matching or not-matching with the borders of all separated administrative units. Edge-matched means that the same set of coordinates is used.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="au:TechnicalStatusValueType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="beginLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="endLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element maxOccurs="unbounded" name="admUnit" nillable="true" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
The administrative units separated by this administrative boundary. 

-- Description --
NOTE In case of a national boundary (i.e. nationalLevel=''1st order'')  only one national administrative unit (i.e. country) is provided. 
</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">au:AdministrativeUnit</targetElement>
                <reversePropertyName xmlns="http://www.opengis.net/gml/3.2">au:boundary</reversePropertyName>
              </appinfo>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="AdministrativeBoundaryPropertyType">
    <sequence minOccurs="0">
      <element ref="au:AdministrativeBoundary"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <simpleType name="LegalStatusValueType">
    <annotation>
      <documentation>-- Definition --
Description of the legal status of administrative boundaries.</documentation>
    </annotation>
    <restriction base="string">
      <enumeration value="agreed">
        <annotation>
          <documentation>-- Definition --
The edge-matched boundary has been agreed between neighbouring administrative units and is stable now.</documentation>
        </annotation>
      </enumeration>
      <enumeration value="notAgreed">
        <annotation>
          <documentation>-- Definition --
The edge-matched boundary has not yet been agreed between neighbouring administrative units and could be changed.</documentation>
        </annotation>
      </enumeration>
    </restriction>
  </simpleType>
  <element name="Condominium" substitutionGroup="gml:AbstractFeature" type="au:CondominiumType">
    <annotation>
      <documentation>-- Definition --
An administrative area established independently to any national administrative division of territory  and administered by two or more countries. 

-- Description --
NOTE Condominium is not a part of any national administrative hierarchy of territory division in Member State. </documentation>
    </annotation>
  </element>
  <complexType name="CondominiumType">
    <complexContent>
      <extension base="gml:AbstractFeatureType">
        <sequence>
          <element name="inspireId" type="base:IdentifierPropertyType">
            <annotation>
              <documentation>-- Definition --
External object identifier of the spatial object.

-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.
</documentation>
            </annotation>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="name" nillable="true">
            <annotation>
              <documentation>-- Definition --
Official geographical name of this condominium, given in several languages where required.</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="gn:GeographicalName"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element name="geometry" type="gml:MultiSurfacePropertyType">
            <annotation>
              <documentation>-- Definition --
Geometric representation of spatial area covered by this condominium</documentation>
            </annotation>
          </element>
          <element name="beginLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="endLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element maxOccurs="unbounded" name="admUnit" nillable="true" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
The administrative unit administering the condominium</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">au:AdministrativeUnit</targetElement>
                <reversePropertyName xmlns="http://www.opengis.net/gml/3.2">au:condominium</reversePropertyName>
              </appinfo>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="CondominiumPropertyType">
    <sequence minOccurs="0">
      <element ref="au:Condominium"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <simpleType name="TechnicalStatusValueType">
    <annotation>
      <documentation>-- Definition --
Description of the technical status of administrative boundaries.</documentation>
    </annotation>
    <restriction base="string">
      <enumeration value="edgeMatched">
        <annotation>
          <documentation>-- Definition --
The boundaries of neighbouring administrative units have the same set of coordinates.</documentation>
        </annotation>
      </enumeration>
      <enumeration value="notEdgeMatched">
        <annotation>
          <documentation>-- Definition --
The boundaries of neighbouring administrative units do not have the same set of coordinates.</documentation>
        </annotation>
      </enumeration>
    </restriction>
  </simpleType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 307;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (307, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/base/3.3/basetypes.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 307 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as basetypes_base_3_3.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml/3.2" targetNamespace="http://inspire.ec.europa.eu/schemas/base/3.3" elementFormDefault="qualified" version="3.3">
	<annotation>
		<documentation>-- Definition --
schema for basic types used by multiple themes</documentation>
	</annotation>
	<import namespace="http://www.isotc211.org/2005/gmd" schemaLocation="http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<simpleType name="VerticalPositionValueType">
		<annotation>
			<documentation>-- Definition --
The relative vertical position of a spatial object.</documentation>
		</annotation>
		<restriction base="string">
			<enumeration value="onGroundSurface">
				<annotation>
					<documentation>-- Definition --
The spatial object is on ground level.</documentation>
				</annotation>
			</enumeration>
			<enumeration value="suspendedOrElevated">
				<annotation>
					<documentation>-- Definition --
The spatial object is suspended or elevated.</documentation>
				</annotation>
			</enumeration>
			<enumeration value="underground">
				<annotation>
					<documentation>-- Definition --
The spatial object is underground.</documentation>
				</annotation>
			</enumeration>
		</restriction>
	</simpleType>
	<element name="SpatialDataSet" type="base:SpatialDataSetType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Definition --
Identifiable collection of spatial data.

-- Description --
NOTE The type SpatialDataSet is offered as a pre-defined type for spatial data sets. The scope of this type is packaging pre-defined data sets for the non-direct access download service. It may be reused in thematic application schemas, but if it does not fit an application-schema-specific data set object should be modelled. This type may have the same name and definition like this type, but may have a different set of properties.

This type specifies three properties: an external object identifier, a container for metadata (may be void), and an association to zero or more spatial objects.</documentation>
		</annotation>
	</element>
	<complexType name="SpatialDataSetType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="identifier" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Definition --
Identifier of the spatial data set.</documentation>
						</annotation>
					</element>
					<element name="metadata" nillable="true">
						<annotation>
							<documentation>-- Definition --
Metadata of the spatial data set.</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMetadataPropertyType">
									<sequence minOccurs="0">
										<element ref="gmd:MD_Metadata"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="SpatialDataSetPropertyType">
		<sequence minOccurs="0">
			<element ref="base:SpatialDataSet"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="Identifier" type="base:IdentifierType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Definition --
External unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object.

-- Description --
NOTE1 External object identifiers are distinct from thematic object identifiers.

NOTE 2 The voidable version identifier attribute is not part of the unique identifier of a spatial object and may be used to distinguish two versions of the same spatial object.

NOTE 3 The unique identifier will not change during the life-time of a spatial object.</documentation>
		</annotation>
	</element>
	<complexType name="IdentifierType">
		<sequence>
			<element name="localId" type="string">
				<annotation>
					<documentation>-- Definition --
A local identifier, assigned by the data provider. The local identifier is unique within the namespace, that is no other spatial object carries the same unique identifier.

-- Description --
NOTE It is the responsibility of the data provider to guarantee uniqueness of the local identifier within the namespace.</documentation>
				</annotation>
			</element>
			<element name="namespace" type="string">
				<annotation>
					<documentation>-- Definition --
Namespace uniquely identifying the data source of the spatial object.

-- Description --
NOTE The namespace value will be owned by the data provider of the spatial object and will be registered in the INSPIRE External Object Identifier Namespaces Register.</documentation>
				</annotation>
			</element>
			<element name="versionId" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Definition --
The identifier of the particular version of the spatial object, with a maximum length of 25 characters. If the specification of a spatial object type with an external object identifier includes life-cycle information, the version identifier is used to distinguish between the different versions of a spatial object. Within the set of all versions of a spatial object, the version identifier is unique. 

-- Description --
NOTE The maximum length has been selected to allow for time stamps based on ISO 8601, for example, "2007-02-12T12:12:12+05:30" as the version identifier.

NOTE 2 The property is void, if the spatial data set does not distinguish between different versions of the spatial object. It is missing, if the spatial object type does not support any life-cycle information.</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="string">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
		</sequence>
	</complexType>
	<complexType name="IdentifierPropertyType">
		<sequence>
			<element ref="base:Identifier"/>
		</sequence>
	</complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 308;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (308, empty_clob(), 'INSPIRE', 'urn:x-inspire:specification:gmlas:BaseTypes:3.2/basetypes.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 308 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as basetypes_base_3_2.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?><schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="urn:x-inspire:specification:gmlas:BaseTypes:3.2" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml/3.2" elementFormDefault="qualified" targetNamespace="urn:x-inspire:specification:gmlas:BaseTypes:3.2" version="3.2">
  <annotation>
    <documentation>-- Definition --
schema for basic types used by multiple themes</documentation>
  </annotation>
  <import namespace="http://www.isotc211.org/2005/gmd" schemaLocation="http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd"/>
  <import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
  <!--XML Schema document created by ShapeChange-->
  <simpleType name="VerticalPositionValueType">
    <annotation>
      <documentation>-- Definition --
The relative vertical position of a spatial object.</documentation>
    </annotation>
    <restriction base="string">
      <enumeration value="onGroundSurface">
        <annotation>
          <documentation>-- Definition --
The spatial object is on ground level.</documentation>
        </annotation>
      </enumeration>
      <enumeration value="suspendedOrElevated">
        <annotation>
          <documentation>-- Definition --
The spatial object is suspended or elevated.</documentation>
        </annotation>
      </enumeration>
      <enumeration value="underground">
        <annotation>
          <documentation>-- Definition --
The spatial object is underground.</documentation>
        </annotation>
      </enumeration>
    </restriction>
  </simpleType>
  <element name="Identifier" substitutionGroup="gml:AbstractObject" type="base:IdentifierType">
    <annotation>
      <documentation>-- Definition --
External unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object.

-- Description --
NOTE1 External object identifiers are distinct from thematic object identifiers.

NOTE 2 The voidable version identifier attribute is not part of the unique identifier of a spatial object and may be used to distinguish two versions of the same spatial object.

NOTE 3 The unique identifier will not change during the life-time of a spatial object.</documentation>
    </annotation>
  </element>
  <complexType name="IdentifierType">
    <sequence>
      <element name="localId" type="string">
        <annotation>
          <documentation>-- Definition --
A local identifier, assigned by the data provider. The local identifier is unique within the namespace, that is no other spatial object carries the same unique identifier.

-- Description --
NOTE It is the responsibility of the data provider to guarantee uniqueness of the local identifier within the namespace.</documentation>
        </annotation>
      </element>
      <element name="namespace" type="string">
        <annotation>
          <documentation>-- Definition --
Namespace uniquely identifying the data source of the spatial object.

-- Description --
NOTE The namespace value will be owned by the data provider of the spatial object and will be registered in the INSPIRE External Object Identifier Namespaces Register.</documentation>
        </annotation>
      </element>
      <element minOccurs="0" name="versionId" nillable="true">
        <annotation>
          <documentation>-- Definition --
The identifier of the particular version of the spatial object, with a maximum length of 25 characters. If the specification of a spatial object type with an external object identifier includes life-cycle information, the version identifier is used to distinguish between the different versions of a spatial object. Within the set of all versions of a spatial object, the version identifier is unique. 

-- Description --
NOTE The maximum length has been selected to allow for time stamps based on ISO 8601, for example, "2007-02-12T12:12:12+05:30" as the version identifier.

NOTE 2 The property is void, if the spatial data set does not distinguish between different versions of the spatial object. It is missing, if the spatial object type does not support any life-cycle information.</documentation>
        </annotation>
        <complexType>
          <simpleContent>
            <extension base="string">
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </extension>
          </simpleContent>
        </complexType>
      </element>
    </sequence>
  </complexType>
  <complexType name="IdentifierPropertyType">
    <sequence>
      <element ref="base:Identifier"/>
    </sequence>
  </complexType>
  <element name="SpatialDataSet" substitutionGroup="gml:AbstractFeature" type="base:SpatialDataSetType">
    <annotation>
      <documentation>-- Definition --
Identifiable collection of spatial data.

-- Description --
NOTE The type SpatialDataSet is offered as a pre-defined type for spatial data sets. INSPIRE application schemas may specify their own spatial data set types. It specifies three properties: an external object identifier, a container for metadata (may be void), and an association to zero or more spatial objects.</documentation>
    </annotation>
  </element>
  <complexType name="SpatialDataSetType">
    <complexContent>
      <extension base="gml:AbstractFeatureType">
        <sequence>
          <element name="identifier" type="base:IdentifierPropertyType">
            <annotation>
              <documentation>-- Definition --
Identifier of the spatial data set.</documentation>
            </annotation>
          </element>
          <element name="metadata" nillable="true">
            <annotation>
              <documentation>-- Definition --
Metadata of the spatial data set.</documentation>
            </annotation>
            <complexType>
              <complexContent>
                <extension base="gml:AbstractMetadataPropertyType">
                  <sequence minOccurs="0">
                    <element ref="gmd:MD_Metadata"/>
                  </sequence>
                  <attributeGroup ref="gml:AssociationAttributeGroup"/>
                </extension>
              </complexContent>
            </complexType>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="member" type="gml:FeaturePropertyType">
            <annotation>
              <documentation>The spatial objects that are members of the spatial data set</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">null:AbstractFeature</targetElement>
              </appinfo>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="SpatialDataSetPropertyType">
    <sequence minOccurs="0">
      <element ref="base:SpatialDataSet"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);





    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 309;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (309, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/base2/1.0/basetypes2.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 309 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as basetypes2_base2_1_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:ad="urn:x-inspire:specification:gmlas:Addresses:3.0" xmlns:base2="http://inspire.ec.europa.eu/schemas/base2/1.0" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:sc="http://www.interactive-instruments.de/ShapeChange/AppInfo" targetNamespace="http://inspire.ec.europa.eu/schemas/base2/1.0" elementFormDefault="qualified" version="1.0">
	<annotation>
		<documentation>-- Definition --
schema for additional basic types used by multiple themes

-- Description --
NOTE	The additional types specified with Annex II/III data specifications are placed in a separate schema to maintain backwards compatibility.</documentation>
	</annotation>
	<import namespace="http://www.interactive-instruments.de/ShapeChange/AppInfo" schemaLocation="http://portele.de/ShapeChangeAppinfo.xsd"/>
	<import namespace="http://www.isotc211.org/2005/gmd" schemaLocation="http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<import namespace="urn:x-inspire:specification:gmlas:Addresses:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/ad/3.0/Addresses.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="OfficialJournalInformation" type="base2:OfficialJournalInformationType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
official journal information

-- Definition --
Full citation of the location of the legislative instrument within the official journal.</documentation>
		</annotation>
	</element>
	<complexType name="OfficialJournalInformationType">
		<sequence>
			<element name="officialJournalIdentification" type="string">
				<annotation>
					<documentation>-- Name --
official journal identification

-- Definition --
Reference to the location within the official journal within which the legislative instrument was published. This reference shall be comprised of three parts:
- the title of the official journal;
- the volume and/or series number;
- Page number(s);

-- Description --
EXAMPLE: Official Journal of European Union (OJEU), L108, Volume 50, 1-14</documentation>
				</annotation>
			</element>
			<element name="ISSN" type="string" minOccurs="0">
				<annotation>
					<documentation>-- Name --
ISSN

-- Definition --
The International Standard Serial Number (ISSN) is an eight-digit number that identifies the periodical publication in which the legislative instrument was published.

-- Description --
NOTE: Periodical publilcations are issued in successive parts, usually having numerical or chronological designations and required that each serial publication can be uniquely identified.

EXAMPLE: OJ Series in which INSPIRE Directive is published has been assigned the ISSN: 1725-2555</documentation>
				</annotation>
			</element>
			<element name="ISBN" type="string" minOccurs="0">
				<annotation>
					<documentation>-- Name --
ISBN

-- Definition --
International Standard Book Number (ISBN) is an nine-digit number that uniquely identifies the book in which the legislative instrument was published.</documentation>
				</annotation>
			</element>
			<element name="linkToJournal" type="anyURI" minOccurs="0">
				<annotation>
					<documentation>-- Name --
link to online version

-- Definition --
Link to an online version of the official journal</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="OfficialJournalInformationPropertyType">
		<sequence>
			<element ref="base2:OfficialJournalInformation"/>
		</sequence>
	</complexType>
	<element name="LegislationCitation" type="base2:LegislationCitationType" substitutionGroup="base2:DocumentCitation">
		<annotation>
			<documentation>-- Name --
legislation citation

-- Definition --
Citation for the purposes of unambiguously referencing a legal act or a specific part of a legal act.</documentation>
		</annotation>
	</element>
	<complexType name="LegislationCitationType">
		<complexContent>
			<extension base="base2:DocumentCitationType">
				<sequence>
					<element name="identificationNumber" type="string" minOccurs="0">
						<annotation>
							<documentation>-- Name --
identification number

-- Definition --
Code used to identify the legislative instrument

-- Description --

EXAMPLE 1: 2007/2/EC is the identification number for the INSPIRE Directive

EXAMPLE 2: 2008/50/EC is the identification number for the CAFE Directive

EXAMPLE 3: 2000/60/EC is the identification number for the  Water Framework Directive</documentation>
						</annotation>
					</element>
					<element name="officialDocumentNumber" type="string" minOccurs="0">
						<annotation>
							<documentation>-- Name --
official document number

-- Definition --
Official document number used to uniquely identify the legislative instrument.

-- Description --
NOTE: An official document number may be assigned to uniquely identify the legislative instrument.

EXAMPLE: CELEX Number used to uniquely identify European Union Legislation</documentation>
						</annotation>
					</element>
					<element name="dateEnteredIntoForce" type="gml:TimePositionType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
date entered into force

-- Definition --
Date the legislative instrument entered into force.</documentation>
						</annotation>
					</element>
					<element name="dateRepealed" type="gml:TimePositionType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
date repealed

-- Definition --
Date the legislative instrument was repealed.</documentation>
						</annotation>
					</element>
					<element name="level" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Name --
name

-- Definition --
The level at which the legislative instrument is adopted.</documentation>
						</annotation>
					</element>
					<element name="journalCitation" type="base2:OfficialJournalInformationPropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
journal citation

-- Definition --
Citation of the official journal in which the legislation is published.</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="LegislationCitationPropertyType">
		<sequence minOccurs="0">
			<element ref="base2:LegislationCitation"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="Contact" type="base2:ContactType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
contact

-- Definition --
Communication channels by which it is possible to gain access to someone or something.

-- Description --</documentation>
		</annotation>
	</element>
	<complexType name="ContactType">
		<sequence>
			<element name="address" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Definition --
An address provided as free text.</documentation>
				</annotation>
				<complexType>
					<sequence>
						<element ref="ad:AddressRepresentation"/>
					</sequence>
					<attribute name="nilReason" type="gml:NilReasonType"/>
				</complexType>
			</element>
			<element name="contactInstructions" type="gmd:PT_FreeText_PropertyType" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Definition --
Supplementary instructions on how or when to contact an individual or organisation.


-- Description --</documentation>
				</annotation>
			</element>
			<element name="electronicMailAddress" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Definition --
An address of the organisation''s or individual''s electronic mailbox.

-- Description --</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="string">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
			<element name="hoursOfService" type="gmd:PT_FreeText_PropertyType" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Definition --
Periods of time when the organisation or individual can be contacted.

-- Description --</documentation>
				</annotation>
			</element>
			<element name="telephoneFacsimile" nillable="true" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Definition --
Number of a facsimile machine of the organisation or individual.

-- Description --</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="string">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
			<element name="telephoneVoice" nillable="true" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Definition --
Telephone number of the organisation or individual.

-- Description --</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="string">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
			<element name="website" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Definition --
Pages provided on the World Wide Web by the organisation or individual.

-- Description --</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="anyURI">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
		</sequence>
	</complexType>
	<complexType name="ContactPropertyType">
		<sequence>
			<element ref="base2:Contact"/>
		</sequence>
	</complexType>
	<element name="RelatedParty" type="base2:RelatedPartyType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
related party

-- Definition --
An organisation or a person with a role related to a resource.

-- Description --
NOTE 1 A party, typically an individual person, acting as a general point of contact for a resource can be specified without providing any particular role.</documentation>
		</annotation>
	</element>
	<complexType name="RelatedPartyType">
		<sequence>
			<element name="individualName" type="gmd:PT_FreeText_PropertyType" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Name --
individual name

-- Definition --
Name of the related person.</documentation>
				</annotation>
			</element>
			<element name="organisationName" type="gmd:PT_FreeText_PropertyType" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Name --
organisation name

-- Definition --
Name of the related organisation.</documentation>
				</annotation>
			</element>
			<element name="positionName" type="gmd:PT_FreeText_PropertyType" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Name --
position name

-- Definition --
Position of the party in relation to a resource, such as head of department.</documentation>
				</annotation>
			</element>
			<element name="contact" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Name --
contact

-- Definition --
Contact information for the related party.</documentation>
				</annotation>
				<complexType>
					<sequence>
						<element ref="base2:Contact"/>
					</sequence>
					<attribute name="nilReason" type="gml:NilReasonType"/>
				</complexType>
			</element>
			<element name="role" type="gml:ReferenceType" nillable="true" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Definition --
Role(s) of the party in relation to a resource, such as owner.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">TG</taggedValue>
					</appinfo>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="RelatedPartyPropertyType">
		<sequence>
			<element ref="base2:RelatedParty"/>
		</sequence>
	</complexType>
	<element name="DocumentCitation" type="base2:DocumentCitationType" substitutionGroup="gml:AbstractGML">
		<annotation>
			<documentation>-- Name --
document citation

-- Definition --
Citation for the purposes of unambiguously referencing a document.</documentation>
		</annotation>
	</element>
	<complexType name="DocumentCitationType">
		<complexContent>
			<extension base="gml:AbstractGMLType">
				<sequence>
					<element name="name" type="string">
						<annotation>
							<documentation>-- Name --
name

-- Definition --
Name of the document.

-- Description --
NOTE	For legal documents, this should be the official name assigned to the legislative instrument.

EXAMPLE The official legal name for the INSPIRE Directive is "Directive 2007/2/EC of the European Parliament and of the Council of 14 March 2007 establishing an Infrastructure for Spatial Information in the European Community (INSPIRE)"</documentation>
						</annotation>
					</element>
					<element name="shortName" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
short name

-- Definition --
Short name or alternative title of the document.

-- Description --
NOTE	For legal documents, this should be a short name or alternative title commonly used to identify the legislation.

EXAMPLE 1: INSPIRE Directive is the short name for "Directive 2007/2/EC of the European Parliament and of the Council of 14 March 2007 establishing an Infrastructure for Spatial Information in the European Community (INSPIRE)"

EXAMPLE 2: CAFE Directive is the short name for the Directive 2008/50/EC of the European Parliament and of the Council of 21 May 2008 on ambient air quality and cleaner air for Europe" 

EXAMPLE  3: Water Framework Directive the short name for "Directive 2000/60/EC of the European Parliament and of the Council establishing a framework for the Community action in the field of water policy"</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="string">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="date" nillable="true">
						<annotation>
							<documentation>-- Name --
date

-- Definition --
Date of creation, publication or revision of the document.</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMetadataPropertyType">
									<sequence>
										<element ref="gmd:CI_Date"/>
									</sequence>
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="link" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
link to online version

-- Definition --
Link to an online version of the document</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="anyURI">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="specificReference" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
specific reference

-- Definition --
Reference to a specific part of the document.

-- Description --
EXAMPLE For legal documents, this attribute can contain a reference to article(s) that specify a specific requirement or obligation.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="string">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="DocumentCitationPropertyType">
		<sequence minOccurs="0">
			<element ref="base2:DocumentCitation"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="ThematicIdentifier" type="base2:ThematicIdentifierType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
thematic identifier

-- Definition --
Thematic identifier to uniquely identify the spatial object. 

-- Description --
Some spatial objects may be assigned multiple unique identifiers. 
These may have been established to meet data exchange requirements of different reporting obligations at International, European or national levels and/or internal data maintenance requirements.</documentation>
		</annotation>
	</element>
	<complexType name="ThematicIdentifierType">
		<sequence>
			<element name="identifier" type="string">
				<annotation>
					<documentation>-- Name --
identifier

-- Definition --
Unique identifier used to identify the spatial object within the specified identification scheme.</documentation>
				</annotation>
			</element>
			<element name="identifierScheme" type="string">
				<annotation>
					<documentation>-- Name --
identifier scheme

-- Definition --
Identifier defining the scheme used to assign the identifier.

-- Description --
NOTE 1: Reporting requirements for different environmental legislation mandate that each spatial object is assigned an identifier conforming to specific lexical rules. 

NOTE 2: These rules are often inconsistent so a spatial object may be assigned multiple identifiers which are used for object referencing to link information to the spatial object.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="ThematicIdentifierPropertyType">
		<sequence>
			<element ref="base2:ThematicIdentifier"/>
		</sequence>
	</complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 310;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (310, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/br/3.0/bio_geographicalregions.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 310 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as bio_geographicalregions_br_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:br="http://inspire.ec.europa.eu/schemas/br/3.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:sc="http://www.interactive-instruments.de/ShapeChange/AppInfo" targetNamespace="http://inspire.ec.europa.eu/schemas/br/3.0" elementFormDefault="qualified" version="3.0">
	<annotation>
		<documentation>Application schema for Bio-geographical Regions</documentation>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/base/3.3" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd"/>
	<import namespace="http://www.interactive-instruments.de/ShapeChange/AppInfo" schemaLocation="http://portele.de/ShapeChangeAppinfo.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="Bio-geographicalRegion" type="br:Bio-geographicalRegionType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
bio-geographical region

-- Definition --
An area in which there are relatively homogeneous ecological conditions with common characteristics. 

-- Description --
EXAMPLE Europe is divided into eleven broad bio-geographical terrestrial zones and 5 zones for marine bio-geographical regions. 

NOTE The marine regions are used in the context of Natura2000 due to practical / technical reasons only; they do not have any legal status in contrast to the "terrestrial" Bio-geographical Regions.</documentation>
		</annotation>
	</element>
	<complexType name="Bio-geographicalRegionType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
inspire id

-- Definition --
External object identifier of the spatial object.

-- Description --
An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="geometry" type="gml:MultiSurfacePropertyType">
						<annotation>
							<documentation>-- Name --
geometry

-- Definition --
The geometry defining the ecological region.</documentation>
						</annotation>
					</element>
					<element name="regionClassification" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Name --
region classification

-- Definition --
Regionclass code, according to a classification scheme.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">technicalGuidance</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="regionClassificationScheme" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Name --
region classification scheme

-- Definition --
Classification scheme used for classifying regions.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">technicalGuidance</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="regionClassificationLevel" type="gml:ReferenceType" nillable="true">
						<annotation>
							<documentation>-- Name --
region classification level

-- Definition --
The classification level of the region class.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="beginLifespanVersion" nillable="true">
						<annotation>
							<documentation>-- Name --
begin lifespan version

-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="endLifespanVersion" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
end lifespan version

-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="Bio-geographicalRegionPropertyType">
		<sequence minOccurs="0">
			<element ref="br:Bio-geographicalRegion"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 311;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (311, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/bu-base/3.0/buildingsbase.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 311 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as buildingsbase_bu_base_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:bu-base="http://inspire.ec.europa.eu/schemas/bu-base/3.0" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:gn="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" xmlns:sc="http://www.interactive-instruments.de/ShapeChange/AppInfo" targetNamespace="http://inspire.ec.europa.eu/schemas/bu-base/3.0" elementFormDefault="qualified" version="3.0">
	<annotation>
		<documentation>-- Name --
Building base

-- Definition --
The base application schema for INSPIRE theme buildings.</documentation>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/base/3.3" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd"/>
	<import namespace="http://www.interactive-instruments.de/ShapeChange/AppInfo" schemaLocation="http://portele.de/ShapeChangeAppinfo.xsd"/>
	<import namespace="http://www.isotc211.org/2005/gmd" schemaLocation="http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<import namespace="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/gn/3.0/GeographicalNames.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="Building" type="bu-base:BuildingType" abstract="true" substitutionGroup="bu-base:AbstractBuilding">
		<annotation>
			<documentation>-- Name --
Building

-- Definition --
A Building is an enclosed '||'&'||'lt;b'||'&'||'gt;construction '||'&'||'lt;/b'||'&'||'gt;above and/or underground, used or intended for the shelter of humans, animals or things or for the production of economic goods. A building refers to any structure permanently constructed or erected on its site.</documentation>
		</annotation>
	</element>
	<complexType name="BuildingType" abstract="true">
		<complexContent>
			<extension base="bu-base:AbstractBuildingType">
				<sequence>
					<element name="parts" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
The building parts composing the Building.
-- Description --
A building may be a simple building (with no BuildingPart) or a composed building (with several BuildingParts).</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="bu-base:BuildingPart"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="BuildingPropertyType">
		<sequence minOccurs="0">
			<element ref="bu-base:Building"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="AbstractConstruction" type="bu-base:AbstractConstructionType" abstract="true" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
Abstract construction

-- Definition --
Abstract spatial object type grouping the semantic properties of  buildings, building parts and of some optional spatial object types that may be added in order to provide more information about the theme Buildings.

-- Description --
The optional spatial object types that may be added to core profiles are described in the extended profiles. The ones inheriting from the attributes of AbstractConstruction are Installation and OtherConstruction.</documentation>
		</annotation>
	</element>
	<complexType name="AbstractConstructionType" abstract="true">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="beginLifespanVersion" nillable="true">
						<annotation>
							<documentation>-- Name --
Begin lifespan version

-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="conditionOfConstruction" type="gml:ReferenceType" nillable="true">
						<annotation>
							<documentation>-- Name --
Condition of construction

-- Definition --
Status of the construction.

-- Description --
EXAMPLES: functional, projected, ruin</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="dateOfConstruction" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
Date of construction

-- Definition --
Date of construction.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="bu-base:DateOfEvent"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="dateOfDemolition" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
Date of demolition

-- Definition --
Date of demolition.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="bu-base:DateOfEvent"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="dateOfRenovation" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
Date of last major renovation

-- Definition --
Date of last major renovation.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="bu-base:DateOfEvent"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="elevation" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
Elevation

-- Definition --
Vertically-constrained dimensional property consisting of an absolute measure referenced to a well-defined surface which is commonly taken as origin (geoid, water level, etc.).
-- Description --
Source: adapted from the definition given in the data specification of the theme Elevation.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="bu-base:Elevation"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="endLifespanVersion" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
End lifespan version

-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="externalReference" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
External reference

-- Definition --
Reference to an external information system containing any piece of information related to the spatial object.

-- Description --

EXAMPLE 1: Reference to another spatial data set containing another view on buildings; the externalReference may be used for instance to ensure consistency between 2D and 3D representations of the same buildings

EXAMPLE 2: Reference to cadastral or dwelling register. The reference to this register may enable to find legal information related to the building, such as the owner(s) or valuation criteria (e.g. type of heating, toilet, kitchen)

EXAMPLE 3: Reference to the system recording the building permits. The reference to the building permits may be used to find detailed information about the building physical and temporal aspects.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="bu-base:ExternalReference"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="heightAboveGround" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
Height above ground

-- Definition --
Height above ground.

-- Description --
NOTE: height above ground may be defined as the difference between elevation at a low reference (ground level) and elevation as a high reference (e.g. roof level, top of construction)</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="bu-base:HeightAboveGround"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Name --
inspire id

-- Definition --
External object identifier of the spatial object.

-- Description --
An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="name" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
Name

-- Definition --
Name of the construction.

-- Description --
EXAMPLES:  Big Ben, Eiffel Tower, Sacrada Familia</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="gn:GeographicalName"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="AbstractConstructionPropertyType">
		<sequence minOccurs="0">
			<element ref="bu-base:AbstractConstruction"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="BuildingGeometry2D" type="bu-base:BuildingGeometry2DType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
Building geometry 2D

-- Definition --
This data types includes the geometry of the building and metadata information about which element of the building was captured and how.</documentation>
		</annotation>
	</element>
	<complexType name="BuildingGeometry2DType">
		<sequence>
			<element name="geometry" type="gml:GeometryPropertyType">
				<annotation>
					<documentation>-- Name --
Geometry

-- Definition --
2D or 2.5D geometric representation</documentation>
				</annotation>
			</element>
			<element name="referenceGeometry" type="boolean">
				<annotation>
					<documentation>-- Name --
Reference geometry

-- Definition --
The geometry to be taken into account by view services, for portrayal.

-- Description --
NOTE 1: In case of multiple representation by point and by surface, it is generally recommended to provide the surface as reference geometry.
NOTE 2: The geometric representation whose referenceGeometry is true may also be used preferably for spatial queries by download services (WFS) or by Geographical Information System (GIS).</documentation>
				</annotation>
			</element>
			<element name="horizontalGeometryReference" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Name --
Horizontal geometry reference

-- Definition --
Element of the building that was captured by (X,Y) coordinates.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="verticalGeometryReference" type="gml:ReferenceType" minOccurs="0">
				<annotation>
					<documentation>-- Name --
Vertical geometry reference

-- Definition --
Element of the building that was captured by vertical coordinates.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="horizontalGeometryEstimatedAccuracy" nillable="true">
				<annotation>
					<documentation>-- Name --
Horizontal geometry estimated accuracy

-- Definition --
The estimated absolute positional accuracy of the (X,Y) coordinates of the building geometry, in the INSPIRE official Coordinate Reference System. Absolute positional accuracy is defined as the mean value of the positional uncertainties for a set of positions where the positional uncertainties are defined as the distance between a measured position and what is considered as the corresponding true position.
-- Description --
NOTE: This mean value may come from quality measures on a homogeneous population of buildings or from an estimation based on the knowledge of the production processes and of their accuracy.</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="gml:LengthType">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
			<element name="verticalGeometryEstimatedAccuracy" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Name --
Vertical geometry estimated accuracy

-- Definition --
The estimated absolute positional accuracy of the Z coordinates of the  building geometry, in the INSPIRE official Coordinate Reference System. Absolute positional accuracy is defined as the mean value of the positional uncertainties for a set of positions where the positional uncertainties are defined as the distance between a measured position and what is considered as the corresponding true position.
-- Description --
NOTE: This mean value may come from quality measures on a homogeneous population of buildings or from an estimation based on the knowledge of the production processes and of their accuracy.</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="gml:LengthType">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
		</sequence>
	</complexType>
	<complexType name="BuildingGeometry2DPropertyType">
		<sequence>
			<element ref="bu-base:BuildingGeometry2D"/>
		</sequence>
	</complexType>
	<element name="BuildingPart" type="bu-base:BuildingPartType" abstract="true" substitutionGroup="bu-base:AbstractBuilding">
		<annotation>
			<documentation>-- Name --
Building part

-- Definition --
A BuildingPart is a sub-division of a Building that might be considered itself as a building.

-- Description --
NOTE 1: A BuildingPart is homogeneous related to its physical, functional or temporal aspects. 

NOTE 2: Building and BuildingPart share the same set of properties.
EXAMPLE: A building may be composed of two building parts having different heights above ground.</documentation>
		</annotation>
	</element>
	<complexType name="BuildingPartType" abstract="true">
		<complexContent>
			<extension base="bu-base:AbstractBuildingType">
				<sequence/>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="BuildingPartPropertyType">
		<sequence minOccurs="0">
			<element ref="bu-base:BuildingPart"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="Elevation" type="bu-base:ElevationType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
Elevation

-- Definition --
This data types includes the elevation value itself  and information on how this elevation was measured.</documentation>
		</annotation>
	</element>
	<complexType name="ElevationType">
		<sequence>
			<element name="elevationReference" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Name --
Elevation reference

-- Definition --
Element where the elevation was measured.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="elevationValue" type="gml:DirectPositionType">
				<annotation>
					<documentation>-- Name --
elevation value

-- Definition --
Value of the elevation.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="ElevationPropertyType">
		<sequence>
			<element ref="bu-base:Elevation"/>
		</sequence>
	</complexType>
	<element name="AbstractBuilding" type="bu-base:AbstractBuildingType" abstract="true" substitutionGroup="bu-base:AbstractConstruction">
		<annotation>
			<documentation>-- Name --
Abstract building

-- Definition --
Abstract spatial object type grouping the common semantic properties of the spatial object types Building and BuildingPart.</documentation>
		</annotation>
	</element>
	<complexType name="AbstractBuildingType" abstract="true">
		<complexContent>
			<extension base="bu-base:AbstractConstructionType">
				<sequence>
					<element name="buildingNature" type="gml:ReferenceType" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
Building nature

-- Definition --
Characteristic of the building that makes it generally of interest for mappings applications. The characteristic may be related to the physical aspect and/or to the function of the building.

-- Description --
This attribute focuses on the physical aspect of the building; however, this physical aspect is often expressed as a function (e.g. stadium, silo, windmill); this attribute aims to fulfil mainly mapping purposes and addresses only specific, noticeable buildings.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="currentUse" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
Current use

-- Definition --
Activity hosted within the building. This attribute addresses mainly the buildings hosting human activities.
-- Description --
NOTE: . This attribute aims to fulfill management requirements, such as computation of population or spatial planning ; this classification aims to be exhaustive for the functional buildings hosting human activities.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
						<complexType>
							<sequence>
								<element ref="bu-base:CurrentUse"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="numberOfDwellings" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
Number of dwellings

-- Definition --
Number of dwellings.

-- Description --
A dwelling is a residential unit which may consist of one or several rooms designed for the occupation of households.
NOTE: In the data sets including building units, a dwelling is a residential building unit or, only when that building has no building units, a residential building'||'&'||'lt;i'||'&'||'gt;.'||'&'||'lt;/i'||'&'||'gt;
EXAMPLES: a single building dwelling could be a detached or semi-detached house.  A block of flats will contain multiple dwellings determined by the number of individual flats.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="integer">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="numberOfBuildingUnits" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
Number of building units

-- Definition --
Number of building units in the building. A BuildingUnit is a subdivision of Building with its own lockable access from the outside or from a common area (i.e. not from another BuildingUnit), which is atomic, functionally independent, and may be separately sold, rented out, inherited, etc.
-- Description --
Building units are spatial objects aimed at subdividing buildings and/or building parts into smaller parts that are treated as seperate entities in daily life. A building unit is homogeneous, regarding management aspects.
EXAMPLES: It may be e.g. an apartment in a condominium, a terraced house, or a shop inside a shopping arcade.
NOTE 1: According to national regulations, a building unit may be a flat, a cellar, a garage or set of a flat, a cellar and a garage.
NOTE 2: According to national regulation, a building that is one entity for daily life (typically, a single family house) may be considered as a Building composed of one BuildingUnit or as a Building composed of zero BuildingUnit.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="integer">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="numberOfFloorsAboveGround" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
Number of floors above ground

-- Definition --
Number of floors above ground.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="integer">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="AbstractBuildingPropertyType">
		<sequence minOccurs="0">
			<element ref="bu-base:AbstractBuilding"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="HeightAboveGround" type="bu-base:HeightAboveGroundType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
Height above ground

-- Definition --
Vertical distance (measured or estimated) between a low reference and a high reference.</documentation>
		</annotation>
	</element>
	<complexType name="HeightAboveGroundType">
		<sequence>
			<element name="heightReference" type="gml:ReferenceType" nillable="true">
				<annotation>
					<documentation>-- Name --
Height reference

-- Definition --
Element used as the high reference.

-- Description --
EXAMPLE: The height of the building has been captured up to the top of building.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="lowReference" type="gml:ReferenceType" nillable="true">
				<annotation>
					<documentation>-- Name --
Low reference

-- Definition --
Element  as the low reference.

-- Description --
EXAMPLE: the height of the building has been captured from its the lowest ground point.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="status" type="gml:ReferenceType" nillable="true">
				<annotation>
					<documentation>-- Name --
Status

-- Definition --
The way the height has been captured.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="value" type="gml:LengthType">
				<annotation>
					<documentation>-- Name --
Value

-- Definition --
Value of the height above ground.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="HeightAboveGroundPropertyType">
		<sequence>
			<element ref="bu-base:HeightAboveGround"/>
		</sequence>
	</complexType>
	<element name="DateOfEvent" type="bu-base:DateOfEventType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
Date of event

-- Definition --
This data type includes the different possible ways to define the date of an event.</documentation>
		</annotation>
	</element>
	<complexType name="DateOfEventType">
		<sequence>
			<element name="anyPoint" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Name --
Any point

-- Definition --
A date and time of any point of the event, between its beginning and its end.</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="dateTime">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
			<element name="beginning" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Name --
Beginning

-- Definition --
Date and time when the event begun.</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="dateTime">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
			<element name="end" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Name --
End

-- Definition --
Date and time when the event ended.</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="dateTime">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
		</sequence>
	</complexType>
	<complexType name="DateOfEventPropertyType">
		<sequence>
			<element ref="bu-base:DateOfEvent"/>
		</sequence>
	</complexType>
	<element name="ExternalReference" type="bu-base:ExternalReferenceType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
External reference

-- Definition --
Reference to an external information system containing any piece of information related to the spatial object.</documentation>
		</annotation>
	</element>
	<complexType name="ExternalReferenceType">
		<sequence>
			<element name="informationSystem" type="anyURI">
				<annotation>
					<documentation>-- Name --
Information system

-- Definition --
Uniform Resource Identifier of the external information system.</documentation>
				</annotation>
			</element>
			<element name="informationSystemName" type="gmd:PT_FreeText_PropertyType">
				<annotation>
					<documentation>-- Name --
Information system name

-- Definition --
The name of the external information system.

-- Description --
EXAMPLES: Danish Register of Dwellings, Spanish Cadastre.</documentation>
				</annotation>
			</element>
			<element name="reference" type="string">
				<annotation>
					<documentation>-- Name --
Reference

-- Definition --
Thematic identifier of the spatial object or of any piece of information related to the spatial object.
-- Description --
NOTE: This reference will act as a foreign key to implement the association between the spatial object in the INSPIRE data set and in the external information system.
EXAMPLE: The cadastral reference of a given building in the national cadastral register.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="ExternalReferencePropertyType">
		<sequence>
			<element ref="bu-base:ExternalReference"/>
		</sequence>
	</complexType>
	<element name="CurrentUse" type="bu-base:CurrentUseType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
Current use

-- Definition --
This data type enables to detail the current use(s).</documentation>
		</annotation>
	</element>
	<complexType name="CurrentUseType">
		<sequence>
			<element name="currentUse" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Name --
Current use

-- Definition --
The current use.

-- Description --
EXAMPLE: trade</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="percentage" nillable="true">
				<annotation>
					<documentation>-- Name --
Percentage

-- Definition --
The proportion of the real world object, given as a percentage, devoted to this current use.
-- Description --
NOTE: The percentage of use is generally the percentage of floor area dedicated to this given use. If it is not the case, it is recommended to explain what the percentage refers to in metadata (template for additional information)
EXAMPLE: 30 (if 30% of the building is occupied by trade activity).</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="integer">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
		</sequence>
	</complexType>
	<complexType name="CurrentUsePropertyType">
		<sequence>
			<element ref="bu-base:CurrentUse"/>
		</sequence>
	</complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);



    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 312;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (312, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/bu-core2d/3.0/buildingscore2d.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 312 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as buildingscore2d_bu_core2d_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:bu-base="http://inspire.ec.europa.eu/schemas/bu-base/3.0" xmlns:bu-core2d="http://inspire.ec.europa.eu/schemas/bu-core2d/3.0" xmlns:gml="http://www.opengis.net/gml/3.2" targetNamespace="http://inspire.ec.europa.eu/schemas/bu-core2d/3.0" elementFormDefault="qualified" version="3.0">
	<annotation>
		<documentation>-- Name --
Building 2D

-- Definition --
The 2D application schema for INSPIRE theme buildings.</documentation>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/bu-base/3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/bu-base/3.0/BuildingsBase.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="Building" type="bu-core2d:BuildingType" substitutionGroup="bu-base:Building">
		<annotation>
			<documentation>-- Name --
Building

-- Definition --
A Building is an enclosed construction above and/or underground, used or intended for the shelter of humans, animals or things or for the production of economic goods. A building refers to any structure permanently constructed or erected on its site.</documentation>
		</annotation>
	</element>
	<complexType name="BuildingType">
		<complexContent>
			<extension base="bu-base:BuildingType">
				<sequence>
					<element name="geometry2D" type="bu-base:BuildingGeometry2DPropertyType">
						<annotation>
							<documentation>-- Name --
Geometry 2D

-- Definition --
2D or 2.5D geometric representation of the building.

-- Description --
'||'&'||'lt;font color="#0f0f0f"'||'&'||'gt;NOTE: Multiple representations of the geometry are possible (e.g. by surface and by point).'||'&'||'lt;/font'||'&'||'gt;</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="BuildingPropertyType">
		<sequence minOccurs="0">
			<element ref="bu-core2d:Building"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="BuildingPart" type="bu-core2d:BuildingPartType" substitutionGroup="bu-base:BuildingPart">
		<annotation>
			<documentation>-- Name --
Building part

-- Definition --
A BuildingPart is a sub-division of a Building that might be considered itself as a building.

-- Description --
NOTE 1: A BuildingPart is homogeneous related to its physical, functional or temporal aspects. 

NOTE 2: Building and BuildingPart share the same set of properties.
EXAMPLE: A building may be composed of two building parts having different heights above ground.</documentation>
		</annotation>
	</element>
	<complexType name="BuildingPartType">
		<complexContent>
			<extension base="bu-base:BuildingPartType">
				<sequence>
					<element name="geometry2D" type="bu-base:BuildingGeometry2DPropertyType" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
Geometry 2D

-- Definition --
'||'&'||'lt;font color="#0f0f0f"'||'&'||'gt;2D or 2.5D geometric representation of the building part.'||'&'||'lt;/font'||'&'||'gt;
'||'&'||'lt;font color="#0f0f0f"'||'&'||'gt;
'||'&'||'lt;/font'||'&'||'gt;'||'&'||'lt;font color="#0f0f0f"'||'&'||'gt;-- Description --'||'&'||'lt;/font'||'&'||'gt;
'||'&'||'lt;font color="#0f0f0f"'||'&'||'gt;NOTE: Multiple representations of the geometry are possible (e.g. by surface and by point).'||'&'||'lt;/font'||'&'||'gt;</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="BuildingPartPropertyType">
		<sequence minOccurs="0">
			<element ref="bu-core2d:BuildingPart"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 313;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (313, empty_clob(), 'INSPIRE', 'http://inspire.jrc.ec.europa.eu/draft-schemas/bu-core3d/3.0/buildingscore3d.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 313 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as buildingscore3d_bu_core3d_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:bu-base="http://inspire.ec.europa.eu/schemas/bu-base/3.0" xmlns:bu-core3d="http://inspire.jrc.ec.europa.eu/draft-schemas/bu-core3d/3.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:sc="http://www.interactive-instruments.de/ShapeChange/AppInfo" targetNamespace="http://inspire.jrc.ec.europa.eu/draft-schemas/bu-core3d/3.0" elementFormDefault="qualified" version="3.0">
	<annotation>
		<documentation>-- Name --
Building 3D

-- Definition --
The 3D application schema for INSPIRE theme buildings.</documentation>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/bu-base/3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/bu-base/3.0/BuildingsBase.xsd"/>
	<import namespace="http://www.interactive-instruments.de/ShapeChange/AppInfo" schemaLocation="http://portele.de/ShapeChangeAppinfo.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="BuildingGeometry3DLoD" type="bu-core3d:BuildingGeometry3DLoDType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
Building geometry 3D LoD

-- Definition --
Data type grouping the 3D geometry of a building or building part and the metadata information attached to this geometry.</documentation>
		</annotation>
	</element>
	<complexType name="BuildingGeometry3DLoDType">
		<sequence>
			<element name="geometryMultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0">
				<annotation>
					<documentation>-- Name --
Geometry multi-surface

-- Definition --
Representation of the outer boundary by a Multi Surface, which may - in contrast to a solid representation - not be topologically clean. In particular, the ground surface may be missing.</documentation>
				</annotation>
			</element>
			<element name="geometrySolid" type="gml:SolidPropertyType" minOccurs="0">
				<annotation>
					<documentation>-- Name --
Geometry solid

-- Definition --
Representation of the outer boundary by a solid.</documentation>
				</annotation>
			</element>
			<element name="terrainIntersection" type="gml:MultiCurvePropertyType" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Name --
Terrain intersection

-- Definition --
Line or multi-line where the spatial object  (Building, BuildingPart, ...) touches the terrain representation.</documentation>
				</annotation>
			</element>
			<element name="verticalGeometryReference3DBottom" type="gml:ReferenceType" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Name --
Vertical geometry reference 3D bottom

-- Definition --
Height level to which the lower height of the model (Z-value of the lower horizontal polygon) refers to. 
-- Description --
EXAMPLE: generalGround, bottomOfConstruction.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="horizontalGeometryEstimatedAccuracy" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Name --
Horizontal geometry estimated accuracy

-- Definition --
The estimated absolute positional accuracy of the (X,Y) coordinates of the geometry, in the INSPIRE official Coordinate Reference System. Absolute positional accuracy is defined as the mean value of the positional uncertainties for a set of positions where the positional uncertainties are defined as the distance between a measured position and what is considered as the corresponding true position.

-- Description --
NOTE: this mean value may come from quality measures on a homogeneous population of buildings or from an estimation based on the knowledge of the production processes and of their accuracy.</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="gml:LengthType">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
			<element name="verticalGeometryEstimatedAccuracy" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Name --
Vertical geometry estimated accuracy

-- Definition --
The estimated absolute positional accuracy of the Z- coordinate of the geometry, in the INSPIRE official Coordinate Reference System. Absolute positional accuracy is defined as the mean value of the positional uncertainties for a set of positions where the positional uncertainties are defined as the distance between a measured position and what is considered as the corresponding true position.

-- Description --
NOTE: this mean value may come from quality measures on a homogeneous population of buildings or from an estimation based on the knowledge of the production processes and of their accuracy.</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="gml:LengthType">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
		</sequence>
	</complexType>
	<complexType name="BuildingGeometry3DLoDPropertyType">
		<sequence>
			<element ref="bu-core3d:BuildingGeometry3DLoD"/>
		</sequence>
	</complexType>
	<element name="Building" type="bu-core3d:BuildingType" substitutionGroup="bu-base:Building">
		<annotation>
			<documentation>-- Name --
Building

-- Definition --
A Building is an enclosed construction above and/or underground, used or intended for the shelter of humans, animals or things or for the production of economic goods. A building refers to any structure permanently constructed or erected on its site.</documentation>
		</annotation>
	</element>
	<complexType name="BuildingType">
		<complexContent>
			<extension base="bu-base:BuildingType">
				<sequence>
					<element name="geometry2D" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
geometry 2D

-- Definition --
'||'&'||'lt;font color="#0f0f0f"'||'&'||'gt;2D or 2.5D geometric representation.'||'&'||'lt;/font'||'&'||'gt;
'||'&'||'lt;font color="#0f0f0f"'||'&'||'gt;
'||'&'||'lt;/font'||'&'||'gt;'||'&'||'lt;font color="#0f0f0f"'||'&'||'gt;-- Description --'||'&'||'lt;/font'||'&'||'gt;
'||'&'||'lt;font color="#0f0f0f"'||'&'||'gt;NOTE: Multiple representations of the geometry are possible (e.g. by surface and by point).'||'&'||'lt;/font'||'&'||'gt;</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="bu-base:BuildingGeometry2D"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="geometry3DLoD1" type="bu-core3d:BuildingGeometry3DLoD1PropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
geometry 3D LoD 1

-- Definition --
3D geometric representation at level of detail (LoD) 1, consisting of the generalized representation of the outer boundary by vertical lateral surfaces and horizontal base polygons.</documentation>
						</annotation>
					</element>
					<element name="geometry3DLoD2" type="bu-core3d:BuildingGeometry3DLoD2PropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
geometry 3D LoD 2

-- Definition --
3D geometric representation at level of detail (LoD) 2, consisting of the generalized representation of the outer boundary by vertical lateral surfaces and a prototypical roof shape or cover (from a defined list of roof shapes)

-- Description --
NOTE: The prototypical roof shapes come from a defined list of roof shapes, in City GML; this list is equivalent to the code list RoofTypeValue, provided in the extended2D profile (without the hyperbolic parabaloidal roof).</documentation>
						</annotation>
					</element>
					<element name="geometry3DLoD3" type="bu-core3d:BuildingGeometry3DLoDPropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
geometry 3D LoD 3

-- Definition --
3D geometric representation at level of detail (LoD) 3, consisting of the detailed representation of the outer boundary (including protrusions, facade elements and window recesses) as well as of the roof shape (including dormers, chimneys).</documentation>
						</annotation>
					</element>
					<element name="geometry3DLoD4" type="bu-core3d:BuildingGeometry3DLoDPropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
geometry 3D LoD 4

-- Definition --
3D geometric representation at level of detail (LoD) 4, consisting of the detailed representation of the outer boundary (including protrusions, facade elements, and window recesses) as well as of the roof shape (including dormers, chimneys).

-- Description --
NOTE: The LoD4 representation  is equivalent to the LoD3 representation in core 3D application schema. The LoD 4 representation is more meaningful in extended 3D application schema, with the optional description of building interior.</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="BuildingPropertyType">
		<sequence minOccurs="0">
			<element ref="bu-core3d:Building"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="BuildingGeometry3DLoD2" type="bu-core3d:BuildingGeometry3DLoD2Type" substitutionGroup="bu-core3d:BuildingGeometry3DLoD">
		<annotation>
			<documentation>-- Name --
Building geometry 3D LoD 2

-- Definition --
Data type grouping the specific metadata attached to the 3D geometry, when provided by a LoD2 representation.</documentation>
		</annotation>
	</element>
	<complexType name="BuildingGeometry3DLoD2Type">
		<complexContent>
			<extension base="bu-core3d:BuildingGeometry3DLoDType">
				<sequence>
					<element name="horizontalGeometryReference" type="gml:ReferenceType" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
Horizontal geometry reference

-- Definition --
Element that was captured by the (X,Y) coordinates of the LoD2 MultiSurface or Solid geometry.
-- Description --
EXAMPLE: footprint, roof edge</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="BuildingGeometry3DLoD2PropertyType">
		<sequence>
			<element ref="bu-core3d:BuildingGeometry3DLoD2"/>
		</sequence>
	</complexType>
	<element name="BuildingGeometry3DLoD1" type="bu-core3d:BuildingGeometry3DLoD1Type" substitutionGroup="bu-core3d:BuildingGeometry3DLoD">
		<annotation>
			<documentation>-- Name --
Building geometry 3D LoD 1

-- Definition --
Data type grouping the specific metadata attached to the 3D geometry, when provided by a LoD 1 representation.</documentation>
		</annotation>
	</element>
	<complexType name="BuildingGeometry3DLoD1Type">
		<complexContent>
			<extension base="bu-core3d:BuildingGeometry3DLoDType">
				<sequence>
					<element name="horizontalGeometryReference" type="gml:ReferenceType" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
Horizontal geometry reference

-- Definition --
Element of the real world object that was captured by the (X,Y) coordinates of the LoD1 Multisurface or Solid geometry.
-- Description --
EXAMPLE: footprint, roof edge</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="verticalGeometryReference3DTop" type="gml:ReferenceType" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
Vertical geometry reference 3D top

-- Definition --
Height level  to which the upper height of the model (Z-value of the upper horizontal polygon) refers to.

-- Description --
EXAMPLE: generalRoof, lowestRoof Edge.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="BuildingGeometry3DLoD1PropertyType">
		<sequence>
			<element ref="bu-core3d:BuildingGeometry3DLoD1"/>
		</sequence>
	</complexType>
	<element name="BuildingPart" type="bu-core3d:BuildingPartType" substitutionGroup="bu-base:BuildingPart">
		<annotation>
			<documentation>-- Name --
Building part

-- Definition --
A BuildingPart is a sub-division of a Building that might be considered itself as a building.
-- Description --
NOTE 1: A building part is homogeneous related to its physical, functional and temporal aspects.

EXAMPLE: A building may be composed of two building parts having different heights above ground.</documentation>
		</annotation>
	</element>
	<complexType name="BuildingPartType">
		<complexContent>
			<extension base="bu-base:BuildingPartType">
				<sequence>
					<element name="geometry2D" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
geometry 2D

-- Definition --
'||'&'||'lt;font color="#0f0f0f"'||'&'||'gt;2D or 2.5D geometric representation.'||'&'||'lt;/font'||'&'||'gt;
'||'&'||'lt;font color="#0f0f0f"'||'&'||'gt;
'||'&'||'lt;/font'||'&'||'gt;'||'&'||'lt;font color="#0f0f0f"'||'&'||'gt;-- Description --'||'&'||'lt;/font'||'&'||'gt;
'||'&'||'lt;font color="#0f0f0f"'||'&'||'gt;NOTE: Multiple representations of the geometry are possible (e.g. by surface and by point).'||'&'||'lt;/font'||'&'||'gt;</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="bu-base:BuildingGeometry2D"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="geometry3DLoD1" type="bu-core3d:BuildingGeometry3DLoD1PropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
geometry 3D LoD 1

-- Definition --
3D geometric representation at level of detail (LoD) 1, consisting of the generalized representation of the outer boundary by vertical lateral surfaces and horizontal base polygons.</documentation>
						</annotation>
					</element>
					<element name="geometry3DLoD2" type="bu-core3d:BuildingGeometry3DLoD2PropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
geometry 3D LoD 2

-- Definition --
3D geometric representation at level of detail (LoD) 2, consisting of the generalized representation of the outer boundary by vertical lateral surfaces and a prototypical roof shape or cover (from a defined list of roof shapes).

NOTE: The prototypical roof shapes come from a defined list of roof shapes, in City GML; this list is equivalent to the code list RoofTypeValue, provided in the extended2D profile (without the hyperbolic parabaloidal roof).</documentation>
						</annotation>
					</element>
					<element name="geometry3DLoD3" type="bu-core3d:BuildingGeometry3DLoDPropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
geometry 3D LoD 3

-- Definition --
3D geometric representation at level of detail (LoD) 3, consisting of the detailed representation of the outer boundary (including protrusions, facade elements and window recesses) as well as of the roof shape (including dormers, chimneys).</documentation>
						</annotation>
					</element>
					<element name="geometry3DLoD4" type="bu-core3d:BuildingGeometry3DLoDPropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
geometry 3D LoD 4

-- Definition --
3D geometric representation at level of detail (LoD) 4, consisting of the detailed representation of the outer boundary (including protrusions, facade elements, and window recesses) as well as of the roof shape (including dormers, chimneys).

-- Description --
NOTE: The LoD4 representation  is equivalent to the LoD3 representation in core 3D application schema. The LoD 4 representation is more meaningful in extended 3D application schema, with the optional description of building interior.</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="BuildingPartPropertyType">
		<sequence minOccurs="0">
			<element ref="bu-core3d:BuildingPart"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 314;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (314, empty_clob(), 'INSPIRE', 'urn:x-inspire:specification:gmlas:Buildings:0.0/buildings.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 314 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as buildings_bu_0_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?><schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:bui="urn:x-inspire:specification:gmlas:Buildings:0.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:tn-a="urn:x-inspire:specification:gmlas:AirTransportNetwork:3.0" elementFormDefault="qualified" targetNamespace="urn:x-inspire:specification:gmlas:Buildings:0.0" version="0.0">
  <import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
  <import namespace="urn:x-inspire:specification:gmlas:AirTransportNetwork:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/tn-a/3.0/AirTransportNetwork.xsd"/>
  <!--XML Schema document created by ShapeChange-->
  <element name="Building" substitutionGroup="gml:AbstractFeature" type="bui:BuildingType">
    <annotation>
      <documentation>-- Definition --
A building is a covered facility, usable for the protection of humans, animals, things or the production of economic goods. A building refers to any structure permanently constructed or erected on its site.</documentation>
    </annotation>
  </element>
  <complexType name="BuildingType">
    <complexContent>
      <extension base="gml:AbstractFeatureType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="BuildingPropertyType">
    <sequence minOccurs="0">
      <element ref="bui:Building"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="ControlTower" substitutionGroup="gml:AbstractFeature" type="bui:ControlTowerType">
    <annotation>
      <documentation>-- Definition --
Aerodrome control tower [Unit.Type=''TWR'' - AIXM5.0].

-- Description --
NOTE Point representing the situation of a Control Tower belonging to an aerodrome (airport/heliport), used to manage aircraft traffic in the runways and nearest airspace to the aerodrome.
</documentation>
    </annotation>
  </element>
  <complexType name="ControlTowerType">
    <complexContent>
      <extension base="gml:AbstractFeatureType">
        <sequence>
          <element name="airportHeliport" nillable="true" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
The aerodrome (airport/heliport) to which the control tower belongs.</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">tn-a:AerodromeNode</targetElement>
                <reversePropertyName xmlns="http://www.opengis.net/gml/3.2">tn-a:controlTowers</reversePropertyName>
              </appinfo>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="ControlTowerPropertyType">
    <sequence minOccurs="0">
      <element ref="bui:ControlTower"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    -- Main XSD
    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 3;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (3, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/common/1.0/common.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 3 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as common_common_1_0.xsd
    -- Needed to separate this xsd into two pieces due to its size>32767.
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://inspire.ec.europa.eu/schemas/common/1.0" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" targetNamespace="http://inspire.ec.europa.eu/schemas/common/1.0" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0.1" jaxb:version="2.0">
<!--
26-APR-2011 1.0.1 Conformity element:
                    Restricted allowed citations to "INSPIRE interoperability of spatial data sets and services", according to the MD regulation,
                    requirements for the conformity element (page 17 of the MD regulation).
                  Inspire Themes:
                    Removed leading blank for German, Bulgarian, Czech and Danish translations
18-FEB-2011 Added types for encoding for Language Elements in Network Services
05-FEB-2011 Added comment to classificationOfSpatialDataService
04-FEB-2011 Renamed codelists as enumerations. No change required in exsiting xml documents.
02-FEB-2011 Refactored originating controlled vocabulary to derive from citation. No change required in exsiting xml documents.
31-JAN-2011 Removed language dependent schema implementations. This is now the top schema file.
-->
	<xs:annotation>
		<xs:appinfo>
			<jaxb:globalBindings typesafeEnumMaxMembers="1000"/>
		</xs:appinfo>
	</xs:annotation>
	<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
	<xs:include schemaLocation="network_common_1_0.xsd"/>
	<!--Load language dependent types-->
	<xs:include schemaLocation="enum_eng_enums.xsd"/>
        <!--xs:include schemaLocation="enums/enum_bul.xsd"/>
	<xs:include schemaLocation="enums/enum_cze.xsd"/>
	<xs:include schemaLocation="enums/enum_dan.xsd"/>
	<xs:include schemaLocation="enums/enum_dut.xsd"/>
	<xs:include schemaLocation="enums/enum_eng.xsd"/>
	<xs:include schemaLocation="enums/enum_est.xsd"/>
	<xs:include schemaLocation="enums/enum_fin.xsd"/>
	<xs:include schemaLocation="enums/enum_fre.xsd"/>
	<xs:include schemaLocation="enums/enum_ger.xsd"/>
	<xs:include schemaLocation="enums/enum_gle.xsd"/>
	<xs:include schemaLocation="enums/enum_gre.xsd"/>
	<xs:include schemaLocation="enums/enum_hun.xsd"/>
	<xs:include schemaLocation="enums/enum_ita.xsd"/>
	<xs:include schemaLocation="enums/enum_lav.xsd"/>
	<xs:include schemaLocation="enums/enum_lit.xsd"/>
	<xs:include schemaLocation="enums/enum_mlt.xsd"/>
	<xs:include schemaLocation="enums/enum_pol.xsd"/>
	<xs:include schemaLocation="enums/enum_por.xsd"/>
	<xs:include schemaLocation="enums/enum_rum.xsd"/>
	<xs:include schemaLocation="enums/enum_slo.xsd"/>
	<xs:include schemaLocation="enums/enum_slv.xsd"/>
	<xs:include schemaLocation="enums/enum_spa.xsd"/>
	<xs:include schemaLocation="enums/enum_swe.xsd"/-->
	<xs:element name="SpatialDataService" type="service"/>
	<xs:element name="SpatialDataSet" type="dataset"/>
	<xs:element name="SpatialDataSetSeries" type="series"/>
	<!--TBD	
	<xs:element name="INSPIREResource" type="resource">
	</xs:element>
-->
	<!--Types-->
	<xs:complexType name="resource" abstract="true">
		<xs:sequence>
			<xs:element name="ResourceTitle" type="notEmptyString"/>
			<xs:element name="ResourceAbstract" type="notEmptyString"/>
			<xs:element name="ResourceType" type="resourceType"/>
			<xs:element name="ResourceLocator" type="resourceLocatorType" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation xml:lang="en">Mandatory if a URL is available to obtain more information on
the resource, and/or access related services.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="MandatoryKeyword" type="keyword" minOccurs="1" maxOccurs="unbounded"/>
			<xs:element name="Keyword" type="keyword" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation xml:lang="en">If a resource is a spatial data set or spatial data set series, at least one keyword shall be provided from the general environmental multilingual thesaurus (GEMET) describing the relevant spatial data theme as defined in Annex I, II or III to Directive 2007/2/EC.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="GeographicBoundingBox" type="geographicBoundingBox" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="TemporalReference" type="temporalReference" maxOccurs="unbounded"/>
			<xs:element name="SpatialResolution" type="spatialResolution" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation xml:lang="en">Mandatory when there is a restriction on the spatial resolution for this service.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Conformity" type="conformity" maxOccurs="unbounded"/>
			<xs:element name="ConditionsForAccessAndUse" type="notEmptyString" maxOccurs="unbounded"/>
			<xs:element name="LimitationsOnPublicAccess" type="notEmptyString" maxOccurs="unbounded"/>
			<xs:element name="ResponsibleOrganisation" type="responsibleOrganisation" maxOccurs="unbounded"/>
			<xs:element name="MetadataPointOfContact" type="metadataPointOfContact" maxOccurs="unbounded"/>
			<xs:element name="MetadataDate" type="iso8601Date"/>
			<xs:element name="MetadataLanguage" type="euLanguageISO6392B"/>
		</xs:sequence>
		<xs:attribute ref="xml:lang"/>
	</xs:complexType>
	<xs:complexType name="data" abstract="true">
		<xs:complexContent>
			<xs:extension base="resource">
				<xs:sequence>
					<xs:element name="UniqueResourceIdentifier" type="uniqueResourceIdentifier" minOccurs="1" maxOccurs="unbounded"/>
					<xs:element name="ResourceLanguage" type="languageISO6392B" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">Mandatory if the resource includes textual information.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="TopicCategory" type="topicCategory" maxOccurs="unbounded"/>
					<xs:element name="Lineage" type="notEmptyString"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="dataset">
		<xs:complexContent>
			<xs:restriction base="data">
				<xs:sequence>
					<xs:element name="ResourceTitle" type="notEmptyString"/>
					<xs:element name="ResourceAbstract" type="notEmptyString"/>
					<xs:element name="ResourceType">
						<xs:simpleType>
							<xs:restriction base="resourceType">
								<xs:enumeration value="dataset"/>
							</xs:restriction>
						</xs:simpleType>
					</xs:element>
					<xs:element name="ResourceLocator" type="resourceLocatorType" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">Mandatory if a URL is available to obtain more information on
the resource, and/or access related services.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="MandatoryKeyword" type="inspireTheme" minOccurs="1" maxOccurs="unbounded"/>
					<xs:element name="Keyword" type="keyword" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">If a resource is a spatial data set or spatial data set series, at least one keyword shall be provided from the general environmental multilingual thesaurus (GEMET) describing the relevant spatial data theme as defined in Annex I, II or III to Directive 2007/2/EC.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="GeographicBoundingBox" type="geographicBoundingBox" maxOccurs="unbounded"/>
					<xs:element name="TemporalReference" type="temporalReference" maxOccurs="unbounded"/>
					<xs:element name="SpatialResolution" type="spatialResolution" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">Mandatory when there is a restriction on the spatial resolution for this service.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="Conformity" type="conformity" maxOccurs="unbounded"/>
					<xs:element name="ConditionsForAccessAndUse" type="notEmptyString" maxOccurs="unbounded"/>
					<xs:element name="LimitationsOnPublicAccess" type="notEmptyString" maxOccurs="unbounded"/>
					<xs:element name="ResponsibleOrganisation" type="responsibleOrganisation" maxOccurs="unbounded"/>
					<xs:element name="MetadataPointOfContact" type="metadataPointOfContact" maxOccurs="unbounded"/>
					<xs:element name="MetadataDate" type="iso8601Date"/>
					<xs:element name="MetadataLanguage" type="euLanguageISO6392B"/>
					<xs:element name="UniqueResourceIdentifier" type="uniqueResourceIdentifier" minOccurs="1" maxOccurs="unbounded"/>
					<xs:element name="ResourceLanguage" type="languageISO6392B" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">Mandatory if the resource includes textual information.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="TopicCategory" type="topicCategory" maxOccurs="unbounded"/>
					<xs:element name="Lineage" type="notEmptyString"/>
				</xs:sequence>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="series">
		<xs:complexContent>
			<xs:restriction base="data">
				<xs:sequence>
					<xs:element name="ResourceTitle" type="notEmptyString"/>
					<xs:element name="ResourceAbstract" type="notEmptyString"/>
					<xs:element name="ResourceType">
						<xs:simpleType>
							<xs:restriction base="resourceType">
								<xs:enumeration value="series"/>
							</xs:restriction>
						</xs:simpleType>
					</xs:element>
					<xs:element name="ResourceLocator" type="resourceLocatorType" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">Mandatory if a URL is available to obtain more information on
the resource, and/or access related services.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="MandatoryKeyword" type="inspireTheme" minOccurs="1" maxOccurs="unbounded"/>
					<xs:element name="Keyword" type="keyword" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">If a resource is a spatial data set or spatial data set series, at least one keyword shall be provided from the general environmental multilingual thesaurus (GEMET) describing the relevant spatial data theme as defined in Annex I, II or III to Directive 2007/2/EC.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="GeographicBoundingBox" type="geographicBoundingBox" maxOccurs="unbounded"/>
					<xs:element name="TemporalReference" type="temporalReference" maxOccurs="unbounded"/>
					<xs:element name="SpatialResolution" type="spatialResolution" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">Mandatory when there is a restriction on the spatial resolution for this service.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="Conformity" type="conformity" maxOccurs="unbounded"/>
					<xs:element name="ConditionsForAccessAndUse" type="notEmptyString" maxOccurs="unbounded"/>
					<xs:element name="LimitationsOnPublicAccess" type="notEmptyString" maxOccurs="unbounded"/>
					<xs:element name="ResponsibleOrganisation" type="responsibleOrganisation" maxOccurs="unbounded"/>
					<xs:element name="MetadataPointOfContact" type="metadataPointOfContact" maxOccurs="unbounded"/>
					<xs:element name="MetadataDate" type="iso8601Date"/>
					<xs:element name="MetadataLanguage" type="euLanguageISO6392B"/>
					<xs:element name="UniqueResourceIdentifier" type="uniqueResourceIdentifier" minOccurs="1" maxOccurs="unbounded"/>
					<xs:element name="ResourceLanguage" type="languageISO6392B" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">Mandatory if the resource includes textual information.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="TopicCategory" type="topicCategory" maxOccurs="unbounded"/>
					<xs:element name="Lineage" type="notEmptyString"/>
				</xs:sequence>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<!--Service-->
	<xs:complexType name="service_ext" abstract="true">
		<xs:complexContent>
			<xs:extension base="resource">
				<xs:sequence>
					<xs:element name="CoupledResource" type="uniqueResourceIdentifier" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">Mandatory if linkage to data sets on which the service operates are available.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="SpatialDataServiceType" type="spatialDataServiceType"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="service">
		<xs:complexContent>
			<xs:restriction base="service_ext">
				<xs:sequence>
					<xs:element name="ResourceTitle" type="notEmptyString"/>
					<xs:element name="ResourceAbstract" type="notEmptyString"/>
					<xs:element name="ResourceType" type="serviceSpatialDataResourceType"/>
					<xs:element name="ResourceLocator" type="resourceLocatorType" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">Mandatory if linkage to the service is available</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="MandatoryKeyword" type="classificationOfSpatialDataService" minOccurs="1" maxOccurs="unbounded"/>
					<xs:element name="Keyword" type="keyword" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">If the resource is a spatial data service, at least one keyword from Part D.4 shall be provided.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="GeographicBoundingBox" type="geographicBoundingBox" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">Mandatory for services with an explicit geographic extent.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="TemporalReference" type="temporalReference" maxOccurs="unbounded"/>
					<xs:element name="SpatialResolution" type="spatialResolution" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">Mandatory when there is a restriction on the spatial resolution for this service.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="Conformity" type="conformity" maxOccurs="unbounded"/>
					<xs:element name="ConditionsForAccessAndUse" type="notEmptyString" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation>The element must have values. If no conditions apply to the access and use of the resource, "no conditions apply" 
shall be used. If conditions are unknown, "conditions unknown" shall be used.
			</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="LimitationsOnPublicAccess" type="notEmptyString" maxOccurs="unbounded"/>
					<xs:element name="ResponsibleOrganisation" type="responsibleOrganisation" maxOccurs="unbounded"/>
					<xs:element name="MetadataPointOfContact" type="metadataPointOfContact" maxOccurs="unbounded"/>
					<xs:element name="MetadataDate" type="iso8601Date"/>
					<xs:element name="MetadataLanguage" type="euLanguageISO6392B"/>
					<xs:element name="CoupledResource" type="uniqueResourceIdentifier" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">Mandatory if linkage to data sets on which the service operates are available.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="SpatialDataServiceType" type="spatialDataServiceType"/>
				</xs:sequence>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<!--Shared types-->
	<xs:element name="SpatialDataServiceType" type="spatialDataServiceType"/>
	<xs:simpleType name="serviceSpatialDataResourceType">
		<xs:restriction base="resourceType">
			<xs:enumeration value="service"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="viewSpatialDataServiceType">
		<xs:restriction base="spatialDataServiceType">
			<xs:enumeration value="view"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="discoverySpatialDataServiceType">
		<xs:restriction base="spatialDataServiceType">
			<xs:enumeration value="discovery"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="transformationSpatialDataServiceType">
		<xs:restriction base="spatialDataServiceType">
			<xs:enumeration value="transformation"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="invokeSpatialDataServiceType">
		<xs:restriction base="spatialDataServiceType">
			<xs:enumeration value="invoke"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="otherSpatialDataServiceType">
		<xs:restriction base="spatialDataServiceType">
			<xs:enumeration value="other"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:complexType name="metadataPointOfContact">
		<xs:sequence>
			<xs:element name="OrganisationName" type="xs:string"/>
			<xs:element name="EmailAddress" type="emailType"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="responsibleOrganisation">
		<xs:sequence>
			<xs:element name="ResponsibleParty">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="OrganisationName" type="notEmptyString"/>
						<xs:element name="EmailAddress" type="emailType"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="ResponsiblePartyRole" type="responsiblePartyRole"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="citation">
		<xs:sequence>
			<xs:element name="Title" type="notEmptyString"/>
			<xs:choice>
				<xs:element name="DateOfPublication" type="iso8601Date"/>
				<xs:element name="DateOfCreation" type="iso8601Date"/>
				<xs:element name="DateOfLastRevision" type="iso8601Date"/>
			</xs:choice>
			<xs:element name="URI" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>One or more Documentation URIs if available</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="ResourceLocator" type="resourceLocatorType" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>One or more URLs if available</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="citationConformity">
		<xs:complexContent>
			<xs:restriction base="citation">
				<xs:sequence>
					<xs:element name="Title" type="notEmptyString"/>
					<xs:choice>
						<xs:element name="DateOfPublication" type="iso8601Date"/>
						<xs:element name="DateOfCreation" type="iso8601Date"/>
						<xs:element name="DateOfLastRevision" type="iso8601Date"/>
					</xs:choice>
					<xs:element name="URI" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation>One or more Documentation URIs if available</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="ResourceLocator" type="resourceLocatorType" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation>One or more URLs if available</xs:documentation>
						</xs:annotation>
					</xs:element>
				</xs:sequence>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="conformity">
		<xs:sequence>
			<xs:element name="Specification" type="citationConformity"/>
			<xs:element name="Degree" type="degreeOfConformity"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="originatingControlledVocabulary">
		<xs:complexContent>
			<xs:restriction base="citation">
				<xs:sequence>
					<xs:element name="Title" type="notEmptyString"/>
					<xs:choice>
						<xs:element name="DateOfPublication" type="iso8601Date"/>
						<xs:element name="DateOfCreation" type="iso8601Date"/>
						<xs:element name="DateOfLastRevision" type="iso8601Date"/>
					</xs:choice>
					<xs:element name="URI" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation>One or more Documentation URIs if available</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="ResourceLocator" type="resourceLocatorType" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation>One or more URLs if available</xs:documentation>
						</xs:annotation>
					</xs:element>
				</xs:sequence>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="originatingControlledVocabularyGemetInspireThemes">
		<xs:complexContent>
			<xs:restriction base="originatingControlledVocabulary">
				<xs:sequence>
					<xs:element name="Title">
						<xs:simpleType>
							<xs:restriction base="notEmptyString">
								<xs:enumeration value="GEMET - INSPIRE themes"/>
							</xs:restriction>
						</xs:simpleType>
					</xs:element>
					<xs:choice>
						<xs:element name="DateOfPublication">
							<xs:simpleType>
								<xs:restriction base="iso8601Date">
									<xs:enumeration value="2008-06-01"/>
								</xs:restriction>
							</xs:simpleType>
						</xs:element>
					</xs:choice>
				</xs:sequence>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="originatingControlledVocabularyMD">
		<xs:complexContent>
			<xs:restriction base="originatingControlledVocabulary">
				<xs:sequence>
					<xs:element name="Title">
						<xs:simpleType>
							<xs:restriction base="notEmptyString">
								<xs:enumeration value="GEMET - INSPIRE themes"/>
							</xs:restriction>
						</xs:simpleType>
					</xs:element>
					<xs:choice>
						<xs:element name="DateOfPublication">
							<xs:simpleType>
								<xs:restriction base="iso8601Date">
									<xs:enumeration value="2008-06-01"/>
								</xs:restriction>
							</xs:simpleType>
						</xs:element>
					</xs:choice>
				</xs:sequence>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="temporalReference">
		<xs:sequence>
			<xs:element name="DateOfCreation" type="iso8601Date" minOccurs="0"/>
			<xs:element name="DateOfLastRevision" type="iso8601Date" minOccurs="0"/>
			<xs:element name="DateOfPublication" type="iso8601Date" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="TemporalExtent" type="temporalExtent" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:element name="TemporalExtentElement" abstract="true"/>
	<xs:element name="IndividualDate" type="iso8601Date" substitutionGroup="TemporalExtentElement"/>
	<xs:element name="IntervalOfDates" substitutionGroup="TemporalExtentElement">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="StartingDate" type="iso8601Date"/>
				<xs:element name="EndDate" type="iso8601Date"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:complexType name="temporalExtent">
		<xs:sequence>
			<xs:element ref="TemporalExtentElement" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:simpleType name="keywordValue">
		<xs:restriction base="notEmptyString"/>
	</xs:simpleType>
	<xs:complexType name="keyword">
		<xs:sequence>
			<xs:element name="OriginatingControlledVocabulary" type="originatingControlledVocabulary" minOccurs="0"/>
			<xs:element name="KeywordValue" type="xs:string"/>
		</xs:sequence>
	</xs:complexType>
	<xs:simpleType name="topicCategory">
		<xs:restriction base="xs:string">
			<xs:enumeration value="farming"/>
			<xs:enumeration value="biota"/>
			<xs:enumeration value="boundaries"/>
			<xs:enumeration value="climatologyMeteorologyAtmosphere"/>
			<xs:enumeration value="economy"/>
			<xs:enumeration value="elevation"/>
			<xs:enumeration value="environment"/>
			<xs:enumeration value="geoscientificInformation"/>
			<xs:enumeration value="health"/>
			<xs:enumeration value="imageryBaseMapsEarthCover"/>
			<xs:enumeration value="intelligenceMilitary"/>
			<xs:enumeration value="inlandWaters"/>
			<xs:enumeration value="location"/>
			<xs:enumeration value="oceans"/>
			<xs:enumeration value="planningCadastre"/>
			<xs:enumeration value="society"/>
			<xs:enumeration value="structure"/>
			<xs:enumeration value="transportation"/>
			<xs:enumeration value="utilitiesCommunication"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:complexType name="classificationOfSpatialDataService">
		<xs:complexContent>
			<xs:restriction base="keyword">
				<xs:sequence>
					<xs:element name="OriginatingControlledVocabulary" type="originatingControlledVocabulary" minOccurs="0" maxOccurs="0">
						<xs:annotation>
							<xs:documentation>The INSPIRE Metadata Regulation for spatial data services requires that a mandatory keyword which comes from a list and not an originating controlled vocabulary. This is also what the INSPIRE Metadata Technical Guidelines implement</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="KeywordValue">
						<xs:simpleType>
							<xs:restriction base="keywordValue">
								<xs:enumeration value="chainDefinitionService"/>
								<xs:enumeration value="comEncodingService"/>
								<xs:enumeration value="comGeographicCompressionService"/>
								<xs:enumeration value="comGeographicFormatConversionService"/>
								<xs:enumeration value="comMessagingService"/>
								<xs:enumeration value="comRemoteFileAndExecutableManagement"/>
								<xs:enumeration value="comService"/>
								<xs:enumeration value="comTransferService"/>
								<xs:enumeration value="humanCatalogueViewer"/>
								<xs:enumeration value="humanChainDefinitionEditor"/>
								<xs:enumeration value="humanFeatureGeneralizationEditor"/>
								<xs:enumeration value="humanGeographicDataStructureViewer"/>
								<xs:enumeration value="humanGeographicFeatureEditor"/>
								<xs:enumeration value="humanGeographicSpreadsheetViewer"/>
								<xs:enumeration value="humanGeographicSymbolEditor"/>
								<xs:enumeration value="humanGeographicViewer"/>
								<xs:enumeration value="humanInteractionService"/>
								<xs:enumeration value="humanServiceEditor"/>
								<xs:enumeration value="humanWorkflowEnactmentManager"/>
								<xs:enumeration value="infoCatalogueService"/>
								<xs:enumeration value="infoCoverageAccessService"/>
								<xs:enumeration value="infoFeatureAccessService"/>
								<xs:enumeration value="infoFeatureTypeService"/>
								<xs:enumeration value="infoGazetteerService"/>
								<xs:enumeration value="infoManagementService"/>
								<xs:enumeration value="infoMapAccessService"/>
								<xs:enumeration value="infoOrderHandlingService"/>
								<xs:enumeration value="infoProductAccessService"/>
								<xs:enumeration value="infoRegistryService"/>
								<xs:enumeration value="infoSensorDescriptionService"/>
								<xs:enumeration value="infoStandingOrderService"/>
								<xs:enumeration value="metadataGeographicAnnotationService"/>
								<xs:enumeration value="metadataProcessingService"/>
								<xs:enumeration value="metadataStatisticalCalculationService"/>
								<xs:enumeration value="spatialCoordinateConversionService"/>
								<xs:enumeration value="spatialCoordinateTransformationService"/>
								<xs:enumeration value="spatialCoverageVectorConversionService"/>
								<xs:enumeration value="spatialDimensionMeasurementService"/>
								<xs:enumeration value="spatialFeatureGeneralizationService"/>
								<xs:enumeration value="spatialFeatureManipulationService"/>
								<xs:enumeration value="spatialFeatureMatchingService"/>
								<xs:enumeration value="spatialImageCoordinateConversionService"/>
								<xs:enumeration value="spatialImageGeometryModelConversionService"/>
								<xs:enumeration value="spatialOrthorectificationService"/>
								<xs:enumeration value="spatialPositioningService"/>
								<xs:enumeration value="spatialProcessingService"/>
								<xs:enumeration value="spatialProximityAnalysisService"/>
								<xs:enumeration value="spatialRectificationService"/>
								<xs:enumeration value="spatialRouteDeterminationService"/>
								<xs:enumeration value="spatialSamplingService"/>
								<xs:enumeration value="spatialSensorGeometryModelAdjustmentService"/>
								<xs:enumeration value="spatialSubsettingService"/>
								<xs:enumeration value="spatialTilingChangeService"/>
								<xs:enumeration value="subscriptionService"/>
								<xs:enumeration value="taskManagementService"/>
								<xs:enumeration value="temporalProcessingService"/>
								<xs:enumeration value="temporalProximityAnalysisService"/>
								<xs:enumeration value="temporalReferenceSystemTransformationService"/>
								<xs:enumeration value="temporalSamplingService"/>
								<xs:enumeration value="temporalSubsettingService"/>
								<xs:enumeration value="thematicChangeDetectionService"/>
								<xs:enumeration value="thematicClassificationService"/>
								<xs:enumeration value="thematicFeatureGeneralizationService"/>
								<xs:enumeration value="thematicGeocodingService"/>
								<xs:enumeration value="thematicGeographicInformationExtractionService"/>
								<xs:enumeration value="thematicGeoparsingService"/>
								<xs:enumeration value="thematicGoparameterCalculationService"/>
								<xs:enumeration value="thematicImageManipulationService"/>
								<xs:enumeration value="thematicImageProcessingService"/>
								<xs:enumeration value="thematicImageSynthesisService"/>
								<xs:enumeration value="thematicImageUnderstandingService"/>
								<xs:enumeration value="thematicMultibandImageManipulationService"/>
								<xs:enumeration value="thematicObjectDetectionService"/>
								<xs:enumeration value="thematicProcessingService"/>
								<xs:enumeration value="thematicReducedResolutionGenerationService"/>
								<xs:enumeration value="thematicSpatialCountingService"/>
								<xs:enumeration value="thematicSubsettingService"/>
								<xs:enumeration value="workflowEnactmentService"/>
							</xs:restriction>
						</xs:simpleType>
					</xs:element>
				</xs:sequence>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<xs:simpleType name="notEmptyString">
		<xs:restriction base="xs:string">
			<xs:minLength value="1"/>
		</xs:restriction>
	</xs:simpleType>';

          
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    
    pos := pos + amt;
    buf :=        
'	<xs:simpleType name="mediaType">
		<xs:annotation>
			<xs:documentation>
	Draft implementation to be refined
	</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:enumeration value="text/plain"/>
			<xs:enumeration value="text/html"/>
			<xs:enumeration value="text/xml"/>
			<xs:enumeration value="application/xml"/>
			<xs:enumeration value="application/json"/>
			<xs:enumeration value="application/pdf"/>
			<xs:enumeration value="application/rdf+xml"/>
			<xs:enumeration value="application/json"/>
			<xs:enumeration value="application/soap+xml"/>
			<xs:enumeration value="application/vnd.eu.europa.ec.inspire.resource+xml">
				<xs:annotation>
					<xs:documentation>Official mime type for INSPIRE Resources</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="application/vnd.google-earth.kml+xml"/>
			<xs:enumeration value="application/vnd.google-earth.kml"/>
			<xs:enumeration value="application/vnd.google-earth.kmx"/>
			<xs:enumeration value="application/vnd.msword"/>
			<xs:enumeration value="application/vnd.ms-excel"/>
			<xs:enumeration value="application/vnd.ms-powerpoint"/>
			<xs:enumeration value="application/vnd.oasis.opendocument.text"/>
			<xs:enumeration value="application/vnd.oasis.opendocument.spreadsheet"/>
			<xs:enumeration value="application/vnd.oasis.opendocument.presentation"/>
			<xs:enumeration value="application/vnd.oasis.opendocument.graphics"/>
			<xs:enumeration value="application/gml+xml">
				<xs:annotation>
					<xs:documentation>Official mime type for OGC GML currently in the registration process of IANA</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="application/vnd.ogc.wms_xml">
				<xs:annotation>
					<xs:documentation>Unofficial mime type for OGC WMS</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="application/vnd.ogc.csw_xml">
				<xs:annotation>
					<xs:documentation>Unofficial mime type for OGC CSW</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="application/vnd.ogc.csw.capabilities.response_xml">
				<xs:annotation>
					<xs:documentation>Unofficial mime type for OGC CSW Capabilities response document</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="application/vnd.ogc.csw.GetRecordByIdResponse_xml">
				<xs:annotation>
					<xs:documentation>Unofficial mime type for OGC CSW Capabilities response document</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="application/vnd.ogc.csw.GetRecordsResponse_xml">
				<xs:annotation>
					<xs:documentation>Unofficial mime type for OGC CSW Capabilities response document</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="application/vnd.ogc.wfs_xml">
				<xs:annotation>
					<xs:documentation>Unofficial mime type for OGC WFS</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="application/vnd.ogc.se_xml">
				<xs:annotation>
					<xs:documentation>Unofficial mime type for OGC Service Exception</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="application/vnd.iso.19139+xml">
				<xs:annotation>
					<xs:documentation>Unofficial mime type for ISO 19139 metadata</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
		</xs:restriction>
	</xs:simpleType>
	<xs:complexType name="resourceLocatorType">
		<xs:annotation>
			<xs:documentation xml:lang="en">Mandatory if a URL is available to obtain more information on
the resource, and/or access related services.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="URL" type="xs:anyURI"/>
			<xs:element name="MediaType" type="mediaType" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:simpleType name="emailType">
		<xs:restriction base="xs:string">
			<xs:pattern value="[^@]+@[^\.]+\..+"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="iso8601Date">
		<xs:restriction base="xs:string">
			<xs:annotation>
				<xs:documentation>Simplified ISO 8601 implementation</xs:documentation>
			</xs:annotation>
			<xs:pattern value="\d{4}-(1[0-2]|0[1-9])-(3[0-1]|0[1-9]|[1-2][0-9])(T(2[0-3]|[0-1][0-9]):([0-5][0-9]):([0-5][0-9])(\.[0-9]+)?)?(Z|([+|-](2[0-3]|[0-1][0-9]):([0-5][0-9]):([0-5][0-9])(\.[0-9])?)?)?">
				<xs:annotation>
					<xs:documentation>YEAR MONTH DAY-----------------------TIME--------------------FRACTIONAL SECONDS---------TIME ZONE</xs:documentation>
				</xs:annotation>
			</xs:pattern>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="resourceType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="dataset"/>
			<xs:enumeration value="series"/>
			<xs:enumeration value="service"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="spatialDataServiceType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="discovery"/>
			<xs:enumeration value="view"/>
			<xs:enumeration value="download"/>
			<xs:enumeration value="transformation"/>
			<xs:enumeration value="invoke"/>
			<xs:enumeration value="other"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="degreeOfConformity">
		<xs:restriction base="xs:string">
			<xs:enumeration value="conformant"/>
			<xs:enumeration value="notConformant"/>
			<xs:enumeration value="notEvaluated"/>
		</xs:restriction>
	</xs:simpleType>
        <xs:simpleType name="euLanguageISO6392B">
		<xs:restriction base="languageISO6392B">
			<xs:enumeration value="bul"/>
			<xs:enumeration value="cze"/>
			<xs:enumeration value="dan"/>
			<xs:enumeration value="dut"/>
			<xs:enumeration value="eng"/>
			<xs:enumeration value="est"/>
			<xs:enumeration value="fin"/>
			<xs:enumeration value="fre"/>
			<xs:enumeration value="ger"/>
			<xs:enumeration value="gre"/>
			<xs:enumeration value="hun"/>
			<xs:enumeration value="gle"/>
			<xs:enumeration value="ita"/>
			<xs:enumeration value="lav"/>
			<xs:enumeration value="lit"/>
			<xs:enumeration value="mlt"/>
			<xs:enumeration value="pol"/>
			<xs:enumeration value="por"/>
			<xs:enumeration value="rum"/>
			<xs:enumeration value="slo"/>
			<xs:enumeration value="slv"/>
			<xs:enumeration value="spa"/>
			<xs:enumeration value="swe"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="languageISO6392B">
		<xs:restriction base="xs:string">
			<xs:enumeration value="aar"/>
			<xs:enumeration value="abk"/>
			<xs:enumeration value="ace"/>
			<xs:enumeration value="ach"/>
			<xs:enumeration value="ada"/>
			<xs:enumeration value="ady"/>
			<xs:enumeration value="afa"/>
			<xs:enumeration value="afh"/>
			<xs:enumeration value="afr"/>
			<xs:enumeration value="ain"/>
			<xs:enumeration value="aka"/>
			<xs:enumeration value="akk"/>
			<xs:enumeration value="alb"/>
			<xs:enumeration value="ale"/>
			<xs:enumeration value="alg"/>
			<xs:enumeration value="alt"/>
			<xs:enumeration value="amh"/>
			<xs:enumeration value="ang"/>
			<xs:enumeration value="anp"/>
			<xs:enumeration value="apa"/>
			<xs:enumeration value="ara"/>
			<xs:enumeration value="arc"/>
			<xs:enumeration value="arg"/>
			<xs:enumeration value="arm"/>
			<xs:enumeration value="arn"/>
			<xs:enumeration value="arp"/>
			<xs:enumeration value="art"/>
			<xs:enumeration value="arw"/>
			<xs:enumeration value="asm"/>
			<xs:enumeration value="ast"/>
			<xs:enumeration value="ath"/>
			<xs:enumeration value="aus"/>
			<xs:enumeration value="ava"/>
			<xs:enumeration value="ave"/>
			<xs:enumeration value="awa"/>
			<xs:enumeration value="aym"/>
			<xs:enumeration value="aze"/>
			<xs:enumeration value="bad"/>
			<xs:enumeration value="bai"/>
			<xs:enumeration value="bak"/>
			<xs:enumeration value="bal"/>
			<xs:enumeration value="bam"/>
			<xs:enumeration value="ban"/>
			<xs:enumeration value="baq"/>
			<xs:enumeration value="bas"/>
			<xs:enumeration value="bat"/>
			<xs:enumeration value="bej"/>
			<xs:enumeration value="bel"/>
			<xs:enumeration value="bem"/>
			<xs:enumeration value="ben"/>
			<xs:enumeration value="ber"/>
			<xs:enumeration value="bho"/>
			<xs:enumeration value="bih"/>
			<xs:enumeration value="bik"/>
			<xs:enumeration value="bin"/>
			<xs:enumeration value="bis"/>
			<xs:enumeration value="bla"/>
			<xs:enumeration value="bnt"/>
			<xs:enumeration value="bos"/>
			<xs:enumeration value="bra"/>
			<xs:enumeration value="bre"/>
			<xs:enumeration value="btk"/>
			<xs:enumeration value="bua"/>
			<xs:enumeration value="bug"/>
			<xs:enumeration value="bul"/>
			<xs:enumeration value="bur"/>
			<xs:enumeration value="byn"/>
			<xs:enumeration value="cad"/>
			<xs:enumeration value="cai"/>
			<xs:enumeration value="car"/>
			<xs:enumeration value="cat"/>
			<xs:enumeration value="cau"/>
			<xs:enumeration value="ceb"/>
			<xs:enumeration value="cel"/>
			<xs:enumeration value="cha"/>
			<xs:enumeration value="chb"/>
			<xs:enumeration value="che"/>
			<xs:enumeration value="chg"/>
			<xs:enumeration value="chi"/>
			<xs:enumeration value="chk"/>
			<xs:enumeration value="chm"/>
			<xs:enumeration value="chn"/>
			<xs:enumeration value="cho"/>
			<xs:enumeration value="chp"/>
			<xs:enumeration value="chr"/>
			<xs:enumeration value="chu"/>
			<xs:enumeration value="chv"/>
			<xs:enumeration value="chy"/>
			<xs:enumeration value="cmc"/>
			<xs:enumeration value="cop"/>
			<xs:enumeration value="cor"/>
			<xs:enumeration value="cos"/>
			<xs:enumeration value="cpe"/>
			<xs:enumeration value="cpf"/>
			<xs:enumeration value="cpp"/>
			<xs:enumeration value="cre"/>
			<xs:enumeration value="crh"/>
			<xs:enumeration value="crp"/>
			<xs:enumeration value="csb"/>
			<xs:enumeration value="cus"/>
			<xs:enumeration value="cze"/>
			<xs:enumeration value="dak"/>
			<xs:enumeration value="dan"/>
			<xs:enumeration value="dar"/>
			<xs:enumeration value="day"/>
			<xs:enumeration value="del"/>
			<xs:enumeration value="den"/>
			<xs:enumeration value="dgr"/>
			<xs:enumeration value="din"/>
			<xs:enumeration value="div"/>
			<xs:enumeration value="doi"/>
			<xs:enumeration value="dra"/>
			<xs:enumeration value="dsb"/>
			<xs:enumeration value="dua"/>
			<xs:enumeration value="dum"/>
			<xs:enumeration value="dut"/>
			<xs:enumeration value="dyu"/>
			<xs:enumeration value="dzo"/>
			<xs:enumeration value="efi"/>
			<xs:enumeration value="egy"/>
			<xs:enumeration value="eka"/>
			<xs:enumeration value="elx"/>
			<xs:enumeration value="eng"/>
			<xs:enumeration value="enm"/>
			<xs:enumeration value="epo"/>
			<xs:enumeration value="est"/>
			<xs:enumeration value="ewe"/>
			<xs:enumeration value="ewo"/>
			<xs:enumeration value="fan"/>
			<xs:enumeration value="fao"/>
			<xs:enumeration value="fat"/>
			<xs:enumeration value="fij"/>
			<xs:enumeration value="fil"/>
			<xs:enumeration value="fin"/>
			<xs:enumeration value="fiu"/>
			<xs:enumeration value="fon"/>
			<xs:enumeration value="fre"/>
			<xs:enumeration value="frm"/>
			<xs:enumeration value="fro"/>
			<xs:enumeration value="frr"/>
			<xs:enumeration value="frs"/>
			<xs:enumeration value="fry"/>
			<xs:enumeration value="ful"/>
			<xs:enumeration value="fur"/>
			<xs:enumeration value="gaa"/>
			<xs:enumeration value="gay"/>
			<xs:enumeration value="gba"/>
			<xs:enumeration value="gem"/>
			<xs:enumeration value="geo"/>
			<xs:enumeration value="ger"/>
			<xs:enumeration value="gez"/>
			<xs:enumeration value="gil"/>
			<xs:enumeration value="gla"/>
			<xs:enumeration value="gle"/>
			<xs:enumeration value="glg"/>
			<xs:enumeration value="glv"/>
			<xs:enumeration value="gmh"/>
			<xs:enumeration value="goh"/>
			<xs:enumeration value="gon"/>
			<xs:enumeration value="gor"/>
			<xs:enumeration value="got"/>
			<xs:enumeration value="grb"/>
			<xs:enumeration value="grc"/>
			<xs:enumeration value="gre"/>
			<xs:enumeration value="grn"/>
			<xs:enumeration value="gsw"/>
			<xs:enumeration value="guj"/>
			<xs:enumeration value="gwi"/>
			<xs:enumeration value="hai"/>
			<xs:enumeration value="hat"/>
			<xs:enumeration value="hau"/>
			<xs:enumeration value="haw"/>
			<xs:enumeration value="heb"/>
			<xs:enumeration value="her"/>
			<xs:enumeration value="hil"/>
			<xs:enumeration value="him"/>
			<xs:enumeration value="hin"/>
			<xs:enumeration value="hit"/>
			<xs:enumeration value="hmn"/>
			<xs:enumeration value="hmo"/>
			<xs:enumeration value="hrv"/>
			<xs:enumeration value="hsb"/>
			<xs:enumeration value="hun"/>
			<xs:enumeration value="hup"/>
			<xs:enumeration value="iba"/>
			<xs:enumeration value="ibo"/>
			<xs:enumeration value="ice"/>
			<xs:enumeration value="ido"/>
			<xs:enumeration value="iii"/>
			<xs:enumeration value="ijo"/>
			<xs:enumeration value="iku"/>
			<xs:enumeration value="ile"/>
			<xs:enumeration value="ilo"/>
			<xs:enumeration value="ina"/>
			<xs:enumeration value="inc"/>
			<xs:enumeration value="ind"/>
			<xs:enumeration value="ine"/>
			<xs:enumeration value="inh"/>
			<xs:enumeration value="ipk"/>
			<xs:enumeration value="ira"/>
			<xs:enumeration value="iro"/>
			<xs:enumeration value="ita"/>
			<xs:enumeration value="jav"/>
			<xs:enumeration value="jbo"/>
			<xs:enumeration value="jpn"/>
			<xs:enumeration value="jpr"/>
			<xs:enumeration value="jrb"/>
			<xs:enumeration value="kaa"/>
			<xs:enumeration value="kab"/>
			<xs:enumeration value="kac"/>
			<xs:enumeration value="kal"/>
			<xs:enumeration value="kam"/>
			<xs:enumeration value="kan"/>
			<xs:enumeration value="kar"/>
			<xs:enumeration value="kas"/>
			<xs:enumeration value="kau"/>
			<xs:enumeration value="kaw"/>
			<xs:enumeration value="kaz"/>
			<xs:enumeration value="kbd"/>
			<xs:enumeration value="kha"/>
			<xs:enumeration value="khi"/>
			<xs:enumeration value="khm"/>
			<xs:enumeration value="kho"/>
			<xs:enumeration value="kik"/>
			<xs:enumeration value="kin"/>
			<xs:enumeration value="kir"/>
			<xs:enumeration value="kmb"/>
			<xs:enumeration value="kok"/>
			<xs:enumeration value="kom"/>
			<xs:enumeration value="kon"/>
			<xs:enumeration value="kor"/>
			<xs:enumeration value="kos"/>
			<xs:enumeration value="kpe"/>
			<xs:enumeration value="krc"/>
			<xs:enumeration value="krl"/>
			<xs:enumeration value="kro"/>
			<xs:enumeration value="kru"/>
			<xs:enumeration value="kua"/>
			<xs:enumeration value="kum"/>
			<xs:enumeration value="kur"/>
			<xs:enumeration value="kut"/>
			<xs:enumeration value="lad"/>
			<xs:enumeration value="lah"/>
			<xs:enumeration value="lam"/>
			<xs:enumeration value="lao"/>
			<xs:enumeration value="lat"/>
			<xs:enumeration value="lav"/>
			<xs:enumeration value="lez"/>
			<xs:enumeration value="lim"/>
			<xs:enumeration value="lin"/>
			<xs:enumeration value="lit"/>
			<xs:enumeration value="lol"/>
			<xs:enumeration value="loz"/>
			<xs:enumeration value="ltz"/>
			<xs:enumeration value="lua"/>
			<xs:enumeration value="lub"/>
			<xs:enumeration value="lug"/>
			<xs:enumeration value="lui"/>
			<xs:enumeration value="lun"/>
			<xs:enumeration value="luo"/>
			<xs:enumeration value="lus"/>
			<xs:enumeration value="mac"/>
			<xs:enumeration value="mad"/>
			<xs:enumeration value="mag"/>
			<xs:enumeration value="mah"/>
			<xs:enumeration value="mai"/>
			<xs:enumeration value="mak"/>
			<xs:enumeration value="mal"/>
			<xs:enumeration value="man"/>
			<xs:enumeration value="mao"/>
			<xs:enumeration value="map"/>
			<xs:enumeration value="mar"/>
			<xs:enumeration value="mas"/>
			<xs:enumeration value="may"/>
			<xs:enumeration value="mdf"/>
			<xs:enumeration value="mdr"/>
			<xs:enumeration value="men"/>
			<xs:enumeration value="mga"/>
			<xs:enumeration value="mic"/>
			<xs:enumeration value="min"/>
			<xs:enumeration value="mis"/>
			<xs:enumeration value="mkh"/>
			<xs:enumeration value="mlg"/>
			<xs:enumeration value="mlt"/>
			<xs:enumeration value="mnc"/>
			<xs:enumeration value="mni"/>
			<xs:enumeration value="mno"/>
			<xs:enumeration value="moh"/>
			<xs:enumeration value="mon"/>
			<xs:enumeration value="mos"/>
			<xs:enumeration value="mul"/>
			<xs:enumeration value="mun"/>
			<xs:enumeration value="mus"/>
			<xs:enumeration value="mwl"/>
			<xs:enumeration value="mwr"/>
			<xs:enumeration value="myn"/>
			<xs:enumeration value="myv"/>
			<xs:enumeration value="nah"/>
			<xs:enumeration value="nai"/>
			<xs:enumeration value="nap"/>
			<xs:enumeration value="nau"/>
			<xs:enumeration value="nav"/>
			<xs:enumeration value="nbl"/>
			<xs:enumeration value="nde"/>
			<xs:enumeration value="ndo"/>
			<xs:enumeration value="nds"/>
			<xs:enumeration value="nep"/>
			<xs:enumeration value="new"/>
			<xs:enumeration value="nia"/>
			<xs:enumeration value="nia"/>
			<xs:enumeration value="nic"/>
			<xs:enumeration value="niu"/>
			<xs:enumeration value="nno"/>
			<xs:enumeration value="nob"/>
			<xs:enumeration value="nog"/>
			<xs:enumeration value="non"/>
			<xs:enumeration value="nor"/>
			<xs:enumeration value="nqo"/>
			<xs:enumeration value="nso"/>
			<xs:enumeration value="nub"/>
			<xs:enumeration value="nwc"/>
			<xs:enumeration value="nya"/>
			<xs:enumeration value="nym"/>
			<xs:enumeration value="nyn"/>
			<xs:enumeration value="nyo"/>
			<xs:enumeration value="nzi"/>
			<xs:enumeration value="oci"/>
			<xs:enumeration value="oji"/>
			<xs:enumeration value="ori"/>
			<xs:enumeration value="orm"/>
			<xs:enumeration value="osa"/>
			<xs:enumeration value="oss"/>
			<xs:enumeration value="ota"/>
			<xs:enumeration value="oto"/>
			<xs:enumeration value="paa"/>
			<xs:enumeration value="pag"/>
			<xs:enumeration value="pal"/>
			<xs:enumeration value="pam"/>
			<xs:enumeration value="pan"/>
			<xs:enumeration value="pap"/>
			<xs:enumeration value="pau"/>
			<xs:enumeration value="peo"/>
			<xs:enumeration value="per"/>
			<xs:enumeration value="phi"/>
			<xs:enumeration value="phn"/>
			<xs:enumeration value="pli"/>
			<xs:enumeration value="pol"/>
			<xs:enumeration value="pon"/>
			<xs:enumeration value="por"/>
			<xs:enumeration value="pra"/>
			<xs:enumeration value="pro"/>
			<xs:enumeration value="pus"/>
			<xs:enumeration value="qaa-qtz"/>
			<xs:enumeration value="que"/>
			<xs:enumeration value="raj"/>
			<xs:enumeration value="rap"/>
			<xs:enumeration value="rar"/>
			<xs:enumeration value="roa"/>
			<xs:enumeration value="roh"/>
			<xs:enumeration value="rom"/>
			<xs:enumeration value="rum"/>
			<xs:enumeration value="run"/>
			<xs:enumeration value="rup"/>
			<xs:enumeration value="rus"/>
			<xs:enumeration value="sad"/>
			<xs:enumeration value="sag"/>
			<xs:enumeration value="sah"/>
			<xs:enumeration value="sai"/>
			<xs:enumeration value="sal"/>
			<xs:enumeration value="sam"/>
			<xs:enumeration value="san"/>
			<xs:enumeration value="sas"/>
			<xs:enumeration value="sat"/>
			<xs:enumeration value="scn"/>
			<xs:enumeration value="sco"/>
			<xs:enumeration value="sel"/>
			<xs:enumeration value="sem"/>
			<xs:enumeration value="sga"/>
			<xs:enumeration value="sgn"/>
			<xs:enumeration value="shn"/>
			<xs:enumeration value="sid"/>
			<xs:enumeration value="sin"/>
			<xs:enumeration value="sio"/>
			<xs:enumeration value="sit"/>
			<xs:enumeration value="sla"/>
			<xs:enumeration value="slo"/>
			<xs:enumeration value="slv"/>
			<xs:enumeration value="sma"/>
			<xs:enumeration value="sme"/>
			<xs:enumeration value="smi"/>
			<xs:enumeration value="smj"/>
			<xs:enumeration value="smn"/>
			<xs:enumeration value="smo"/>
			<xs:enumeration value="sms"/>
			<xs:enumeration value="sna"/>
			<xs:enumeration value="snd"/>
			<xs:enumeration value="snk"/>
			<xs:enumeration value="sog"/>
			<xs:enumeration value="som"/>
			<xs:enumeration value="son"/>
			<xs:enumeration value="sot"/>
			<xs:enumeration value="spa"/>
			<xs:enumeration value="srd"/>
			<xs:enumeration value="srn"/>
			<xs:enumeration value="srp"/>
			<xs:enumeration value="srr"/>
			<xs:enumeration value="ssa"/>
			<xs:enumeration value="ssw"/>
			<xs:enumeration value="suk"/>
			<xs:enumeration value="sun"/>
			<xs:enumeration value="sus"/>
			<xs:enumeration value="sux"/>
			<xs:enumeration value="swa"/>
			<xs:enumeration value="swe"/>
			<xs:enumeration value="syc"/>
			<xs:enumeration value="syr"/>
			<xs:enumeration value="tah"/>
			<xs:enumeration value="tai"/>
			<xs:enumeration value="tam"/>
			<xs:enumeration value="tat"/>
			<xs:enumeration value="tel"/>
			<xs:enumeration value="tem"/>
			<xs:enumeration value="ter"/>
			<xs:enumeration value="tet"/>
			<xs:enumeration value="tgk"/>
			<xs:enumeration value="tgl"/>
			<xs:enumeration value="tha"/>
			<xs:enumeration value="tib"/>
			<xs:enumeration value="tig"/>
			<xs:enumeration value="tir"/>
			<xs:enumeration value="tiv"/>
			<xs:enumeration value="tkl"/>
			<xs:enumeration value="tlh"/>
			<xs:enumeration value="tli"/>
			<xs:enumeration value="tmh"/>
			<xs:enumeration value="tog"/>
			<xs:enumeration value="ton"/>
			<xs:enumeration value="tpi"/>
			<xs:enumeration value="tsi"/>
			<xs:enumeration value="tsn"/>
			<xs:enumeration value="tso"/>
			<xs:enumeration value="tuk"/>
			<xs:enumeration value="tum"/>
			<xs:enumeration value="tup"/>
			<xs:enumeration value="tur"/>
			<xs:enumeration value="tut"/>
			<xs:enumeration value="tvl"/>
			<xs:enumeration value="twi"/>
			<xs:enumeration value="tyv"/>
			<xs:enumeration value="udm"/>
			<xs:enumeration value="uga"/>
			<xs:enumeration value="uig"/>
			<xs:enumeration value="ukr"/>
			<xs:enumeration value="umb"/>
			<xs:enumeration value="und"/>
			<xs:enumeration value="urd"/>
			<xs:enumeration value="uzb"/>
			<xs:enumeration value="vai"/>
			<xs:enumeration value="ven"/>
			<xs:enumeration value="vie"/>
			<xs:enumeration value="vol"/>
			<xs:enumeration value="vot"/>
			<xs:enumeration value="wak"/>
			<xs:enumeration value="wal"/>
			<xs:enumeration value="war"/>
			<xs:enumeration value="was"/>
			<xs:enumeration value="wel"/>
			<xs:enumeration value="wen"/>
			<xs:enumeration value="wln"/>
			<xs:enumeration value="wol"/>
			<xs:enumeration value="xal"/>
			<xs:enumeration value="xho"/>
			<xs:enumeration value="yao"/>
			<xs:enumeration value="yap"/>
			<xs:enumeration value="yid"/>
			<xs:enumeration value="yor"/>
			<xs:enumeration value="ypk"/>
			<xs:enumeration value="zap"/>
			<xs:enumeration value="zbl"/>
			<xs:enumeration value="zen"/>
			<xs:enumeration value="zha"/>
			<xs:enumeration value="znd"/>
			<xs:enumeration value="zul"/>
			<xs:enumeration value="zun"/>
			<xs:enumeration value="zxx"/>
			<xs:enumeration value="zza"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="languageIETF">
		<xs:restriction base="xs:language"/>
	</xs:simpleType>
	<xs:simpleType name="euLanguageIETF">
		<xs:restriction base="languageIETF">
			<xs:enumeration value="bg"/>
			<xs:enumeration value="bg-BG"/>
			<xs:enumeration value="cs"/>
			<xs:enumeration value="cs-CZ"/>
			<xs:enumeration value="da"/>
			<xs:enumeration value="da-DK"/>
			<xs:enumeration value="nl"/>
			<xs:enumeration value="nl-NL"/>
			<xs:enumeration value="en"/>
			<xs:enumeration value="en-GB"/>
			<xs:enumeration value="et"/>
			<xs:enumeration value="et-EE"/>
			<xs:enumeration value="fi"/>
			<xs:enumeration value="fi-FI"/>
			<xs:enumeration value="fr"/>
			<xs:enumeration value="fr-FR"/>
			<xs:enumeration value="de"/>
			<xs:enumeration value="de-DE"/>
			<xs:enumeration value="de-AT"/>
			<xs:enumeration value="el"/>
			<xs:enumeration value="el-GR"/>
			<xs:enumeration value="hu"/>
			<xs:enumeration value="hu-HU"/>
			<xs:enumeration value="ga"/>
			<xs:enumeration value="ga-IE"/>
			<xs:enumeration value="it"/>
			<xs:enumeration value="it-IT"/>
			<xs:enumeration value="lv"/>
			<xs:enumeration value="lv-LV"/>
			<xs:enumeration value="lt"/>
			<xs:enumeration value="lt-LT"/>
			<xs:enumeration value="mt"/>
			<xs:enumeration value="mt-MT"/>
			<xs:enumeration value="pl"/>
			<xs:enumeration value="pl-PL"/>
			<xs:enumeration value="pt"/>
			<xs:enumeration value="pt-PT"/>
			<xs:enumeration value="ro"/>
			<xs:enumeration value="ro-RO"/>
			<xs:enumeration value="sk"/>
			<xs:enumeration value="sk-SK"/>
			<xs:enumeration value="sl"/>
			<xs:enumeration value="sl-SI"/>
			<xs:enumeration value="es"/>
			<xs:enumeration value="es-ES"/>
			<xs:enumeration value="sv"/>
			<xs:enumeration value="sv-SE"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:complexType name="languageElement" abstract="true">
		<xs:sequence>
			<xs:element name="Language" type="xs:string"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="languageElementISO6392B">
		<xs:complexContent>
			<xs:restriction base="languageElement">
				<xs:sequence>
					<xs:element name="Language" type="euLanguageISO6392B"/>
				</xs:sequence>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="languageElementIETF">
		<xs:complexContent>
			<xs:restriction base="languageElement">
				<xs:sequence>
					<xs:element name="Language" type="euLanguageIETF"/>
				</xs:sequence>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="geographicBoundingBox">
		<xs:annotation>
			<xs:documentation xml:lang="en">Mandatory for services with an explicit geographic extent.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="East" type="geoBoxDigits"/>
			<xs:element name="West" type="geoBoxDigits"/>
			<xs:element name="North" type="geoBoxDigits"/>
			<xs:element name="South" type="geoBoxDigits"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="spatialResolution">
		<xs:annotation>
			<xs:documentation xml:lang="en">Mandatory if an equivalent scale or a resolution distance is available</xs:documentation>
			<xs:documentation xml:lang="en">Mandatory for services when there is a restriction on the spatial resolution for service</xs:documentation>
		</xs:annotation>
		<xs:choice>
			<xs:element name="EquivalentScale" type="xs:integer">
				<xs:annotation>
					<xs:documentation>An equivalent scale is generally expressed as an integer value expressing the scale denominator</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:sequence>
				<xs:element name="ResolutionDistance" type="xs:integer">
					<xs:annotation>
						<xs:documentation>A resolution distance shall be expressed as a numerical value associated with a unit of length</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="UnitOfMeasure" type="xs:string"/>
			</xs:sequence>
		</xs:choice>
		<xs:attribute name="abstract" type="xs:string">
			<xs:annotation>
				<xs:documentation>
		ISO 19139 does not offer encoding of spatial resolution for services and INSPIRE Guidelines recommend to put it inside the abstract element in unstructured format, making it virtually impossible to extract the spatial resolution from the rest of the abstract text. The original abstract text is copied for reference.
		</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="uniqueResourceIdentifier">
		<xs:sequence>
			<xs:element name="Code" type="notEmptyString"/>
			<xs:element name="Namespace" type="xs:anyURI" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute name="metadataURL" type="xs:anyURI"/>
	</xs:complexType>
	<!--
	<xs:complexType name="inspireTheme">
		<xs:complexContent>
			<xs:restriction base="keyword">
				<xs:sequence>
					<xs:element name="OriginatingControlledVocabulary" type="originatingControlledVocabularyGemetInspireThemes" minOccurs="0"/>
					<xs:element name="KeywordValue" type="keywordValue"/>
				</xs:sequence>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
-->
	<xs:simpleType name="responsiblePartyRole">
		<xs:restriction base="xs:string">
			<xs:enumeration value="resourceProvider">
				<xs:annotation>
					<xs:documentation xml:lang="en">Resource Provider (resourceProvider): Party that supplies the resource.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="custodian">
				<xs:annotation>
					<xs:documentation>6.2. Custodian (custodian): Party that accepts accountability and responsibility for the data and ensures appropriate care and maintenance of the resource.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="owner">
				<xs:annotation>
					<xs:documentation>6.3. Owner (owner): Party that owns the resource.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="user">
				<xs:annotation>
					<xs:documentation>6.4. User (user): Party who uses the resource.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="distributor">
				<xs:annotation>
					<xs:documentation>6.5. Distributor (distributor): Party who distributes the resource.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="originator">
				<xs:annotation>
					<xs:documentation>6.6. Originator (originator): Party who created the resource</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="pointOfContact">
				<xs:annotation>
					<xs:documentation>6.7. Point of Contact (pointOfContact): Party who can be contacted for acquiring knowledge about or acquisition of the resource.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="principalInvestigator">
				<xs:annotation>
					<xs:documentation>6.8. Principal Investigator (principalInvestigator): Key party responsible for gathering information and conducting research.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="processor">
				<xs:annotation>
					<xs:documentation>6.9. Processor (processor): Party who has processed the data in a manner such that the resource has been modified.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="publisher">
				<xs:annotation>
					<xs:documentation>6.10. Publisher (publisher): Party who published the resource.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="author">
				<xs:annotation>
					<xs:documentation>6.11. Author (author): Party who authored the resource.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="geoBoxDigits">
		<xs:restriction base="xs:string">
			<xs:annotation>
				<xs:documentation xml:lang="en">The bounding box shall be expressed with westbound and eastbound longitudes, and southbound and northbound latitudes in decimal degrees, with a precision of at least two decimals.</xs:documentation>
			</xs:annotation>
			<xs:pattern value="-?(0+|(0*[1-9]\d*))(\.\d{2,})"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:complexType name="inspireTheme" abstract="true">
		<xs:complexContent>
			<xs:restriction base="keyword">
				<xs:sequence>
					<xs:element name="OriginatingControlledVocabulary" type="originatingControlledVocabularyGemetInspireThemes" minOccurs="1"/>
					<xs:element name="KeywordValue" type="keywordValue"/>
				</xs:sequence>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
</xs:schema>';
    
    amt := length(buf);

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 315;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (315, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/common/1.0/network.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 315 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as network_common_1_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!--
26-APR-2011 1.0.1 Conformity element:
                    Restricted allowed citations to "INSPIRE interoperability of spatial data sets and services", according to the MD regulation,
                    requirements for the conformity element (page 17 of the MD regulation).
                  Inspire Themes:
                    Removed leading blank for German, Bulgarian, Czech and Danish translations
18-FEB-2011 Added types for encoding for Language Elements in Network Services
18-DEC-2010 ResourceLocator made mandatory since we are dealing with Network Services
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://inspire.ec.europa.eu/schemas/common/1.0" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" targetNamespace="http://inspire.ec.europa.eu/schemas/common/1.0" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0.1" jaxb:version="2.0">
	<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
	<xs:complexType name="ExtendedCapabilitiesType">
		<xs:annotation>
			<xs:documentation>Extended capabilities for ISO 19128 , OGC CSW, OGC OWS services</xs:documentation>
		</xs:annotation>
		<xs:choice>
			<xs:sequence>
				<xs:annotation>
					<xs:documentation>Scenario 1: Mandatory MetadataUrl element pointing to an INSPIRE Compliant ISO metadata document plus language parameters </xs:documentation>
				</xs:annotation>
				<xs:element name="MetadataUrl" type="resourceLocatorType"/>
				<xs:element name="SupportedLanguages" type="supportedLanguagesType"/>
				<xs:element name="ResponseLanguage" type="languageElementISO6392B"/>
			</xs:sequence>
			<xs:sequence>
				<xs:annotation>
					<xs:documentation>Scenario 2: Mandatory (where appropriate) metadata elements not mapped to standard capabilities, plus mandatory language parameters, plus OPTIONAL MetadataUrl pointing to an INSPIRE Compliant ISO metadata document</xs:documentation>
				</xs:annotation>
				<xs:element name="ResourceLocator" type="resourceLocatorType" maxOccurs="unbounded">
					<xs:annotation>
						<xs:documentation xml:lang="en">Mandatory linkage to the network service</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="ResourceType" type="serviceSpatialDataResourceType"/>
				<xs:element name="TemporalReference" type="temporalReference" maxOccurs="unbounded"/>
				<xs:element name="Conformity" type="conformity" maxOccurs="unbounded"/>
				<xs:element name="MetadataPointOfContact" type="metadataPointOfContact" maxOccurs="unbounded"/>
				<xs:element name="MetadataDate" type="iso8601Date"/>
				<xs:element name="SpatialDataServiceType" type="spatialDataServiceType"/>
				<xs:element name="MandatoryKeyword" type="classificationOfSpatialDataService" maxOccurs="unbounded"/>
				<xs:element name="Keyword" type="keyword" minOccurs="0" maxOccurs="unbounded">
					<xs:annotation>
						<xs:documentation xml:lang="en">If the resource is a spatial data service, at least one keyword from Part D.4 shall be provided.</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="SupportedLanguages" type="supportedLanguagesType"/>
				<xs:element name="ResponseLanguage" type="languageElementISO6392B"/>
				<xs:element name="MetadataUrl" type="resourceLocatorType" minOccurs="0"/>
			</xs:sequence>
		</xs:choice>
	</xs:complexType>
	<xs:complexType name="supportedLanguagesType">
		<xs:sequence>
			<xs:element name="DefaultLanguage" type="languageElementISO6392B"/>
			<xs:element name="SupportedLanguage" type="languageElementISO6392B" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>It is not necessary to repeat the default
language</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:element name="DiscoveryService" type="discoveryService"/>
	<xs:element name="ViewService" type="viewService"/>
	<xs:element name="DownloadService" type="downloadService"/>
	<xs:element name="TransformationService" type="transformationService"/>
	<xs:element name="InvokeService" type="invokeService"/>
	<xs:element name="OtherService" type="otherService"/>
	<!--	<xs:element name="ViewServiceClient" type="viewServiceClient"/> -->
	<!--Type definitions-->
	<!--Discovery  Service-->
	<xs:complexType name="discoveryService_ext">
		<xs:complexContent>
			<xs:extension base="service">
				<xs:sequence/>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="discoveryService">
		<xs:complexContent>
			<xs:restriction base="discoveryService_ext">
				<xs:sequence>
					<xs:element name="ResourceTitle" type="notEmptyString"/>
					<xs:element name="ResourceAbstract" type="notEmptyString"/>
					<xs:element name="ResourceType" type="serviceSpatialDataResourceType"/>
					<xs:element name="ResourceLocator" type="resourceLocatorType" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">Mandatory if linkage to the service is available</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="MandatoryKeyword" type="classificationOfSpatialDataService" minOccurs="1" maxOccurs="unbounded"/>
					<xs:element name="Keyword" type="keyword" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">If the resource is a spatial data service, at least one keyword from Part D.4 shall be provided.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="GeographicBoundingBox" type="geographicBoundingBox" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">Mandatory for services with an explicit geographic extent.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="TemporalReference" type="temporalReference" maxOccurs="unbounded"/>
					<xs:element name="SpatialResolution" type="spatialResolution" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">Mandatory when there is a restriction on the spatial resolution for this service.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="Conformity" type="conformity" maxOccurs="unbounded"/>
					<xs:element name="ConditionsForAccessAndUse" type="notEmptyString" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation>The element must have values. If no conditions apply to the access and use of the resource, "no conditions apply" shall be used. If conditions are unknown, "conditions unknown" shall be used.
			</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="LimitationsOnPublicAccess" type="notEmptyString" maxOccurs="unbounded"/>
					<xs:element name="ResponsibleOrganisation" type="responsibleOrganisation" maxOccurs="unbounded"/>
					<xs:element name="MetadataPointOfContact" type="metadataPointOfContact" maxOccurs="unbounded"/>
					<xs:element name="MetadataDate" type="iso8601Date"/>
					<xs:element name="MetadataLanguage" type="euLanguageISO6392B"/>
					<xs:element name="CoupledResource" type="uniqueResourceIdentifier" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">Mandatory if linkage to data sets on which the service operates are available.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="SpatialDataServiceType" type="discoverySpatialDataServiceType"/>
				</xs:sequence>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<!--View Service-->
	<xs:complexType name="layers">
		<xs:sequence>
			<xs:element name="Layer">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="Name" type="xs:string">
							<xs:annotation>
								<xs:documentation>Harmonised name of the layer</xs:documentation>
							</xs:annotation>
						</xs:element>
						<xs:element name="ResourceTitle" type="xs:string">
							<xs:annotation>
								<xs:documentation>Layer Title</xs:documentation>
							</xs:annotation>
						</xs:element>
						<xs:element name="ResourceAbstract" type="xs:string"/>
						<xs:element name="Keyword" type="keyword" minOccurs="0" maxOccurs="unbounded"/>
						<xs:element name="GeographicBoundingBox" type="geographicBoundingBox" maxOccurs="unbounded"/>
						<xs:element name="UniqueResourceIdentifier" type="uniqueResourceIdentifier" minOccurs="1" maxOccurs="unbounded"/>
						<xs:element name="CoordinateReferenceSystems">
							<xs:annotation>
								<xs:documentation>List of Coordinate Reference Systems in which the layer is available</xs:documentation>
							</xs:annotation>
							<xs:complexType>
								<xs:sequence>
									<xs:element name="CRS" maxOccurs="unbounded">
										<xs:complexType>
											<xs:sequence>
												<xs:element name="CRSName" type="xs:string"/>
												<xs:element name="CRSLabel" type="xs:string"/>
											</xs:sequence>
										</xs:complexType>
									</xs:element>
								</xs:sequence>
							</xs:complexType>
						</xs:element>
						<xs:element name="Styles">
							<xs:complexType>
								<xs:sequence>
									<xs:element name="Style">
										<xs:complexType>
											<xs:sequence>
												<xs:element name="StyleName" type="xs:string"/>
												<xs:element name="StyleTitle" type="xs:string"/>
												<xs:element name="StyleAbstract">
													<xs:complexType/>
												</xs:element>
												<xs:element name="StyleFormat">
													<xs:complexType/>
												</xs:element>
												<xs:element name="StyleURL">
													<xs:complexType/>
												</xs:element>
												<xs:element name="LegendList">
													<xs:complexType>
														<xs:sequence>
															<xs:element name="Legend">
																<xs:complexType>
																	<xs:sequence>
																		<xs:element name="LegendFormat">
																			<xs:complexType/>
																		</xs:element>
																		<xs:element name="LegendHeight" type="xs:byte"/>
																		<xs:element name="LegendWidth" type="xs:byte"/>
																		<xs:element name="LegendURL">
																			<xs:complexType/>
																		</xs:element>
																	</xs:sequence>
																</xs:complexType>
															</xs:element>
														</xs:sequence>
													</xs:complexType>
												</xs:element>
											</xs:sequence>
											<xs:attribute name="name" type="xs:string" use="required"/>
										</xs:complexType>
									</xs:element>
								</xs:sequence>
							</xs:complexType>
						</xs:element>
					</xs:sequence>
					<xs:attribute name="layerName" type="xs:string"/>
					<xs:attribute name="queryable" type="xs:boolean"/>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="viewService_ext">
		<xs:complexContent>
			<xs:extension base="service">
				<xs:sequence>
					<xs:element name="Layers" type="layers"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="viewService">
		<xs:complexContent>
			<xs:restriction base="viewService_ext">
				<xs:sequence>
					<xs:element name="ResourceTitle" type="notEmptyString"/>
					<xs:element name="ResourceAbstract" type="notEmptyString"/>
					<xs:element name="ResourceType" type="serviceSpatialDataResourceType"/>
					<xs:element name="ResourceLocator" type="resourceLocatorType" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">Mandatory if linkage to the service is available</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="MandatoryKeyword" type="classificationOfSpatialDataService" minOccurs="1" maxOccurs="unbounded"/>
					<xs:element name="Keyword" type="keyword" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">If the resource is a spatial data service, at least one keyword from Part D.4 shall be provided.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="GeographicBoundingBox" type="geographicBoundingBox" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">Mandatory for services with an explicit geographic extent.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="TemporalReference" type="temporalReference" maxOccurs="unbounded"/>
					<xs:element name="SpatialResolution" type="spatialResolution" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">Mandatory when there is a restriction on the spatial resolution for this service.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="Conformity" type="conformity" maxOccurs="unbounded"/>
					<xs:element name="ConditionsForAccessAndUse" type="notEmptyString" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation>The element must have values. If no conditions apply to the access and use of the resource, "no conditions apply" 
shall be used. If conditions are unknown, "conditions unknown" shall be used.
			</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="LimitationsOnPublicAccess" type="notEmptyString" maxOccurs="unbounded"/>
					<xs:element name="ResponsibleOrganisation" type="responsibleOrganisation" maxOccurs="unbounded"/>
					<xs:element name="MetadataPointOfContact" type="metadataPointOfContact" maxOccurs="unbounded"/>
					<xs:element name="MetadataDate" type="iso8601Date"/>
					<xs:element name="MetadataLanguage" type="euLanguageISO6392B"/>
					<xs:element name="CoupledResource" type="uniqueResourceIdentifier" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">Mandatory if linkage to data sets on which the service operates are available.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="SpatialDataServiceType" type="viewSpatialDataServiceType"/>
					<xs:element name="Layers" type="layers"/>
				</xs:sequence>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<!--Download Service-->
	<xs:complexType name="downloadService_ext">
		<xs:complexContent>
			<xs:extension base="service">
				<xs:sequence/>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="downloadService">
		<xs:complexContent>
			<xs:restriction base="downloadService_ext">
				<xs:sequence>
					<xs:element name="ResourceTitle" type="notEmptyString"/>
					<xs:element name="ResourceAbstract" type="notEmptyString"/>
					<xs:element name="ResourceType" type="serviceSpatialDataResourceType"/>
					<xs:element name="ResourceLocator" type="resourceLocatorType" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">Mandatory if linkage to the service is available</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="MandatoryKeyword" type="classificationOfSpatialDataService" minOccurs="1" maxOccurs="unbounded"/>
					<xs:element name="Keyword" type="keyword" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">If the resource is a spatial data service, at least one keyword from Part D.4 shall be provided.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="GeographicBoundingBox" type="geographicBoundingBox" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">Mandatory for services with an explicit geographic extent.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="TemporalReference" type="temporalReference" maxOccurs="unbounded"/>
					<xs:element name="SpatialResolution" type="spatialResolution" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">Mandatory when there is a restriction on the spatial resolution for this service.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="Conformity" type="conformity" maxOccurs="unbounded"/>
					<xs:element name="ConditionsForAccessAndUse" type="notEmptyString" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation>The element must have values. If no conditions apply to the access and use of the resource, "no conditions apply" 
shall be used. If conditions are unknown, "conditions unknown" shall be used.
			</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="LimitationsOnPublicAccess" type="notEmptyString" maxOccurs="unbounded"/>
					<xs:element name="ResponsibleOrganisation" type="responsibleOrganisation" maxOccurs="unbounded"/>
					<xs:element name="MetadataPointOfContact" type="metadataPointOfContact" maxOccurs="unbounded"/>
					<xs:element name="MetadataDate" type="iso8601Date"/>
					<xs:element name="MetadataLanguage" type="euLanguageISO6392B"/>
					<xs:element name="CoupledResource" type="uniqueResourceIdentifier" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">Mandatory if linkage to data sets on which the service operates are available.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="SpatialDataServiceType" type="transformationSpatialDataServiceType"/>
				</xs:sequence>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<!--Transformation  Service-->
	<xs:complexType name="transformationService_ext">
		<xs:complexContent>
			<xs:extension base="service">
				<xs:sequence/>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="transformationService">
		<xs:complexContent>
			<xs:restriction base="transformationService_ext">
				<xs:sequence>
					<xs:element name="ResourceTitle" type="notEmptyString"/>
					<xs:element name="ResourceAbstract" type="notEmptyString"/>
					<xs:element name="ResourceType" type="serviceSpatialDataResourceType"/>
					<xs:element name="ResourceLocator" type="resourceLocatorType" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">Mandatory if linkage to the service is available</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="MandatoryKeyword" type="classificationOfSpatialDataService" minOccurs="1" maxOccurs="unbounded"/>
					<xs:element name="Keyword" type="keyword" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">If the resource is a spatial data service, at least one keyword from Part D.4 shall be provided.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="GeographicBoundingBox" type="geographicBoundingBox" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">Mandatory for services with an explicit geographic extent.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="TemporalReference" type="temporalReference" maxOccurs="unbounded"/>
					<xs:element name="SpatialResolution" type="spatialResolution" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">Mandatory when there is a restriction on the spatial resolution for this service.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="Conformity" type="conformity" maxOccurs="unbounded"/>
					<xs:element name="ConditionsForAccessAndUse" type="notEmptyString" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation>The element must have values. If no conditions apply to the access and use of the resource, "no conditions apply" 
shall be used. If conditions are unknown, "conditions unknown" shall be used.
			</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="LimitationsOnPublicAccess" type="notEmptyString" maxOccurs="unbounded"/>
					<xs:element name="ResponsibleOrganisation" type="responsibleOrganisation" maxOccurs="unbounded"/>
					<xs:element name="MetadataPointOfContact" type="metadataPointOfContact" maxOccurs="unbounded"/>
					<xs:element name="MetadataDate" type="iso8601Date"/>
					<xs:element name="MetadataLanguage" type="euLanguageISO6392B"/>
					<xs:element name="CoupledResource" type="uniqueResourceIdentifier" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">Mandatory if linkage to data sets on which the service operates are available.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="SpatialDataServiceType" type="transformationSpatialDataServiceType"/>
				</xs:sequence>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<!--Invoke Service-->
	<xs:complexType name="invokeService_ext">
		<xs:complexContent>
			<xs:extension base="service">
				<xs:sequence/>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="invokeService">
		<xs:complexContent>
			<xs:restriction base="invokeService_ext">
				<xs:sequence>
					<xs:element name="ResourceTitle" type="notEmptyString"/>
					<xs:element name="ResourceAbstract" type="notEmptyString"/>
					<xs:element name="ResourceType" type="serviceSpatialDataResourceType"/>
					<xs:element name="ResourceLocator" type="resourceLocatorType" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">Mandatory if linkage to the service is available</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="MandatoryKeyword" type="classificationOfSpatialDataService" minOccurs="1" maxOccurs="unbounded"/>
					<xs:element name="Keyword" type="keyword" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">If the resource is a spatial data service, at least one keyword from Part D.4 shall be provided.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="GeographicBoundingBox" type="geographicBoundingBox" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">Mandatory for services with an explicit geographic extent.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="TemporalReference" type="temporalReference" maxOccurs="unbounded"/>
					<xs:element name="SpatialResolution" type="spatialResolution" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">Mandatory when there is a restriction on the spatial resolution for this service.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="Conformity" type="conformity" maxOccurs="unbounded"/>
					<xs:element name="ConditionsForAccessAndUse" type="notEmptyString" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation>The element must have values. If no conditions apply to the access and use of the resource, "no conditions apply" 
shall be used. If conditions are unknown, "conditions unknown" shall be used.
			</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="LimitationsOnPublicAccess" type="notEmptyString" maxOccurs="unbounded"/>
					<xs:element name="ResponsibleOrganisation" type="responsibleOrganisation" maxOccurs="unbounded"/>
					<xs:element name="MetadataPointOfContact" type="metadataPointOfContact" maxOccurs="unbounded"/>
					<xs:element name="MetadataDate" type="iso8601Date"/>
					<xs:element name="MetadataLanguage" type="euLanguageISO6392B"/>
					<xs:element name="CoupledResource" type="uniqueResourceIdentifier" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">Mandatory if linkage to data sets on which the service operates are available.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="SpatialDataServiceType" type="discoverySpatialDataServiceType"/>
				</xs:sequence>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<!--Other  Service-->
	<xs:complexType name="otherService_ext">
		<xs:complexContent>
			<xs:extension base="service">
				<xs:sequence/>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="otherService">
		<xs:complexContent>
			<xs:restriction base="otherService_ext">
				<xs:sequence>
					<xs:element name="ResourceTitle" type="notEmptyString"/>
					<xs:element name="ResourceAbstract" type="notEmptyString"/>
					<xs:element name="ResourceType" type="serviceSpatialDataResourceType"/>
					<xs:element name="ResourceLocator" type="resourceLocatorType" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">Mandatory if linkage to the service is available</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="MandatoryKeyword" type="classificationOfSpatialDataService" minOccurs="1" maxOccurs="unbounded"/>
					<xs:element name="Keyword" type="keyword" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">If the resource is a spatial data service, at least one keyword from Part D.4 shall be provided.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="GeographicBoundingBox" type="geographicBoundingBox" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">Mandatory for services with an explicit geographic extent.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="TemporalReference" type="temporalReference" maxOccurs="unbounded"/>
					<xs:element name="SpatialResolution" type="spatialResolution" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">Mandatory when there is a restriction on the spatial resolution for this service.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="Conformity" type="conformity" maxOccurs="unbounded"/>
					<xs:element name="ConditionsForAccessAndUse" type="notEmptyString" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation>The element must have values. If no conditions apply to the access and use of the resource, "no conditions apply" 
shall be used. If conditions are unknown, "conditions unknown" shall be used.
			</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="LimitationsOnPublicAccess" type="notEmptyString" maxOccurs="unbounded"/>
					<xs:element name="ResponsibleOrganisation" type="responsibleOrganisation" maxOccurs="unbounded"/>
					<xs:element name="MetadataPointOfContact" type="metadataPointOfContact" maxOccurs="unbounded"/>
					<xs:element name="MetadataDate" type="iso8601Date"/>
					<xs:element name="MetadataLanguage" type="euLanguageISO6392B"/>
					<xs:element name="CoupledResource" type="uniqueResourceIdentifier" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation xml:lang="en">Mandatory if linkage to data sets on which the service operates are available.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="SpatialDataServiceType" type="discoverySpatialDataServiceType"/>
				</xs:sequence>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
</xs:schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 316;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (316, empty_clob(), 'INSPIRE', 'urn:x-inspire:specification:gmlas:CadastralParcels:3.0/cadastralparcels.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 316 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as cadastralparcels_cp_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?><schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:au="urn:x-inspire:specification:gmlas:AdministrativeUnits:3.0" xmlns:base="urn:x-inspire:specification:gmlas:BaseTypes:3.2" xmlns:cp="urn:x-inspire:specification:gmlas:CadastralParcels:3.0" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:gn="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" elementFormDefault="qualified" targetNamespace="urn:x-inspire:specification:gmlas:CadastralParcels:3.0" version="3.0">
  <annotation>
    <documentation>-- Definition --
The application schema CadastralParcels contains the feature types CadastralParcel, CadastralBoundary and CadastralIndexSet. </documentation>
  </annotation>
  <import namespace="urn:x-inspire:specification:gmlas:BaseTypes:3.2" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.2/BaseTypes.xsd"/>
  <import namespace="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/gn/3.0/GeographicalNames.xsd"/>
  <import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
  <import namespace="urn:x-inspire:specification:gmlas:AdministrativeUnits:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/au/3.0/AdministrativeUnits.xsd"/>
  <import namespace="http://www.isotc211.org/2005/gmd" schemaLocation="http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd"/>
  <!--XML Schema document created by ShapeChange-->
  <element name="BasicPropertyUnit" substitutionGroup="gml:AbstractFeature" type="cp:BasicPropertyUnitType">
    <annotation>
      <documentation>-- Definition --
The basic unit of ownership that is recorded in the land books, land registers or equivalent. It is defined by unique ownership and homogeneous real property rights, and may consist of one or more adjacent or geographically separate parcels.

-- Description --
SOURCE Adapted from UN ECE 2004.

NOTE 1 In the INSPIRE context, basic property units are to be made available by member states where unique cadastral references are given only for basic property units and not for parcels.

NOTE 2 In many (but not all) countries, the area of the basic property unit corresponds to the cadastral parcel itself.

NOTE 3 Some countries, such as Finland, may also register officially basic property units without any area. These basic property units are considered out of the INSPIRE scope.

NOTE 4 Some countries, such as Norway, may have parcels which belong to several basic property units.</documentation>
    </annotation>
  </element>
  <complexType name="BasicPropertyUnitType">
    <complexContent>
      <extension base="gml:AbstractFeatureType">
        <sequence>
          <element name="inspireId" type="base:IdentifierPropertyType">
            <annotation>
              <documentation>-- Definition --
External object identifier of the spatial object.

-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.
</documentation>
            </annotation>
          </element>
          <element name="nationalCadastralReference" type="string">
            <annotation>
              <documentation>-- Definition --
Thematic identifier at national level, generally the full national code of the basic property unit. Must ensure the link to the national cadastral register or equivalent.

-- Description --
The national cadastral reference can be used also in further queries in national services.</documentation>
            </annotation>
          </element>
          <element minOccurs="0" name="areaValue" nillable="true">
            <annotation>
              <documentation>-- Definition --
Registered area value giving quantification of the area projected on the horizontal plane of the cadastral parcels composing the basic property unit.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:AreaType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="validFrom" nillable="true">
            <annotation>
              <documentation>-- Definition --
Official date and time the basic property unit was/will be legally established.

-- Description --
NOTE This is the date and time the national cadastral reference can be used in legal acts.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="validTo" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which the basic property unit legally ceased/will cease to be used.

-- Description --
NOTE This is the date and time the national cadastral reference can no longer be used in legal acts.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="beginLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="endLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="administrativeUnit" nillable="true" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
The administrative unit of lowest administrative level containing this basic property unit.</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">au:AdministrativeUnit</targetElement>
              </appinfo>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="BasicPropertyUnitPropertyType">
    <sequence minOccurs="0">
      <element ref="cp:BasicPropertyUnit"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="CadastralBoundary" substitutionGroup="gml:AbstractFeature" type="cp:CadastralBoundaryType">
    <annotation>
      <documentation>-- Definition --
Part of the outline of a cadastral parcel. One cadastral boundary may be shared by two neighbouring cadastral parcels.

-- Description --
NOTE In the INSPIRE context, cadastral boundaries are to be made available by member states where absolute positional accuracy information is recorded for the cadastral boundary (attribute estimated accuracy).</documentation>
    </annotation>
  </element>
  <complexType name="CadastralBoundaryType">
    <complexContent>
      <extension base="gml:AbstractFeatureType">
        <sequence>
          <element name="beginLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="endLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="estimatedAccuracy" nillable="true">
            <annotation>
              <documentation>-- Definition --
Estimated absolute positional accuracy of the cadastral boundary in the used INSPIRE coordinate reference system. Absolute positional accuracy is the mean value of the positional uncertainties for a set of positions, where the positional uncertainties are the distance between a measured position and what is considered as the corresponding true position. 

-- Description --
NOTE This mean value may come from quality measures on a homogeneous population of cadastral boundaries or from an estimation based on the knowledge of the production processes and of their accuracy.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:LengthType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="geometry" type="gml:CurvePropertyType">
            <annotation>
              <documentation>-- Definition --
Geometry of the cadastral boundary.</documentation>
            </annotation>
          </element>
          <element minOccurs="0" name="inspireId" type="base:IdentifierPropertyType">
            <annotation>
              <documentation>-- Definition --
External object identifier of the spatial object.

-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.
</documentation>
            </annotation>
          </element>
          <element minOccurs="0" name="validFrom" nillable="true">
            <annotation>
              <documentation>-- Definition --
Official date and time the cadastral boundary was/will be legally established.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="validTo" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which the cadastral boundary legally ceased/will cease to be used.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element maxOccurs="2" name="parcel" nillable="true" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
The cadastral parcel(s) outlined by this cadastral boundary. A cadastral boundary may outline one or two cadastral parcels.</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">cp:CadastralParcel</targetElement>
              </appinfo>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="CadastralBoundaryPropertyType">
    <sequence minOccurs="0">
      <element ref="cp:CadastralBoundary"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="CadastralParcel" substitutionGroup="gml:AbstractFeature" type="cp:CadastralParcelType">
    <annotation>
      <documentation>-- Definition --
Areas defined by cadastral registers or equivalent.

-- Description --
SOURCE [INSPIRE Directive:2007].

NOTE As much as possible, in the INSPIRE context, cadastral parcels should be forming a partition of national territory. Cadastral parcel should be considered as a single area of Earth surface (land and/or water), under homogeneous real property rights and unique ownership, real property rights and ownership being defined by national law (adapted from UN ECE 2004 and WG-CPI, 2006). By unique ownership is meant that the ownership is held by one or several joint owners for the whole parcel.
</documentation>
    </annotation>
  </element>
  <complexType name="CadastralParcelType">
    <complexContent>
      <extension base="gml:AbstractFeatureType">
        <sequence>
          <element minOccurs="0" name="areaValue" nillable="true">
            <annotation>
              <documentation>-- Definition --
Registered area value giving quantification of the area projected on the horizontal plane of the cadastral parcel.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:AreaType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="beginLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="endLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="geometry" type="gml:GeometryPropertyType">
            <annotation>
              <documentation>-- Definition --
Geometry of the cadastral parcel.

-- Description --
As much as possible, the geometry should be a single area.</documentation>
            </annotation>
          </element>
          <element name="inspireId" type="base:IdentifierPropertyType">
            <annotation>
              <documentation>-- Definition --
External object identifier of the spatial object.

-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.
</documentation>
            </annotation>
          </element>
          <element name="label" type="string">
            <annotation>
              <documentation>-- Definition --
Text commonly used to display the cadastral parcel identification.

-- Description --
NOTE 1 The label is usually the last part of the national cadastral reference.

NOTE 2 The label can be used for label in portrayal.</documentation>
            </annotation>
          </element>
          <element name="nationalCadastralReference" type="string">
            <annotation>
              <documentation>-- Definition --
Thematic identifier at national level, generally the full national code of the cadastral parcel. Must ensure the link to the national cadastral register or equivalent.

-- Description --
The national cadastral reference can be used also in further queries in national services.</documentation>
            </annotation>
          </element>
          <element minOccurs="0" name="referencePoint" nillable="true" type="gml:PointPropertyType">
            <annotation>
              <documentation>-- Definition --
A point within the cadastral parcel.

-- Description --
EXAMPLE The centroid of the cadastral parcel geometry.</documentation>
            </annotation>
          </element>
          <element minOccurs="0" name="validFrom" nillable="true">
            <annotation>
              <documentation>-- Definition --
Official date and time the cadastral parcel was/will be legally established.

-- Description --
NOTE This is the date and time the national cadastral reference can be used in legal acts.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="validTo" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which the cadastral parcel legally ceased/will cease to be used.

-- Description --
NOTE This is the date and time the national cadastral reference can no longer be used in legal acts.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="basicPropertyUnit" nillable="true" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
The basic property unit(s) containing this cadastral parcel.</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">cp:BasicPropertyUnit</targetElement>
              </appinfo>
            </annotation>
          </element>
          <element minOccurs="0" name="administrativeUnit" nillable="true" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
The administrative unit of lowest administrative level containing this cadastral parcel.</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">au:AdministrativeUnit</targetElement>
              </appinfo>
            </annotation>
          </element>
          <element minOccurs="0" name="zoning" nillable="true" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
The cadastral zoning of lowest level containing this cadastral parcel.</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">cp:CadastralZoning</targetElement>
              </appinfo>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="CadastralParcelPropertyType">
    <sequence minOccurs="0">
      <element ref="cp:CadastralParcel"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="CadastralZoning" substitutionGroup="gml:AbstractFeature" type="cp:CadastralZoningType">
    <annotation>
      <documentation>-- Definition --
Intermediary areas used in order to divide national territory into cadastral parcels.

-- Description --
NOTE 1 In the INSPIRE context, cadastral zonings are to be used to carry metadata information and to facilitate portrayal and search of data.

NOTE 2 Cadastral zonings have generally been defined when cadastral maps were created for the first time.

EXAMPLE Municipality, section, parish, district, block.</documentation>
    </annotation>
  </element>
  <complexType name="CadastralZoningType">
    <complexContent>
      <extension base="gml:AbstractFeatureType">
        <sequence>
          <element name="beginLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="endLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="estimatedAccuracy" nillable="true">
            <annotation>
              <documentation>-- Definition --
The estimated absolute positional accuracy of cadastral parcels within the cadastral zoning in the used INSPIRE coordinate reference system. Absolute positional accuracy is the mean value of the positional uncertainties for a set of positions, where the positional uncertainties are the distance between a measured position and what is considered as the corresponding true position.

-- Description --
NOTE This mean value may come from quality measures on a homogeneous population of cadastral parcels or from an estimation based on the knowledge of the production processes and of their accuracy.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:LengthType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="geometry" type="gml:MultiSurfacePropertyType">
            <annotation>
              <documentation>-- Definition --
Geometry of the cadastral zoning.</documentation>
            </annotation>
          </element>
          <element minOccurs="0" name="inspireId" type="base:IdentifierPropertyType">
            <annotation>
              <documentation>-- Definition --
External object identifier of spatial object.

-- Description --
NOTE 
An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.
</documentation>
            </annotation>
          </element>
          <element name="label" type="string">
            <annotation>
              <documentation>-- Definition --
Text commonly used to display the cadastral zoning identification.

-- Description --
NOTE 1 The label is usually the last part of the national cadastral zoning reference or that reference itself or the name.

NOTE 2 The label can be used for label in portrayal.</documentation>
            </annotation>
          </element>
          <element name="level" nillable="true">
            <annotation>
              <documentation>-- Definition --
Level of the cadastral zoning in the national cadastral hierarchy.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:CodeType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element maxOccurs="unbounded" name="levelName" nillable="true" type="gmd:LocalisedCharacterString_PropertyType">
            <annotation>
              <documentation>-- Definition --
Name of the level of the cadastral zoning in the national cadastral hierarchy, in at least one official language of the European Union. 

-- Description --
EXAMPLE  For Spain, level name might be supplied as "municipio" (in Spanish) and as "municipality" (in English).
</documentation>
            </annotation>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="name" nillable="true">
            <annotation>
              <documentation>-- Definition --
Name of the cadastral zoning.

-- Description --
NOTE 1 Cadastral zonings which are also administrative units have generally a name.

EXAMPLE Bordeaux, Copenhagen.

NOTE 2 The language of the name should be filled in most cases, except if the data producer does not know in which language the names are.</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="gn:GeographicalName"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element name="nationalCadastalZoningReference" type="string">
            <annotation>
              <documentation>-- Definition --
Thematic identifier at national level, generally the full national code of the cadastral zoning.

-- Description --
EXAMPLE 03260000AB (France), 30133 (Austria), APD00F (Netherlands).</documentation>
            </annotation>
          </element>
          <element minOccurs="0" name="originalMapScaleDenominator" nillable="true">
            <annotation>
              <documentation>-- Definition --
The denominator in the scale of the original paper map (if any) to whose extent the cadastral zoning corresponds.

-- Description --
EXAMPLE 2000 means that original cadastral map was designed at scale 1: 2000.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="integer">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="referencePoint" nillable="true" type="gml:PointPropertyType">
            <annotation>
              <documentation>-- Definition --
A point within the cadastral zoning.

-- Description --
EXAMPLE The centroid of the cadastral parcel geometry.</documentation>
            </annotation>
          </element>
          <element minOccurs="0" name="validFrom" nillable="true">
            <annotation>
              <documentation>-- Definition --
Official date and time the cadastral zoning was/will be legally established.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="validTo" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which the cadastral zoning legally ceased/will cease to be used.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="upperLevelUnit" nillable="true" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
The next upper level cadastral zoning containing this cadastral zoning.</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">cp:CadastralZoning</targetElement>
              </appinfo>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="CadastralZoningPropertyType">
    <sequence minOccurs="0">
      <element ref="cp:CadastralZoning"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 317;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (317, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/cvbase/1.0/coveragebase.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 317 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as coveragebase_cvbase_1_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:cvbase="http://inspire.ec.europa.eu/schemas/cvbase/1.0" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gml="http://www.opengis.net/gml/3.2" targetNamespace="http://inspire.ec.europa.eu/schemas/cvbase/1.0" elementFormDefault="qualified" version="1.0">
	<annotation>
		<documentation>-- Definition --
base schema for coverages</documentation>
	</annotation>
	<import namespace="http://www.isotc211.org/2005/gco" schemaLocation="http://schemas.opengis.net/iso/19139/20070417/gco/gco.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="Coverage" type="cvbase:CoverageType" abstract="true" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
coverage

-- Definition --
Spatial object that acts as a function to return values from its range for any direct position within its spatial, temporal or spatiotemporal domain.

-- Description --
EXAMPLE	Examples include a raster image, polygon overlay or digital elevation matrix.

NOTE	In other words, a coverage is a feature that has multiple values for each attribute type, where each direct position within the geometric representation of the feature has a single value for each attribute type.</documentation>
		</annotation>
	</element>
	<complexType name="CoverageType" abstract="true">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="metadata" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
metadata

-- Definition --
Application specific metadata of the coverage.

-- Description --
NOTE	The values of this property will typically be constrained in subtypes or in profiles specified by information communities.</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="gml:AbstractObject"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="rangeType">
						<annotation>
							<documentation>-- Name --
range type

-- Definition --
Description of the structure of the range values.</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="gco:RecordType"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="CoveragePropertyType">
		<sequence minOccurs="0">
			<element ref="cvbase:Coverage"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 318;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (318, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/cvgvp/0.1/coveragegvp.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 318 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as coveragegvp_cvgvp_0_1.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:cvbase="http://inspire.ec.europa.eu/schemas/cvbase/1.0" xmlns:cvgvp="http://inspire.ec.europa.eu/schemas/cvgvp/0.1" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:gmlcov="http://www.opengis.net/gmlcov/1.0" targetNamespace="http://inspire.ec.europa.eu/schemas/cvgvp/0.1" elementFormDefault="qualified" version="0.1">
	<annotation>
		<documentation>-- Definition --
application schema for coverages with a geometry/value pair representation 

-- Description --
NOTE	This application schema has been specified to be conceptually consistent with the coverage model used by the OGC Best Practice document 06-188r1 "GML Encoding of Discrete Coverages (interleaved pattern)".</documentation>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/cvbase/1.0" schemaLocation="http://inspire.ec.europa.eu/schemas/cvbase/1.0/CoverageBase.xsd"/>
	<import namespace="http://www.isotc211.org/2005/gmd" schemaLocation="http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<import namespace="http://www.opengis.net/gmlcov/1.0" schemaLocation="http://schemas.opengis.net/gmlcov/1.0/coverage.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="MultiTimeInstantCoverage" type="cvgvp:MultiTimeInstantCoverageType" substitutionGroup="cvgvp:DiscreteCoverageGeometryValuePairs">
		<annotation>
			<documentation>-- Name --
multi time instant coverage

-- Definition --
coverage characterized by a finite domain consisting of time instants

-- Description --
NOTE	This type provides a representation of the time instant/value pairs, i.e. represents a time series.</documentation>
		</annotation>
	</element>
	<complexType name="MultiTimeInstantCoverageType">
		<complexContent>
			<extension base="cvgvp:DiscreteCoverageGeometryValuePairsType">
				<sequence/>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="MultiTimeInstantCoveragePropertyType">
		<sequence minOccurs="0">
			<element ref="cvgvp:MultiTimeInstantCoverage"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="GeometryValuePair" type="cvgvp:GeometryValuePairType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
geometry-value pair

-- Definition --
describes an element of a set that defines the relationships of a discrete coverage

-- Description --
Each instance consists of two parts: a domain object from the domain of the coverage to which it belongs and a record of feature attribute values from the range of the coverage to which it belongs.</documentation>
		</annotation>
	</element>
	<complexType name="GeometryValuePairType">
		<sequence>
			<element name="geometry">
				<annotation>
					<documentation>-- Name --
geometry

-- Definition --
the domain object</documentation>
				</annotation>
				<complexType>
					<complexContent>
						<extension base="gml:AbstractMemberType">
							<sequence minOccurs="0">
								<element ref="gml:AbstractObject"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
						</extension>
					</complexContent>
				</complexType>
			</element>
			<element name="value">
				<annotation>
					<documentation>-- Name --
value

-- Definition --
holds the record of feature attribute values associated with the domain object in the property "geometry"</documentation>
				</annotation>
				<complexType>
					<complexContent>
						<extension base="gml:AbstractMemberType">
							<sequence minOccurs="0">
								<element ref="gml:AbstractObject"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
						</extension>
					</complexContent>
				</complexType>
			</element>
		</sequence>
	</complexType>
	<complexType name="GeometryValuePairPropertyType">
		<sequence>
			<element ref="cvgvp:GeometryValuePair"/>
		</sequence>
	</complexType>
	<element name="DiscreteCoverageGeometryValuePairs" type="cvgvp:DiscreteCoverageGeometryValuePairsType" substitutionGroup="gmlcov:AbstractCoverage">
		<annotation>
			<documentation>-- Name --
coverage (geometry-value pair representation)

-- Definition --
coverage which provides the geometry value pairs</documentation>
		</annotation>
	</element>
	<complexType name="DiscreteCoverageGeometryValuePairsType">
		<complexContent>
			<extension base="gmlcov:AbstractCoverageType">
				<sequence>
					<element name="domainExtent" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
domain extent

-- Definition --
contains the extent of the domain of the coverage

-- Description --
NOTE	Extents may be specified in space, time or space-time.</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMetadataPropertyType">
									<sequence minOccurs="0">
										<element ref="gmd:EX_Extent"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="element" type="cvgvp:GeometryValuePairPropertyType" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
alement

-- Definition --
list of the geometry/value pairs of the coverage</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="DiscreteCoverageGeometryValuePairsPropertyType">
		<sequence minOccurs="0">
			<element ref="cvgvp:DiscreteCoverageGeometryValuePairs"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 319;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (319, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/ef/3.0/environmentalmonitoringfacilities.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 319 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as environmentalmonitoringfacilities_ef_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:base2="http://inspire.ec.europa.eu/schemas/base2/1.0" xmlns:ef="http://inspire.ec.europa.eu/schemas/ef/3.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:om="http://www.opengis.net/om/2.0" targetNamespace="http://inspire.ec.europa.eu/schemas/ef/3.0" elementFormDefault="qualified" version="3.0">
	<import namespace="http://inspire.ec.europa.eu/schemas/base/3.3" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/base2/1.0" schemaLocation="http://inspire.ec.europa.eu/schemas/base2/1.0/BaseTypes2.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<import namespace="http://www.opengis.net/om/2.0" schemaLocation="http://schemas.opengis.net/om/2.0/observation.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="AbstractMonitoringObject" type="ef:AbstractMonitoringObjectType" abstract="true" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
abstract monitoring object

-- Definition --
An abstract base class for environmental monitoring objects.</documentation>
		</annotation>
	</element>
	<complexType name="AbstractMonitoringObjectType" abstract="true">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Definition --
External object identifier.</documentation>
						</annotation>
					</element>
					<element name="name" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Plain text denotation of the AbstractMonitoringObject.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="string">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="additionalDescription" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Plain text description of additional information not fitting in other attributes.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="string">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="mediaMonitored" type="gml:ReferenceType" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Monitored environmental medium.</documentation>
						</annotation>
					</element>
					<element name="legalBackground" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
The legal context, in which the management and regulation of the AbstractMonitoringObject is defined.</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="base2:LegislationCitation"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="responsibleParty" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Responsible party for the AbstractMonitoringObject.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="base2:RelatedParty"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="geometry" type="gml:GeometryPropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Geometry associated to the AbstractMonitoringObject.
For mobile facilities the geometry represents the area the facility is expected to measure in.</documentation>
						</annotation>
					</element>
					<element name="onlineResource" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
A link to an external document providing further information on the AbstractMonitoringObject.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="anyURI">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="purpose" type="gml:ReferenceType" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Reason for which the AbstractMonitoringObject has been generated.</documentation>
						</annotation>
					</element>
					<element name="observingCapability" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
A link pointing to the explicit capability of an AbstractMonitoringObject. This provides a clean link between the observed property, the procedure used as well as the location of the measurement</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="ef:ObservingCapability"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="broader" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
A link pointing to a broader AbstractMonitoringObject (a higher level in a hierarchical structure).
The association has additional
properties as defined in the
association class Hierarchy.</documentation>
							<appinfo>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">ef:narrower</reversePropertyName>
							</appinfo>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="ef:Hierarchy"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
					<element name="narrower" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
A link pointing to narrower AbstractMonitoringObject(s) (a lower level in a hierarchical structure).
The association has additional
properties as defined in the
association class Hierarchy.</documentation>
							<appinfo>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">ef:broader</reversePropertyName>
							</appinfo>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="ef:Hierarchy"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
					<element name="supersedes" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
In a genealogy, the AbstractMonitoringObject(s) that has(have) been deactivated/replaced by another one.</documentation>
							<appinfo>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">ef:supersededBy</reversePropertyName>
							</appinfo>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="ef:AbstractMonitoringObject"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
					<element name="supersededBy" type="ef:AbstractMonitoringObjectPropertyType" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
In a genealogy, the newly active AbstractMonitoringObject(s) that replaces(replace) the superseded one.</documentation>
							<appinfo>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">ef:supersedes</reversePropertyName>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="AbstractMonitoringObjectPropertyType">
		<sequence minOccurs="0">
			<element ref="ef:AbstractMonitoringObject"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="ReportToLegalAct" type="ef:ReportToLegalActType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
report to legal act

-- Definition --
Information on the involvement of an AbstractMonitoringFeature in reporting. The information is specific per submitted reporting envelope and not per obligation/agreement.

-- Description --
From INSPIRE perspective, an AbstractMonitoringFeature requires the provision of  ISO 19156 compliant observations '||'&'||'amp; measurements only in the case that these have been required by a legal reporting obligation or a commonly agreed voluntarily data flow using INSPIRE EF dataspecification for the definition of datastructure.</documentation>
		</annotation>
	</element>
	<complexType name="ReportToLegalActType">
		<sequence>
			<element name="legalAct">
				<annotation>
					<documentation>-- Definition --
LegalAct which is reported to.</documentation>
				</annotation>
				<complexType>
					<complexContent>
						<extension base="gml:AbstractMemberType">
							<sequence minOccurs="0">
								<element ref="base2:LegislationCitation"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
						</extension>
					</complexContent>
				</complexType>
			</element>
			<element name="reportDate" nillable="true">
				<annotation>
					<documentation>-- Definition --
Time of reporting.</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="dateTime">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
			<element name="reportedEnvelope" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Definition --
Link to the reported data set according to the date indicated in the attribute reportDate.</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="anyURI">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
			<element name="observationRequired" nillable="true">
				<annotation>
					<documentation>-- Definition --
Indicates whether an observation is required for the AbstractMonitoringFeature.</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="boolean">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
			<element name="observingCapabilityRequired" nillable="true">
				<annotation>
					<documentation>-- Definition --
Indicates whether the observingCapability is required for the AbstractMonitoringFeature.</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="boolean">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
			<element name="description" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Definition --
Additional information on the actual data reported.</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="string">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
		</sequence>
	</complexType>
	<complexType name="ReportToLegalActPropertyType">
		<sequence>
			<element ref="ef:ReportToLegalAct"/>
		</sequence>
	</complexType>
	<element name="EnvironmentalMonitoringProgramme" type="ef:EnvironmentalMonitoringProgrammeType" substitutionGroup="ef:AbstractMonitoringObject">
		<annotation>
			<documentation>-- Name --
environmental monitoring programme

-- Definition --
Framework based on policy relevant documents defining the target of a collection of observations and/or the deployment of AbstractMonitoringFeatures on the field. 
Usually an Environmental Monitoring Programme has a long term perspective over at least a few years.</documentation>
		</annotation>
	</element>
	<complexType name="EnvironmentalMonitoringProgrammeType">
		<complexContent>
			<extension base="ef:AbstractMonitoringObjectType">
				<sequence>
					<element name="triggers" type="ef:EnvironmentalMonitoringActivityPropertyType" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
EnvironmentalMonitoringActivity(s) triggered by the EnvironmentalMonitoringProgramme.</documentation>
							<appinfo>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">ef:setUpFor</reversePropertyName>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="EnvironmentalMonitoringProgrammePropertyType">
		<sequence minOccurs="0">
			<element ref="ef:EnvironmentalMonitoringProgramme"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="AbstractMonitoringFeature" type="ef:AbstractMonitoringFeatureType" abstract="true" substitutionGroup="ef:AbstractMonitoringObject">
		<annotation>
			<documentation>-- Name --
abstract monitoring feature

-- Definition --
An abstract base class for environmental monitoring features in the real world (EnvironmentalMonitoringNetwork, EnvironmentalMonitoringFacility).

-- Description --</documentation>
		</annotation>
	</element>
	<complexType name="AbstractMonitoringFeatureType" abstract="true">
		<complexContent>
			<extension base="ef:AbstractMonitoringObjectType">
				<sequence>
					<element name="reportedTo" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Information on the involvement of the AbstractMonitoringFeature in reporting.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="ef:ReportToLegalAct"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="hasObservation" type="om:OM_ObservationPropertyType" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Observation of emissions, of the state of environmental media and of other ecosystem parameters (biodiversity, ecological conditions of vegetation, etc.) by or on behalf of public authorities at this AbstractMonitoringFeature.</documentation>
						</annotation>
					</element>
					<element name="involvedIn" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
EnvironmentalMonitoringActivity(s) in which the AbstractMonitoringFeature is involved.</documentation>
							<appinfo>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">ef:uses</reversePropertyName>
							</appinfo>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="ef:EnvironmentalMonitoringActivity"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="AbstractMonitoringFeaturePropertyType">
		<sequence minOccurs="0">
			<element ref="ef:AbstractMonitoringFeature"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="EnvironmentalMonitoringFacility" type="ef:EnvironmentalMonitoringFacilityType" substitutionGroup="ef:AbstractMonitoringFeature">
		<annotation>
			<documentation>-- Name --
environmental monitoring facility

-- Definition --
A georeferenced object directly collecting or processing data about objects whose properties (e.g. physical, chemical, biological or other aspects of environmental conditions) are repeatedly observed or measured. An environmental monitoring facility can also host other environmental monitoring facilities.

-- Description --
NOTE 1: An EnvironmentalMonitoringFacility is not a facility in the common INSPIRE sense realised by the Generic Conceptual Model class ActivtiyComplex.

NOTE 2: Laboratories are not EnvironmentalMonitoringFacilities from an INSPIRE perspective as the exact location of the laboratory does not add further information to the measurement. 
The methodology used in the laboratory should be provided with observational data.</documentation>
		</annotation>
	</element>
	<complexType name="EnvironmentalMonitoringFacilityType">
		<complexContent>
			<extension base="ef:AbstractMonitoringFeatureType">
				<sequence>
					<element name="representativePoint" type="gml:PointPropertyType" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Representative location for the EnvironmentalMonitoringFacility.

-- Description --</documentation>
						</annotation>
					</element>
					<element name="measurementRegime" type="gml:ReferenceType" nillable="true">
						<annotation>
							<documentation>-- Definition --
Regime of the measurement</documentation>
						</annotation>
					</element>
					<element name="mobile" nillable="true">
						<annotation>
							<documentation>-- Definition --
Indicate whether the EnvironmentalMonitoringFacility is mobile (repositionable) during the acquisition of the observation.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="boolean">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="resultAcquisitionSource" type="gml:ReferenceType" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Source of result acquisition</documentation>
						</annotation>
					</element>
					<element name="specialisedEMFType" type="gml:ReferenceType" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Categorisation of EnvironmentalMonitoringFacilities generally used by domain and in national settings.

-- Description --
EXAMPLE: platform, site, station, sensor, ...</documentation>
						</annotation>
					</element>
					<element name="operationalActivityPeriod" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Lifespan of the physical object (facility).</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="ef:OperationalActivityPeriod"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="relatedTo" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Any Thematic Link to an Environmental Monitoring Facility.
The association has additional properties as defined in the association class AnyDomainLink.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="ef:AnyDomainLink"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>';
            
        
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    
    pos := pos + amt;
    buf :=        
'					<element name="belongsTo" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
A link pointing to the EnvironmentalMonitoringNetwork(s) this EnvironmentalMonitoringFacility pertains to.
The association has additional properties as defined in the association class NetworkFacility.</documentation>
							<appinfo>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">ef:contains</reversePropertyName>
							</appinfo>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="ef:NetworkFacility"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="EnvironmentalMonitoringFacilityPropertyType">
		<sequence minOccurs="0">
			<element ref="ef:EnvironmentalMonitoringFacility"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="NetworkFacility" type="ef:NetworkFacilityType" substitutionGroup="gml:AbstractGML">
		<annotation>
			<documentation>-- Name --
network facility

-- Definition --
Link between EnvironmentalMonitoringNetwork and EnvironmentalMonitoringFacility.</documentation>
		</annotation>
	</element>
	<complexType name="NetworkFacilityType">
		<complexContent>
			<extension base="gml:AbstractGMLType">
				<sequence>
					<element name="linkingTime" nillable="true">
						<annotation>
							<documentation>-- Definition --
Time period of the link.</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="gml:AbstractTimeObject"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="belongsTo" nillable="true">
						<annotation>
							<documentation>-- Definition --
A link pointing to the EnvironmentalMonitoringNetwork(s) this EnvironmentalMonitoringFacility pertains to.
The association has additional properties as defined in the association class NetworkFacility.</documentation>
							<appinfo>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">ef:contains</reversePropertyName>
							</appinfo>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="ef:EnvironmentalMonitoringNetwork"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
					<element name="contains" nillable="true">
						<annotation>
							<documentation>-- Definition --
A link pointing to the EnvironmentalMonitoringFacility(s) included in this EnvironmentalMonitoringNetwork.
The association has additional properties as defined in the association class NetworkFacility.</documentation>
							<appinfo>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">ef:belongsTo</reversePropertyName>
							</appinfo>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="ef:EnvironmentalMonitoringFacility"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="NetworkFacilityPropertyType">
		<sequence minOccurs="0">
			<element ref="ef:NetworkFacility"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="EnvironmentalMonitoringNetwork" type="ef:EnvironmentalMonitoringNetworkType" substitutionGroup="ef:AbstractMonitoringFeature">
		<annotation>
			<documentation>-- Name --
environmental monitoring network

-- Definition --
Administrative or organisational grouping of EnvironmentalMonitoringFacilities managed the same way for a specific purpose, targeting a specific area. Each network respects common rules aiming at ensuring coherence of the observations, especially for purposes of EnvironmentalMonitoringFacilities, mandatory parameters selection, measurement methods and measurement regime.</documentation>
		</annotation>
	</element>
	<complexType name="EnvironmentalMonitoringNetworkType">
		<complexContent>
			<extension base="ef:AbstractMonitoringFeatureType">
				<sequence>
					<element name="organisationLevel" type="gml:ReferenceType" nillable="true">
						<annotation>
							<documentation>-- Definition --
Level of legal organisation the EnvironmentalMonitoringNetwork is affiliated with.</documentation>
						</annotation>
					</element>
					<element name="contains" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
A link pointing to the EnvironmentalMonitoringFacility(s) included in this EnvironmentalMonitoringNetwork.
The association has additional properties as defined in the association class NetworkFacility.</documentation>
							<appinfo>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">ef:belongsTo</reversePropertyName>
							</appinfo>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="ef:NetworkFacility"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="EnvironmentalMonitoringNetworkPropertyType">
		<sequence minOccurs="0">
			<element ref="ef:EnvironmentalMonitoringNetwork"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="Hierarchy" type="ef:HierarchyType" substitutionGroup="gml:AbstractGML">
		<annotation>
			<documentation>--Name --
hierarchy

-- Definition --
Hierachical link between AbstractMonitoringObjects.</documentation>
		</annotation>
	</element>
	<complexType name="HierarchyType">
		<complexContent>
			<extension base="gml:AbstractGMLType">
				<sequence>
					<element name="linkingTime" nillable="true">
						<annotation>
							<documentation>-- Definition --
Time period of the link.</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="gml:AbstractTimeObject"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="broader" nillable="true">
						<annotation>
							<documentation>-- Definition --
A link pointing to a broader AbstractMonitoringObject (a higher level in a hierarchical structure).
The association has additional
properties as defined in the
association class Hierarchy.</documentation>
							<appinfo>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">ef:narrower</reversePropertyName>
							</appinfo>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="ef:AbstractMonitoringObject"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
					<element name="narrower" nillable="true">
						<annotation>
							<documentation>-- Definition --
A link pointing to narrower AbstractMonitoringObject(s) (a lower level in a hierarchical structure).
The association has additional
properties as defined in the
association class Hierarchy.</documentation>
							<appinfo>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">ef:broader</reversePropertyName>
							</appinfo>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="ef:AbstractMonitoringObject"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="HierarchyPropertyType">
		<sequence minOccurs="0">
			<element ref="ef:Hierarchy"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="ObservingCapability" type="ef:ObservingCapabilityType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
observing capability

-- Definition --
Explicit capability of an AbstractMonitoringObject.</documentation>
		</annotation>
	</element>
	<complexType name="ObservingCapabilityType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="observingTime" nillable="true">
						<annotation>
							<documentation>-- Definition --
Describes the time period that observations can be expected from this AbstractMonitoringObject. Can be only a start time for running measurements or an interval.</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="gml:AbstractTimeObject"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="processType" type="gml:ReferenceType" nillable="true">
						<annotation>
							<documentation>-- Definition --
The type of object used for describing the process.</documentation>
						</annotation>
					</element>
					<element name="resultNature" type="gml:ReferenceType" nillable="true">
						<annotation>
							<documentation>-- Definition --
State of the provided result.</documentation>
						</annotation>
					</element>
					<element name="onlineResource" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
A link to an external document providing further information about an ISO 19156 ''Observations and Measurements'' compliant data model used to store or exchange Observations and Measurements acquired.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="anyURI">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="procedure" type="om:OM_ProcessPropertyType">
						<annotation>
							<documentation>-- Definition --
Link to the Process used to generate the result. The OM_Process shall be suitable for the observed property. As a corollary, details of the observed property are constrained by the procedure used.</documentation>
						</annotation>
					</element>
					<element name="featureOfInterest" type="gml:FeaturePropertyType" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
This feature is the real-world object whose properties are under observation, or is a feature intended to sample the real-world object</documentation>
						</annotation>
					</element>
					<element name="observedProperty" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Definition --
The property being observed or measured at this AMO.</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="ObservingCapabilityPropertyType">
		<sequence minOccurs="0">
			<element ref="ef:ObservingCapability"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="EnvironmentalMonitoringActivity" type="ef:EnvironmentalMonitoringActivityType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
environmental monitoring activity

-- Definition --
Specific set of AbstractMonitoringFeatures used for a given domain in a coherent and concise timeframe, area and purpose. Usually the information collected is treated as one time step in a long term monitoring programme. It is a concrete realisation of a given EnvironmentalMonitoringProgramme.

-- Description --
For example a vessel could be equipped with a collection of EnvironmentalMonitoringFacilities for a given campaign (= EnvironmentalMonitoringActivity) fulfilling an EnvironmentalMonitoringProgramme requirements. Then, after a given period this exact same vessel could be equipped with another set of EnvironmentalMonitoringFacilities for another campaign fulfilling another EnvironmentalMonitoringProgramme requirements.</documentation>
		</annotation>
	</element>
	<complexType name="EnvironmentalMonitoringActivityType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="activityTime" nillable="true">
						<annotation>
							<documentation>-- Definition --
Lifespan of the EnvironmentalMonitoringActivity.</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="gml:AbstractTimeObject"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="activityConditions" nillable="true">
						<annotation>
							<documentation>-- Definition --
Textual description of the EnvironmentalMonitoringActivity.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="string">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="boundingBox" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Bounding box in which the EnvironmentalMonitoringActivity takes place. 

-- Description --
EXAMPLE: If a research vessel has several monitoring activities (EnvironmentalMonitoringActivity) one wants to know where he cruised for each of those (EnvironmentaMonitoringActivity).</documentation>
						</annotation>
					</element>
					<element name="responsibleParty" nillable="true">
						<annotation>
							<documentation>-- Definition --
Responsible party for the EnvironmentalMonitoringActivity.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="base2:RelatedParty"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Definition --
External object identifier.</documentation>
						</annotation>
					</element>
					<element name="onlineResource" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
A link to an external document providing further information on the EnvironmentalMonitoringActivity.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="anyURI">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="setUpFor" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
EnvironmentalMonitoringProgramme(s) for which the EnvironmentalMonitoringActivity is set up.</documentation>
							<appinfo>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">ef:triggers</reversePropertyName>
							</appinfo>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="ef:EnvironmentalMonitoringProgramme"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
					<element name="uses" type="ef:AbstractMonitoringFeaturePropertyType" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Specific set of AbstractMonitoringFeature(s) involved in an EnvironmentalMonitoringActivity.</documentation>
							<appinfo>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">ef:involvedIn</reversePropertyName>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="EnvironmentalMonitoringActivityPropertyType">
		<sequence minOccurs="0">
			<element ref="ef:EnvironmentalMonitoringActivity"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="OperationalActivityPeriod" type="ef:OperationalActivityPeriodType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
operational activity period

-- Definition --
Corresponds to a period during which the EnvironmentalMonitoringFacility has been up and running.</documentation>
		</annotation>
	</element>
	<complexType name="OperationalActivityPeriodType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="activityTime">
						<annotation>
							<documentation>-- Definition --
Lifespan of the OperationalActivityPeriod.</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="gml:AbstractTimeObject"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="OperationalActivityPeriodPropertyType">
		<sequence minOccurs="0">
			<element ref="ef:OperationalActivityPeriod"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="AnyDomainLink" type="ef:AnyDomainLinkType" substitutionGroup="gml:AbstractGML">
		<annotation>
			<documentation>-- Name --
any domain link

-- Definition --
Any domain relevant link to an EnvironmentalMonitoringFacility that is not hierarchical or associated with a notion of genealogy.</documentation>
		</annotation>
	</element>
	<complexType name="AnyDomainLinkType">
		<complexContent>
			<extension base="gml:AbstractGMLType">
				<sequence>
					<element name="comment" nillable="true">
						<annotation>
							<documentation>-- Definition --
Additional information on the domain link.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="string">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="relatedTo" nillable="true">
						<annotation>
							<documentation>-- Definition --
Any Thematic Link to an Environmental Monitoring Facility.
The association has additional properties as defined in the association class AnyDomainLink.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="ef:EnvironmentalMonitoringFacility"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="AnyDomainLinkPropertyType">
		<sequence minOccurs="0">
			<element ref="ef:AnyDomainLink"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
</schema>';


    amt := length(buf);
    
    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 320;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (320, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/el-bas/3.0/elevationbasetypes.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 320 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as elevationbasetypes_el_bas_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:el-bas="http://inspire.ec.europa.eu/schemas/el-bas/3.0" targetNamespace="http://inspire.ec.europa.eu/schemas/el-bas/3.0" elementFormDefault="qualified" version="3.0">
	<annotation>
		<documentation>-- Name --
elevation - base types

-- Definition --
Elevation - Base Types application schema.</documentation>
		<appinfo>
			<gmlProfileSchema xmlns="http://www.opengis.net/gml/3.2">EMPTY</gmlProfileSchema>
		</appinfo>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/base/3.3" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<simpleType name="ElevationPropertyTypeValueType">
		<annotation>
			<documentation>-- Name --
elevation property type value

-- Definition --
Enumeration type which determines the elevation property which has been measured or calculated.

-- Description --
NOTE 1  An elevation property is a vertically-constrained dimensional property of an element consisting of an absolute measure referenced to a well-defined surface which is commonly taken as origin (geoid, water level, etc.).

NOTE 2  It does not include relative elevations of the element referenced to other spatial objects.

EXAMPLE  Height, depth.</documentation>
		</annotation>
		<restriction base="string">
			<enumeration value="height">
				<annotation>
					<documentation>-- Name --
height

-- Definition --
Elevation property measured along a plumb line in a direction opposite to Earth''s gravity field (upwards).

-- Description --
NOTE This definition intentionally avoids making reference to complex geodetic terms. It is only intended to specify the direction in which the elevation property has been measured.</documentation>
				</annotation>
			</enumeration>
			<enumeration value="depth">
				<annotation>
					<documentation>-- Name --
depth

-- Definition --
Elevation property measured along a plumb line in a direction coincident to Earth''s gravity field (downwards).

-- Description --
NOTE This definition intentionally avoids making reference to complex geodetic terms. It is only intended to specify the direction in which the elevation property has been measured.</documentation>
				</annotation>
			</enumeration>
		</restriction>
	</simpleType>
	<simpleType name="SurfaceTypeValueType">
		<annotation>
			<documentation>-- Name --
surface type value

-- Definition --
Enumeration type which determines the elevation surface with regard to its relative adherence to the Earth''s bare surface.

-- Description --
EXAMPLE DTM and DSM.</documentation>
		</annotation>
		<restriction base="string">
			<enumeration value="DTM">
				<annotation>
					<documentation>-- Name --
digital terrain model

-- Definition --
Digital terrain model.

-- Description --
EXAMPLE Buildings, bridges or vegetation do not form part of a DTM.

NOTE 1 For DTM surfaces describing the floor of water bodies (e.g. the sea-floor), the water bodies are not considered as part of the Earth''s bare surface. Hence, they are excluded from the DTM.

NOTE 2 For DTM surfaces in which any features placed on the Earth''s bare surface have not been totally filtered and excluded, the deviations must be explained in the metadata.</documentation>
				</annotation>
			</enumeration>
			<enumeration value="DSM">
				<annotation>
					<documentation>-- Name --
digital surface model

-- Definition --
Digital surface model.

-- Description --
EXAMPLE 1 Vegetation, buildings and bridges are examples of static features. 

EXAMPLE 2 Cars, trucks and other dynamic features are examples of temporary phenomena.

NOTE 1 For DSM surfaces describing the floor of water bodies (e.g. the sea-floor) and those features placed on it, the water bodies are not considered as part of the Earth''s bare surface. Hence, they are excluded from the DSM.

NOTE 2 For DSM surfaces in which any temporary phenomena have not been totally filtered and excluded, the deviations must be explained in the metadata.</documentation>
				</annotation>
			</enumeration>
		</restriction>
	</simpleType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 321;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (321, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/el-cov/3.0/elevationgridcoverage.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 321 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as elevationgridcoverage_el_cov_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:cvbase="http://inspire.ec.europa.eu/schemas/cvbase/1.0" xmlns:el-bas="http://inspire.ec.europa.eu/schemas/el-bas/3.0" xmlns:el-cov="http://inspire.ec.europa.eu/schemas/el-cov/3.0" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:gmlcov="http://www.opengis.net/gmlcov/1.0" xmlns:ns1="http://inspire.ec.europa.eu/schemas/cvbase/1.0" targetNamespace="http://inspire.ec.europa.eu/schemas/el-cov/3.0" elementFormDefault="qualified" version="3.0">
	<annotation>
		<documentation>-- Name --
elevation - grid coverage

-- Definition --
Elevation - Grid Coverage application schema.</documentation>
		<appinfo>
			<gmlProfileSchema xmlns="http://www.opengis.net/gml/3.2">EMPTY</gmlProfileSchema>
		</appinfo>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/base/3.3" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/cvbase/1.0" schemaLocation="http://inspire.ec.europa.eu/schemas/cvbase/1.0/CoverageBase.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/el-bas/3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/el-bas/3.0/ElevationBaseTypes.xsd"/>
	<import namespace="http://www.isotc211.org/2005/gmd" schemaLocation="http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<import namespace="http://www.opengis.net/gmlcov/1.0" schemaLocation="http://schemas.opengis.net/gmlcov/1.0/coverage.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="ElevationGridCoverageAggregation" type="el-cov:ElevationGridCoverageAggregationType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
elevation grid coverage aggregation

-- Definition --
Geometrical characteristics of the elevation grid coverage aggregation.</documentation>
		</annotation>
	</element>
	<complexType name="ElevationGridCoverageAggregationType">
		<sequence>
			<element name="contributingFootprint" type="gml:MultiSurfacePropertyType">
				<annotation>
					<documentation>-- Name --
contributing footprint

-- Definition --
Multi polygon delineating the geographic area of the elevation grid coverage that contributes to the aggregated elevation grid coverage.</documentation>
				</annotation>
			</element>
			<element name="contributingElevationGridCoverage">
				<annotation>
					<documentation>-- Name --
contributing elevation grid coverage

-- Definition --
Reference to the elevation grid coverages that compose an aggregated elevation grid coverage.

The association has additional properties as defined in the association class ElevationGridCoverageAggregation.</documentation>
					<appinfo>
						<targetElement xmlns="http://www.opengis.net/gml/3.2">el-cov:ElevationGridCoverage</targetElement>
					</appinfo>
				</annotation>
				<complexType>
					<complexContent>
						<extension base="gml:AbstractMemberType">
							<sequence/>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
						</extension>
					</complexContent>
				</complexType>
			</element>
		</sequence>
	</complexType>
	<complexType name="ElevationGridCoverageAggregationPropertyType">
		<sequence>
			<element ref="el-cov:ElevationGridCoverageAggregation"/>
		</sequence>
	</complexType>
	<element name="ElevationGridCoverage" type="el-cov:ElevationGridCoverageType" substitutionGroup="gmlcov:RectifiedGridCoverage">
		<annotation>
			<documentation>-- Name --
elevation grid coverage

-- Definition --
Continuous coverage which uses a systematic tessellation based on a regular rectified quadrilateral grid to cover its domain, where the elevation property value is usually known for each of the grid points forming this domain.

-- Description --
SOURCE Adapted from [ISO 19123:2005].</documentation>
		</annotation>
	</element>
	<complexType name="ElevationGridCoverageType">
		<complexContent>
			<extension base="gmlcov:AbstractDiscreteCoverageType">
				<sequence>
					<element name="beginLifespanVersion" nillable="true">
						<annotation>
							<documentation>-- Name --
begin lifespan version

-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="domainExtent" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
domain extent

-- Definition --
Extent of the spatiotemporal domain of the coverage.

-- Description --
SOURCE [ISO 19123:2005].

NOTE 1 The data type EX_Extent, is defined in ISO 19103.  Extents may be specified in both space and time. 

NOTE 2 The domain extent shall be specified at least in space by using EX_BoundingPolygon, EX_GeographicBoundingBox or EX_GeographicDescription.  The whole geographic extent of the elevation coverage is affected, including areas where grid points hold nil reason values.</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMetadataPropertyType">
									<sequence minOccurs="0">
										<element ref="gmd:EX_Extent"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="endLifespanVersion" nillable="true">
						<annotation>
							<documentation>-- Name --
end lifespan version

-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Name --
inspire ID

-- Definition --
External object identifier of the spatial object.

-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="propertyType" type="el-bas:ElevationPropertyTypeValueType">
						<annotation>
							<documentation>-- Name --
property type

-- Definition --
Attribute determining the elevation property represented by the elevation grid coverage.

-- Description --
EXAMPLE  Height, depth.</documentation>
						</annotation>
					</element>
					<element name="surfaceType" type="el-bas:SurfaceTypeValueType">
						<annotation>
							<documentation>-- Name --
surface type

-- Definition --
Attribute indicating the type of elevation surface that the coverage describes in relation to the Earth''s bare surface.</documentation>
						</annotation>
					</element>
					<element name="contributingElevationGridCoverage" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
contributing elevation grid coverage

-- Definition --
Reference to the elevation grid coverages that compose an aggregated elevation grid coverage.

The association has additional properties as defined in the association class ElevationGridCoverageAggregation.</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">el-cov:ElevationGridCoverage</targetElement>
							</appinfo>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence/>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="ElevationGridCoveragePropertyType">
		<sequence minOccurs="0">
			<element ref="el-cov:ElevationGridCoverage"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 322;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (322, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/el-tin/3.0/elevationtin.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 322 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as elevationtin_el_tin_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:el-bas="http://inspire.ec.europa.eu/schemas/el-bas/3.0" xmlns:el-tin="http://inspire.ec.europa.eu/schemas/el-tin/3.0" xmlns:gml="http://www.opengis.net/gml/3.2" targetNamespace="http://inspire.ec.europa.eu/schemas/el-tin/3.0" elementFormDefault="qualified" version="3.0">
	<annotation>
		<documentation>-- Name --
elevation - tin

-- Definition --
Elevation - TIN application schema.</documentation>
		<appinfo>
			<gmlProfileSchema xmlns="http://www.opengis.net/gml/3.2">EMPTY</gmlProfileSchema>
		</appinfo>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/base/3.3" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/el-bas/3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/el-bas/3.0/ElevationBaseTypes.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="ElevationTIN" type="el-tin:ElevationTINType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
elevation TIN

-- Definition --
Collection of elevation spatial objects forming a particular tessellation of the space based on a Triangulated Irregular Network (TIN) according the geometry GM_Tin (defined in ISO 19107:2003). Its components are a set of control points whose elevation property values are known, and a set of break lines and stop lines.

-- Description --
NOTE The TIN can be calculated using any triangulation method, which determines the spatial relationships between the spatial objects in the collection.

EXAMPLE An elevation TIN model calculated by means of the Delaunay triangulation method.</documentation>
		</annotation>
	</element>
	<complexType name="ElevationTINType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="beginLifespanVersion" nillable="true">
						<annotation>
							<documentation>-- Name --
begin lifespan version

-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="endLifespanVersion" nillable="true">
						<annotation>
							<documentation>-- Name --
end lifespan version

-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="geometries">
						<annotation>
							<documentation>-- Name --
geometries

-- Definition --
Represents the collection of geometric properties of the elevation TIN spatial object.</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="gml:Tin"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Name --
inspire ID

-- Definition --
External object identifier of the spatial object.

-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="propertyType" type="el-bas:ElevationPropertyTypeValueType">
						<annotation>
							<documentation>-- Name --
property type

-- Definition --
Attribute determining the elevation property represented by the elevation TIN.

-- Description --
EXAMPLE  Height, depth.</documentation>
						</annotation>
					</element>
					<element name="surfaceType" type="el-bas:SurfaceTypeValueType">
						<annotation>
							<documentation>-- Name --
surface type

-- Definition --
Attribute indicating the type of elevation surface that the elevation TIN describes in relation to the Earth''s bare surface.</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="ElevationTINPropertyType">
		<sequence minOccurs="0">
			<element ref="el-tin:ElevationTIN"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 323;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (323, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/el-vec/3.0/elevationvectorelements.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 323 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as elevationvectorelements_el_vec_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:el-bas="http://inspire.ec.europa.eu/schemas/el-bas/3.0" xmlns:el-vec="http://inspire.ec.europa.eu/schemas/el-vec/3.0" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:gn="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" xmlns:sc="http://www.interactive-instruments.de/ShapeChange/AppInfo" targetNamespace="http://inspire.ec.europa.eu/schemas/el-vec/3.0" elementFormDefault="qualified" version="3.0">
	<annotation>
		<documentation>-- Name --
elevation - vector elements

-- Definition --
Elevation - Vector Elements application schema.</documentation>
		<appinfo>
			<gmlProfileSchema xmlns="http://www.opengis.net/gml/3.2">EMPTY</gmlProfileSchema>
		</appinfo>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/base/3.3" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd"/>
	<!-- import namespace="http://inspire.ec.europa.eu/schemas/hy-p/4.0rc1" schemaLocation="http://inspire.ec.europa.eu/draft-schemas/hy-p/4.0rc1/HydroPhysicalWaters.xsd"/ -->
	<import namespace="http://inspire.ec.europa.eu/schemas/el-bas/3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/el-bas/3.0/ElevationBaseTypes.xsd"/>
	<import namespace="http://www.interactive-instruments.de/ShapeChange/AppInfo" schemaLocation="http://portele.de/ShapeChangeAppinfo.xsd"/>
	<import namespace="http://www.isotc211.org/2005/gmd" schemaLocation="http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<import namespace="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/gn/3.0/GeographicalNames.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="ElevationVectorObject" type="el-vec:ElevationVectorObjectType" abstract="true" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
elevation vector object

-- Definition --
Elevation spatial object forming part of a vector data set, which participates in the description of the elevation property of a real world surface. It consists of an identity base for all vector objects which can be included as part of an elevation data set.

-- Description --
It is an abstract feature type which generically describes every possible type of elevation vector object. It includes common attributes, properties and constraints for such spatial objects.</documentation>
		</annotation>
	</element>
	<complexType name="ElevationVectorObjectType" abstract="true">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="beginLifespanVersion" nillable="true">
						<annotation>
							<documentation>-- Name --
begin lifespan version

-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="endLifespanVersion" nillable="true">
						<annotation>
							<documentation>-- Name --
end lifespan version

-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="localDepthDatum" type="el-vec:ChartDatumPropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
local depth datum

-- Definition --
Identification of a local vertical coordinate reference system not included in a registry, which is used to refer depth measurements.

-- Description --
NOTE This data type is applicable only to bathymetric vector objects.

EXAMPLE Local datums for referring depths in lakes and navigable rivers.</documentation>
						</annotation>
					</element>
					<element name="propertyType" type="el-bas:ElevationPropertyTypeValueType">
						<annotation>
							<documentation>-- Name --
property type

-- Definition --
Attribute categorizing the elevation vector object as a land-elevation or a bathymetry spatial object. It determines the elevation property represented by the object.

-- Description --
EXAMPLE  Height, depth.</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="ElevationVectorObjectPropertyType">
		<sequence minOccurs="0">
			<element ref="el-vec:ElevationVectorObject"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="BreakLine" type="el-vec:BreakLineType" substitutionGroup="el-vec:ElevationVectorObject">
		<annotation>
			<documentation>-- Name --
breakline

-- Definition --
A line of a critical nature which describes the shape of an elevation surface and indicates a discontinuity in the slope of the surface (i.e. an abrupt change in gradient). Triangles included within a TIN model must never cross it.

-- Description --
SOURCE Adapted from [ISO 19107:2003].

EXAMPLE 
Breaklines represent local ridges or depressions (streams or drainage lines) in the surface, man-made structures (e.g. roads), etc. 

NOTE 1  A breakline connects points with different elevation and therefore its description using 2.5-D coordinates (using the ''geometry'' attribute) is fully recommended.

NOTE 2  No triangle in a TIN may cross a breakline (in other words, breakline segments are enforced as triangle edges), even if doing so violates the triangulation criterion.

NOTE 3  All breaklines are located on the ground surface or on any of the artificial structures built on it. 

NOTE 4  Breaklines are useful as input data for the generation of a more appropriate or accurate digital elevation model by using interpolation methods.</documentation>
		</annotation>
	</element>
	<complexType name="BreakLineType">
		<complexContent>
			<extension base="el-vec:ElevationVectorObjectType">
				<sequence>
					<element name="breakLineType" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Name --
break line type

-- Definition --
The type of break line with regard the natural or man-made real world characteristic it represents, or the specific function it has in calculating a Digital Elevation Model (DEM).</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">IR</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="geometry" type="gml:CurvePropertyType">
						<annotation>
							<documentation>-- Name --
geometry

-- Definition --
Represents the geometric properties of the spatial object.</documentation>
						</annotation>
					</element>
					<element name="manMadeBreak" nillable="true">
						<annotation>
							<documentation>-- Name --
man-made break

-- Definition --
Line which represents an elevation break due to an artificial or man-made construction present on the terrain.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="boolean">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="BreakLinePropertyType">
		<sequence minOccurs="0">
			<element ref="el-vec:BreakLine"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="ContourLine" type="el-vec:ContourLineType" substitutionGroup="el-vec:ElevationVectorObject">
		<annotation>
			<documentation>-- Name --
contour line

-- Definition --
Linear spatial object composed of a set of adjoining locations characterized by having the same elevation property value. It describes, together with other contour lines present in the area, the local morphology of the Earth''s surface.

-- Description --
NOTE 1 The attribute propertyType is equal to ''height'' in the case of contour lines and it is equal to ''depth'' in the case of depth contours.</documentation>
		</annotation>
	</element>
	<complexType name="ContourLineType">
		<complexContent>
			<extension base="el-vec:ElevationVectorObjectType">
				<sequence>
					<element name="contourLineType" nillable="true">
						<annotation>
							<documentation>-- Name --
contour line type

-- Definition --
The type of contour line with regard to the normal contour vertical interval (if any).

-- Description --
NOTE This attribute is often applicable to contour lines describing the relief of a land-based area. For depth contours describing the floor of a water body is not always applicable.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="el-vec:ContourLineTypeValueType">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="downRight" nillable="true">
						<annotation>
							<documentation>-- Name --
down right

-- Definition --
Property indicating that the contour line spatial object is digitized in a way that the height of the elevation surface is lower at the right side of the line.

-- Description --
NOTE 1 In the case of contour lines, when the downRight attribute is ''true'' this indicates that the height of the surface is lower at the right side of the line.

NOTE 2 In the case of depth contours, when the downRight attribute is ''true'' this indicates that the depth of the surface is higher at the right side of the line.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="boolean">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="geometry" type="gml:CurvePropertyType">
						<annotation>
							<documentation>-- Name --
geometry

-- Definition --
Represents the geometric properties of the spatial object.</documentation>
						</annotation>
					</element>
					<element name="propertyValue" type="gml:DirectPositionType">
						<annotation>
							<documentation>-- Name --
property value

-- Definition --
Value of the elevation property of the spatial object referred to a specific vertical coordinate reference system.</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="ContourLinePropertyType">
		<sequence minOccurs="0">
			<element ref="el-vec:ContourLine"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<simpleType name="ContourLineTypeValueType">
		<annotation>
			<documentation>-- Name --
contour line type value

-- Definition --
List of possible categories of contour lines based on the equidistance parameter of the data set.</documentation>
		</annotation>
		<restriction base="string">
			<enumeration value="master">
				<annotation>
					<documentation>-- Name --
master

-- Definition --
Contour at a vertical distance which is multiple to the equidistance parameter (corresponding to a certain multiple of the normal contour vertical interval) associated with the nominal scale.</documentation>
				</annotation>
			</enumeration>
			<enumeration value="ordinary">
				<annotation>
					<documentation>-- Name --
ordinary

-- Definition --
Contour at the equidistance parameter (corresponding to the normal contour vertical interval) associated with the nominal scale, and which is not a master contour.</documentation>
				</annotation>
			</enumeration>
			<enumeration value="auxiliary">
				<annotation>
					<documentation>-- Name --
auxiliary

-- Definition --
A supplementary contour '||'&'||'amp;ndash; not corresponding to the normal contour vertical interval '||'&'||'amp;ndash; estimated or interpolated from surrounding contours, used in areas where there is insufficient height information for elevation mapping purposes or to control the creation of a digital elevation model. 

-- Description --
NOTE This term is equivalent to the value ''intermediate'' used in some Member States.</documentation>
				</annotation>
			</enumeration>
		</restriction>
	</simpleType>
	<element name="IsolatedArea" type="el-vec:IsolatedAreaType" substitutionGroup="el-vec:ElevationVectorObject">
		<annotation>
			<documentation>-- Name --
isolated area

-- Definition --
Delimitation of an area of the Earth''s surface where an isolated part of the elevation model exists. Its outside surroundings have no elevation information.

-- Description --
SOURCE Adapted from "IslandArea" [GIS4EU D3.5].

NOTE 1 It includes the delimitation of any island of elevation data which are isolated from the main DEM. They may be included inside void areas.

NOTE 2 Isolated areas can be useful as masks when calculating a more appropriate or accurate DEM.</documentation>
		</annotation>
	</element>
	<complexType name="IsolatedAreaType">
		<complexContent>
			<extension base="el-vec:ElevationVectorObjectType">
				<sequence>
					<element name="geometry" type="gml:SurfacePropertyType">
						<annotation>
							<documentation>-- Name --
geometry

-- Definition --
Represents the geometric properties of the spatial object.</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="IsolatedAreaPropertyType">
		<sequence minOccurs="0">
			<element ref="el-vec:IsolatedArea"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="ChartDatum" type="el-vec:ChartDatumType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
chart datum

-- Definition --
Local vertical coordinate reference system which is used to refer and portray depth measurements as property values.

-- Description --
NOTE This data type is intended to describe the main characteristics of a vertical CRS for measurement of depths in cases where this information is rarely or not available through a CRS registry (e.g. like EPSG).

EXAMPLE Local datums for referring depths in lakes and navigable rivers.</documentation>
		</annotation>
	</element>
	<complexType name="ChartDatumType">
		<sequence>
			<element name="datumWaterLevel" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Name --
datum water level

-- Definition --
Water level determining the origin of depth measurements for the chart datum.

-- Description --
EXAMPLE High water, low water, etc.

NOTE 1 Values in the code list are applicable either for sea or inland waters.

NOTE 2 When defining a depth datum for inland waters, it is recommended the use of "highWater", "lowWater" or "meanWaterLevel" - as applicable. All the other levels in the code list are well defined but usually just locally and do not serve for cross border purposes.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">IR</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="offset" type="gml:MeasureType" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Name --
offset

-- Definition --
Relative difference between the height of each reference point and the height of the water level determining the chart datum.

-- Description --
NOTE 1 In order to calculate the offset parameter, the height(s) of the reference point(s) and the height of the water level determining the chart datum must be compared in the same vertical CRS.

NOTE 2 When a single reference point is provided, the offset parameter is supposed to be zero (by default). If this condition is true, there is no need to inform the offset parameter.

NOTE 3 When a set of reference points is provided, an individual offset parameter shall be provided for each of these points. The multiplicity between both properties - "referencePoint" and "offset" - is ordered with the aim to maintain this correspondence.</documentation>
				</annotation>
			</element>
			<element name="referencePoint" type="gml:PointPropertyType" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Name --
reference point

-- Definition --
Geographical position(s) of:
- Case A: a single point which is used to refer depth values within the geographical scope of the chart datum.
- Case B: a set of points where water level measurements are performed to determine the water level of the chart datum.

-- Description --
NOTE 1 The altimetric position of each reference point must be its height in a common vertical CRS: 
- in EVRS within its geographical scope (continental Europe).
- in a vertical CRS identified and documented by the Member State concerned, outside the geographical scope of EVRS (overseas territories).
'||'&'||'lt;font color="#ff0000"'||'&'||'gt;
'||'&'||'lt;/font'||'&'||'gt;NOTE 2 In Case A - The altimetric position of the reference point can be directly utilised as input to calculate approximate heights in a common vertical CRS for those vector objects whose depth values are referred to the chart datum. 

NOTE 3 In Case B - The altimetric positions of the reference points can be utilised, together with the respective offset parameter, as input to calculate approximate heights in a common vertical CRS for those vector objects whose depth values are referred to the water level of the chart datum. 

NOTE 4 The common vertical CRS mentioned in Note 2 and Note 3 shall be the one determined by Note 1.</documentation>
				</annotation>
			</element>
			<element name="scope">
				<annotation>
					<documentation>-- Name --
scope

-- Definition --
Geographic scope in which the local depth datum is practically used.

-- Description --
NOTE Chart datums should only be used to refer and portray depths at local level, since they are determined by a local water level. 

EXAMPLE 1 Lake or part of a lake in which a specific water level is used as depth datum.

EXAMPLE 2 River section in which a specific water level is used as depth datum.

EXAMPLE 3 Extent of the sea area in which a specific local tide level is used as depth datum.</documentation>
				</annotation>
				<complexType>
					<complexContent>
						<extension base="gml:AbstractMetadataPropertyType">
							<sequence minOccurs="0">
								<element ref="gmd:EX_Extent"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
						</extension>
					</complexContent>
				</complexType>
			</element>
		</sequence>
	</complexType>
	<complexType name="ChartDatumPropertyType">
		<sequence>
			<element ref="el-vec:ChartDatum"/>
		</sequence>
	</complexType>
	<element name="VoidArea" type="el-vec:VoidAreaType" substitutionGroup="el-vec:ElevationVectorObject">
		<annotation>
			<documentation>-- Name --
void area

-- Definition --
Area of the Earth''s surface where the elevation model is unknown because of missing input data. This area shall be excluded from a DEM.

-- Description --
SOURCE "ObscureArea" [GIS4EU D3.5].

NOTE 1 A void area may contain a number of isolated areas with elevation data. These are considered as holes of the container void area.

NOTE 2  Void areas can be useful as masks when calculating a more appropriate or accurate DEM.</documentation>
		</annotation>
	</element>
	<complexType name="VoidAreaType">
		<complexContent>
			<extension base="el-vec:ElevationVectorObjectType">
				<sequence>
					<element name="geometry" type="gml:SurfacePropertyType">
						<annotation>
							<documentation>-- Name --
geometry

-- Definition --
Represents the geometric properties of the spatial object.</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="VoidAreaPropertyType">
		<sequence minOccurs="0">
			<element ref="el-vec:VoidArea"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="SpotElevation" type="el-vec:SpotElevationType" substitutionGroup="el-vec:ElevationVectorObject">
		<annotation>
			<documentation>-- Name --
spot elevation

-- Definition --
Point spatial object which describes the elevation of an Earth''s surface at a specific location. It provides a single elevation property value.

-- Description --
NOTE 1 It often represents a singular point in the morphology of a land or water body''s floor surface.

NOTE 2 The attribute propertyType is equal to ''height'' in the case of spot heights. It is equal to ''depth'' in the case of spot depths.</documentation>
		</annotation>
	</element>
	<complexType name="SpotElevationType">
		<complexContent>
			<extension base="el-vec:ElevationVectorObjectType">
				<sequence>
					<element name="classification" type="gml:ReferenceType" nillable="true">
						<annotation>
							<documentation>-- Name --
classification

-- Definition --
Class of spot elevation according to the LAS specification of the American Society for Photogrammetry and Remote Sensing (ASPRS).</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">TG</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="geographicalName" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
geographical name

-- Definition --
A geographical name that is used to identify a named land or water body''s floor location in the real world, which is represented by the spot elevation spatial object.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="gn:GeographicalName"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="geometry" type="gml:PointPropertyType">
						<annotation>
							<documentation>-- Name --
geometry

-- Definition --
Represents the geometric properties of the spatial object.</documentation>
						</annotation>
					</element>
					<element name="propertyValue" type="gml:DirectPositionType">
						<annotation>
							<documentation>-- Name --
property value

-- Definition --
Value of the elevation property of the spatial object referred to a specific vertical coordinate reference system.</documentation>
						</annotation>
					</element>
					<element name="spotElevationType" type="gml:ReferenceType" nillable="true">
						<annotation>
							<documentation>-- Name --
spot elevation type

-- Definition --
The type of elevation spot.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">IR</taggedValue>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="SpotElevationPropertyType">
		<sequence minOccurs="0">
			<element ref="el-vec:SpotElevation"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 324;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (324, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/elu/3.0/existinglanduse.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 324 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as existinglanduse_elu_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:elu="http://inspire.ec.europa.eu/schemas/elu/3.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:lunom="http://inspire.ec.europa.eu/schemas/lunom/3.0" xmlns:sc="http://www.interactive-instruments.de/ShapeChange/AppInfo" targetNamespace="http://inspire.ec.europa.eu/schemas/elu/3.0" elementFormDefault="qualified" version="3.0">
	<annotation>
		<documentation>-- Name --
existing land use</documentation>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/base/3.3" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/lunom/3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/lunom/3.0/LandUseNomenclature.xsd"/>
	<import namespace="http://www.interactive-instruments.de/ShapeChange/AppInfo" schemaLocation="http://portele.de/ShapeChangeAppinfo.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="ExistingLandUseDataSet" type="elu:ExistingLandUseDataSetType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
existing land use data set
-- Definition --
An existing land use data set is a collection of areas for which information on existing (present or past) land uses is provided.</documentation>
		</annotation>
	</element>
	<complexType name="ExistingLandUseDataSetType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Definition --
External object identifier of the existing land use dataset.
-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="extent" type="gml:MultiSurfacePropertyType">
						<annotation>
							<documentation>-- Name --
existing land use data set
-- Definition --
Boundary of the geometrical union of all the instances of the spatial object type ExistingLandUseObject.</documentation>
						</annotation>
					</element>
					<element name="beginLifespanVersion" nillable="true">
						<annotation>
							<documentation>-- Definition --
Date and time at which this version of the existing land use data set was inserted or changed in the provided set of data.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="endLifespanVersion" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Date and time at which this version of the existing land use data set was superseded or retired in the provided set of data.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="name" type="string">
						<annotation>
							<documentation>-- Definition --
Human readable name of the data set.</documentation>
						</annotation>
					</element>
					<element name="validFrom" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
the time when the existing land use data set started to exist in the real world</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="date">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="validTo" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
The time from which this existing land use data set no longer exists in the real world.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="date">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="member" type="gml:ReferenceType" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Existing land use objects that belong to this existing land use data set.</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">elu:ExistingLandUseObject</targetElement>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">elu:dataset</reversePropertyName>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="ExistingLandUseDataSetPropertyType">
		<sequence minOccurs="0">
			<element ref="elu:ExistingLandUseDataSet"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="ExistingLandUseObject" type="elu:ExistingLandUseObjectType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
existing land use object
-- Definition --
An existing land use object describes the land use of an area having a homogeneous combination of land use types.</documentation>
		</annotation>
	</element>
	<complexType name="ExistingLandUseObjectType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Definition --
External object identifier of the existing land use object.
-- Description --
An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="beginLifespanVersion" nillable="true">
						<annotation>
							<documentation>-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="geometry" type="gml:MultiSurfacePropertyType">
						<annotation>
							<documentation>-- Definition --
Geometric representation of spatial area covered by this spatial object.</documentation>
						</annotation>
					</element>
					<element name="endLifespanVersion" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="hilucsLandUse" type="gml:ReferenceType" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Land use HILUCS classes that are present in this existing land use object.
-- Description --
NOTE The Existing Land Use model enables the provision of information on land uses inside one land use object. The ExistingLandUseObject may be associated with 1 to many HILUCSLandUse that represents the Land Uses for the polygon from the economical point of view. It makes possible the assignment of more than one HILUCSLandUse existences when they cannot be managed by HILUCSPresences.</documentation>
						</annotation>
					</element>
					<element name="hilucsPresence" nillable="true">
						<annotation>
							<documentation>-- Name --
land use presence
-- Definition --
Actual presence of a land use category according to HILUCS within the object.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
						<complexType>
							<sequence>
								<element ref="lunom:HILUCSPresence"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="specificLandUse" type="gml:ReferenceType" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Land Use Category according to the nomenclature specific to this data set.
-- Description --
Reference to an entry in the classfication that is part of the SpecificLandUseClassification.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="specificPresence" nillable="true">
						<annotation>
							<documentation>-- Name --
land use presence
-- Definition --
Actual presence of a land use category within the object.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
						<complexType>
							<sequence>
								<element ref="lunom:SpecificPresence"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="observationDate" nillable="true">
						<annotation>
							<documentation>-- Name --
Observation Date.
-- Definition --
The observation date associated to a description.
-- Description --
Defines the observation date of the description. It could be the date of an aerial/satellite acquisition or a field survey. The observation date allows the user to have accurate date of when the description was made in the real word. In a database, not all objects are necessarily captured at the same time.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="date">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="validFrom" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
The time when the phenomenon started to exist in the real world.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="date">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="validTo" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
The time from which the phenomenon no longer exists in the real world.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="date">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="dataset" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Definition --
Existing land use data set to which this land use object belongs.</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">elu:ExistingLandUseDataSet</targetElement>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">elu:member</reversePropertyName>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="ExistingLandUseObjectPropertyType">
		<sequence minOccurs="0">
			<element ref="elu:ExistingLandUseObject"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 325;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (325, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/er-b/3.0/energyresourcesbase.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 325 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as energyresourcesbase_er_b_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:er-b="http://inspire.ec.europa.eu/schemas/er-b/3.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:sc="http://www.interactive-instruments.de/ShapeChange/AppInfo" targetNamespace="http://inspire.ec.europa.eu/schemas/er-b/3.0" elementFormDefault="qualified" version="3.0">
	<annotation>
		<documentation>-- Name --
Energy Resources Base application schema</documentation>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/base/3.3" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd"/>
	<import namespace="http://www.interactive-instruments.de/ShapeChange/AppInfo" schemaLocation="http://portele.de/ShapeChangeAppinfo.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="VerticalExtentRangeType" type="er-b:VerticalExtentRangeTypeType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
Vertical extent range type

-- Definition --
Value indicating the upper and lower bounds of the height/depth range.

-- Description --
In the case of depth, the range between the deepest (lower bound) and most shallow (upper bound) aspect of the deposit body, where the depth is true vertical depth below a chosen vertical reference level.</documentation>
		</annotation>
	</element>
	<complexType name="VerticalExtentRangeTypeType">
		<sequence>
			<element name="lowerBound" nillable="true">
				<annotation>
					<documentation>-- Name --
Lower bound

-- Definition --
Value indicating the lower bound of the height/depth range.

-- Description --
In the case of subsurface resources, true vertical depth below a chosen vertical reference level to the deepest vertex of the deposit body.</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="gml:LengthType">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
			<element name="upperBound" type="gml:LengthType">
				<annotation>
					<documentation>-- Name --
Upper bound

-- Definition --
Value indicating the upper bound of the height/depth range.

-- Description --
In the case of subsurface resources, depth is the true vertical depth below a chosen vertical reference level to the shallowest vertex of the deposit body.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="VerticalExtentRangeTypePropertyType">
		<sequence>
			<element ref="er-b:VerticalExtentRangeType"/>
		</sequence>
	</complexType>
	<element name="VerticalExtentValue" type="er-b:VerticalExtentValueType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
Vertical extent value

-- Definition --
Either a single number or a range of height/depth values to describe the height/depth position of an Energy Resource.</documentation>
		</annotation>
	</element>
	<complexType name="VerticalExtentValueType">
		<choice>
			<element name="range" type="er-b:VerticalExtentRangeTypePropertyType">
				<annotation>
					<documentation>-- Name --
Range

-- Definition --
Range of numbers representing the height or depth range of an Energy Resource.

-- Description --
NOTE depth values are represented by negative numbers.</documentation>
				</annotation>
			</element>
			<element name="scalar" type="gml:LengthType">
				<annotation>
					<documentation>-- Name --
Scalar

-- Definition --
Number representing the height or depth of an Energy Resource.

-- Description --
NOTE depth values are represented by negative numbers.</documentation>
				</annotation>
			</element>
		</choice>
	</complexType>
	<complexType name="VerticalExtentValuePropertyType">
		<sequence>
			<element ref="er-b:VerticalExtentValue"/>
		</sequence>
	</complexType>
	<element name="VerticalExtentType" type="er-b:VerticalExtentTypeType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
Vertical extent type

-- Definition --
Vertical dimensional property consisting of an absolute measure or range of measures referenced to a well-defined vertical reference level which is commonly taken as origin (ground level, mean sea level, etc.).</documentation>
		</annotation>
	</element>
	<complexType name="VerticalExtentTypeType">
		<sequence>
			<element name="verticalExtent" type="er-b:VerticalExtentValuePropertyType">
				<annotation>
					<documentation>-- Name --
Vertical extent

-- Definition --
Extent of the vertical dimension represented by a scalar or by a range of values.</documentation>
				</annotation>
			</element>
			<element name="verticalReference" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Name --
Vertical Reference

-- Definition --
Reference level that was chosen to determine the vertical height/depth.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">technicalGuidance</taggedValue>
					</appinfo>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="VerticalExtentTypePropertyType">
		<sequence>
			<element ref="er-b:VerticalExtentType"/>
		</sequence>
	</complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 326;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (326, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/er-c/3.0/energyresourcescoverage.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 326 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as energyresourcescoverage_er_c_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:base2="http://inspire.ec.europa.eu/schemas/base2/1.0" xmlns:er-b="http://inspire.ec.europa.eu/schemas/er-b/3.0" xmlns:er-c="http://inspire.ec.europa.eu/schemas/er-c/3.0" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:gmlcov="http://www.opengis.net/gmlcov/1.0" xmlns:sc="http://www.interactive-instruments.de/ShapeChange/AppInfo" targetNamespace="http://inspire.ec.europa.eu/schemas/er-c/3.0" elementFormDefault="qualified" version="3.0">
	<annotation>
		<documentation>-- Name --
Energy Resources Coverage application schema</documentation>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/base/3.3" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/base2/1.0" schemaLocation="http://inspire.ec.europa.eu/schemas/base2/1.0/BaseTypes2.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/er-b/3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/er-b/3.0/EnergyResourcesBase.xsd"/>
	<import namespace="http://www.interactive-instruments.de/ShapeChange/AppInfo" schemaLocation="http://portele.de/ShapeChangeAppinfo.xsd"/>
	<import namespace="http://www.isotc211.org/2005/gmd" schemaLocation="http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<import namespace="http://www.opengis.net/gmlcov/1.0" schemaLocation="http://schemas.opengis.net/gmlcov/1.0/coverage.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="RenewableAndWastePotentialCoverage" type="er-c:RenewableAndWastePotentialCoverageType" substitutionGroup="gmlcov:AbstractCoverage">
		<annotation>
			<documentation>-- Name --
Renewable and waste potential coverage

-- Definition --
Function that returns an energy potential value from its range for any direct position within its spatial, temporal or spatio-temporal domain.

-- Description --
SOURCE Adapted from "Coverage" [ISO 19123:2005].</documentation>
		</annotation>
	</element>
	<complexType name="RenewableAndWastePotentialCoverageType">
		<complexContent>
			<extension base="gmlcov:AbstractCoverageType">
				<sequence>
					<element name="assessmentMethod" nillable="true">
						<annotation>
							<documentation>-- Name --
Assessment method

-- Definition --
A reference to the method used to assess the energy resource potential.</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="base2:DocumentCitation"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="beginLifespanVersion" nillable="true">
						<annotation>
							<documentation>-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="domainExtent" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
Domain extent

-- Definition --
The attribute domainExtent shall contain the extent of the spatio-temporal domain of the coverage. Extents may be specified in both space and time. 

-- Description --
NOTE 1 The domain extent shall be specified at least in space by using EX_BoundingPolygon, EX_GeographicBoundingBox or EX_GeographicDescription.  

NOTE 2 In specific cases information is needed on the vertical extent e.g. wind power potential.
SOURCE Adapted from [ISO 19123:2005].</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMetadataPropertyType">
									<sequence minOccurs="0">
										<element ref="gmd:EX_Extent"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="endLifespanVersion" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Definition --
External object identifier of the spatial object.

-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="name" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
Name

-- Definition --
Name of the coverage.

-- Description --
EXAMPLE The name of the catchment area for which a coverage has been extracted to represent Hydroelectric potential.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="string">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="potentialType" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Name --
Potential type

-- Definition --
There are various types of potential energy, each associated with a particular type of power.

-- Description --
NOTE Most detailed classification must be provided.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">technicalGuidance</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="typeOfResource" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Name --
Type of resource

-- Definition --
Type of renewable and waste resource to which the measured phenomenon is applicable.

-- Description --
NOTE Most detailed classification must be provided.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="validTime" type="gml:TimePeriodPropertyType" nillable="true">
						<annotation>
							<documentation>-- Name --
Valid time

-- Definition --
The time period for which this coverage is representative.</documentation>
						</annotation>
					</element>
					<element name="verticalExtent" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
Vertical extent

-- Definition --
A number or a range of height/depth values to describe the height/depth for which the range set values are valid.
EXAMPLE wind power map represents wind power at a height of 80m above groundlevel.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="er-b:VerticalExtentType"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="RenewableAndWastePotentialCoveragePropertyType">
		<sequence minOccurs="0">
			<element ref="er-c:RenewableAndWastePotentialCoverage"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 327;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (327, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/er-v/3.0/energyresourcesvector.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 327 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as energyresourcesvector_er_v_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:am="http://inspire.ec.europa.eu/schemas/am/3.0" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:base2="http://inspire.ec.europa.eu/schemas/base2/1.0" xmlns:er-b="http://inspire.ec.europa.eu/schemas/er-b/3.0" xmlns:er-v="http://inspire.ec.europa.eu/schemas/er-v/3.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:gn="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" xmlns:sc="http://www.interactive-instruments.de/ShapeChange/AppInfo" targetNamespace="http://inspire.ec.europa.eu/schemas/er-v/3.0" elementFormDefault="qualified" version="3.0">
	<annotation>
		<documentation>-- Name --
Energy Resources Vector application schema</documentation>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/base/3.3" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/base2/1.0" schemaLocation="http://inspire.ec.europa.eu/schemas/base2/1.0/BaseTypes2.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/am/3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/am/3.0/AreaManagementRestrictionRegulationZone.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/er-b/3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/er-b/3.0/EnergyResourcesBase.xsd"/>
	<import namespace="http://www.interactive-instruments.de/ShapeChange/AppInfo" schemaLocation="http://portele.de/ShapeChangeAppinfo.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<import namespace="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/gn/3.0/GeographicalNames.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="FossilFuelMeasure" type="er-v:FossilFuelMeasureType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
Fossil fuel measure

-- Definition --
Amount of resources according to the specific categorisation.</documentation>
		</annotation>
	</element>
	<complexType name="FossilFuelMeasureType">
		<sequence>
			<element name="amount" type="gml:MeasureType">
				<annotation>
					<documentation>-- Name --
Amount

-- Definition --
Amount of resource present in the spatial object.

-- Description --
NOTE the unit of measure to be used is standard cubic meters for natural gas assuming reference gas conditions (15 degrees Celsius; 101,325 kPa) and 1000 tonnes for solid fossil fuels and oil.</documentation>
				</annotation>
			</element>
			<element name="dateOfDetermination" type="gml:TimePositionType">
				<annotation>
					<documentation>-- Name --
Date of determination

-- Definition --
Date on which the resource was quantified.</documentation>
				</annotation>
			</element>
			<element name="resourceClass" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Name --
Resource class

-- Definition --
Category indicating the different confidence levels of fossil fuel resources for distinguishing real from potential or expected amount of fossil fuels.

-- Description --
A particular class within the classification framework.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">technicalGuidance</taggedValue>
					</appinfo>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="FossilFuelMeasurePropertyType">
		<sequence>
			<element ref="er-v:FossilFuelMeasure"/>
		</sequence>
	</complexType>
	<element name="FossilFuelResource" type="er-v:FossilFuelResourceType" substitutionGroup="er-v:VectorEnergyResource">
		<annotation>
			<documentation>-- Name --
Fossil fuel resource

-- Definition --
A spatial object defining an inferred or observable spatial extent of a resource that can be, or has been used as a source of fossil fuel energy.  The most common fossil fuel types are coal, natural gas and crude oil. 

-- Description --
Solid fossil fuels are those non-renewable hydrocarbon energy resources that are naturally found in the solid state i.e. coals and peat. Hydrocarbons cover various types of natural gas and petroleum resources.</documentation>
		</annotation>
	</element>
	<complexType name="FossilFuelResourceType">
		<complexContent>
			<extension base="er-v:VectorEnergyResourceType">
				<sequence>
					<element name="dateOfDiscovery" type="gml:TimePositionType" nillable="true">
						<annotation>
							<documentation>-- Name --
Date of discovery

-- Definition --
The date the energy source was discovered.</documentation>
						</annotation>
					</element>
					<element name="resource" type="er-v:FossilFuelResourceTypePropertyType" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
Resource

-- Definition --
Type and amount of fossil fuel resources in a single spatial object.</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="FossilFuelResourcePropertyType">
		<sequence minOccurs="0">
			<element ref="er-v:FossilFuelResource"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="ExploitationPeriodType" type="er-v:ExploitationPeriodTypeType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
Exploitation period type

-- Definition --
The exploitationPeriod defines the start and, if applicable, the end date of the exploitation or application.</documentation>
		</annotation>
	</element>
	<complexType name="ExploitationPeriodTypeType">
		<sequence>
			<element name="beginTime" type="gml:TimePositionType">
				<annotation>
					<documentation>-- Name --
Begin time

-- Definition --
The time when the exploitation started.

-- Description --
This is both for renewable and non-renewable energy sources. For non-renewable energy resources exploitation starts with certain mining activities. In the case of renewable energy resources, it starts with the extraction of energy using specific equipment.</documentation>
				</annotation>
			</element>
			<element name="endTime" type="gml:TimePositionType" minOccurs="0">
				<annotation>
					<documentation>-- Name --
End time

-- Definition --
The time when the exploitation ended.

-- Description --
This is both for renewable and non-renewable energy sources. For non-renewable energy resources exploitation ends with stopping the mining activities. In the case of renewable energy resources, it ends when specific equipment is no longer used for extraction of renewable and waste energy.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="ExploitationPeriodTypePropertyType">
		<sequence>
			<element ref="er-v:ExploitationPeriodType"/>
		</sequence>
	</complexType>
	<element name="FossilFuelResourceType" type="er-v:FossilFuelResourceTypeType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
Resource type

-- Definition --
Type and amount of resource according to specific categorisation.</documentation>
		</annotation>
	</element>
	<complexType name="FossilFuelResourceTypeType">
		<sequence>
			<element name="calorificValue" nillable="true">
				<annotation>
					<documentation>
					-- Name -- Calorific value
					-- Definition -- Each fossil fuel resource is characterised by its own calorific value, i.e. the quantity of energy available in a unit of mass.
					-- Description -- NOTE the unit of measure to be used is MJ/tonne for solid fossil fuels, MJ/tonne for oil and KJ/cubic meter for natural gas '||'&'||'lt;/font'||'&'||'gt;assuming reference gas conditions (15 degrees Celsius; 101,325 kPa)</documentation>
				</annotation>
				<complexType>
					<sequence>
						<element ref="er-v:CalorificValueType"/>
					</sequence>
					<attribute name="nilReason" type="gml:NilReasonType"/>
				</complexType>
			</element>
			<element name="quantity" nillable="true" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Name --
Quantity

-- Definition --
Amount of resource according to the specific categorisation.</documentation>
				</annotation>
				<complexType>
					<sequence>
						<element ref="er-v:FossilFuelMeasure"/>
					</sequence>
					<attribute name="nilReason" type="gml:NilReasonType"/>
				</complexType>
			</element>
			<element name="typeOfResource" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Name --
Type of resource

-- Definition --
Type of fossil fuel.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
					</appinfo>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="FossilFuelResourceTypePropertyType">
		<sequence>
			<element ref="er-v:FossilFuelResourceType"/>
		</sequence>
	</complexType>
	<element name="CalorificRangeType" type="er-v:CalorificRangeTypeType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
Calorific range type

-- Definition --
Value indicating the upper and lower bounds of the calorific range of the energy resource.</documentation>
		</annotation>
	</element>
	<complexType name="CalorificRangeTypeType">
		<sequence>
			<element name="lowerBound" type="gml:MeasureType">
				<annotation>
					<documentation>-- Name --
Lower bound

-- Definition --
Value indicating the lower bound of the calorific range.

-- Description --
NOTE the unit of measure to be used is the SI unit kJ/kg.</documentation>
				</annotation>
			</element>
			<element name="upperBound" type="gml:MeasureType">
				<annotation>
					<documentation>-- Name --
Upper bound

-- Definition --
Value indicating the upper bound of the calorific range.

-- Description --
NOTE the unit of measure to be used is the SI unit kJ/kg.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="CalorificRangeTypePropertyType">
		<sequence>
			<element ref="er-v:CalorificRangeType"/>
		</sequence>
	</complexType>
	<element name="CalorificValueType" type="er-v:CalorificValueTypeType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
Calorific value type.

-- Definition --
Value or range of values describing the calorific value of an Energy Resource.</documentation>
		</annotation>
	</element>
	<complexType name="CalorificValueTypeType">
		<choice>
			<element name="calorificRange" type="er-v:CalorificRangeTypePropertyType">
				<annotation>
					<documentation>-- Name --
Calorific range

-- Definition --
A range of calorific values describing the calorific value of an Energy Resource.</documentation>
				</annotation>
			</element>
			<element name="calorificScalar" type="gml:MeasureType">
				<annotation>
					<documentation>-- Name --
Calorific scalar

-- Definition --
Measure quantifying the calorific property of an Energy Resource.

-- Description --
NOTE the unit of measure to be used is the SI unit kJ/kg.</documentation>
				</annotation>
			</element>
		</choice>
	</complexType>
	<complexType name="CalorificValueTypePropertyType">
		<sequence>
			<element ref="er-v:CalorificValueType"/>
		</sequence>
	</complexType>
	<element name="VectorEnergyResource" type="er-v:VectorEnergyResourceType" abstract="true" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
Vector Energy Resource

-- Definition --
A vector spatial object defining an inferred or observable spatial extent of a resource that can be or has been used as a source of energy.</documentation>
		</annotation>
	</element>
	<complexType name="VectorEnergyResourceType" abstract="true">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="beginLifespanVersion" nillable="true">
						<annotation>
							<documentation>-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="ClassificationAndQuantificationFramework" type="gml:ReferenceType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
Classification and quantification framework

-- Definition --
A reference classification scheme to classify and quantify energy resources.

-- Description --
NOTE in most cases, only applicable to fossil fuels.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="endLifespanVersion" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="exploitationPeriod" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
Exploitation period

-- Definition --
The exploitationPeriod defines the start and, if applicable, the end date of the application.

-- Description --
NOTE For several reasons there might be more than 1 exploitation period</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="er-v:ExploitationPeriodType"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="geometry" type="gml:GeometryPropertyType">
						<annotation>
							<documentation>-- Name --
Geometry

-- Definition --
Geometric representation of spatial extent covered by this energy resource.</documentation>
						</annotation>
					</element>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Definition --
External object identifier of the spatial object.

-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="reportingAuthority" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
Reporting authority

-- Definition --
Organisation responsible for reporting on the estimated and produced energy resources.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="base2:RelatedParty"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="resourceName" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
Resource name

-- Definition --
The name of the energy resource

-- Description --
NOTE For fossil fuels this name is the official name, as it'||'&'||'amp;rsquo;s registered in the national register governed by geological survey or other national authority in charge.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="gn:GeographicalName"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="verticalExtent" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
Vertical extent

-- Definition --
Vertical dimensional property consisting of an absolute measure or range of measures referenced to a well-defined vertical reference level which is commonly taken as origin (ground level, mean sea level, etc.).

-- Description --
In the case of subsurface resources the depth or depth range between the deepest (lower bound) and most shallow (upper bound) aspect of the deposit body, where the depth is true vertical depth below a chosen vertical reference level.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="er-b:VerticalExtentType"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="VectorEnergyResourcePropertyType">
		<sequence minOccurs="0">
			<element ref="er-v:VectorEnergyResource"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="RenewableAndWasteResource" type="er-v:RenewableAndWasteResourceType" substitutionGroup="er-v:VectorEnergyResource">
		<annotation>
			<documentation>-- Name --
Renewable and waste resource

-- Definition --
A spatial object defining an inferred or observable spatial extent of a resource that can be, or has been used as a source of renewable energy or waste.

-- Description --
Renewable energy is energy that is naturally occurring and theoretically inexhausatable that is not derived from fossil or nuclear fuel. Waste is a fuel that may consist of many materials coming from combustible industrial, institutional, hospital and household wastes such as rubber, plastics, waste fossil oils and other similar commodities. It is either solid or liquid in form, renewable or non-renewable, biodegradable or non-biodegradable.</documentation>
		</annotation>
	</element>
	<complexType name="RenewableAndWasteResourceType">
		<complexContent>
			<extension base="er-v:VectorEnergyResourceType">
				<sequence>
					<element name="Capacity" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
Capacity

-- Definition --
Energy capacity of a renewable energy resource within the spatial object.

-- Description --
NOTE the unit of measure to be used is MWe for electrical generation capacity and MWt for heat generation capacity.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="gml:MeasureType">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="dateOfDetermination" type="gml:TimePositionType" nillable="true">
						<annotation>
							<documentation>-- Name --
Date of determination

-- Definition --
Date on which the capacity of the resource has been determined.</documentation>
						</annotation>
					</element>
					<element name="typeOfResource" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Name --
Type of resource

-- Definition --
The type of renewable energy or waste resource.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="RenewableAndWasteResourcePropertyType">
		<sequence minOccurs="0">
			<element ref="er-v:RenewableAndWasteResource"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 328;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (328, empty_clob(), 'INSPIRE', 'urn:x-inspire:specification:gmlas:EnergyResources:0.0/energyresources.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 328 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as energyresources_er_0_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?><schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:er="urn:x-inspire:specification:gmlas:EnergyResources:0.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:hy-p="urn:x-inspire:specification:gmlas:HydroPhysicalWaters:3.0" elementFormDefault="qualified" targetNamespace="urn:x-inspire:specification:gmlas:EnergyResources:0.0" version="0.0">
  <import namespace="urn:x-inspire:specification:gmlas:HydroPhysicalWaters:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/hy-p/3.0/HydroPhysicalWaters.xsd"/>
  <import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
  <!--XML Schema document created by ShapeChange-->
  <element name="HydroPowerPlant" substitutionGroup="hy-p:ManMadeObject" type="er:HydroPowerPlantType">
    <annotation>
      <documentation>-- Definition --
A facility for the generation of power from moving water.

-- Description --
NOTE Regarded as a candidate spatial object in Annex III theme ''Energy resources'' due to its primary energy-production role.</documentation>
    </annotation>
  </element>
  <complexType name="HydroPowerPlantType">
    <complexContent>
      <extension base="hy-p:ManMadeObjectType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="HydroPowerPlantPropertyType">
    <sequence minOccurs="0">
      <element ref="er:HydroPowerPlant"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 329;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (329, empty_clob(), 'INSPIRE', 'urn:x-inspire:specification:gmlas:Gazetteer:3.2/gazetteer.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 329 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as gazetteer_gaz_3_2.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?><schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:gaz="urn:x-inspire:specification:gmlas:Gazetteer:3.2" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml/3.2" elementFormDefault="qualified" targetNamespace="urn:x-inspire:specification:gmlas:Gazetteer:3.2" version="3.2">
  <annotation>
    <documentation>Application schema for gazetteers.</documentation>
  </annotation>
  <import namespace="http://www.isotc211.org/2005/gmd" schemaLocation="http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd"/>
  <import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
  <!--XML Schema document created by ShapeChange-->
  <element name="LocationInstance" substitutionGroup="gml:AbstractFeature" type="gaz:LocationInstanceType">
    <annotation>
      <documentation>Identifiable place in the real world</documentation>
    </annotation>
  </element>
  <complexType name="LocationInstanceType">
    <complexContent>
      <extension base="gml:AbstractFeatureType">
        <sequence>
          <element name="geographicIdentifier" type="string">
            <annotation>
              <documentation>unique identifier for the location instance</documentation>
            </annotation>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="alternativeGeographicIdentifier" type="string">
            <annotation>
              <documentation>other identifier for the location instance</documentation>
            </annotation>
          </element>
          <element minOccurs="0" name="dateOfCreation" type="date">
            <annotation>
              <documentation>date of creation of this version of the location instance</documentation>
            </annotation>
          </element>
          <element name="geographicExtent" type="gml:GeometryPropertyType">
            <annotation>
              <documentation>description of the location instance</documentation>
            </annotation>
          </element>
          <element name="admin">
            <annotation>
              <documentation>organization responsible for defining the characteristics of the location instance</documentation>
            </annotation>
            <complexType>
              <complexContent>
                <extension base="gml:AbstractMetadataPropertyType">
                  <sequence>
                    <element ref="gmd:CI_ResponsibleParty"/>
                  </sequence>
                </extension>
              </complexContent>
            </complexType>
          </element>
          <element maxOccurs="unbounded" name="gazetteer" type="gml:ReferenceType">
            <annotation>
              <documentation>gazatteer which includes this location instance</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">gaz:Gazetteer</targetElement>
              </appinfo>
            </annotation>
          </element>
          <element minOccurs="0" name="spatialObject" nillable="true" type="gml:FeaturePropertyType">
            <annotation>
              <documentation>reference to a spatial object that is associated with the location and often the source for the location instance</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">null:AbstractFeature</targetElement>
              </appinfo>
            </annotation>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="parent" type="gml:ReferenceType">
            <annotation>
              <documentation>location instance of a different location type, for which this location instance is a sub-division</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">gaz:LocationInstance</targetElement>
              </appinfo>
            </annotation>
          </element>
          <element name="locationType" type="gml:ReferenceType">
            <annotation>
              <documentation>location type of this instance</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">gaz:LocationType</targetElement>
              </appinfo>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="LocationInstancePropertyType">
    <sequence minOccurs="0">
      <element ref="gaz:LocationInstance"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="LocationType" substitutionGroup="gml:AbstractFeature" type="gaz:LocationTypeType">
    <annotation>
      <documentation>Classification scheme for location instances.</documentation>
    </annotation>
  </element>
  <complexType name="LocationTypeType">
    <complexContent>
      <extension base="gml:AbstractFeatureType">
        <sequence>
          <element name="name" type="gmd:PT_FreeText_PropertyType">
            <annotation>
              <documentation>name of the location type</documentation>
            </annotation>
          </element>
          <element name="definition" type="gmd:PT_FreeText_PropertyType">
            <annotation>
              <documentation>the way in which location instances are defined</documentation>
            </annotation>
          </element>
          <element maxOccurs="unbounded" name="identificationType" type="gml:CodeType">
            <annotation>
              <documentation>method of uniquely identifying location instances</documentation>
            </annotation>
          </element>
          <element name="territoryOfUse">
            <annotation>
              <documentation>geographic area within which the location type occurs</documentation>
            </annotation>
            <complexType>
              <complexContent>
                <extension base="gml:AbstractMetadataPropertyType">
                  <sequence minOccurs="0">
                    <element ref="gmd:AbstractEX_GeographicExtent"/>
                  </sequence>
                  <attributeGroup ref="gml:AssociationAttributeGroup"/>
                </extension>
              </complexContent>
            </complexType>
          </element>
          <element name="owner">
            <annotation>
              <documentation>name of organization or class of organization able to create and destroy location instances</documentation>
            </annotation>
            <complexType>
              <complexContent>
                <extension base="gml:AbstractMetadataPropertyType">
                  <sequence>
                    <element ref="gmd:CI_ResponsibleParty"/>
                  </sequence>
                </extension>
              </complexContent>
            </complexType>
          </element>
          <element minOccurs="0" name="spatialObjectType" type="anyURI">
            <annotation>
              <documentation>spatial object type used as the defining characteristic of the location type, if applicable</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">null:FC_FeatureType</targetElement>
              </appinfo>
            </annotation>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="parent" type="gml:ReferenceType">
            <annotation>
              <documentation>name of parent location type (a location type of which this location type is a sub-division)</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">gaz:LocationType</targetElement>
              </appinfo>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="LocationTypePropertyType">
    <sequence minOccurs="0">
      <element ref="gaz:LocationType"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="Gazetteer" substitutionGroup="gml:AbstractFeature" type="gaz:GazetteerType">
    <annotation>
      <documentation>A gazetteer is a directory of instances of location types in a spatial reference system.</documentation>
    </annotation>
  </element>
  <complexType name="GazetteerType">
    <complexContent>
      <extension base="gml:AbstractFeatureType">
        <sequence>
          <element name="name" type="gmd:PT_FreeText_PropertyType">
            <annotation>
              <documentation>name of the gazetteer</documentation>
            </annotation>
          </element>
          <element minOccurs="0" name="scope" type="gmd:PT_FreeText_PropertyType">
            <annotation>
              <documentation>description of the location types contained in the gazettee</documentation>
            </annotation>
          </element>
          <element name="custodian">
            <annotation>
              <documentation>name of the organization responsible for maintenance of the gazetteer</documentation>
            </annotation>
            <complexType>
              <complexContent>
                <extension base="gml:AbstractMetadataPropertyType">
                  <sequence>
                    <element ref="gmd:CI_ResponsibleParty"/>
                  </sequence>
                </extension>
              </complexContent>
            </complexType>
          </element>
          <element name="territoryOfUse">
            <annotation>
              <documentation>use geographic domain covered by the gazetteer</documentation>
            </annotation>
            <complexType>
              <complexContent>
                <extension base="gml:AbstractMetadataPropertyType">
                  <sequence minOccurs="0">
                    <element ref="gmd:AbstractEX_GeographicExtent"/>
                  </sequence>
                  <attributeGroup ref="gml:AssociationAttributeGroup"/>
                </extension>
              </complexContent>
            </complexType>
          </element>
          <element minOccurs="0" name="coordinateSystem" type="gml:CRSPropertyType">
            <annotation>
              <documentation>name of coordinate reference system used in the gazetteer for describing position</documentation>
            </annotation>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="locationType" type="gml:ReferenceType">
            <annotation>
              <documentation>location type for which instances are recorded in the gazetteer</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">gaz:LocationType</targetElement>
              </appinfo>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="GazetteerPropertyType">
    <sequence minOccurs="0">
      <element ref="gaz:Gazetteer"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 330;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (330, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/ge-core/3.0/geologycore.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 330 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as geologycore_ge_core_3_0.xsd
    -- Needed to separate this xsd into two pieces due to its size>32767.
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:base2="http://inspire.ec.europa.eu/schemas/base2/1.0" xmlns:ge="http://inspire.ec.europa.eu/schemas/ge-core/3.0" xmlns:ge_gp="http://inspire.ec.europa.eu/schemas/ge_gp/3.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:sc="http://www.interactive-instruments.de/ShapeChange/AppInfo" xmlns:swe="http://www.opengis.net/swe/2.0" targetNamespace="http://inspire.ec.europa.eu/schemas/ge-core/3.0" elementFormDefault="qualified" version="3.0">
	<import namespace="http://inspire.ec.europa.eu/schemas/base/3.3" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/base2/1.0" schemaLocation="http://inspire.ec.europa.eu/schemas/base2/1.0/BaseTypes2.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/ge_gp/3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/ge_gp/3.0/GeophysicsCore.xsd"/>
	<import namespace="http://www.interactive-instruments.de/ShapeChange/AppInfo" schemaLocation="http://portele.de/ShapeChangeAppinfo.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<import namespace="http://www.opengis.net/swe/2.0" schemaLocation="http://schemas.opengis.net/sweCommon/2.0/swe.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="Borehole" type="ge:BoreholeType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Definition --
A borehole is the generalized term for any narrow shaft drilled in the ground.</documentation>
		</annotation>
	</element>
	<complexType name="BoreholeType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Definition --
External object identifier of the spatial object.</documentation>
						</annotation>
					</element>
					<element name="downholeGeometry" type="gml:CurvePropertyType" nillable="true">
						<annotation>
							<documentation>The downhole geometry of the borehole</documentation>
						</annotation>
					</element>
					<element name="boreholeLength" type="swe:QuantityPropertyType" nillable="true">
						<annotation>
							<documentation>-- Definition --
The distance along a borehole.

-- Description --
This will be determined by the data provider (ie, "length" can have different sources, like drillers measurement, loggers measurement, survey).</documentation>
						</annotation>
					</element>
					<element name="elevation" nillable="true">
						<annotation>
							<documentation>-- Definition --
The vertical height above datum of the borehole collar.

-- Description --
This is a compromise approach to supply elevation explictly for location; this is to allow for software that cannot process 3-D GM_Point. Use null if elevation is unknown. Direct position shall have a dimension of 1, and CRS will be a "vertical" CRS (e.g. EPSG CRSs in the range 5600-5799).</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="gml:DirectPositionType">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="location" type="gml:PointPropertyType">
						<annotation>
							<documentation>-- Definition --
The location of the borehole collar.</documentation>
						</annotation>
					</element>
					<element name="purpose" type="gml:ReferenceType" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
The purpose for which the borehole was drilled.

-- Description --
EXAMPLE: site investigation, mineral exploration, hydrocarbon exploration, water resources.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="logElement" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
1-D MappedFeature instances that are logged (interpreted) intervals within a borehole.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="ge:MappedInterval"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="BoreholePropertyType">
		<sequence minOccurs="0">
			<element ref="ge:Borehole"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="GeologicStructure" type="ge:GeologicStructureType" abstract="true" substitutionGroup="ge:GeologicFeature">
		<annotation>
			<documentation>-- Definition --
A configuration of matter in the Earth based on describable inhomogeneity, pattern, or fracture in an earth material. 

-- Description --
The identity of a GeologicStructure is independent of the material that is the substrate for the structure.</documentation>
		</annotation>
	</element>
	<complexType name="GeologicStructureType" abstract="true">
		<complexContent>
			<extension base="ge:GeologicFeatureType">
				<sequence/>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="GeologicStructurePropertyType">
		<sequence minOccurs="0">
			<element ref="ge:GeologicStructure"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="ShearDisplacementStructure" type="ge:ShearDisplacementStructureType" substitutionGroup="ge:GeologicStructure">
		<annotation>
			<documentation>-- Definition --
Brittle to ductile style structures along which displacement has occurred.

-- Description --
These range from from a simple, single ''planar'' brittle or ductile surface to a fault system comprised of tens of strands of both brittle and ductile nature.</documentation>
		</annotation>
	</element>
	<complexType name="ShearDisplacementStructureType">
		<complexContent>
			<extension base="ge:GeologicStructureType">
				<sequence>
					<element name="faultType" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Definition --
Refers to a vocabulary of terms describing the type of shear displacement structure.

-- Description --
EXAMPLE: thrust fault, normal fault, wrench fault.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="ShearDisplacementStructurePropertyType">
		<sequence minOccurs="0">
			<element ref="ge:ShearDisplacementStructure"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="MappedFeature" type="ge:MappedFeatureType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Definition --
A spatial representation of a GeologicFeature.

-- Description --
A MappedFeature is part of a geological interpretation. 
It provides a link between a notional feature (description package) and one spatial representation of it, or part of it (exposures, surface traces and intercepts, etc) which forms the specific bounded occurrence, such as an outcrop or map polygon.</documentation>
		</annotation>
	</element>
	<complexType name="MappedFeatureType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="shape" type="gml:GeometryPropertyType">
						<annotation>
							<documentation>-- Definition --
The geometry of the mapped feature.</documentation>
						</annotation>
					</element>
					<element name="mappingFrame" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Definition --
The surface on which the mapped feature is projected.

-- Description --
EXAMPLE: Topographic surface, Bedrock surface, Base of Permian</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="specification" type="ge:GeologicFeaturePropertyType">
						<annotation>
							<documentation>-- Definition --
A description association that links a mapped feature to a notional geologic feature.  

-- Description --
A geologic feature, such as a geologic unit may be linked to mapped features from a number of different maps.  A mapped feature, however is always associated with only a single description (geologic feature).</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="MappedFeaturePropertyType">
		<sequence minOccurs="0">
			<element ref="ge:MappedFeature"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="ThematicClass" type="ge:ThematicClassType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Definition --
A generic thematic classifier to enable the reclassification of Geologic Features with user defined classes appropriate to thematic maps.

-- Description --
This datatype allows Geologic Features to be classified against thematic classes. This provides a generic means of delivering geological thematic map data.</documentation>
		</annotation>
	</element>
	<complexType name="ThematicClassType">
		<sequence>
			<element name="themeClassification" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Definition --
The used classification.</documentation>
				</annotation>
			</element>
			<element name="themeClass" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Definition --
The value of the thematic class.

-- Description --
The thematic class value should be constrained by a codelist of defined terms, but these will commonly be specific to a particular thematic map.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="ThematicClassPropertyType">
		<sequence>
			<element ref="ge:ThematicClass"/>
		</sequence>
	</complexType>
	<element name="GeologicCollection" type="ge:GeologicCollectionType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Definition --
A collection of geological or geophysical objects.

-- Description --
Geologic objects are commonly grouped into collections such as geological maps, thematic maps, or the required input to a geological model.</documentation>
		</annotation>
	</element>
	<complexType name="GeologicCollectionType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Definition --
External object identifier of the spatial object.</documentation>
						</annotation>
					</element>
					<element name="name" type="string">
						<annotation>
							<documentation>-- Definition --
The name of the collection.</documentation>
						</annotation>
					</element>
					<element name="collectionType" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Definition --
The type of the collection.

-- Description --
Refers to a vocabulary of types.
EXAMPLE: geological map, thematic map etc.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="reference" nillable="true">
						<annotation>
							<documentation>-- Definition --
A reference for the collection.</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="base2:DocumentCitation"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="beginLifespanVersion" nillable="true">
						<annotation>
							<documentation>-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="endLifespanVersion" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="mapMember" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
A Mapped Feature member of a Geologic Collection.

-- Description --
Association that allows MappedFeature objects to be included as members in a GML Collection, through the use of the GeologicCollection class.</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="ge:MappedFeature"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="boreholeMember" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
A Borehole member of a Geologic Collection.

-- Description --
Association that allows Borehole objects to be included as members in a GML Collection, through the use of the GeologicCollection class.</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="ge:Borehole"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="geophObjectSet" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
A GeophObjectSet member of a Geologic Collection.</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="ge_gp:GeophObjectSet"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="geophObjectMember" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
A GeophObject member of a Geologic Collection.</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="ge_gp:GeophObject"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>';
            
        
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    
    pos := pos + amt;
    buf :=        
'	<complexType name="GeologicCollectionPropertyType">
		<sequence minOccurs="0">
			<element ref="ge:GeologicCollection"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="GeomorphologicFeature" type="ge:GeomorphologicFeatureType" abstract="true" substitutionGroup="ge:GeologicFeature">
		<annotation>
			<documentation>-- Definition --
An abstract spatial object type describing the shape and nature of the Earth''s land surface (ie, a landform).  

-- Description --
These landforms may be created by natural Earth processes (eg, river channel, beach, moraine, mountain) or through human (anthropogenic) activity (eg, dredged channel, reclaimed land, mine waste dumps).</documentation>
		</annotation>
	</element>
	<complexType name="GeomorphologicFeatureType" abstract="true">
		<complexContent>
			<extension base="ge:GeologicFeatureType">
				<sequence/>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="GeomorphologicFeaturePropertyType">
		<sequence minOccurs="0">
			<element ref="ge:GeomorphologicFeature"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="GeologicFeature" type="ge:GeologicFeatureType" abstract="true" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Definition --
A conceptual geological feature that is hypothesized to exist coherently in the world.

-- Description --
This corresponds with a "legend item" from a traditional geologic map. While the bounding coordinates of a Geologic Feature may be described, its shape is not.
The implemented Geologic Feature instance acts as the "description package"</documentation>
		</annotation>
	</element>
	<complexType name="GeologicFeatureType" abstract="true">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Definition --
External object identifier of the spatial object.</documentation>
						</annotation>
					</element>
					<element name="name" nillable="true">
						<annotation>
							<documentation>-- Definition --
The name of the geologic feature.

-- Description --
EXAMPLE: a lithostratigraphic unit, mineral occurrence, or major fault. 
Not all GeologicFeatures will have names, for example minor faults.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="string">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="geologicHistory" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
An association that relates one or more geologic events to a geologic feature to describe their age or geologic history.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="ge:GeologicEvent"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
					<element name="themeClass" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
A thematic classification of the geologic feature.

-- Description --
A GeologicFeature may be classified according to one or more thematic schema, for example ground stability or mineral resource potential.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="ge:ThematicClass"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="GeologicFeaturePropertyType">
		<sequence minOccurs="0">
			<element ref="ge:GeologicFeature"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="CompositionPart" type="ge:CompositionPartType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Definition --
The composition of a geologic unit in terms of lithological constituents.</documentation>
		</annotation>
	</element>
	<complexType name="CompositionPartType">
		<sequence>
			<element name="material" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Definition --
The material that comprises part or all of the geologic unit. 

-- Description --
This refers to a vocabulary of lithological terms.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="proportion" nillable="true">
				<annotation>
					<documentation>-- Definition --
Quantity that specifies the fraction of the geologic unit composed of the material.</documentation>
				</annotation>
				<complexType>
					<complexContent>
						<extension base="gml:AbstractMemberType">
							<sequence minOccurs="0">
								<element ref="swe:QuantityRange"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
						</extension>
					</complexContent>
				</complexType>
			</element>
			<element name="role" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Definition --
The relationship of the composition part to the geologic unit composition as a whole.

-- Description --
EXAMPLE: vein, interbedded constituent, layers, dominant constituent.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
					</appinfo>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="CompositionPartPropertyType">
		<sequence>
			<element ref="ge:CompositionPart"/>
		</sequence>
	</complexType>
	<element name="GeologicEvent" type="ge:GeologicEventType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Definition --
An identifiable event during which one or more geological processes act to modify geological entities. 

-- Description --
A GeologicEvent should have a specified geologic age and process, and may have a specified environment. An example might be a cratonic uplift event during which erosion, sedimentation, and volcanism all take place. A GeologicEvent age can represent an instant in time or an interval of time.</documentation>
		</annotation>
	</element>
	<complexType name="GeologicEventType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="name" nillable="true">
						<annotation>
							<documentation>-- Definition --
The name of the Geologic Event.

-- Description --

Only major Geologic Events, such as orogenies, are likely to have names.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="string">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="eventEnvironment" type="gml:ReferenceType" nillable="true">
						<annotation>
							<documentation>-- Definition --
The physical setting within which the geologic event takes place.  

-- Description --
GeologicEnvironment is construed broadly to include physical settings on the Earth surface specified by climate, tectonics, physiography or geography, and settings in the Earth'||'&'||'amp;rsquo;s interior specified by pressure, temperature, chemical environment, or tectonics.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="eventProcess" type="gml:ReferenceType" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
The process or processes that occurred during the geologic event. 

-- Description --
EXAMPLE: deposition, extrusion, intrusion, cooling.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="olderNamedAge" type="gml:ReferenceType" nillable="true">
						<annotation>
							<documentation>-- Definition --
Older boundary of the age of the event.

-- Description --
This is expressed using a geochronologic era defined in a vocabulary of recognised units, such as those of the International Commission on Stratigraphy (ICS) Stratigraphic Chart.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="youngerNamedAge" type="gml:ReferenceType" nillable="true">
						<annotation>
							<documentation>-- Definition --
Younger boundary of the age of the event.

-- Description --
This is expressed using a geochronologic era defined in a vocabulary of recognised units, such as those of the International Commission on Stratigraphy (ICS) Stratigraphic Chart.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="GeologicEventPropertyType">
		<sequence minOccurs="0">
			<element ref="ge:GeologicEvent"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="GeologicUnit" type="ge:GeologicUnitType" substitutionGroup="ge:GeologicFeature">
		<annotation>
			<documentation>-- Definition --
A volume of rock with distinct characteristics.

-- Description --
Includes both formal units (i.e. formally adopted and named in an official lexicon) and informal units (i.e. named but not promoted to the lexicon) and unnamed units (i.e. recognisable and described and delineable in the field but not otherwise formalised).
Spatial properties are only available through association with a MappedFeature.</documentation>
		</annotation>
	</element>
	<complexType name="GeologicUnitType">
		<complexContent>
			<extension base="ge:GeologicFeatureType">
				<sequence>
					<element name="geologicUnitType" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Definition --
The type of geological the unit. 

-- Description --
Logical constraints of definition of unit and valid property cardinalities should be contained in the definition.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="composition" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Describes the composition of the geologic unit.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="ge:CompositionPart"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="GeologicUnitPropertyType">
		<sequence minOccurs="0">
			<element ref="ge:GeologicUnit"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="MappedInterval" type="ge:MappedIntervalType" substitutionGroup="ge:MappedFeature">
		<annotation>
			<documentation>-- Definition --
A special kind of mapped feature whose shape is a 1-D interval and which uses the SRS of the containing borehole.</documentation>
		</annotation>
	</element>
	<complexType name="MappedIntervalType">
		<complexContent>
			<extension base="ge:MappedFeatureType">
				<sequence/>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="MappedIntervalPropertyType">
		<sequence minOccurs="0">
			<element ref="ge:MappedInterval"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="AnthropogenicGeomorphologicFeature" type="ge:AnthropogenicGeomorphologicFeatureType" substitutionGroup="ge:GeomorphologicFeature">
		<annotation>
			<documentation>-- Definition --
A geomorphologic feature (ie, landform) which has been created by human activity.

-- Description --
EXAMPLE: dredged channel, midden, open pit, reclaimed land.</documentation>
		</annotation>
	</element>
	<complexType name="AnthropogenicGeomorphologicFeatureType">
		<complexContent>
			<extension base="ge:GeomorphologicFeatureType">
				<sequence>
					<element name="anthropogenicGeomorphologicFeatureType" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Definition --
Terms describing the type of a geomorphologic feature.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="AnthropogenicGeomorphologicFeaturePropertyType">
		<sequence minOccurs="0">
			<element ref="ge:AnthropogenicGeomorphologicFeature"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="Fold" type="ge:FoldType" substitutionGroup="ge:GeologicStructure">
		<annotation>
			<documentation>-- Definition --
One or more systematically curved layers, surfaces, or lines in a rock body. 

-- Description --
A fold denotes a structure formed by the deformation of a Geologic Structure to form a structure that may be described by the translation of an abstract line (the fold axis) parallel to itself along some curvilinear path (the fold profile). Folds have a hinge zone (zone of maximum curvature along the surface) and limbs (parts of the deformed surface not in the hinge zone).</documentation>
		</annotation>
	</element>
	<complexType name="FoldType">
		<complexContent>
			<extension base="ge:GeologicStructureType">
				<sequence>
					<element name="profileType" type="gml:ReferenceType" nillable="true">
						<annotation>
							<documentation>-- Definition --
The type of the fold.

-- Description --
Folds are typed according to the concave/convex geometry of the fold relative to the earth surface, and the relationship to younging direction in folded strata if known.
EXAMPLE:  antiform, synform, anticline, syncline, etc.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="FoldPropertyType">
		<sequence minOccurs="0">
			<element ref="ge:Fold"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="NaturalGeomorphologicFeature" type="ge:NaturalGeomorphologicFeatureType" substitutionGroup="ge:GeomorphologicFeature">
		<annotation>
			<documentation>-- Definition --
A geomorphologic feature (ie, landform) that has been created by natural Earth processes. 

-- Description --
EXAMPLE: river channel, beach ridge, caldera, canyon, moraine, mud flat.</documentation>
		</annotation>
	</element>
	<complexType name="NaturalGeomorphologicFeatureType">
		<complexContent>
			<extension base="ge:GeomorphologicFeatureType">
				<sequence>
					<element name="naturalGeomorphologicFeatureType" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Definition --
The type of the natural geomorphologic feature.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="activity" type="gml:ReferenceType" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
The level of activity of the natural geomorphologic feature.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="NaturalGeomorphologicFeaturePropertyType">
		<sequence minOccurs="0">
			<element ref="ge:NaturalGeomorphologicFeature"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
</schema>';    
    
    amt := length(buf);
   
    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 331;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (331, empty_clob(), 'INSPIRE', 'urn:x-inspire:specification:gmlas:Geology:0.0/geology.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 331 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as geology_ge_0_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?><schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:geo="urn:x-inspire:specification:gmlas:Geology:0.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:hy-p="urn:x-inspire:specification:gmlas:HydroPhysicalWaters:3.0" elementFormDefault="qualified" targetNamespace="urn:x-inspire:specification:gmlas:Geology:0.0" version="0.0">
  <import namespace="urn:x-inspire:specification:gmlas:HydroPhysicalWaters:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/hy-p/3.0/HydroPhysicalWaters.xsd"/>
  <import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
  <!--XML Schema document created by ShapeChange-->
  <element name="SpringOrSeep" substitutionGroup="hy-p:HydroPointOfInterest" type="geo:SpringOrSeepType">
    <annotation>
      <documentation>-- Definition --
A natural outflow of water from below the ground surface.

-- Description --
NOTE 1 Corresponds to a ''source'' node in a network view.

NOTE 2 Regarded as a placeholder in Annex II theme ''Geology'' due to the connection with groundwater.</documentation>
    </annotation>
  </element>
  <complexType name="SpringOrSeepType">
    <complexContent>
      <extension base="hy-p:HydroPointOfInterestType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="SpringOrSeepPropertyType">
    <sequence minOccurs="0">
      <element ref="geo:SpringOrSeep"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="VanishingPoint" substitutionGroup="hy-p:HydroPointOfInterest" type="geo:VanishingPointType">
    <annotation>
      <documentation>-- Definition --
Location where a watercourse disappears into the terrain or vanishes due to anthropization.

-- Description --
NOTE 1 Corresponds to an ''outlet'' node in a network view.

NOTE 2 Regarded as a placeholder in Annex II theme ''Geology'' due to the connection with groundwater.</documentation>
    </annotation>
  </element>
  <complexType name="VanishingPointType">
    <complexContent>
      <extension base="hy-p:HydroPointOfInterestType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="VanishingPointPropertyType">
    <sequence minOccurs="0">
      <element ref="geo:VanishingPoint"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 332;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (332, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/ge_gp/3.0/geophysicscore.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 332 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as geophysicscore_ge_gp_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:base2="http://inspire.ec.europa.eu/schemas/base2/1.0" xmlns:ge_gp="http://inspire.ec.europa.eu/schemas/ge_gp/3.0" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:sams="http://www.opengis.net/samplingSpatial/2.0" xmlns:sc="http://www.interactive-instruments.de/ShapeChange/AppInfo" targetNamespace="http://inspire.ec.europa.eu/schemas/ge_gp/3.0" elementFormDefault="qualified" version="3.0">
	<import namespace="http://inspire.ec.europa.eu/schemas/base/3.3" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/base2/1.0" schemaLocation="http://inspire.ec.europa.eu/schemas/base2/1.0/BaseTypes2.xsd"/>
	<import namespace="http://www.interactive-instruments.de/ShapeChange/AppInfo" schemaLocation="http://portele.de/ShapeChangeAppinfo.xsd"/>
	<import namespace="http://www.isotc211.org/2005/gmd" schemaLocation="http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<import namespace="http://www.opengis.net/samplingSpatial/2.0" schemaLocation="http://schemas.opengis.net/samplingSpatial/2.0/spatialSamplingFeature.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="GeophMeasurement" type="ge_gp:GeophMeasurementType" abstract="true" substitutionGroup="ge_gp:GeophObject">
		<annotation>
			<documentation>-- Definition --
Generic spatial object type for geophysical measurements.

-- Description --
Geophysical measurements collect data outside or on the boundary of the observed spatial domain.</documentation>
		</annotation>
	</element>
	<complexType name="GeophMeasurementType" abstract="true">
		<complexContent>
			<extension base="ge_gp:GeophObjectType">
				<sequence>
					<element name="relatedModel" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Identifier of the geophysical model that was created from the measurement

-- Description --
Results of the measurement can be referenced by these identifiers.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="base:Identifier"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="platformType" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Definition --
Platform from which the measurement was carried out

-- Description --
Values to be used are defined in codelist  PlatformTypeValue.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="relatedNetwork" type="gml:ReferenceType" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Name of a national or international observation network to which the facility belongs, or  to which measured data is reported.

-- Description --
Permanent measuring installations maz be part of larger observation networks. It means that observation data is regularly sent to the archives of the related network in an official way.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="GeophMeasurementPropertyType">
		<sequence minOccurs="0">
			<element ref="ge_gp:GeophMeasurement"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="GeophProfile" type="ge_gp:GeophProfileType" substitutionGroup="ge_gp:GeophMeasurement">
		<annotation>
			<documentation>-- Definition --
Geophysical measurement spatially referenced to a curve

-- Description --
Used to collect data along a curve. Examples: 2D seismic line (field measurement), borehole logging, airborne geophysical flight line

NOTE1. Processing results of geophProfiles are often vertical surface coverages</documentation>
		</annotation>
	</element>
	<complexType name="GeophProfileType">
		<complexContent>
			<extension base="ge_gp:GeophMeasurementType">
				<sequence>
					<element name="profileType" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Definition --
Type of geophysical profile</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="GeophProfilePropertyType">
		<sequence minOccurs="0">
			<element ref="ge_gp:GeophProfile"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="GeophObjectSet" type="ge_gp:GeophObjectSetType" substitutionGroup="sams:SF_SpatialSamplingFeature">
		<annotation>
			<documentation>-- Definition --
Generic class for collections of geophysical objects

-- Description --
It is a set of geophysical objects that are grouped by some common property. p.e: created in the same measuring campaign. GeophObjectSets are used for spatial sampling either by means of data acquisition or data processing. The produced  result of a geophObjectSet is always collective, e.g. a map constructed from the results of the individual member objects.</documentation>
		</annotation>
	</element>
	<complexType name="GeophObjectSetType">
		<complexContent>
			<extension base="sams:SF_SpatialSamplingFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Definition --
External object identifier of the spatial object.

-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="citation">
						<annotation>
							<documentation>-- Definition --
Citation of geophysical documentation

-- Description --
Used for title,  date of related documentation and URL for  online access. At the minimum a short name (title) shall be given.</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="base2:DocumentCitation"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="verticalExtent" nillable="true">
						<annotation>
							<documentation>-- Definition --
Vertical extent of the range of interest. 

-- Description --
This parameter serves discovery purposes. It may refer both to the vertical extent of the setup of measurements within the survey, or the extent of the range where processed data is spatially referenced to (estimated depth of investigation). The aim is to give an idea to the user about the estimated depth of investigation.</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMetadataPropertyType">
									<sequence minOccurs="0">
										<element ref="gmd:EX_VerticalExtent"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="distributionInfo" nillable="true">
						<annotation>
							<documentation>-- Definition --
Distribution metadata

-- Description --
Data providers may use external services to provide access to data or information on a survey. Links to the access points, description of ordering procedures, fees can be added in distributionInfo that is an ISO MD_Distributor record.</documentation>
						</annotation>
					</element>
					<element name="projectedGeometry" type="gml:GeometryPropertyType" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
2D projection of the feature to the ground surface (as a representative point, curve or bounding polygon) to be used by an INSPIRE view service to display the spatial object on a map.. 

-- Description --
Projected geometry of the object set  (survey), that is usually the bounding polygon of the working area.</documentation>
						</annotation>
					</element>
					<element name="largerWork" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Identifier of a larger work dataset

-- Description --
The largerWork identifier points to the parent Campaign or Project</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="base:Identifier"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="GeophObjectSetPropertyType">
		<sequence minOccurs="0">
			<element ref="ge_gp:GeophObjectSet"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="GeophSwath" type="ge_gp:GeophSwathType" substitutionGroup="ge_gp:GeophMeasurement">
		<annotation>
			<documentation>-- Definition --
Geophysical measurement spatially referenced to a surface

-- Description --
Used to collect data over a surface. Example: 3D seismic swath

NOTE1. Processing results of geophSwaths can be both surface and solid coverages</documentation>
		</annotation>
	</element>
	<complexType name="GeophSwathType">
		<complexContent>
			<extension base="ge_gp:GeophMeasurementType">
				<sequence>
					<element name="swathType" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Definition --
Type of geophysical swath</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="GeophSwathPropertyType">
		<sequence minOccurs="0">
			<element ref="ge_gp:GeophSwath"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="Campaign" type="ge_gp:CampaignType" substitutionGroup="ge_gp:GeophObjectSet">
		<annotation>
			<documentation>-- Definition --
Geophysical activity extending over a limited time range and limited area for producing similar geophysical measurements, processing results or models.

-- Description --
Campaigns can be considered as parents of geophysical measurements or models. Children may refer to parent campaigns through the largerWork  identifier.</documentation>
		</annotation>
	</element>
	<complexType name="CampaignType">
		<complexContent>
			<extension base="ge_gp:GeophObjectSetType">
				<sequence>
					<element name="campaignType" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Definition --
Type of activity to produce data

-- Description --
Value shall be one of the items defined in codelist CampaignTypeValue</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="surveyType" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Definition --
Type of geophysical survey

-- Description --
The geophysical method is specified by this attribute. Value shall be one of the items defined in codelist SurveyTypeValue.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="client" nillable="true">
						<annotation>
							<documentation>-- Definition --
Party for which data was created.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="base2:RelatedParty"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="contractor" nillable="true">
						<annotation>
							<documentation>-- Definition --
Party by which data was created

-- Description --
Party responsible for creating the data related to the campaign</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="base2:RelatedParty"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="CampaignPropertyType">
		<sequence minOccurs="0">
			<element ref="ge_gp:Campaign"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="GeophStation" type="ge_gp:GeophStationType" substitutionGroup="ge_gp:GeophMeasurement">
		<annotation>
			<documentation>-- Definition --
Geophysical measurement spatially referenced to a single point location

-- Description --
Used to collect data at a single location. The source-sensor setup may be elongated or two dimensional, but the collected data is spatially referenced to a single point. Example: Gravity station, Magnetic station

NOTE 1. Processing results of geophStations are often vertical curve coverages</documentation>
		</annotation>
	</element>
	<complexType name="GeophStationType">
		<complexContent>
			<extension base="ge_gp:GeophMeasurementType">
				<sequence>
					<element name="stationType" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Definition --
Type of geophysical station</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="stationRank" type="gml:ReferenceType" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Geophysical stations may be part of a hierarchical system. Rank is proportional to the importance of a station 

-- Description --
Significance of stations can be very different even for the same geophysical method. Rank maz take the following values: 1stOrderBase, 2ndOrderBase, secularStation, observatory. Base stations are used to tie local measurements to higher level networks. Secular stations are visited from time to time to detect long term temporal changes of physical parameters. Observatories are important facilities that collect data continuously, or on a regular basis.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="GeophStationPropertyType">
		<sequence minOccurs="0">
			<element ref="ge_gp:GeophStation"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="GeophObject" type="ge_gp:GeophObjectType" abstract="true" substitutionGroup="sams:SF_SpatialSamplingFeature">
		<annotation>
			<documentation>-- Definition --
A generic class for  geophysical objects. 

-- Description --
GeophObject models single geophysical entities that are used for spatial sampling either by means of data acquisition or data processing.</documentation>
		</annotation>
	</element>
	<complexType name="GeophObjectType" abstract="true">
		<complexContent>
			<extension base="sams:SF_SpatialSamplingFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Definition --
External object identifier of the measurement.

-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="citation">
						<annotation>
							<documentation>-- Definition --
Citation of geophysical documentation

-- Description --
Used for title,  date of related documentation and URL for  online access. At the minimum a short name (title) shall be given.</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="base2:DocumentCitation"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="projectedGeometry" type="gml:GeometryPropertyType" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
2D projection of the feature to the ground surface (as a representative point, curve or bounding polygon) to be used by an INSPIRE view service to display the spatial object location on a map. 

-- Description --
When measurement setup is 3 dimensional, it is necessary to define a 2D geometry for displaying purposes. It shall be the 2D projection of the spatial object on the ground surface. Allowed types: point, track and outline. Examples: projected geometry of a borehole logging measurement is a point coincident with the borehole collar location. Projected geometry of a 3D multielectrode DC measurement is a polygon</documentation>
						</annotation>
					</element>
					<element name="verticalExtent" nillable="true">
						<annotation>
							<documentation>-- Definition --
Vertical extent of the range of interest. 

-- Description --
This parameter serves discovery purposes. It may refer both to the vertical extent of the measurement setup (p.e. borehole logging) or the extent of the range where processed data is spatially referenced to (Vertical Electric Sounding). The aim is to give an idea to the user about the estimated depth of investigation.</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMetadataPropertyType">
									<sequence minOccurs="0">
										<element ref="gmd:EX_VerticalExtent"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="distributionInfo" nillable="true">
						<annotation>
							<documentation>-- Definition --
Distribution metadata

-- Description --
Data providers may use external services to provide information on a geophysical measurement. Links to the access points, description of ordering procedures or external services can be added in distributionInfo, that is an ISO MD_Distributor record.</documentation>
						</annotation>
					</element>
					<element name="largerWork" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Identifier of a larger work dataset, typically a campaign or project

-- Description --
Measurements are usually made in campaigns. The largerWork identifier points to the parent Campaign or Project</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="base:Identifier"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="GeophObjectPropertyType">
		<sequence minOccurs="0">
			<element ref="ge_gp:GeophObject"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 333;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (333, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/ge_hg/3.0/hydrogeologycore.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 333 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as hydrogeologycore_ge_hg_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:ef="http://inspire.ec.europa.eu/schemas/ef/3.0" xmlns:ge="http://inspire.ec.europa.eu/schemas/ge-core/3.0" xmlns:ge_hg="http://inspire.ec.europa.eu/schemas/ge_hg/3.0" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:gmlcov="http://www.opengis.net/gmlcov/1.0" xmlns:omso="http://inspire.ec.europa.eu/schemas/omso/2.0" xmlns:sc="http://www.interactive-instruments.de/ShapeChange/AppInfo" xmlns:swe="http://www.opengis.net/swe/2.0" targetNamespace="http://inspire.ec.europa.eu/schemas/ge_hg/3.0" elementFormDefault="qualified" version="3.0">
	<import namespace="http://inspire.ec.europa.eu/schemas/base/3.3" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/ef/3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/ef/3.0/EnvironmentalMonitoringFacilities.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/ge-core/3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/ge-core/3.0/GeologyCore.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/omso/2.0" schemaLocation="http://inspire.ec.europa.eu/schemas/omso/2.0/SpecialisedObservations.xsd"/>
	<import namespace="http://www.interactive-instruments.de/ShapeChange/AppInfo" schemaLocation="http://portele.de/ShapeChangeAppinfo.xsd"/>
	<import namespace="http://www.isotc211.org/2005/gmd" schemaLocation="http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<import namespace="http://www.opengis.net/gmlcov/1.0" schemaLocation="http://schemas.opengis.net/gmlcov/1.0/coverage.xsd"/>
	<import namespace="http://www.opengis.net/swe/2.0" schemaLocation="http://schemas.opengis.net/sweCommon/2.0/swe.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="AquiferSystem" type="ge_hg:AquiferSystemType" substitutionGroup="ge_hg:HydrogeologicalUnit">
		<annotation>
			<documentation>-- Name --
Aquifer System
-- Definition --
A collection of aquifers and aquitards, which together constitute the environment of groundwater - "communicating vessels", that are filled or can be filled with water. 

-- Description -- 
Attributes of Aquifer System and its components determine the feasibility of water collection, its movement, as well as the impact on its chemical state.
NOTE: The Aquifer System components and their attributes (including geometry) are relatively stable over time except in special cases.</documentation>
		</annotation>
	</element>
	<complexType name="AquiferSystemType">
		<complexContent>
			<extension base="ge_hg:HydrogeologicalUnitType">
				<sequence>
					<element name="isLayered" nillable="true">
						<annotation>
							<documentation>-- Name --
Is Layered
-- Definition --
Indicates if the AquiferSystem consists of more than one layer.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="boolean">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="aquifer" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
Aquifer
-- Definition --
The Aquifer(s) contained in the AquiferSystem.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="ge_hg:Aquifer"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
					<element name="aquitard" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
Aquitard
-- Definition --
The Aquitard(s) contained within the AquiferSystem.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="ge_hg:Aquitard"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
					<element name="aquiclude" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
Aquiclude
-- Definition --
An Aquiclude enclosing the AquiferSystem.

-- Description --
This acts as a barrier for groundwater flow.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="ge_hg:Aquiclude"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="AquiferSystemPropertyType">
		<sequence minOccurs="0">
			<element ref="ge_hg:AquiferSystem"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="PiezometricState" type="ge_hg:PiezometricStateType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
Piezometric State

-- Definition --
The piezometric state of a GroundWaterBody

-- Description --
Groundwater state (level) as a surface. It can be a set of point observations or interpolated to form a coverage.</documentation>
		</annotation>
	</element>
	<complexType name="PiezometricStateType">
		<sequence>
			<element name="observationTime" type="dateTime">
				<annotation>
					<documentation>-- Name --
Observation Time
-- Definition --
Date and time of groundwater state observation.</documentation>
				</annotation>
			</element>
			<element name="piezometricSurface" type="ge_hg:HydrogeologicalSurfacePropertyType">
				<annotation>
					<documentation>-- Name --
Piezometric Surface
-- Definition --
A surface that represents the level to which water will rise in tightly cased wells. 

-- Description --
If the head varies significantly with depth in the aquifer, then there may be more than one potentiometric surface. The water table is a particular potentiometric surface for an unconfined aquifer.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="PiezometricStatePropertyType">
		<sequence>
			<element ref="ge_hg:PiezometricState"/>
		</sequence>
	</complexType>
	<element name="HydrogeologicalObjectNatural" type="ge_hg:HydrogeologicalObjectNaturalType" substitutionGroup="ge_hg:HydrogeologicalObject">
		<annotation>
			<documentation>-- Name --
Hydrogeological Object Natural
-- Definition --
HydrogeologicalObject which was created by natural processes.
-- Description --
Examples of natural hydrogeological objects are: a source, vanishing point and geyser.</documentation>
		</annotation>
	</element>
	<complexType name="HydrogeologicalObjectNaturalType">
		<complexContent>
			<extension base="ge_hg:HydrogeologicalObjectType">
				<sequence>
					<element name="naturalObjectType" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Name --
Natural Object Type
-- Definition --
The type of natural hydrogeological object.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="waterPersistence" type="gml:ReferenceType" nillable="true">
						<annotation>
							<documentation>-- Name --
Water Persistence
-- Definition --
The degree of persistence of water flow.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="approximateQuantityOfFlow" nillable="true">
						<annotation>
							<documentation>-- Name --
Approximate Quantity of Flow
-- Definition --
An approximate value defining the water yield in a natural hydrogeological object.

-- Description --
The discharge of water flow for a certain cross-section per time unit.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="ge_hg:QuantityValue"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="groundWaterBody" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
Groundwater Body
-- Definition --
The GroundWateBody with which the natural hydrogeological object interacts.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="ge_hg:GroundWaterBody"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="HydrogeologicalObjectNaturalPropertyType">
		<sequence minOccurs="0">
			<element ref="ge_hg:HydrogeologicalObjectNatural"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="HydrogeologicalObject" type="ge_hg:HydrogeologicalObjectType" abstract="true" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
Hydrogeological Object

-- Definition --
An abstract class for man-made facilities or natural features that have an interaction with the hydrogeological system.

-- Description --
Hydrogeological objects may be natural (eg. spring) or the manmade (eg. wells). The vast majority of hydrogeological objects are manmade.</documentation>
		</annotation>
	</element>
	<complexType name="HydrogeologicalObjectType" abstract="true">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
INSPIRE Identifier
-- Definition --
External object identifier of the spatial object.

-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="geometry" type="gml:GeometricPrimitivePropertyType">
						<annotation>
							<documentation>-- Name --
Geometry
-- Definition --
The geometry defining the spatial location of the HydrogeologicalObject.</documentation>
						</annotation>
					</element>
					<element name="name" type="gmd:PT_FreeText_PropertyType" nillable="true">
						<annotation>
							<documentation>-- Name --
Name
-- Definition --
The name or code of the HydrogeologicalObject.</documentation>
						</annotation>
					</element>
					<element name="description" type="gmd:PT_FreeText_PropertyType" nillable="true">
						<annotation>
							<documentation>-- Name --
Description
-- Definition --
The description of the HydrogeologicalObject.</documentation>
						</annotation>
					</element>
					<element name="beginLifespanVersion" type="dateTime">
						<annotation>
							<documentation>-- Name --
Begin Life Span Version
-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
						</annotation>
					</element>
					<element name="endLifespanVersion" type="dateTime" minOccurs="0">
						<annotation>
							<documentation>-- Name --
End Life Span Version
-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
						</annotation>
					</element>
					<element name="aquifer" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
Aquifer
-- Definition --
The Aquifer within which the HydrogeologicalObject occurs.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="ge_hg:Aquifer"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="HydrogeologicalObjectPropertyType">
		<sequence minOccurs="0">
			<element ref="ge_hg:HydrogeologicalObject"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="Aquiclude" type="ge_hg:AquicludeType" substitutionGroup="ge_hg:HydrogeologicalUnit">
		<annotation>
			<documentation>-- Name --
Aquiclude
-- Definition --
An impermeable body of rock or stratum of sediment that acts as a barrier to the flow of groundwater.
-- Description --
A formation which, although porous and capable of absorbing water slowly, will not transmit water fast enough to furnish an appreciable supply for a well or spring. Aquicludes are characterized by very low values of "leakage" (the ratio of vertical '||'&'||'lt;i'||'&'||'gt;Hydraulic Conductivity '||'&'||'lt;/i'||'&'||'gt;to thickness), so that they transmit only minor inter-aquifer flow and also have very low rates of yield from compressible storage. Therefore, they constitute boundaries of aquifer flow systems.</documentation>
		</annotation>
	</element>
	<complexType name="AquicludeType">
		<complexContent>
			<extension base="ge_hg:HydrogeologicalUnitType">
				<sequence/>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="AquicludePropertyType">
		<sequence minOccurs="0">
			<element ref="ge_hg:Aquiclude"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="HydrogeologicalUnit" type="ge_hg:HydrogeologicalUnitType" abstract="true" substitutionGroup="ge:GeologicUnit">
		<annotation>
			<documentation>-- Name --
Hydrogeological Unit

-- Definition --
A part of the lithosphere with distinctive parameters for water storage and conduction. '||'&'||'lt;i'||'&'||'gt; '||'&'||'lt;/i'||'&'||'gt;</documentation>
		</annotation>
	</element>
	<complexType name="HydrogeologicalUnitType" abstract="true">
		<complexContent>
			<extension base="ge:GeologicUnitType">
				<sequence>
					<element name="description" type="gmd:PT_FreeText_PropertyType" nillable="true">
						<annotation>
							<documentation>-- Name --
Description
-- Definition --
The description of the HydrogeologicalUnit</documentation>
						</annotation>
					</element>
					<element name="approximateDepth" nillable="true">
						<annotation>
							<documentation>-- Name --
Approximate Depth
-- Definition --
The approximate depth of the HydrogeologicalUnit occurrence.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="ge_hg:QuantityValue"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="approximateThickness" nillable="true">
						<annotation>
							<documentation>-- Name --
Approximate Thickness
-- Definition --
The approximate thickness of the HydrogeologicalUnit.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="ge_hg:QuantityValue"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="beginLifespanVersion" type="dateTime">
						<annotation>
							<documentation>-- Name --
Begin Life Span Version
-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
						</annotation>
					</element>
					<element name="endLifespanVersion" type="dateTime" minOccurs="0">
						<annotation>
							<documentation>-- Name --
End Life Span Version
-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
						</annotation>
					</element>
					<element name="geologicStructure" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
Geologic Structure
-- Definition --
Relates one or many HydrogeologicalUnit(s) to a GeologicStructure.

-- Description --
Allows the description of groundwater occurrence in geological structures.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="ge:GeologicStructure"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="HydrogeologicalUnitPropertyType">
		<sequence minOccurs="0">
			<element ref="ge_hg:HydrogeologicalUnit"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="ActiveWell" type="ge_hg:ActiveWellType" substitutionGroup="ge_hg:HydrogeologicalObjectManMade">
		<annotation>
			<documentation>-- Name --
Active Well
-- Definition --
A well influencing the groundwater resources of the aquifer.

-- Description --
The most common examples of Active Well are: extracting, artificial recharging, or dewatering wells.
NOTE: ActiveWell by extracting, recharging or dewatering influences and changes the state of groundwater resources.</documentation>
		</annotation>
	</element>
	<complexType name="ActiveWellType">
		<complexContent>
			<extension base="ge_hg:HydrogeologicalObjectManMadeType">
				<sequence>
					<element name="activityType" type="gml:ReferenceType" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
Active Well Type
-- Definition --
The type of activity carried out by the well.

-- Description --
Indicates if the well is used for extracting, recharging, dewatering etc of the groundwater resources.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="borehole" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
Borehole
-- Definition --
The Borehole upon which the ActiveWell is based.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="ge:Borehole"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
					<element name="groundWaterBody" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
Groundwater Body
-- Definition --
The GroundWaterBody from which the ActiveWell extracts groundwater resources.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="ge_hg:GroundWaterBody"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
					<element name="environmentalMonitoringFacility" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
Environmental Monitoring Facility
-- Definition --
The related EnvironmentalMonitoringFacility.

-- Description --
The Environmental Monitoring Facility commonly comprises one or more Active Wells acting as groundwater observation wells.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="ef:EnvironmentalMonitoringFacility"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="ActiveWellPropertyType">
		<sequence minOccurs="0">
			<element ref="ge_hg:ActiveWell"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="HydrogeologicalSurface" type="ge_hg:HydrogeologicalSurfaceType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
Hydrogeological Surface

-- Definition --
A surface that represents the interpolated groundwater table, or other surface, for a local or regional area.

-- Description --
This is the 2.5D geometry for hydrogeological surfaces and is based on hydrogeological measurements in a group of wells or other sources of data.</documentation>
		</annotation>
	</element>
	<complexType name="HydrogeologicalSurfaceType">
		<choice>
			<element name="surfaceRectifiedGrid">
				<annotation>
					<documentation>-- Name --
Surface as Rectified Grid
-- Definition --
A surface whose domain is a rectified grid.

-- Description --
A rectified grid is a grid for which there is an affine transformation between the grid coordinates and the coordinates of a coordinate system. It can be used for both discrete and continuous coverages.</documentation>
				</annotation>
				<complexType>
					<complexContent>
						<extension base="gml:AbstractMemberType">
							<sequence minOccurs="0">
								<element ref="gmlcov:RectifiedGridCoverage"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
						</extension>
					</complexContent>
				</complexType>
			</element>
			<element name="surfaceReferencableGrid">
				<annotation>
					<documentation>-- Name --
Surface as Referenceable Grid.
-- Definition --
Surface whose domain consists of a referenceable grid.
-- Description --
A referenceable grid is a grid associated with a transformation that can be used to convert grid coordinate values to values of coordinates referenced to a coordinate reference system. It can be used for both discrete and continuous coverages.</documentation>
				</annotation>
				<complexType>
					<complexContent>
						<extension base="gml:AbstractMemberType">
							<sequence minOccurs="0">
								<element ref="gmlcov:ReferenceableGridCoverage"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
						</extension>
					</complexContent>
				</complexType>
			</element>
			<element name="surfacePointCollection">
				<annotation>
					<documentation>-- Name --
Surface Point Collection
-- Definition --
Hydrogeological surface represented by collection of observations in points.</documentation>
				</annotation>
				<complexType>
					<complexContent>
						<extension base="gml:AbstractMemberType">
							<sequence minOccurs="0">
								<element ref="omso:PointObservationCollection"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
						</extension>
					</complexContent>
				</complexType>
			</element>
		</choice>
	</complexType>
	<complexType name="HydrogeologicalSurfacePropertyType">
		<sequence>
			<element ref="ge_hg:HydrogeologicalSurface"/>
		</sequence>
	</complexType>';
                    
        
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    
    pos := pos + amt;
    buf :=        
'	<element name="QuantityValue" type="ge_hg:QuantityValueType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
QuantityValue
-- Definition --
Data container with a single quantity value or a range of quantity values .</documentation>
		</annotation>
	</element>
	<complexType name="QuantityValueType">
		<choice>
			<element name="singleQuantity" type="swe:QuantityPropertyType">
				<annotation>
					<documentation>-- Name --
Single Quantity
-- Definition --
Scalar component with decimal representation and a unit of measure used to store value of a continuous quantity.</documentation>
				</annotation>
			</element>
			<element name="quantityInterval">
				<annotation>
					<documentation>-- Name --
Quantity Interval
-- Definition --
Decimal pair for specifying a quantity range with a unit of measure.</documentation>
				</annotation>
				<complexType>
					<complexContent>
						<extension base="gml:AbstractMemberType">
							<sequence minOccurs="0">
								<element ref="swe:QuantityRange"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
						</extension>
					</complexContent>
				</complexType>
			</element>
		</choice>
	</complexType>
	<complexType name="QuantityValuePropertyType">
		<sequence>
			<element ref="ge_hg:QuantityValue"/>
		</sequence>
	</complexType>
	<element name="Aquifer" type="ge_hg:AquiferType" substitutionGroup="ge_hg:HydrogeologicalUnit">
		<annotation>
			<documentation>-- Name --
Aquifer
-- Definition --
A wet underground layer of water-bearing permeable rock or unconsolidated materials (gravel, sand, silt, or clay) from which groundwater can be usefully extracted using a water well.
-- Description --
An underground geological formation able to store and yield water.</documentation>
		</annotation>
	</element>
	<complexType name="AquiferType">
		<complexContent>
			<extension base="ge_hg:HydrogeologicalUnitType">
				<sequence>
					<element name="aquiferType" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Name --
Type of Aquifer
-- Definition --
The type of aquifer.

-- Description --
Water in an Aquifer is, or is not, under pressure. Based on that unconfined, confined, artesian, or subartesian types are distinguished.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="mediaType" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Name --
Type of Media
-- Definition --
The classification of the medium in which the groundwater flow occurs.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="isExploited" nillable="true">
						<annotation>
							<documentation>-- Name --
Is Exploited
-- Definition --
Indicates if groundwater from aquifer is exploited by wells or intakes</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="boolean">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="isMainInSystem" nillable="true">
						<annotation>
							<documentation>-- Name --
Is Main In System
-- Definition --
Indicates if aquifer is the main useful aquifer in the aquifer system</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="boolean">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="vulnerabilityToPollution" nillable="true">
						<annotation>
							<documentation>-- Name --
Vulnerability To Pollution
-- Definition --
An index value or interval of values determining the potential degree of aquifer risk arising from the geological structure, hydrogeological conditions and the existence of real or potential source of contamination.

-- Description --
A single value should be used if it is determined directly from the DRASTIC method. If attribute data comes from another data source which is expressed by categorized items, for example: low, moderate or high, interval should be used expressed by lowest and highest value of category. EXAMPLE: '||'&'||'amp;lsquo;Moderate'||'&'||'amp;rsquo; means interval from 101 to 140.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="ge_hg:QuantityValue"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="permeabilityCoefficient" nillable="true">
						<annotation>
							<documentation>-- Name --
Permeability Coefficient
-- Definition --
The volume of an incompressible fluid that will flow in unit time through a unit cube of a porous substance across which a unit pressure difference is maintained.

-- Description --
The parameter represents the hydraulic conductivity of a rock container. Describes the ease with which water can move through pore spaces or fractures. It depends on the intrinsic permeability of the material and on the degree of saturation.
NOTE: Because of their high porosity and permeability, sand and gravel have higher hydraulic conductivity than clay or unfractured granite aquifers.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="ge_hg:QuantityValue"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="storativityCoefficient" nillable="true">
						<annotation>
							<documentation>-- Name --
Storativity Coefficient
-- Definition --
The ability of an aquifer to store water.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="ge_hg:QuantityValue"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="hydroGeochemicalRockType" type="gml:ReferenceType" nillable="true">
						<annotation>
							<documentation>-- Name --
Hydrogeochemical Type of Rock
-- Definition --
The rock type with respect to the soluble rock components and their hydrogeochemical influence of groundwater.

-- Description --
Defines the prevailing geochemical character of natural groundwater within the Aquifer.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="aquitard" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
Aquitard
-- Definition --
The Aquitard(s) that separates the Aquifer.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="ge_hg:Aquitard"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
					<element name="hydrogeologicalObject" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
Hydrogeological Object
-- Definition --
The HydrogeologicalObject(s) related to the aquifer.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="ge_hg:HydrogeologicalObject"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
					<element name="aquiferSystem" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
Aquifer System
-- Definition --
 The specific AquiferSystem where the Aquitard occurs.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="ge_hg:AquiferSystem"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="AquiferPropertyType">
		<sequence minOccurs="0">
			<element ref="ge_hg:Aquifer"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="GroundWaterBody" type="ge_hg:GroundWaterBodyType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
Groundwater Body
-- Definition --
A distinct volume of groundwater within an aquifer or system of aquifers, which is hydraulically isolated from nearby groundwater bodies. 

-- Description --
Groundwater bodies form the principal management units under the European Water Framework Directive (2000/60/CE, 2000). They should be hydraulically continuous entities, and must be defined on the basis of flow or abstraction, and are inextricably linked to surface water bodies.</documentation>
		</annotation>
	</element>
	<complexType name="GroundWaterBodyType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Name --
INSPIRE Identifier
-- Definition --
External object identifier of the spatial object.

-- Description --
NOTE: An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="approximateHorizontalExtend" type="gml:SurfacePropertyType" nillable="true">
						<annotation>
							<documentation>-- Name --
Approximate Horizontal Extend
-- Definition --
The geometry defining the boundary of the GroundWaterBody.</documentation>
						</annotation>
					</element>
					<element name="conditionOfGroundWaterBody" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Name --
Condition of Groundwater Body
-- Definition --
The approximate degree of change to groundwater as a result of human activity.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="mineralization" type="gml:ReferenceType" nillable="true">
						<annotation>
							<documentation>-- Name --
Water Type
-- Definition --
One of the main chemical characteristics of water. A value is a sum of all water chemical concentration components.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="piezometricState" nillable="true">
						<annotation>
							<documentation>-- Name --
Piezometric State
-- Definition --
Specifies the piezometric state of the GroundwaterBody water table</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="ge_hg:PiezometricState"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="beginLifespanVersion" type="dateTime">
						<annotation>
							<documentation>-- Name --
Begin Life Span Version
-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
						</annotation>
					</element>
					<element name="endLifespanVersion" type="dateTime" minOccurs="0">
						<annotation>
							<documentation>-- Name --
End Life Span Version
-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
						</annotation>
					</element>
					<element name="hydrogeologicalObjectNatural" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
Hydrogeological Object Natural
-- Definition --
A HydrogeologicalObjectNatural interacting with the GroundwaterBody.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="ge_hg:HydrogeologicalObjectNatural"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
					<element name="activeWell" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
Active Well
-- Definition --
The ActiveWell which changes the state of the GroundwaterBody through the extraction of groundwater resources.

-- Description --
ActiveWell by extracting groundwater resources influences the state of GroundWaterBody resources it is installed in.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="ge_hg:ActiveWell"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
					<element name="aquiferSystem" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
Aquifer System
-- Definition --
The AquiferSystem which includes the GroundWaterBody.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="ge_hg:AquiferSystem"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
					<element name="observationWell" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
The observation wells which monitor the GroundWaterBody</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="ef:EnvironmentalMonitoringFacility"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="GroundWaterBodyPropertyType">
		<sequence minOccurs="0">
			<element ref="ge_hg:GroundWaterBody"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="HydrogeologicalObjectManMade" type="ge_hg:HydrogeologicalObjectManMadeType" abstract="true" substitutionGroup="ge_hg:HydrogeologicalObject">
		<annotation>
			<documentation>-- Name --
Hydrogeological Object Man-made

-- Definition --
A man-made hydrogeological object.

-- Description --
Examples of manmade hydrogeological objects are: well, groundwater intake, groundwater monitoring station or monitoring well.</documentation>
		</annotation>
	</element>
	<complexType name="HydrogeologicalObjectManMadeType" abstract="true">
		<complexContent>
			<extension base="ge_hg:HydrogeologicalObjectType">
				<sequence>
					<element name="validFrom" type="dateTime">
						<annotation>
							<documentation>-- Name --
Valid From
-- Definition --
Official date and time the hydrogeological object was/will be legally established.

-- Description --
NOTE This is the date and time the register reference can be used in legal acts.</documentation>
						</annotation>
					</element>
					<element name="validTo" type="dateTime" minOccurs="0">
						<annotation>
							<documentation>-- Name --
Valid To
-- Definition --
Date and time at which the hydrogeological object legally ceased/will cease to be used.

-- Description --
NOTE This is the date and time the register reference can no longer be used in legal acts.</documentation>
						</annotation>
					</element>
					<element name="statusCode" type="gml:ReferenceType" nillable="true">
						<annotation>
							<documentation>-- Name --
Status Code
-- Definition --
A code defining the formal status of a man-made hydrogeological object.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="HydrogeologicalObjectManMadePropertyType">
		<sequence minOccurs="0">
			<element ref="ge_hg:HydrogeologicalObjectManMade"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="Aquitard" type="ge_hg:AquitardType" substitutionGroup="ge_hg:HydrogeologicalUnit">
		<annotation>
			<documentation>-- Name --
Aquitard

-- Definition --
A saturated, but poorly permeable bed that impedes groundwater movement.

-- Description --
It does not yield water freely to wells, but may transmit appreciable water to or from adjacent aquifers and, where sufficiently thick, may constitute an important ground-water storage unit. Aquitards are characterized by values of leakance that may range from relatively low to relatively high. A really extensive aquitard of relatively low leakance may function regionally as boundaries of aquifer flow systems.</documentation>
		</annotation>
	</element>
	<complexType name="AquitardType">
		<complexContent>
			<extension base="ge_hg:HydrogeologicalUnitType">
				<sequence>
					<element name="approximatePermeabilityCoefficient" nillable="true">
						<annotation>
							<documentation>-- Name --
Approximate Permeability Coefficient
-- Definition --
The volume of an incompressible fluid that will flow in unit time through a unit cube of a porous substance across which a unit pressure difference is maintained.  

-- Description --
The parameter represents the hydraulic conductivity of a rock container. Describes the ease with which water can move through pore spaces or fractures. It depends on the intrinsic permeability of the material and on the degree of saturation.
NOTE: Because of their high porosity and permeability, sand and gravel have higher hydraulic conductivity than clay or unfractured granite aquifers.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="ge_hg:QuantityValue"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="approximateStorativityCoefficient" nillable="true">
						<annotation>
							<documentation>-- Name --
Approximate Storativity Coefficient
-- Definition --
The ability of an aquifer to store water.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="ge_hg:QuantityValue"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="aquifer" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
Aquifer
-- Definition --
The Aquifers separated by the Aquitard.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="ge_hg:Aquifer"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
					<element name="aquiferSystem" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
Aquifer System
-- Definition --
The AquiferSystem of which the Aquitard is a part.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="ge_hg:AquiferSystem"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="AquitardPropertyType">
		<sequence minOccurs="0">
			<element ref="ge_hg:Aquitard"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
</schema>';

    
    amt := length(buf);

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 334;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (334, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/gelu/3.0/griddedexistinglanduse.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 334 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as griddedexistinglanduse_gelu_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:gelu="http://inspire.ec.europa.eu/schemas/gelu/3.0" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:gmlcov="http://www.opengis.net/gmlcov/1.0" targetNamespace="http://inspire.ec.europa.eu/schemas/gelu/3.0" elementFormDefault="qualified" version="3.0">
	<annotation>
		<documentation>-- Name --
gridded land use</documentation>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/base/3.3" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd"/>
	<import namespace="http://www.isotc211.org/2005/gmd" schemaLocation="http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<import namespace="http://www.opengis.net/gmlcov/1.0" schemaLocation="http://schemas.opengis.net/gmlcov/1.0/coverage.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="ExistingLandUseGrid" type="gelu:ExistingLandUseGridType" substitutionGroup="gmlcov:RectifiedGridCoverage">
		<annotation>
			<documentation>-- Name --
existing land use grid
-- Definition --
An existing land use grid is a collection of pixels for which information on existing (present or past) land use is provided. The HILUCS system shall be used for classification.</documentation>
		</annotation>
	</element>
	<complexType name="ExistingLandUseGridType">
		<complexContent>
			<extension base="gmlcov:AbstractDiscreteCoverageType">
				<sequence>
					<element name="name" type="string">
						<annotation>
							<documentation>-- Definition --
Human readable name of the data set.</documentation>
						</annotation>
					</element>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Definition --
External object identifier of the sampled land use data grid.
-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="extent">
						<annotation>
							<documentation>-- Name --
extent
-- Definition --
Contains the extent of the data set.
-- Description --
NOTE	Extents may be specified in space, time or space-time.</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMetadataPropertyType">
									<sequence minOccurs="0">
										<element ref="gmd:EX_Extent"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="beginLifespanVersion" nillable="true">
						<annotation>
							<documentation>-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="endLifespanVersion" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="validTo" nillable="true">
						<annotation>
							<documentation>-- Definition --
The time from which the grid is no longer a valid representation of reality.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="date">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="validFrom" nillable="true">
						<annotation>
							<documentation>-- Definition --
First date at which this grid is a valid representation of reality.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="date">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="ExistingLandUseGridPropertyType">
		<sequence minOccurs="0">
			<element ref="gelu:ExistingLandUseGrid"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 335;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (335, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/geoportal/1.0/geoportal.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 335 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as geoportal_geoportal_1_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- THIS SCHEMA IS STILL A BETA VERSION
26-APR-2011 1.0.1 Conformity element:
                    Restricted allowed citations to "INSPIRE interoperability of spatial data sets and services", according to the MD regulation,
                    requirements for the conformity element (page 17 of the MD regulation).
                  Inspire Themes:
                    Removed leading blank for German, Bulgarian, Czech and Danish translations
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://inspire.ec.europa.eu/schemas/geoportal/1.0" xmlns:inspire_common="http://inspire.ec.europa.eu/schemas/common/1.0" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:xhtml="http://www.w3.org/1999/xhtml" targetNamespace="http://inspire.ec.europa.eu/schemas/geoportal/1.0" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0.0" jaxb:version="2.0">
	<xs:annotation>
		<xs:appinfo>
			<jaxb:globalBindings typesafeEnumMaxMembers="1000"/>
		</xs:appinfo>
	</xs:annotation>
	<xs:import namespace="http://inspire.ec.europa.eu/schemas/common/1.0" schemaLocation="../../common/1.0/common.xsd"/>
	<!--	
	<xs:include schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml-rdfa-modules-1.xsd">
		<xs:annotation>
			<xs:documentation> Schema that includes all modules (and redefinitions) for XHTML1.1
                Document Type. </xs:documentation>
		</xs:annotation>
	</xs:include>
-->
	<!--	
	<xs:import namespace="http://www.w3.org/1999/xhtml" schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml-rdfa-1.xsd"/>
	<xs:import namespace="http://www.w3.org/1999/xhtml/datatypes/"  schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml-datatypes-1.xsd"/>
	<xs:import namespace="http://www.w3.org/1999/xhtml/datatypes/"  schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml-link-1.xsd"/>
-->
	<!--	
	<xs:element name="ViewService" type="viewService"/>
	<xs:element name="DiscoveryService" type="discoveryService"/>
	<xs:element name="TransformationService" type="transformationService"/>
	<xs:element name="InvokeService" type="invokeService"/>
	<xs:element name="OtherService" type="otherService"/>
	<xs:element name="ViewServiceClient" type="viewServiceClient"/>
-->
	<xs:element name="Resource" type="geoportalResource"/>
	<xs:complexType name="geoportalResource">
		<xs:sequence>
			<!--
			<xs:element name="link" type="xhtml:xhtml.link.type" minOccurs="0" maxOccurs="unbounded"/>
-->
			<xs:choice>
				<xs:element ref="inspire_common:SpatialDataSet"/>
				<xs:element ref="inspire_common:SpatialDataSetSeries"/>
				<xs:element ref="inspire_common:SpatialDataService"/>
				<xs:element ref="inspire_common:DiscoveryService"/>
				<xs:element ref="inspire_common:ViewService"/>
				<xs:element ref="inspire_common:DownloadService"/>
				<xs:element ref="inspire_common:TransformationService"/>
				<xs:element ref="inspire_common:OtherService"/>
			</xs:choice>
			<xs:element name="MetadataLocator" type="inspire_common:resourceLocatorType"/>
		</xs:sequence>
	</xs:complexType>
	<!--INSPIRE Geoportal Specific-->
	<xs:complexType name="viewServiceClient">
		<xs:complexContent>
			<xs:extension base="inspire_common:viewService">
				<xs:sequence>
					<xs:element name="WMSVersion" type="xs:string"/>
					<xs:element name="WMSType" type="xs:string"/>
					<xs:element name="LayerLimit" type="xs:byte"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
</xs:schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 336;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (336, empty_clob(), 'INSPIRE', 'urn:x-inspire:specification:gmlas:GeographicalNames:3.0/geographicalnames.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 336 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as geographicalnames_gn_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?><schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="urn:x-inspire:specification:gmlas:BaseTypes:3.2" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:gn="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" elementFormDefault="qualified" targetNamespace="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" version="3.0">
  <import namespace="urn:x-inspire:specification:gmlas:BaseTypes:3.2" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.2/BaseTypes.xsd"/>
  <import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
  <import namespace="http://www.isotc211.org/2005/gmd" schemaLocation="http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd"/>
  <!--XML Schema document created by ShapeChange-->
  <element name="NamedPlace" substitutionGroup="gml:AbstractFeature" type="gn:NamedPlaceType">
    <annotation>
      <documentation>-- Definition --
Any real world entity referred to by one or several proper nouns.</documentation>
    </annotation>
  </element>
  <complexType name="NamedPlaceType">
    <complexContent>
      <extension base="gml:AbstractFeatureType">
        <sequence>
          <element name="beginLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="endLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="geometry" type="gml:GeometryPropertyType">
            <annotation>
              <documentation>-- Definition --
Geometry associated to the named place. This data specification does not restrict the geometry types. 

-- Description --
NOTE 1 The most common geometry types for a named place are a reference point (modelled as GM_Point), a more precise geometry of the footprint (typically modelled as GM_Curve or GM_Surface), or a bounding box (to be modelled as a GM_Envelope).

NOTE 2 If the geometry depicts the spatial footprint of the named place, a reference point and a bounding box could be derived from it. However, this specification does not require the explicit provision of any specific type of geometry such as bounding boxes or reference points.

NOTE 3 To avoid any misunderstanding, note that null geometry is not allowed by this specification.

NOTE 4 3D geometries are not really required for Geographical Names, but the model allows for it, so a data provider may publish it.
</documentation>
            </annotation>
          </element>
          <element name="inspireId" type="base:IdentifierPropertyType">
            <annotation>
              <documentation>-- Definition --
External object identifier of the spatial object.

-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.
</documentation>
            </annotation>
          </element>
          <element minOccurs="0" name="leastDetailedViewingResolution" nillable="true">
            <annotation>
              <documentation>-- Definition --
Resolution, expressed as the inverse of an indicative scale or a ground distance, above which the named place and its associated name(s) should no longer be displayed in a basic viewing service.

-- Description --
NOTE 1This information may be used to determine if the names of the named place should be displayed at a given scale of display, only in the context of basic viewing services intending to show the content of the data set containing names. Even if this information is a valuable one for mapping in general, it is only approximate; cartographic services intending to produce high quality maps should certainly rely on other criteria and techniques for selecting names for the map.

NOTE 2 Even if this attribute is "voidable" for practical reasons linked to its availability in data sources, this information may be of first importance for viewing services. There are great chances that viewing services will inefficiently manage named places having this attribute void.

EXAMPLES The following examples use the equivalentScale attribute of MD_Resolution to express the attribute value.
- Names of important cities in Europe may be displayed at all viewing scales greater than 1/5,000,000. In this case, the value of the attribute is 5,000,000
- Names of small hamlets may only be displayed from all viewing scale greater than 1/25,000. In this case, the value of the attribute is 25,000
- Names of countries may be displayed at any small scale. In this case, this attribute is not filled.

NOTE 3 If the data set contain multiple representations of the same real world entity represented at different levels of detail, the scale ranges defined by the attributes leastDetailedViewingResolution and mostDetailedViewingResolution should not overlap, in order to avoid displaying the same names several times.

NOTE 4 The geometry of the named place should have a level of detail (i.e. resolution, granularity, precision, etc.) roughly compatible with its associated viewing scales.
</documentation>
            </annotation>
            <complexType>
              <complexContent>
                <extension base="gml:AbstractMetadataPropertyType">
                  <sequence>
                    <element ref="gmd:MD_Resolution"/>
                  </sequence>
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </complexContent>
            </complexType>
          </element>
          <element maxOccurs="unbounded" name="localType" nillable="true" type="gmd:LocalisedCharacterString_PropertyType">
            <annotation>
              <documentation>-- Definition --
Characterisation of the kind of entity designated by geographical name(s), as defined by the data provider, given in at least in one official language of the European Union.

-- Description --
SOURCE Adapted from [UNGEGN Manual 2007].

NOTE Local types may be defined in additional European languages, either EU official languages or other languages such as the language(s) of the geographical names provided.
</documentation>
            </annotation>
          </element>
          <element minOccurs="0" name="mostDetailedViewingResolution" nillable="true">
            <annotation>
              <documentation>-- Definition --
Resolution, expressed as the inverse of an indicative scale or a ground distance, below which the named place and its associated name(s) should no longer be displayed in a basic viewing service.

-- Description --
NOTE See Description of leastDetailedViewingResolution

EXAMPLES The following examples use the equivalentScale attribute of MD_Resolution to express the attribute value.
- Names of wide areas like mountain ranges may not be displayed at all in viewing scales greater than 1/100,000. In this case, the value of the attribute is 100,000
- Names of small hamlets may be displayed at any large scale. In this case, this attribute is not filled.
</documentation>
            </annotation>
            <complexType>
              <complexContent>
                <extension base="gml:AbstractMetadataPropertyType">
                  <sequence>
                    <element ref="gmd:MD_Resolution"/>
                  </sequence>
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </complexContent>
            </complexType>
          </element>
          <element maxOccurs="unbounded" name="name" type="gn:GeographicalNamePropertyType">
            <annotation>
              <documentation>-- Definition --
Name of the named place.</documentation>
            </annotation>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="relatedSpatialObject" nillable="true">
            <annotation>
              <documentation>-- Definition --
Identifier of a spatial object representing the same entity but appearing in other themes of INSPIRE, if any.

-- Description --
NOTE If no identifier is provided with features of other INSPIRE themes, those features can of course not be referred by the NamedPlace.
</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="base:Identifier"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element maxOccurs="unbounded" name="type" nillable="true">
            <annotation>
              <documentation>-- Definition --
Characterisation of the kind of entity designated by geographical name(s).

-- Description --
SOURCE Adapted from [UNGEGN Manual 2007].

NOTE 1 This attribute should be consistent with the attribute ''relatedSpatialObject''. More precisely, if the attribute ''relatedSpatialObject'' is filled in, the attribute ''type'' should be filled in, and its value(s) should be consistent with the spatial data theme(s) of the related object(s).

NOTE 2 Even if this attribute may introduce some redundancy with the attribute ''relatedSpatialObject'', it has to be filled in order to allow to use geographical names on their own without accessing to any other INSPIRE data set, which may be necessary in most cases.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:CodeType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="NamedPlacePropertyType">
    <sequence minOccurs="0">
      <element ref="gn:NamedPlace"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="PronunciationOfName" substitutionGroup="gml:AbstractObject" type="gn:PronunciationOfNameType">
    <annotation>
      <documentation>-- Definition --
Proper, correct or standard (standard within the linguistic community concerned) pronunciation of a name.

-- Description --
SOURCE Adapted from [UNGEGN Manual 2006].
</documentation>
    </annotation>
  </element>
  <complexType name="PronunciationOfNameType">
    <sequence>
      <element minOccurs="0" name="pronunciationSoundLink" nillable="true">
        <annotation>
          <documentation>-- Definition --
Proper, correct or standard (standard within the linguistic community concerned) pronunciation of a name, expressed by a link to any sound file.

-- Description --
SOURCE Adapted from [UNGEGN Manual 2006].
</documentation>
        </annotation>
        <complexType>
          <simpleContent>
            <extension base="anyURI">
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </extension>
          </simpleContent>
        </complexType>
      </element>
      <element minOccurs="0" name="pronunciationIPA" nillable="true">
        <annotation>
          <documentation>-- Definition --
Proper, correct or standard (standard within the linguistic community concerned) pronunciation of a name, expressed in International Phonetic Alphabet (IPA).

-- Description --
SOURCE Adapted from [UNGEGN Manual 2006].
</documentation>
        </annotation>
        <complexType>
          <simpleContent>
            <extension base="string">
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </extension>
          </simpleContent>
        </complexType>
      </element>
    </sequence>
  </complexType>
  <complexType name="PronunciationOfNamePropertyType">
    <sequence>
      <element ref="gn:PronunciationOfName"/>
    </sequence>
  </complexType>
  <element name="GeographicalName" substitutionGroup="gml:AbstractObject" type="gn:GeographicalNameType">
    <annotation>
      <documentation>-- Definition --
Proper noun applied to a real world entity.</documentation>
    </annotation>
  </element>
  <complexType name="GeographicalNameType">
    <sequence>
      <element name="language" nillable="true">
        <annotation>
          <documentation>-- Definition --
Language of the name, given as a three letters code, in accordance with either ISO 639-3 or ISO 639-5.

-- Description --
NOTE 1More precisely, this definition refers to the language used by the community that uses the name.

NOTE 2 The code "mul" for "multilingual" should not be used in general. However it can be used in rare cases like official names composed of two names in different languages. For example, "Vitoria-Gasteiz" is such a multilingual official name in Spain.

NOTE 3 Even if this attribute is "voidable" for pragmatic reasons, it is of first importance in several use cases in the multi-language context of Europe.
</documentation>
        </annotation>
        <complexType>
          <simpleContent>
            <extension base="string">
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </extension>
          </simpleContent>
        </complexType>
      </element>
      <element name="nativeness" nillable="true">
        <annotation>
          <documentation>-- Definition --
Information enabling to acknowledge if the name is the one that is/was used in the area where the spatial object is situated at the instant when the name is/was in use.
</documentation>
        </annotation>
        <complexType>
          <simpleContent>
            <extension base="gml:CodeType">
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </extension>
          </simpleContent>
        </complexType>
      </element>
      <element name="nameStatus" nillable="true">
        <annotation>
          <documentation>-- Definition --
Qualitative information enabling to discern which credit should be given to the name with respect to its standardisation and/or its topicality.

-- Description --
NOTE The Geographical Names application schema does not explicitly make a preference between different names (e.g. official endonyms) of a specific real world entity. The necessary information for making the preference (e.g. the linguistic status of the administrative or geographic area in question), for a certain use case, must be obtained from other data or information sources. For example, the status of the language of the name may be known through queries on the geometries of named places against the geometry of administrative units recorded in a certain source with the language statuses information. </documentation>
        </annotation>
        <complexType>
          <simpleContent>
            <extension base="gml:CodeType">
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </extension>
          </simpleContent>
        </complexType>
      </element>
      <element name="sourceOfName" nillable="true">
        <annotation>
          <documentation>-- Definition --
Original data source from which the geographical name is taken from and integrated in the data set providing/publishing it. For some named spatial objects it might refer again to the publishing data set if no other information is available.

-- Description --
EXAMPLES Gazetteer, geographical names data set.
</documentation>
        </annotation>
        <complexType>
          <simpleContent>
            <extension base="string">
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </extension>
          </simpleContent>
        </complexType>
      </element>
      <element name="pronunciation" nillable="true">
        <annotation>
          <documentation>-- Definition --
Proper, correct or standard (standard within the linguistic community concerned) pronunciation of the geographical name.

-- Description --
SOURCE Adapted from [UNGEGN Manual 2006].
</documentation>
        </annotation>
        <complexType>
          <sequence>
            <element ref="gn:PronunciationOfName"/>
          </sequence>
          <attribute name="nilReason" type="gml:NilReasonType"/>
        </complexType>
      </element>
      <element maxOccurs="unbounded" name="spelling" type="gn:SpellingOfNamePropertyType">
        <annotation>
          <documentation>-- Definition --
A proper way of writing the geographical name.

-- Description --
NOTE 1 Different spellings should only be used for names rendered in different scripts. .

NOTE 2 While a particular GeographicalName should only have one spelling in a given script, providing different spellings in the same script should be done through the provision of different geographical names associated with the same named place.
</documentation>
        </annotation>
      </element>
      <element minOccurs="0" name="grammaticalGender" nillable="true">
        <annotation>
          <documentation>-- Definition --
Class of nouns reflected in the behaviour of associated words.

-- Description --
NOTE the attribute has cardinality [0..1] and is voidable, which means that:
'||'&'||'lt;ul'||'&'||'gt;
	'||'&'||'lt;li'||'&'||'gt;in case the concept of grammatical gender has no sense for a given name (i.e. the attribute is not applicable), the attribute should not be provided.'||'&'||'lt;/li'||'&'||'gt;
	'||'&'||'lt;li'||'&'||'gt;in case the concept of grammatical gender has some sense for the name but is unknown, the attribute should be provided but '||'&'||'lt;i'||'&'||'gt;void'||'&'||'lt;/i'||'&'||'gt;.  '||'&'||'lt;/li'||'&'||'gt;
'||'&'||'lt;/ul'||'&'||'gt;

</documentation>
        </annotation>
        <complexType>
          <simpleContent>
            <extension base="gml:CodeType">
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </extension>
          </simpleContent>
        </complexType>
      </element>
      <element minOccurs="0" name="grammaticalNumber" nillable="true">
        <annotation>
          <documentation>-- Definition --
Grammatical category of nouns that expresses count distinctions.

-- Description --
NOTE the attribute has cardinality [0..1] and is voidable, which means that:
'||'&'||'lt;ul'||'&'||'gt;
	'||'&'||'lt;li'||'&'||'gt;in case the concept of grammatical number has no sense for a given name (i.e. the attribute is not applicable), the attribute should not be provided.'||'&'||'lt;/li'||'&'||'gt;
	'||'&'||'lt;li'||'&'||'gt;in case the concept of grammatical number has some sense for the name but is unknown, the attribute should be provided but '||'&'||'lt;i'||'&'||'gt;void'||'&'||'lt;/i'||'&'||'gt;.'||'&'||'lt;/li'||'&'||'gt;
'||'&'||'lt;/ul'||'&'||'gt;

</documentation>
        </annotation>
        <complexType>
          <simpleContent>
            <extension base="gml:CodeType">
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </extension>
          </simpleContent>
        </complexType>
      </element>
    </sequence>
  </complexType>
  <complexType name="GeographicalNamePropertyType">
    <sequence>
      <element ref="gn:GeographicalName"/>
    </sequence>
  </complexType>
  <element name="SpellingOfName" substitutionGroup="gml:AbstractObject" type="gn:SpellingOfNameType">
    <annotation>
      <documentation>-- Definition --
Proper way of writing a name.

-- Description --
SOURCE Adapted from [UNGEGN Manual 2006].

NOTE Proper spelling means the writing of a name with the correct capitalisation and the correct letters and diacritics present in an accepted standard order.


</documentation>
    </annotation>
  </element>
  <complexType name="SpellingOfNameType">
    <sequence>
      <element name="text" type="string">
        <annotation>
          <documentation>-- Definition --
Way the name is written.</documentation>
        </annotation>
      </element>
      <element name="script" nillable="true">
        <annotation>
          <documentation>-- Definition --
Set of graphic symbols (for example an alphabet) employed in writing the name, expressed using the four letters codes defined in ISO 15924, where applicable.

-- Description --
SOURCE Adapted from [UNGEGN Glossary 2007].

EXAMPLES Cyrillic, Greek, Roman/Latin scripts.

NOTE 1The four letter codes for Latin (Roman), Cyrillic and Greek script are "Latn", "Cyrl" and "Grek", respectively.

NOTE 2 In rare cases other codes could be used (for other scripts than Latin, Greek and Cyrillic). However, this should mainly apply for historical names in historical scripts.

NOTE 3 This attribute is of first importance in the multi-scriptual context of Europe.
</documentation>
        </annotation>
        <complexType>
          <simpleContent>
            <extension base="string">
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </extension>
          </simpleContent>
        </complexType>
      </element>
      <element minOccurs="0" name="transliterationScheme" nillable="true">
        <annotation>
          <documentation>-- Definition --
Method used for the names conversion between different scripts.

-- Description --
SOURCE Adapted from [UNGEGN Glossary 2007].

NOTE 1 This attribute should be filled for any transliterated spellings. If the transliteration scheme used is recorded in codelists maintained by ISO or UN, those codes should be preferred.
</documentation>
        </annotation>
        <complexType>
          <simpleContent>
            <extension base="string">
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </extension>
          </simpleContent>
        </complexType>
      </element>
    </sequence>
  </complexType>
  <complexType name="SpellingOfNamePropertyType">
    <sequence>
      <element ref="gn:SpellingOfName"/>
    </sequence>
  </complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);



    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 337;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (337, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/hb/3.0/habitatsandbiotopes.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 337 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as habitatsandbiotopes_hb_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:hb="http://inspire.ec.europa.eu/schemas/hb/3.0" xmlns:sc="http://www.interactive-instruments.de/ShapeChange/AppInfo" xmlns:sd="http://inspire.ec.europa.eu/schemas/sd/3.0" targetNamespace="http://inspire.ec.europa.eu/schemas/hb/3.0" elementFormDefault="qualified" version="3.0">
	<annotation>
		<documentation>Application schema for Habitats and Biotopes</documentation>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/base/3.3" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/sd/3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/sd/3.0/SpeciesDistribution.xsd"/>
	<import namespace="http://www.interactive-instruments.de/ShapeChange/AppInfo" schemaLocation="http://portele.de/ShapeChangeAppinfo.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="HabitatTypeCoverType" type="hb:HabitatTypeCoverTypeType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
habitat type cover type

-- Definition --
Habitat type according to an international, national or local habitat classifications scheme.

-- Description --
Includes additional information on covered area, covered length, or containing volume.</documentation>
		</annotation>
	</element>
	<complexType name="HabitatTypeCoverTypeType">
		<sequence>
			<element name="referenceHabitatTypeId" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Name --
reference habitat type id

-- Definition --
Habitat type unique identifier (code) according to one Pan-European classification scheme.

-- Description --
EXAMPLE "1110", "40C0", "95A0", etc., if the referenceHabitatScheme is "habitatsDirective", or "A1.111", "A1.1121", "G1.1111", "X34", etc., if the ReferenceHabitatScheme is "eunis".</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="referenceHabitatTypeScheme" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Name --
reference habitat type scheme

-- Definition --
One of the Pan-European classification schemes, that are widely used in Europe.

-- Description --
The list includes at least the classification of the natural habitat types of community interest listed in Annex I of the Habitats Directive, as well as the hierarchic classification of the habitat types of interest for biodiversity and nature protection listed in the EUNIS database, which is maintained by the EEA.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="referenceHabitatTypeName" nillable="true">
				<annotation>
					<documentation>-- Name --
reference habitat type name

-- Definition --
Name of a habitat type according to one Pan-European classification scheme.

-- Description --
In the given Pan-European habitat classification systems, the habitat types can be identified by both: a short "identifier" (code)  and  a name in natural language, which is meant in this attribute.

EXAMPLE Habitats Directive habitat type 3260 (code) "Floating vegetation of Ranunculus" or "Chenopodietum rubri of submountainous rivers" (name).</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="string">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
			<element name="localHabitatName" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Name --
local habitat name

-- Definition --
Habitat type according to a local habitat classification scheme.

-- Description --
Habitat types used in a certain area (e.g. Mediterranean Sea), or in a certain country, or even more restricted in a certain region, county or any other local level.

It is strongly recommended to register the local classification scheme from which the local habitat names are taken

EXAMPLE Classification of Benthic Marine Habitat Types for the Mediterranean Region, Habitats of Romania, German Biotoptypen, Nordic Vegetation types, UK National Vegetation Classification, etc.</documentation>
				</annotation>
				<complexType>
					<sequence>
						<element ref="hb:LocalNameType"/>
					</sequence>
					<attribute name="nilReason" type="gml:NilReasonType"/>
				</complexType>
			</element>
			<element name="areaCovered" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Name --
area covered 

-- Definition --
The area covered by a certain habitat type within the provided geometry of the habitat spatial object.

-- Description --
The surface area should be expressed in square meters.

It can be used only in the case that the geometry provided in the Habitat feature represents an area in which more than one habitat type exists in other words a complex of different habitat types. In this case, for each habitat type the surface of the covered area can be provided within this attribute.  

Since the geometry provided in the Habitat feature can be larger than the total surface of the habitat types listed within that geometry, the total surface of the habitat types can be smaller than the surface of the provided geometry. On the other hand, since some habitat types may overlap (e.g. subterranean caves / habitat type on the surface) or may cover a steep inclination (cliff) the total area of the habitat types can be bigger than the area of the provided geometry.

EXAMPLE Within a given habitat geometry of 30.2 hectares there are several habitat types, out of which two are natural habitat types of community interest, '||'&'||'amp;rdquo;91D0'||'&'||'amp;rdquo; covering 22.5 hectares and '||'&'||'amp;rdquo;7110'||'&'||'amp;rdquo; covering 5.3 hectares, thus in total are smaller than the total area.</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="gml:AreaType">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
			<element name="lengthCovered" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Name --
length covered

-- Definition --
The length covered by a certain habitat type within the provided geometry of the habitat spatial object.

-- Description --
The length should be expressed in meters.

EXAMPLE Within a given habitat geometry of 300 square meters there are several habitat types. Two natural habitat types of community interest, '||'&'||'amp;rdquo;91F0'||'&'||'amp;rdquo; and '||'&'||'amp;rdquo;9160'||'&'||'amp;rdquo; cover this total area. However, a third natural habitat types of community interest '||'&'||'amp;rdquo;3260'||'&'||'amp;rdquo; is listed, which is a linear feature and thus expressed in meters of its length (e.g. 120 m).</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="gml:LengthType">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
			<element name="volumeCovered" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Name --
volume covered 

-- Definition --
The volume covered by a certain habitat type within the provided geometry of the habitat spatial object.

-- Description --
The volume should be expressed in cubic meters.</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="gml:VolumeType">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
		</sequence>
	</complexType>
	<complexType name="HabitatTypeCoverTypePropertyType">
		<sequence>
			<element ref="hb:HabitatTypeCoverType"/>
		</sequence>
	</complexType>
	<element name="HabitatSpeciesType" type="hb:HabitatSpeciesTypeType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
habitat species type

-- Definition --
Species which occurs in a certain habitat at the time of mapping.</documentation>
		</annotation>
	</element>
	<complexType name="HabitatSpeciesTypeType">
		<sequence>
			<element name="referenceSpeciesId" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Name --
reference species id

-- Definition --
Identifier of one of the reference lists given by the referenceSpeciesScheme.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="referenceSpeciesScheme" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Name --
reference species scheme

-- Definition --
Reference list defining a nomenclatural and taxonomical standard to which all local species names and taxonomic concepts shall be mapped to.

-- Description --
Closed codelist of accepted PAN-european taxonomical reference lists defining the nomenclature and taxonomical concept of a given species name. This must not be regarded as the ultimate taxonomic truth: this will always change. It serves as a definition of a taxonomic concept described by systematic and synonym relations where other names and there inherent taxonomic concepts can be mapped to. The code list comprises of Eu-Nomen, EUNIS and Natura2000. In these sources harmonized species GUIDs and names are maintained by institutions with an assignment outside INSPIRE and the species names are to be retrieved through webservices using GUIDs. Only one of these list must be used for one taxon. The priority is as follows: 1) EU-Nomen, 2) EUNIS, 3) NatureDirectives. This implies: if a taxon is listed in EU-Nomen, this reference must be used as first choice. If it is not listed in EU-Nomen, the second choice is EUNIS, if not in EUNIS, NatureDirectives can be used.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="localSpeciesName" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Name --
local species name

-- Definition --
Scientific name plus author used in national nomenclature with its national taxonomic concept.

-- Description --
The LocalSpeciesName provides nomenclatural and taxonomical information about the locally used species name and the taxonomic concepts implied by the use of this name according to a given reference. If omitted the name and concept given by the referenceSpeciesId according to the referenceSpeciesScheme has been used locally.</documentation>
				</annotation>
				<complexType>
					<sequence>
						<element ref="hb:LocalNameType"/>
					</sequence>
					<attribute name="nilReason" type="gml:NilReasonType"/>
				</complexType>
			</element>
		</sequence>
	</complexType>
	<complexType name="HabitatSpeciesTypePropertyType">
		<sequence>
			<element ref="hb:HabitatSpeciesType"/>
		</sequence>
	</complexType>
	<element name="HabitatVegetationType" type="hb:HabitatVegetationTypeType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
habitat vegetation type

-- Definition --
Vegetation type which occurs in a certain habitat.</documentation>
		</annotation>
	</element>
	<complexType name="HabitatVegetationTypeType">
		<sequence>
			<element name="localVegetationName" type="hb:LocalNameTypePropertyType">
				<annotation>
					<documentation>-- Name --
local vegetation name

-- Definition --
Natural language name of a vegetation class (vegetation type) according to a local vegetation classification scheme. 

-- Description --
For better understanding it is strongly recommended to give the full name of the vegetation type rather than any abbreviation or code used in the local scheme.

EXAMPLE "Stellario alsines '||'&'||'amp;ndash; Montietum rivularis (Franzi 1984)".</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="HabitatVegetationTypePropertyType">
		<sequence>
			<element ref="hb:HabitatVegetationType"/>
		</sequence>
	</complexType>
	<element name="Habitat" type="hb:HabitatType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
habitat

-- Definition --
Geographical areas characterised by specific ecological conditions, processes, structure, and functions that physically support the organisms that live there.

-- Description --
Includes terrestrial and aquatic areas distinguished by geographical, abiotic and biotic features, whether entirely natural or semi-natural [Directive 2007/2/EC].

A Habitat area, line or point may comprise one or more HabitatTypesCoverTypes according to one or more habitat classification schemes, often depending on the data capture process or related to the scale of a map. So a habitat feature might represent a complex of different HabitatTypesCoverTypes.

NOTE Although habitats in principle are geographical areas, they may also be depicted as lines or points.</documentation>
		</annotation>
	</element>
	<complexType name="HabitatType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
inspire id

-- Definition --
External object identifier of the spatial object.

-- Description --
An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="geometry" type="gml:GeometryPropertyType">
						<annotation>
							<documentation>-- Name --
geometry

-- Definition --
The extent of the habitat based on natural boundaries.

-- Description --
NOTE 1 Can be polygons, lines or points. 
NOTE 2 Can also support 3-dimensional features.</documentation>
						</annotation>
					</element>
					<element name="habitat" type="hb:HabitatTypeCoverTypePropertyType" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
habitat type

-- Definition --
The identifier for a habitat class, defined and described in an international, national or local habitat classification scheme.

-- Description --
Habitats and biotopes may be common in some characteristics on a certain level of detail and may thus be classified as abstract types: e.g.  as woodland, pastures, heathland '||'&'||'amp;ndash; referring to their vegetation structure  - or as running waters, limestone rocks or sand dunes  - referring to abiotic features   - but also as wintering areas, nesting areas or wandering corridors etc. - referring to relevant phases for the life-cycle of a certain species or ecological guild. These typological classes are usually organised in classification systems (e.g. EUNIS habitat classification).</documentation>
						</annotation>
					</element>
					<element name="habitatSpecies" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
habitat species

-- Definition --
List of species which occur in or constitute a certain habitat at the time of mapping.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="hb:HabitatSpeciesType"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="habitatVegetation" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
habitat vegetation

-- Definition --
List of vegetation types which constitute a certain habitat.

-- Description --
The cover of plants may be common in some characteristics on a certain level of detail and may thus be classified by vegetation science as abstract types.

E.g. vegetation may be classified as Tundra or Mediterranean Deciduous Forests '||'&'||'amp;ndash; referring to their structure and their bio-geographic formations  - or as Nordic vegetation type 5141 Koeleria glauca-Typ or Ranunculetum fluitantis  - referring to their floristic composition - or as chamaephytes or hemi-cryptophytes - referring to structural traits etc.

Many vegetation type classification systems exist all over Europe. Some of these systems have a deep hierarchical structure. Therefore it is recommended to register the vegetation type scheme which was used.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="hb:HabitatVegetationType"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="HabitatPropertyType">
		<sequence minOccurs="0">
			<element ref="hb:Habitat"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="LocalNameType" type="hb:LocalNameTypeType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
local name type

-- Definition --
Name according to a local classification scheme.</documentation>
		</annotation>
	</element>
	<complexType name="LocalNameTypeType">
		<sequence>
			<element name="localScheme" type="string">
				<annotation>
					<documentation>-- Name --
local scheme

-- Definition --
Uniform resource identifier of a local classification scheme.

-- Description --
Classification scheme, which is used locally and contains all classification types, their codes and/or  very often their names in natural language.

EXAMPLE "http://www.rac-spa.org/sites/default/files/doc_fsd/lchm_en.pdf", for the Classification of Benthic Marine Habitat Types for the Mediterranean Region or "http://www.lifenatura2000.ro/doc/Habitatele din Romania.pdf", for the Romanian habitats classification.</documentation>
				</annotation>
			</element>
			<element name="localNameCode" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Name --
local name code

-- Definition --
Natural language name according to a local classification scheme.

-- Description --
EXAMPLE: "Comunitati vest-pontice cu Camphosma annua si Kochia laniflora" for the habitat '||'&'||'amp;bdquo;R1508" from the Romanian habitat classification or '||'&'||'amp;bdquo;Biocenosis of abyssal muds" for the habitat '||'&'||'amp;bdquo;VI.1.1." from the Classification of Benthic Marine Habitat Types for the Mediterranean Region or "Stellario alsines '||'&'||'amp;ndash; Montietum rivularis (Franzi 1984)" for a vegetation type.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">technicalGuidance</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="localName" nillable="true">
				<annotation>
					<documentation>-- Name --
local name

-- Definition --
Name according to a local classification scheme.

-- Description --
Name according to local classification scheme. It is strongly recommended take all local names from a registered classification scheme.</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="string">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
			<element name="qualifierLocalName" type="gml:ReferenceType" nillable="true">
				<annotation>
					<documentation>-- Name --
qualifier local name

-- Definition --
The relation between the local name and the corresponding name in the Pan-European schema.

-- Description --
EXAMPLE The local habitat type can be conceptually the same as the related Pan-European habitat type, the relationship then is called '||'&'||'amp;ldquo;congruent'||'&'||'amp;rdquo;   or  the local habitat type may be a subtype of the Pan-European habitat type, therefore the relationship should be "includedIn", etc.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
					</appinfo>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="LocalNameTypePropertyType">
		<sequence>
			<element ref="hb:LocalNameType"/>
		</sequence>
	</complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 338;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (338, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/hh/3.0/humanhealth.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 338 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as humanhealth_hh_3_0.xsd
    -- Needed to separate this xsd into two pieces due to its size>32767.
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:hh="http://inspire.ec.europa.eu/schemas/hh/3.0" xmlns:sc="http://www.interactive-instruments.de/ShapeChange/AppInfo" xmlns:su-core="http://inspire.ec.europa.eu/schemas/su-core/3.0" targetNamespace="http://inspire.ec.europa.eu/schemas/hh/3.0" elementFormDefault="qualified" version="3.0">
	<annotation>
		<documentation>-- Name --
Human Health</documentation>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/su-core/3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/su-core/3.0/StatisticalUnitCore.xsd"/>
	<import namespace="http://www.interactive-instruments.de/ShapeChange/AppInfo" schemaLocation="http://portele.de/ShapeChangeAppinfo.xsd"/>
	<import namespace="http://www.isotc211.org/2005/gmd" schemaLocation="http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="HealthStatisticalData" type="hh:HealthStatisticalDataType" abstract="true" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
Health statistical data

-- Definition --
Human health related data, from recorded diseases and related health problems (according to internationally accepted code lists, such as ICD-10), expressed as morbidity and mortality, to data on general health status (BMI, self perceived health, etc.), data on health care services (health care expenditure, day cases, etc.), and data on biomarkers; these are statistical indices aggregated at different statistical units, collected/reported in different population groups. Inclusion of human biomonitoring data provides an opportunity to explore potential direct or indirect links between human health and the environment.</documentation>
		</annotation>
	</element>
	<complexType name="HealthStatisticalDataType" abstract="true">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="aggregationUnit" type="su-core:StatisticalUnitPropertyType">
						<annotation>
							<documentation>-- Definition --
Statistical unit to which health statistical data refers.</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="HealthStatisticalDataPropertyType">
		<sequence minOccurs="0">
			<element ref="hh:HealthStatisticalData"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="HealthServicesStatistic" type="hh:HealthServicesStatisticType" substitutionGroup="hh:HealthStatisticalData">
		<annotation>
			<documentation>-- Name --
Health services statistic
-- Definition --
Type of health care indicator.</documentation>
		</annotation>
	</element>
	<complexType name="HealthServicesStatisticType">
		<complexContent>
			<extension base="hh:HealthStatisticalDataType">
				<sequence>
					<element name="healthServiceType" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Name --
Health service type

-- Definition --
Type of  health services.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">technicalGuidance</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="healthServiceValue" type="double">
						<annotation>
							<documentation>-- Name --
health service value

-- Definition --
Number of the type considered.</documentation>
						</annotation>
					</element>
					<element name="referencePeriod" type="hh:ReferencePeriodTypePropertyType">
						<annotation>
							<documentation>-- Name --
Reference period


-- Definition -- 
The time period to which data is referred to.</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="HealthServicesStatisticPropertyType">
		<sequence minOccurs="0">
			<element ref="hh:HealthServicesStatistic"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="Biomarker" type="hh:BiomarkerType" substitutionGroup="hh:HealthStatisticalData">
		<annotation>
			<documentation>-- Name --
Biomarker

-- Definition --
A biomarker (of exposure) is the concentration of a chemical, its metabolite or the product of an interaction between a chemical and some target molecule or cell that is measured in a compartment in an organism.</documentation>
		</annotation>
	</element>
	<complexType name="BiomarkerType">
		<complexContent>
			<extension base="hh:HealthStatisticalDataType">
				<sequence>
					<element name="biomarkerName" type="hh:BiomarkerTypePropertyType">
						<annotation>
							<documentation>-- Name --
Biomarker name

-- Definition --
It is the unique identifier for a biomarker, providing information on the chemical that is determined and the matrix in which the chemical was determined.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">technicalGuidance</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="biomarkerStatisticalParameter" type="hh:BiomarkerStatisticalParameterTypePropertyType">
						<annotation>
							<documentation>-- Name --
Biomarker statistical parameter

-- Definition --
The statistical summary of a human biomonitoring study, representing the most important statistical features of a biomarker measured in that particular study.</documentation>
						</annotation>
					</element>
					<element name="referencePeriod" type="hh:ReferencePeriodTypePropertyType">
						<annotation>
							<documentation>-- Name --
Reference period


-- Definition -- 
The time period to which data is referred to.</documentation>
						</annotation>
					</element>
					<element name="ageRange" type="hh:AgeRangeTypePropertyType">
						<annotation>
							<documentation>-- Name --
Age range


-- Definition --
Age interval of a specific subpopulation expressed as starting age and an interval, both alternatively expressed in years, months or weeks.</documentation>
						</annotation>
					</element>
					<element name="gender" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Name --
Gender

-- Definition --
Gender of the population considered.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">technicalGuidance</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="refersTo" type="hh:BiomarkerThematicMetadataPropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
biomarker data described by metadata</documentation>
							<appinfo>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">hh:describedBy</reversePropertyName>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="BiomarkerPropertyType">
		<sequence minOccurs="0">
			<element ref="hh:Biomarker"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="BiomarkerType" type="hh:BiomarkerTypeType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
Biomarker type

-- Definition --
A biomarker is defined both by a quantified or determined chemical (e.g. cadmium, lead) or its metabolite, and a matrix (e.g. blood, urine) that is used for quantification; for example - cadmium in urine, lead in blood.</documentation>
		</annotation>
	</element>
	<complexType name="BiomarkerTypeType">
		<sequence>
			<element name="chemical" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Name --
Chemical

-- Definition --
Identification of the compound by name or abbreviation, chemical formula, CAS-PubChem or any other number that is quantified by the measurement.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">technicalGuidance</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="matrix" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Name --
Matrix

-- Definition --
Type of biological material or body compartment that is sampled to determine or quantify a biomarker.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">technicalGuidance</taggedValue>
					</appinfo>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="BiomarkerTypePropertyType">
		<sequence>
			<element ref="hh:BiomarkerType"/>
		</sequence>
	</complexType>
	<element name="Age" type="hh:AgeType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
Age

-- Definition -- 
Persons'' age can be expressed in various ways (for instance years for adults,  months or weeks for infants).</documentation>
		</annotation>
	</element>
	<complexType name="AgeType">
		<choice>
			<element name="month" type="integer">
				<annotation>
					<documentation>-- Name --
month

-- Definition --
Time period.</documentation>
				</annotation>
			</element>
			<element name="week" type="integer">
				<annotation>
					<documentation>-- Name --
week

-- Definition --
Time period.</documentation>
				</annotation>
			</element>
			<element name="year" type="integer">
				<annotation>
					<documentation>-- Name --
year
-- Definition --
Time period.</documentation>
				</annotation>
			</element>
		</choice>
	</complexType>
	<complexType name="AgePropertyType">
		<sequence>
			<element ref="hh:Age"/>
		</sequence>
	</complexType>
	<element name="ReferencePeriodType" type="hh:ReferencePeriodTypeType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
Reference period

-- Definition -- 
The time period which the refer.</documentation>
		</annotation>
	</element>
	<complexType name="ReferencePeriodTypeType">
		<sequence>
			<element name="startDate" type="date">
				<annotation>
					<documentation>-- Name --
Start date

-- Definition -- 
Start of reference period.</documentation>
				</annotation>
			</element>
			<element name="endDate" type="date">
				<annotation>
					<documentation>-- Name --
End date

-- Definition -- 
End of reference period.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="ReferencePeriodTypePropertyType">
		<sequence>
			<element ref="hh:ReferencePeriodType"/>
		</sequence>
	</complexType>
	<element name="Concentration" type="hh:ConcentrationType">
		<annotation>
			<documentation>-- Name --
concentration measure

-- Definition --
A measure of concentration of a specified component in a specified media.</documentation>
		</annotation>
	</element>
	<complexType name="ConcentrationType">
		<complexContent>
			<extension base="gml:MeasureType">
				<sequence/>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="ConcentrationPropertyType">
		<sequence minOccurs="0">
			<element ref="hh:Concentration"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="BiomarkerStatisticalParameterType" type="hh:BiomarkerStatisticalParameterTypeType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
Biomarker statistical parameter

-- Definition --
A set of statistical features of a biomarker measured for one specific biomarker.</documentation>
		</annotation>
	</element>
	<complexType name="BiomarkerStatisticalParameterTypeType">
		<sequence>
			<element name="geometricMean" type="gml:MeasureType" minOccurs="0">
				<annotation>
					<documentation>-- Name --
Geometric mean

-- Definition --
The geometric mean.</documentation>
				</annotation>
			</element>
			<element name="CI95ofGM" type="gml:MeasureType" minOccurs="0">
				<annotation>
					<documentation>-- Name --
CI95 geometric mean

-- Definition --
95% confidence interval of the geometric mean.</documentation>
				</annotation>
			</element>
			<element name="P50" type="gml:MeasureType" minOccurs="0">
				<annotation>
					<documentation>-- Name --
Percentile 50

-- Definition -- 
The 50'||'&'||'lt;sup'||'&'||'gt;th'||'&'||'lt;/sup'||'&'||'gt; Percentile or median value. Value below which 50 percent of the observations may be found.</documentation>
				</annotation>
			</element>
			<element name="P90" type="gml:MeasureType" minOccurs="0">
				<annotation>
					<documentation>-- Name --
Percentile 90

-- Definition -- 
The 90'||'&'||'lt;sup'||'&'||'gt;th'||'&'||'lt;/sup'||'&'||'gt; Percentile. The value below which 90 percent of the observations may be found.</documentation>
				</annotation>
			</element>
			<element name="P95" type="gml:MeasureType" minOccurs="0">
				<annotation>
					<documentation>-- Name --
Percentile 95

-- Definition -- 
The 95'||'&'||'lt;sup'||'&'||'gt;th'||'&'||'lt;/sup'||'&'||'gt; Percentile. The value below which 95 percent of the observations may be found.</documentation>
				</annotation>
			</element>
			<element name="CI95ofP95" type="gml:MeasureType" minOccurs="0">
				<annotation>
					<documentation>-- Name --
CI95 percentile 95

-- Definition --
95% confidence interval of the percentile 95.</documentation>
				</annotation>
			</element>
			<element name="maximum" type="gml:MeasureType" minOccurs="0">
				<annotation>
					<documentation>-- Name --
maximum value

-- Definition --
The highest biomarker value determined in an individual participant in the biomonitoring survey.</documentation>
				</annotation>
			</element>
			<element name="numberOfPartecipants" type="integer">
				<annotation>
					<documentation>-- Name --
Number of partecipants

-- Definition --
The number of participants that have provided samples that have contributed to the calculation of the biomarker statistical parameter.</documentation>
				</annotation>
			</element>
			<element name="pinLOD" type="double" minOccurs="0">
				<annotation>
					<documentation>-- Name --
Limit of detection

-- Definition --
Proportion of individuals with undetectable levels of tested parameter (below limit of detection).</documentation>
				</annotation>
			</element>
			<element name="LOQ" type="double" minOccurs="0">
				<annotation>
					<documentation>-- Name --
Limit of quantification

-- Definition --
Limit of quantification.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="BiomarkerStatisticalParameterTypePropertyType">
		<sequence>
			<element ref="hh:BiomarkerStatisticalParameterType"/>
		</sequence>
	</complexType>
	<element name="UomNoise" type="hh:UomNoiseType">
		<annotation>
			<documentation>-- Name --
noise unit of measure

-- Definition --
A unit of measure for noise intensity.</documentation>
		</annotation>
	</element>
	<complexType name="UomNoiseType">
		<complexContent>
			<extension base="gml:UnitOfMeasureType">
				<sequence>
					<element name="source" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Name --
noise source type

-- Definition --
The noise source type.

-- Description --
EXAMPLE: Road traffic, rail traffic, air traffic, industrial activity, etc.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">technicalGuidance</taggedValue>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="UomNoisePropertyType">
		<sequence minOccurs="0">
			<element ref="hh:UomNoise"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="Disease" type="hh:DiseaseType" substitutionGroup="hh:HealthStatisticalData">
		<annotation>
			<documentation>-- Name --
Disease

-- Definition --
Statistical information related to pathologies linked directly or indirectly to the quality of environment.

-- Description --
Statistical information related to diseases, health-related conditions and external causes of disease and injury, as classified in the International Statistical Classification of Diseases and Related Health Problems, 10th Revision (ICD-10). For practical reasons, a short term '||'&'||'amp;lsquo;disease'||'&'||'amp;rsquo; is used to label all conditions covered by this definition.</documentation>
		</annotation>
	</element>
	<complexType name="DiseaseType">
		<complexContent>
			<extension base="hh:HealthStatisticalDataType">
				<sequence>
					<element name="ageRange" nillable="true">
						<annotation>
							<documentation>-- Name --
Age range


-- Definition --
Age interval of a specific subpopulation expressed as starting age and an interval, both alternatively expressed in years, months or weeks.</documentation>
						</annotation>';
            
        
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    
    pos := pos + amt;
    buf :=        
'						<complexType>
							<sequence>
								<element ref="hh:AgeRangeType"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="diseaseMeasure" type="hh:DiseaseMeasurePropertyType" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
Disease measure

-- Definition --
Different ways how data on diseases and related health problems in a population can be reported.</documentation>
						</annotation>
					</element>
					<element name="gender" type="gml:ReferenceType" nillable="true">
						<annotation>
							<documentation>-- Name --
Gender

-- Definition --
Gender of the population considered.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">technicalGuidance</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="referencePeriod" type="hh:ReferencePeriodTypePropertyType">
						<annotation>
							<documentation>-- Name --
Reference period


-- Definition -- 
The time period to which data refers.</documentation>
						</annotation>
					</element>
					<element name="pathology" type="gml:ReferenceType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
International classification of diseases .


-- Definition --
Disease as defined in the ICD-10 update 2007  "ICD (International Classification of Diseases, 10'||'&'||'lt;sup'||'&'||'gt;th'||'&'||'lt;/sup'||'&'||'gt; revision)".
-- Description --
As values in the INSPIRE data, the  code could be used (e.g A00, A01, A01.1, ...).</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="COD" type="gml:ReferenceType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
Cause of death

-- Definition --
Data on causes of death (COD) that provide information on mortality patterns and form a major element of public health information.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="DiseasePropertyType">
		<sequence minOccurs="0">
			<element ref="hh:Disease"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="NoiseMeasure" type="hh:NoiseMeasureType">
		<annotation>
			<documentation>-- Name --
noise measure

-- Definition --
A measure of noise intensity.</documentation>
		</annotation>
	</element>
	<complexType name="NoiseMeasureType">
		<complexContent>
			<extension base="gml:MeasureType">
				<sequence/>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="NoiseMeasurePropertyType">
		<sequence minOccurs="0">
			<element ref="hh:NoiseMeasure"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="BiomarkerThematicMetadata" type="hh:BiomarkerThematicMetadataType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
Biomarker thematic metadata

-- Definition --
Thematic Metadata describing the purpose of the study, target population and the characteristic of the studied areas.</documentation>
		</annotation>
	</element>
	<complexType name="BiomarkerThematicMetadataType">
		<sequence>
			<element name="studyType" type="gmd:PT_FreeText_PropertyType" minOccurs="0">
				<annotation>
					<documentation>-- Name --
Study type

-- Definition --
The aim of the study (hypothesis driven, general population survey, opportunistic) when these choices are predefined.</documentation>
				</annotation>
			</element>
			<element name="areaType" type="gmd:PT_FreeText_PropertyType" minOccurs="0">
				<annotation>
					<documentation>-- Name --
Area type

-- Definition --
The characteristics of the sampling area (urban, rural, semi-urban) when these choices are predefined in a human biomonitoring study.</documentation>
				</annotation>
			</element>
			<element name="specificSubPopulation" type="gmd:PT_FreeText_PropertyType" minOccurs="0">
				<annotation>
					<documentation>-- Name --
Specific subpopulation

-- Definition --
The characteristics of the sampled population with respect to age, gender, and other population characteristics when these choices are predefined in a human biomonitoring survey.</documentation>
				</annotation>
			</element>
			<element name="meanAge" type="hh:AgePropertyType">
				<annotation>
					<documentation>-- Name --
Mean age

-- Definition --
The mean age of the specific sub population.</documentation>
				</annotation>
			</element>
			<element name="describedBy" type="hh:BiomarkerPropertyType" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Definition --
Metadata that are linked to biomarker data</documentation>
					<appinfo>
						<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">hh:refersTo</reversePropertyName>
					</appinfo>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="BiomarkerThematicMetadataPropertyType">
		<sequence>
			<element ref="hh:BiomarkerThematicMetadata"/>
		</sequence>
	</complexType>
	<element name="EnvHealthDeterminantStatisticalData" type="hh:EnvHealthDeterminantStatisticalDataType" substitutionGroup="hh:HealthStatisticalData">
		<annotation>
			<documentation>-- Name --
environmental health determinant statistical data

-- Definition --
A statistical data of interest for human health determinant analysis, resulting from the aggregation of raw measurements located within a statistical unit.</documentation>
		</annotation>
	</element>
	<complexType name="EnvHealthDeterminantStatisticalDataType">
		<complexContent>
			<extension base="hh:HealthStatisticalDataType">
				<sequence>
					<element name="statisticalMethod" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Name --
statistical method

-- Definition --
The type of statistical method used to aggregate the raw measurement data on the statistical unit.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">technicalGuidance</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="type" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Name --
Type

-- Definition --
The type of environmental health determinant.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">technicalGuidance</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="measure" type="gml:MeasureType">
						<annotation>
							<documentation>-- Name --
Measure

-- Definition --
The measures</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="EnvHealthDeterminantStatisticalDataPropertyType">
		<sequence minOccurs="0">
			<element ref="hh:EnvHealthDeterminantStatisticalData"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="EnvHealthDeterminantMeasure" type="hh:EnvHealthDeterminantMeasureType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
environmental health determinant measure

-- Definition --
A raw measurement performed at some place that is of interest for human health determinant analysis.</documentation>
		</annotation>
	</element>
	<complexType name="EnvHealthDeterminantMeasureType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="location" type="gml:GeometryPropertyType">
						<annotation>
							<documentation>-- Name --
Location

-- Definition --
The location of the measurement.

-- Description --
This location should be a point geometry in most cases.</documentation>
						</annotation>
					</element>
					<element name="type" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Name --
Type

-- Definition --
The type of environmental health determinant.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">technicalGuidance</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="measureTime" type="gml:TimePeriodPropertyType">
						<annotation>
							<documentation>-- Name --
measure time
-- Definition --
The time period when the measure has been performed.</documentation>
						</annotation>
					</element>
					<element name="beginLifespanVersion" nillable="true">
						<annotation>
							<documentation>-- Name --
begin lifespan version
-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="endLifespanVersion" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
end lifespan version
-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="validFrom" nillable="true">
						<annotation>
							<documentation>-- Name --
valid from

-- Definition --
The time when the information will start being used.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="validTo" nillable="true">
						<annotation>
							<documentation>-- Name --
valid to

-- Definition --
The time when the information will stop being used.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="measure" type="gml:MeasureType">
						<annotation>
							<documentation>-- Name --
Measure

-- Definition --
The measure</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="EnvHealthDeterminantMeasurePropertyType">
		<sequence minOccurs="0">
			<element ref="hh:EnvHealthDeterminantMeasure"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="AgeRangeType" type="hh:AgeRangeTypeType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
Age range

-- Definition --
Age interval of a specific subpopulation expressed as starting age and an interval, both alternatively expressed in years, months or weeks.</documentation>
		</annotation>
	</element>
	<complexType name="AgeRangeTypeType">
		<sequence>
			<element name="startAge" type="hh:AgePropertyType">
				<annotation>
					<documentation>-- Name --
start age

-- Definition -- 
Beginning of age interval.</documentation>
				</annotation>
			</element>
			<element name="range" type="hh:AgePropertyType">
				<annotation>
					<documentation>-- Name --
range

-- Definition -- 
Duration of age interval.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="AgeRangeTypePropertyType">
		<sequence>
			<element ref="hh:AgeRangeType"/>
		</sequence>
	</complexType>
	<element name="UomConcentration" type="hh:UomConcentrationType">
		<annotation>
			<documentation>-- Name --
Unit of measure for concentration

-- Definition --
A unit of measure for concentration of a specified component within a specified media.</documentation>
		</annotation>
	</element>
	<complexType name="UomConcentrationType">
		<complexContent>
			<extension base="gml:UnitOfMeasureType">
				<sequence>
					<element name="component" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Name --
component
-- Definition --
The component whose concentration is measured.

-- Description --
EXAMPLE: SO2 in ambient air, lead in drinking water, benzo-a-pyrene in indoor air, ragweed pollens in ambient air.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">technicalGuidance</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="media" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Name --
media
-- Definition --
The media in which the concentration is measured.

-- Description --
EXAMPLE: SO2 in ambient air, lead in drinking water, benzo-a-pyrene in indoor air, ragweed pollens in ambient air.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">technicalGuidance</taggedValue>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="UomConcentrationPropertyType">
		<sequence minOccurs="0">
			<element ref="hh:UomConcentration"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="DiseaseMeasure" type="hh:DiseaseMeasureType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
Disease measure

-- Definition --
Different ways in which data on diseases and related health problems in a population can be reported.

-- Description --
There is a strong agreement between the two codelists addressed in the Data Specifications Document; the '||'&'||'amp;ldquo;ICD10Value'||'&'||'amp;rdquo; and the '||'&'||'amp;ldquo;CODValue'||'&'||'amp;rdquo; codelist. Taking into account that the main source of harmonized data is Eurostat, the reporting formats of Eurostat should be promoted in the definition of DiseaseMeasureType:
'||'&'||'amp;bull; Absolute numbers: the total prevalence of a disease or mortality cause, without any further weighing or processing;
'||'&'||'amp;bull; Crude death rate: describes mortality in relation to the total population. Expressed in deaths per 100,000 inhabitants, it is calculated as the number of deaths recorded in the population for a given period divided by population in the same period and then multiplied by 100,000;
'||'&'||'amp;bull; Standardised death rate: weighted average of age-specific mortality rates. The weighting factor is the age distribution of a standard reference population. Standardised death rates are calculated for the age group 0-64 (''premature death'') and for the total of ages. As most causes of death vary significantly with people''s age and sex, the use of standardised death rates improves comparability over time and between countries.
The reporting formats as presented above are regulated through the European Parliament'||'&'||'amp;rsquo;s '||'&'||'amp;ldquo; Regulation on Community statistics on public health and health and safety at work (EC) No 1338/2008'||'&'||'amp;rdquo;.</documentation>
		</annotation>
	</element>
	<complexType name="DiseaseMeasureType">
		<sequence>
			<element name="diseaseMeasureType" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Name --
Disease measure type


-- Definition --
Different ways how data on diseases and related health problems in a population can be reported.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">technicalGuidance</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="value" type="double">
				<annotation>
					<documentation>-- Name --
Value

-- Definition --
Value of the measured disease indicator.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="DiseaseMeasurePropertyType">
		<sequence>
			<element ref="hh:DiseaseMeasure"/>
		</sequence>
	</complexType>
	<element name="GeneralHealthStatistics" type="hh:GeneralHealthStatisticsType" substitutionGroup="hh:HealthStatisticalData">
		<annotation>
			<documentation>-- Name --
General health statistic

-- Definition --
Numbers about some aspects of health related to a population or an area. For the purpose of this data model, ''general health'' data include issues such as self-perceived health, demographic distribution of various health problems, smokers, etc., expressed as raw numbers, rates, percentage, stratified by gender, age, and/or socio-economic, cultural, ethnic or other factors.</documentation>
		</annotation>
	</element>
	<complexType name="GeneralHealthStatisticsType">
		<complexContent>
			<extension base="hh:HealthStatisticalDataType">
				<sequence>
					<element name="ageRange" nillable="true">
						<annotation>
							<documentation>-- Name --
Age range


-- Definition --
Age interval of a specific subpopulation expressed as starting age and an interval, both alternatively expressed in years, months or weeks.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="hh:AgeRangeType"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="gender" type="gml:ReferenceType" nillable="true">
						<annotation>
							<documentation>-- Name --
Gender

-- Definition --
Gender of the population considered.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">technicalGuidance</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="generalHealthName" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Name --
General health name

-- Definition -- 
Health status indicator.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">technicalGuidance</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="generalHealthValue" type="double">
						<annotation>
							<documentation>-- Name --
General health value
-- Definition -- 
A numerical expression of a health index/indicator.</documentation>
						</annotation>
					</element>
					<element name="referencePeriod" type="hh:ReferencePeriodTypePropertyType">
						<annotation>
							<documentation>-- Name --
Reference period


-- Definition -- 
The time period to which data is referred to.</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="GeneralHealthStatisticsPropertyType">
		<sequence minOccurs="0">
			<element ref="hh:GeneralHealthStatistics"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
</schema>';    
    
    amt := length(buf);
    
    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);



    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 339;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (339, empty_clob(), 'INSPIRE', 'urn:x-inspire:specification:gmlas:HydroNetwork:3.0/hydronetwork.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 339 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as hydronetwork_hy_n_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?><schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:gn="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" xmlns:hy="urn:x-inspire:specification:gmlas:HydroBase:3.0" xmlns:hy-n="urn:x-inspire:specification:gmlas:HydroNetwork:3.0" xmlns:net="urn:x-inspire:specification:gmlas:Network:3.2" elementFormDefault="qualified" targetNamespace="urn:x-inspire:specification:gmlas:HydroNetwork:3.0" version="3.0">
  <annotation>
    <documentation>-- Definition --
The Network application schema contains spatial objects associated with a connected hydrographic network representation of waterways, lakes etc. This is required primarily for the ''spatial analysis and modelling'' Use Case.</documentation>
  </annotation>
  <import namespace="urn:x-inspire:specification:gmlas:HydroBase:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/hy/3.0/HydroBase.xsd"/>
  <import namespace="urn:x-inspire:specification:gmlas:Network:3.2" schemaLocation="http://inspire.ec.europa.eu/schemas/net/3.2/Network.xsd"/>
  <import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
  <import namespace="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/gn/3.0/GeographicalNames.xsd"/>
  <!--XML Schema document created by ShapeChange-->
  <element name="WatercourseSeparatedCrossing" substitutionGroup="net:GradeSeparatedCrossing" type="hy-n:WatercourseSeparatedCrossingType">
    <annotation>
      <documentation>-- Definition --
An element in the hydrographic network used to indicate non-interacting crossing of watercourse links separated by level.

-- Description --
NOTE The crossing may legitimately break a no-intersection quality rule.</documentation>
    </annotation>
  </element>
  <complexType name="WatercourseSeparatedCrossingType">
    <complexContent>
      <extension base="net:GradeSeparatedCrossingType">
        <sequence>
          <element maxOccurs="unbounded" minOccurs="0" name="geographicalName" nillable="true">
            <annotation>
              <documentation>-- Definition --
A geographical name that is used to identify a hydrographic object in the real world. It provides a ''key'' for implicitly associating different representations of the object.

-- Description --
EXAMPLE A standing water in a mapping view may share the same geographical name as a WFD lake in a reporting view, implying they are both representations of the same real world object.</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="gn:GeographicalName"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="hydroId" nillable="true">
            <annotation>
              <documentation>-- Definition --
An identifier that is used to identify a hydrographic object in the real world. It provides a ''key'' for implicitly associating different representations of the object.

-- Description --
NOTE 1 The identifier may be a national hydrological identification code.

NOTE 2 More than one identifier may be required, for instance a watercourse may be assigned different identifying codes under national and European schemes.

EXAMPLE A lock in a mapping view may share the same identifier as a hydro node in a network view, implying they are both representations of the same real world object.</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="hy:HydroIdentifier"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="relatedHydroObject" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
A related hydrographic object representing the same real-world entity.</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">hy:HydroObject</targetElement>
              </appinfo>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="WatercourseSeparatedCrossingPropertyType">
    <sequence minOccurs="0">
      <element ref="hy-n:WatercourseSeparatedCrossing"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="WatercourseLink" substitutionGroup="net:Link" type="hy-n:WatercourseLinkType">
    <annotation>
      <documentation>-- Definition --
A segment of a watercourse within a hydrographic network.

-- Description --
NOTE A watercourse link may be fictitious, with no direct correspondence to a real-world object and included only to ensure a closed network.

EXAMPLE Fictitious examples:
- virtual network segment in coastal water area
- virtual network segment in lake area
- virtual network segment in river to connect tributary
- virtual network segment in transitional water area</documentation>
    </annotation>
  </element>
  <complexType name="WatercourseLinkType">
    <complexContent>
      <extension base="net:LinkType">
        <sequence>
          <element maxOccurs="unbounded" minOccurs="0" name="geographicalName" nillable="true">
            <annotation>
              <documentation>-- Definition --
A geographical name that is used to identify a hydrographic object in the real world. It provides a ''key'' for implicitly associating different representations of the object.

-- Description --
EXAMPLE A standing water in a mapping view may share the same geographical name as a WFD lake in a reporting view, implying they are both representations of the same real world object.</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="gn:GeographicalName"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="hydroId" nillable="true">
            <annotation>
              <documentation>-- Definition --
An identifier that is used to identify a hydrographic object in the real world. It provides a ''key'' for implicitly associating different representations of the object.

-- Description --
NOTE 1 The identifier may be a national hydrological identification code.

NOTE 2 More than one identifier may be required, for instance a watercourse may be assigned different identifying codes under national and European schemes.

EXAMPLE A lock in a mapping view may share the same identifier as a hydro node in a network view, implying they are both representations of the same real world object.</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="hy:HydroIdentifier"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="relatedHydroObject" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
A related hydrographic object representing the same real-world entity.</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">hy:HydroObject</targetElement>
              </appinfo>
            </annotation>
          </element>
          <element name="flowDirection" nillable="true">
            <annotation>
              <documentation>-- Definition --
Direction of water flow in the segment relative to digitisation of segment geometry.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:CodeType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="length" nillable="true">
            <annotation>
              <documentation>-- Definition --
Length of network segment.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:LengthType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="WatercourseLinkPropertyType">
    <sequence minOccurs="0">
      <element ref="hy-n:WatercourseLink"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="WatercourseLinkSequence" substitutionGroup="net:LinkSequence" type="hy-n:WatercourseLinkSequenceType">
    <annotation>
      <documentation>-- Definition --
A sequence of watercourse links representing a non-branching path through a hydrographic network.</documentation>
    </annotation>
  </element>
  <complexType name="WatercourseLinkSequenceType">
    <complexContent>
      <extension base="net:LinkSequenceType">
        <sequence>
          <element maxOccurs="unbounded" minOccurs="0" name="geographicalName" nillable="true">
            <annotation>
              <documentation>-- Definition --
A geographical name that is used to identify a hydrographic object in the real world. It provides a ''key'' for implicitly associating different representations of the object.

-- Description --
EXAMPLE A standing water in a mapping view may share the same geographical name as a WFD lake in a reporting view, implying they are both representations of the same real world object.</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="gn:GeographicalName"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="hydroId" nillable="true">
            <annotation>
              <documentation>-- Definition --
An identifier that is used to identify a hydrographic object in the real world. It provides a ''key'' for implicitly associating different representations of the object.

-- Description --
NOTE 1 The identifier may be a national hydrological identification code.

NOTE 2 More than one identifier may be required, for instance a watercourse may be assigned different identifying codes under national and European schemes.

EXAMPLE A lock in a mapping view may share the same identifier as a hydro node in a network view, implying they are both representations of the same real world object.</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="hy:HydroIdentifier"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="relatedHydroObject" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
A related hydrographic object representing the same real-world entity.</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">hy:HydroObject</targetElement>
              </appinfo>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="WatercourseLinkSequencePropertyType">
    <sequence minOccurs="0">
      <element ref="hy-n:WatercourseLinkSequence"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="HydroNode" substitutionGroup="net:Node" type="hy-n:HydroNodeType">
    <annotation>
      <documentation>-- Definition --
A node within the hydrographic network.

-- Description --
NOTE May represent a physical confluence, bifurcation/confluence/vanishing point etc, or it may be associated with a hydrographic point of interest or facility.</documentation>
    </annotation>
  </element>
  <complexType name="HydroNodeType">
    <complexContent>
      <extension base="net:NodeType">
        <sequence>
          <element maxOccurs="unbounded" minOccurs="0" name="geographicalName" nillable="true">
            <annotation>
              <documentation>-- Definition --
A geographical name that is used to identify a hydrographic object in the real world. It provides a ''key'' for implicitly associating different representations of the object.

-- Description --
EXAMPLE A standing water in a mapping view may share the same geographical name as a WFD lake in a reporting view, implying they are both representations of the same real world object.</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="gn:GeographicalName"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="hydroId" nillable="true">
            <annotation>
              <documentation>-- Definition --
An identifier that is used to identify a hydrographic object in the real world. It provides a ''key'' for implicitly associating different representations of the object.

-- Description --
NOTE 1 The identifier may be a national hydrological identification code.

NOTE 2 More than one identifier may be required, for instance a watercourse may be assigned different identifying codes under national and European schemes.

EXAMPLE A lock in a mapping view may share the same identifier as a hydro node in a network view, implying they are both representations of the same real world object.</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="hy:HydroIdentifier"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="relatedHydroObject" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
A related hydrographic object representing the same real-world entity.</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">hy:HydroObject</targetElement>
              </appinfo>
            </annotation>
          </element>
          <element name="hydroNodeCategory" nillable="true">
            <annotation>
              <documentation>-- Definition --
Nature of the hydro node.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:CodeType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="HydroNodePropertyType">
    <sequence minOccurs="0">
      <element ref="hy-n:HydroNode"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);



    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 340;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (340, empty_clob(), 'INSPIRE', 'urn:x-inspire:specification:gmlas:HydroPhysicalWaters:3.0/hydrophysicalwaters.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 340 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as hydrophysicalwaters_hy_p_3_0.xsd
    -- Needed to separate this xsd into two pieces due to its size>32767.
    buf :=
'<?xml version="1.0" encoding="UTF-8"?><schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="urn:x-inspire:specification:gmlas:BaseTypes:3.2" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:gn="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" xmlns:hy="urn:x-inspire:specification:gmlas:HydroBase:3.0" xmlns:hy-p="urn:x-inspire:specification:gmlas:HydroPhysicalWaters:3.0" xmlns:lc="urn:x-inspire:specification:gmlas:LandCover:0.0" elementFormDefault="qualified" targetNamespace="urn:x-inspire:specification:gmlas:HydroPhysicalWaters:3.0" version="3.0">
  <annotation>
    <documentation>-- Definition --
The ''PhysicalWaters'' application schema is concerned primarily with the ''mapping'' Use Case</documentation>
  </annotation>
  <import namespace="urn:x-inspire:specification:gmlas:HydroBase:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/hy/3.0/HydroBase.xsd"/>
  <import namespace="urn:x-inspire:specification:gmlas:BaseTypes:3.2" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.2/BaseTypes.xsd"/>
  <import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
  <import namespace="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/gn/3.0/GeographicalNames.xsd"/>
  <import namespace="http://www.isotc211.org/2005/gmd" schemaLocation="http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd"/>
  <import namespace="urn:x-inspire:specification:gmlas:LandCover:0.0" schemaLocation="http://inspire.ec.europa.eu/schemas/lc/0.0/LandCover.xsd"/>
  <!--XML Schema document created by ShapeChange-->
  <element name="RiverBasin" substitutionGroup="hy-p:DrainageBasin" type="hy-p:RiverBasinType">
    <annotation>
      <documentation>-- Definition --
The area of land from which all surface run-off flows through a sequence of streams, rivers and, possibly, lakes into the sea at a single river mouth, estuary or delta.

-- Description --
SOURCE [2000/60/EC Art. 2(13)].</documentation>
    </annotation>
  </element>
  <complexType name="RiverBasinType">
    <complexContent>
      <extension base="hy-p:DrainageBasinType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="RiverBasinPropertyType">
    <sequence minOccurs="0">
      <element ref="hy-p:RiverBasin"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="Crossing" substitutionGroup="hy-p:ManMadeObject" type="hy-p:CrossingType">
    <annotation>
      <documentation>-- Definition --
A man-made object allowing the passage of water above or below an obstacle.

-- Description --
EXAMPLE Aqueduct, bridge, culvert, siphon.</documentation>
    </annotation>
  </element>
  <complexType name="CrossingType">
    <complexContent>
      <extension base="hy-p:ManMadeObjectType">
        <sequence>
          <element name="type" nillable="true">
            <annotation>
              <documentation>-- Definition --
The type of physical crossing.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:CodeType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="CrossingPropertyType">
    <sequence minOccurs="0">
      <element ref="hy-p:Crossing"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="DrainageBasin" substitutionGroup="gml:AbstractFeature" type="hy-p:DrainageBasinType">
    <annotation>
      <documentation>-- Definition --
Area having a common outlet for its surface runoff.

-- Description --
SOURCE [UNESCO/WMO International Glossary of Hydrology].

NOTE 1 Regarding the different classifications of drainage basins, no distinction is made between drainage basins / sub-basins since this will vary with application. It is possible to build basins from other basins.

NOTE 2 The outlet of a drainage basin may be a canal or a lake.

NOTE 3 Synonyms for drainage basin include: catchment; catchment area; drainage area; river basin; watershed.</documentation>
    </annotation>
  </element>
  <complexType name="DrainageBasinType">
    <complexContent>
      <extension base="gml:AbstractFeatureType">
        <sequence>
          <element maxOccurs="unbounded" minOccurs="0" name="geographicalName" nillable="true">
            <annotation>
              <documentation>-- Definition --
A geographical name that is used to identify a hydrographic object in the real world. It provides a ''key'' for implicitly associating different representations of the object.

-- Description --
EXAMPLE A standing water in a mapping view may share the same geographical name as a WFD lake in a reporting view, implying they are both representations of the same real world object.</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="gn:GeographicalName"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="hydroId" nillable="true">
            <annotation>
              <documentation>-- Definition --
An identifier that is used to identify a hydrographic object in the real world. It provides a ''key'' for implicitly associating different representations of the object.

-- Description --
NOTE 1 The identifier may be a national hydrological identification code.

NOTE 2 More than one identifier may be required, for instance a watercourse may be assigned different identifying codes under national and European schemes.

EXAMPLE A lock in a mapping view may share the same identifier as a hydro node in a network view, implying they are both representations of the same real world object.</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="hy:HydroIdentifier"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="relatedHydroObject" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
A related hydrographic object representing the same real-world entity.</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">hy:HydroObject</targetElement>
              </appinfo>
            </annotation>
          </element>
          <element name="area" nillable="true">
            <annotation>
              <documentation>-- Definition --
Size of the drainage basin area.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:AreaType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="basinOrder" nillable="true">
            <annotation>
              <documentation>-- Definition --
Number (or code) expressing the degree of branching/dividing in a drainage basin system.</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="hy-p:HydroOrderCode"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element name="beginLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="endLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="geometry" type="gml:SurfacePropertyType">
            <annotation>
              <documentation>-- Definition --
The geometry of the drainage basin, as a surface.</documentation>
            </annotation>
          </element>
          <element name="inspireId" type="base:IdentifierPropertyType">
            <annotation>
              <documentation>-- Definition --
External object identifier of the spatial object.

-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.
</documentation>
            </annotation>
          </element>
          <element name="origin" nillable="true">
            <annotation>
              <documentation>-- Definition --
Origin of the drainage basin.

-- Description --
EXAMPLE Natural, man-made, etc.

NOTE A polder is a drainage basin of man-made origin.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="hy-p:OriginValueType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="containsBasin" nillable="true" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
A smaller sub-basin contained within a larger basin.</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">hy-p:DrainageBasin</targetElement>
              </appinfo>
            </annotation>
          </element>
          <element maxOccurs="unbounded" name="outlet" nillable="true" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
The surface water outlet(s) of a drainage basin.</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">hy-p:SurfaceWater</targetElement>
                <reversePropertyName xmlns="http://www.opengis.net/gml/3.2">hy-p:drainsBasin</reversePropertyName>
              </appinfo>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="DrainageBasinPropertyType">
    <sequence minOccurs="0">
      <element ref="hy-p:DrainageBasin"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element abstract="true" name="SurfaceWater" substitutionGroup="gml:AbstractFeature" type="hy-p:SurfaceWaterType">
    <annotation>
      <documentation>-- Definition --
Any known inland waterway body.

-- Description --
SOURCE [Based on DFDD].

EXAMPLE Lake/pond, reservoir, river/stream, etc.

NOTE May include islands, represented as ''holes'' in its geometry. Islands may be surrounded by a shore and / or land-ware boundary.
</documentation>
    </annotation>
  </element>
  <complexType abstract="true" name="SurfaceWaterType">
    <complexContent>
      <extension base="gml:AbstractFeatureType">
        <sequence>
          <element maxOccurs="unbounded" minOccurs="0" name="geographicalName" nillable="true">
            <annotation>
              <documentation>-- Definition --
A geographical name that is used to identify a hydrographic object in the real world. It provides a ''key'' for implicitly associating different representations of the object.

-- Description --
EXAMPLE A standing water in a mapping view may share the same geographical name as a WFD lake in a reporting view, implying they are both representations of the same real world object.</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="gn:GeographicalName"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="hydroId" nillable="true">
            <annotation>
              <documentation>-- Definition --
An identifier that is used to identify a hydrographic object in the real world. It provides a ''key'' for implicitly associating different representations of the object.

-- Description --
NOTE 1 The identifier may be a national hydrological identification code.

NOTE 2 More than one identifier may be required, for instance a watercourse may be assigned different identifying codes under national and European schemes.

EXAMPLE A lock in a mapping view may share the same identifier as a hydro node in a network view, implying they are both representations of the same real world object.</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="hy:HydroIdentifier"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="relatedHydroObject" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
A related hydrographic object representing the same real-world entity.</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">hy:HydroObject</targetElement>
              </appinfo>
            </annotation>
          </element>
          <element name="beginLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="endLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="geometry" type="gml:GeometricPrimitivePropertyType">
            <annotation>
              <documentation>-- Definition --
The geometry of the surface water:
- either a curve or surface for a watercourse;
- either a point or surface for a standing water.</documentation>
            </annotation>
          </element>
          <element name="inspireId" type="base:IdentifierPropertyType">
            <annotation>
              <documentation>-- Definition --
External object identifier of the spatial object.

-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.
</documentation>
            </annotation>
          </element>
          <element minOccurs="0" name="levelOfDetail">
            <annotation>
              <documentation>-- Definition --
Resolution, expressed as the inverse of an indicative scale or a ground distance.

-- Description --
NOTE The object is captured at a scale of this level of detail; rules apply for portrayal and visualisation.</documentation>
            </annotation>
            <complexType>
              <complexContent>
                <extension base="gml:AbstractMetadataPropertyType">
                  <sequence>
                    <element ref="gmd:MD_Resolution"/>
                  </sequence>
                </extension>
              </complexContent>
            </complexType>
          </element>
          <element minOccurs="0" name="localType" nillable="true" type="gmd:LocalisedCharacterString_PropertyType">
            <annotation>
              <documentation>-- Definition --
Provides ''local'' name for the type of surface water.

-- Description --
EXAMPLE Canal, channel, ditch, etc.</documentation>
            </annotation>
          </element>
          <element name="origin" nillable="true">
            <annotation>
              <documentation>-- Definition --
Origin of the surface water.

-- Description --
SOURCE [Based on EuroRegionalMap].

EXAMPLE Natural, man-made, etc.

NOTE 1 Natural surface waters are natural watercourses (e.g. rivers, streams) and standing waters (e.g. pools, lakes) naturally preserved and that have been canalised and / or dammed either for navigation or for preventing flood disaster.

NOTE 2 A man-made surface water is a surface water entirely created by man for drainage, storage or transportation purpose, this includes canals, ditches and reservoirs.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="hy-p:OriginValueType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="persistence" nillable="true">
            <annotation>
              <documentation>-- Definition --
The degree of persistence of water.

-- Description --
SOURCE [Based on DFDD].</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:CodeType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="tidal" nillable="true">
            <annotation>
              <documentation>-- Definition --
Identifies whether the surface water is affected by tidal water.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="boolean">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="bank" nillable="true" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
The bank(s) associated to a surface water.</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">lc:Shore</targetElement>
              </appinfo>
            </annotation>
          </element>
          <element maxOccurs="unbounded" name="drainsBasin" nillable="true" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
The basin(s) drained by a surface water.</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">hy-p:DrainageBasin</targetElement>
                <reversePropertyName xmlns="http://www.opengis.net/gml/3.2">hy-p:outlet</reversePropertyName>
              </appinfo>
            </annotation>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="neighbour" nillable="true" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
An association to another instance of the same real-world surface water in another data set.</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">hy-p:SurfaceWater</targetElement>
              </appinfo>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="SurfaceWaterPropertyType">
    <sequence minOccurs="0">
      <element ref="hy-p:SurfaceWater"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="ShorelineConstruction" substitutionGroup="hy-p:ManMadeObject" type="hy-p:ShorelineConstructionType">
    <annotation>
      <documentation>-- Definition --
An artificial structure attached to land bordering a body of water and fixed in position.

-- Description --
SOURCE [DFDD].

NOTE 1 It is usually fixed to the waterbody bottom (for example: a mole) but may occasionally be fixed in position (for example: attached to the shore at one end and held between pilings at the other) but floating. Shoreline constructions are normally used for berthing and/or protection.

NOTE 2 Includes breakwater/groyne/wharf; but has more flexibility - also applies to inland waters.</documentation>
    </annotation>
  </element>
  <complexType name="ShorelineConstructionType">
    <complexContent>
      <extension base="hy-p:ManMadeObjectType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="ShorelineConstructionPropertyType">
    <sequence minOccurs="0">
      <element ref="hy-p:ShorelineConstruction"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element abstract="true" name="FluvialPoint" substitutionGroup="hy-p:HydroPointOfInterest" type="hy-p:FluvialPointType">
    <annotation>
      <documentation>-- Definition --
A hydro point of interest that affects the flow of a watercourse.</documentation>
    </annotation>
  </element>
  <complexType abstract="true" name="FluvialPointType">
    <complexContent>
      <extension base="hy-p:HydroPointOfInterestType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="FluvialPointPropertyType">
    <sequence minOccurs="0">
      <element ref="hy-p:FluvialPoint"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="Lock" substitutionGroup="hy-p:ManMadeObject" type="hy-p:LockType">
    <annotation>
      <documentation>-- Definition --
An enclosure with a pair or series of gates used for raising or lowering vessels as they pass from one water level to another.

-- Description --
SOURCE [DFDD].</documentation>
    </annotation>
  </element>
  <complexType name="LockType">
    <complexContent>
      <extension base="hy-p:ManMadeObjectType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="LockPropertyType">
    <sequence minOccurs="0">
      <element ref="hy-p:Lock"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="Ford" substitutionGroup="hy-p:ManMadeObject" type="hy-p:FordType">
    <annotation>
      <documentation>-- Definition --
A shallow part of a watercourse used as a road crossing.

-- Description --
SOURCE [DFDD].
</documentation>
    </annotation>
  </element>
  <complexType name="FordType">
    <complexContent>
      <extension base="hy-p:ManMadeObjectType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="FordPropertyType">
    <sequence minOccurs="0">
      <element ref="hy-p:Ford"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="StandingWater" substitutionGroup="hy-p:SurfaceWater" type="hy-p:StandingWaterType">
    <annotation>
      <documentation>-- Definition --
A body of water that is entirely surrounded by land.

-- Description --
SOURCE [DFDD].

NOTE It may occur in a natural terrain depression in which water collects, or may be impounded by a dam, or formed by its bed being hollowed out of the soil, or formed by embanking and/or damming up a natural hollow (for example: by a beaver dam). It may be connected to inflowing / outflowing watercourses or other standing waters.</documentation>
    </annotation>
  </element>
  <complexType name="StandingWaterType">
    <complexContent>
      <extension base="hy-p:SurfaceWaterType">
        <sequence>
          <element name="elevation" nillable="true">
            <annotation>
              <documentation>-- Definition --
Elevation above mean sea level.

-- Description --
SOURCE [Based on EuroRegionalMap].</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:LengthType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="meanDepth" nillable="true">
            <annotation>
              <documentation>-- Definition --
Average depth of the body of water.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:LengthType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="surfaceArea" nillable="true">
            <annotation>
              <documentation>-- Definition --
Surface area of the body of water.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:AreaType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="StandingWaterPropertyType">
    <sequence minOccurs="0">
      <element ref="hy-p:StandingWater"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element abstract="true" name="ManMadeObject" substitutionGroup="gml:AbstractFeature" type="hy-p:ManMadeObjectType">
    <annotation>
      <documentation>-- Definition --
An artificial object which lies inside a body of water and has one of the following types of function:
- Retains the water;
- Regulates the quantity of water;
- Alters the course of the water;
- Allows watercourses to cross each other.</documentation>
    </annotation>
  </element>
  <complexType abstract="true" name="ManMadeObjectType">
    <complexContent>
      <extension base="gml:AbstractFeatureType">
        <sequence>
          <element maxOccurs="unbounded" minOccurs="0" name="geographicalName" nillable="true">
            <annotation>
              <documentation>-- Definition --
A geographical name that is used to identify a hydrographic object in the real world. It provides a ''key'' for implicitly associating different representations of the object.

-- Description --
EXAMPLE A standing water in a mapping view may share the same geographical name as a WFD lake in a reporting view, implying they are both representations of the same real world object.</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="gn:GeographicalName"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    
    pos := pos + amt;
    buf :=        
'          <element maxOccurs="unbounded" minOccurs="0" name="hydroId" nillable="true">
            <annotation>
              <documentation>-- Definition --
An identifier that is used to identify a hydrographic object in the real world. It provides a ''key'' for implicitly associating different representations of the object.

-- Description --
NOTE 1 The identifier may be a national hydrological identification code.

NOTE 2 More than one identifier may be required, for instance a watercourse may be assigned different identifying codes under national and European schemes.

EXAMPLE A lock in a mapping view may share the same identifier as a hydro node in a network view, implying they are both representations of the same real world object.</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="hy:HydroIdentifier"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="relatedHydroObject" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
A related hydrographic object representing the same real-world entity.</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">hy:HydroObject</targetElement>
              </appinfo>
            </annotation>
          </element>
          <element name="beginLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="condition" nillable="true">
            <annotation>
              <documentation>-- Definition --
The state of planning, construction, repair, and/or maintenance of the structures and/or equipment comprising a facility and/or located at a site, as a whole.

-- Description --
SOURCE [DFDD].</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:CodeType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="endLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="geometry" nillable="true" type="gml:GeometricPrimitivePropertyType">
            <annotation>
              <documentation>-- Definition --
The geometry of the man-made object, as a point, curve or surface.</documentation>
            </annotation>
          </element>
          <element name="inspireId" type="base:IdentifierPropertyType">
            <annotation>
              <documentation>-- Definition --
External object identifier of the spatial object.

-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.
</documentation>
            </annotation>
          </element>
          <element minOccurs="0" name="levelOfDetail">
            <annotation>
              <documentation>-- Definition --
Resolution, expressed as the inverse of an indicative scale or a ground distance.

-- Description --
NOTE The object is captured at a scale of this level of detail; rules apply for portrayal and visualisation.</documentation>
            </annotation>
            <complexType>
              <complexContent>
                <extension base="gml:AbstractMetadataPropertyType">
                  <sequence>
                    <element ref="gmd:MD_Resolution"/>
                  </sequence>
                </extension>
              </complexContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="ManMadeObjectPropertyType">
    <sequence minOccurs="0">
      <element ref="hy-p:ManMadeObject"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="WidthRange" substitutionGroup="gml:AbstractObject" type="hy-p:WidthRangeType">
    <annotation>
      <documentation>-- Definition --
The range of a watercourse''s horizontal width along its length.</documentation>
    </annotation>
  </element>
  <complexType name="WidthRangeType">
    <sequence>
      <element name="lower" type="gml:LengthType">
        <annotation>
          <documentation>-- Definition --
Lower bound of width.</documentation>
        </annotation>
      </element>
      <element name="upper" type="gml:LengthType">
        <annotation>
          <documentation>-- Definition --
Upper bound of width.</documentation>
        </annotation>
      </element>
    </sequence>
  </complexType>
  <complexType name="WidthRangePropertyType">
    <sequence>
      <element ref="hy-p:WidthRange"/>
    </sequence>
  </complexType>
  <element name="Watercourse" substitutionGroup="hy-p:SurfaceWater" type="hy-p:WatercourseType">
    <annotation>
      <documentation>-- Definition --
A natural or man-made flowing watercourse or stream.

-- Description --
SOURCE [EuroRegionalMap].</documentation>
    </annotation>
  </element>
  <complexType name="WatercourseType">
    <complexContent>
      <extension base="hy-p:SurfaceWaterType">
        <sequence>
          <element minOccurs="0" name="condition" nillable="true">
            <annotation>
              <documentation>-- Definition --
The state of planning, construction, repair, and/or maintenance of a watercourse. 

-- Description --
SOURCE [Based on DFDD].

NOTE Only relevant for a man-made watercourse.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:CodeType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="delineationKnown" nillable="true">
            <annotation>
              <documentation>-- Definition --
An indication that the delineation (for example: limits and information) of a spatial object is known.

-- Description --
SOURCE [DFDD].

EXAMPLE The delineation may not be known in the following situations:
- an underground watercourse
- real underground network segment (pipeline or natural network section)
- transition area between a broad river and a smaller tributary
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="boolean">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="length" nillable="true">
            <annotation>
              <documentation>-- Definition --
Length of the watercourse.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:LengthType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="level" nillable="true">
            <annotation>
              <documentation>-- Definition --
Vertical location of watercourse relative to ground.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="base:VerticalPositionValueType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="streamOrder" nillable="true">
            <annotation>
              <documentation>-- Definition --
Number (or code) expressing the degree of branching in a stream system.

-- Description --
SOURCE [Based on UNESCO/WMO International Glossary of Hydrology].</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="hy-p:HydroOrderCode"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element name="width" nillable="true">
            <annotation>
              <documentation>-- Definition --
Width of watercourse (as a range) along its length.</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="hy-p:WidthRange"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="WatercoursePropertyType">
    <sequence minOccurs="0">
      <element ref="hy-p:Watercourse"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="Sluice" substitutionGroup="hy-p:ManMadeObject" type="hy-p:SluiceType">
    <annotation>
      <documentation>-- Definition --
An open, inclined conduit fitted with a gate for regulating water flow.

-- Description --
SOURCE [DFDD].</documentation>
    </annotation>
  </element>
  <complexType name="SluiceType">
    <complexContent>
      <extension base="hy-p:ManMadeObjectType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="SluicePropertyType">
    <sequence minOccurs="0">
      <element ref="hy-p:Sluice"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="HydroOrderCode" substitutionGroup="gml:AbstractObject" type="hy-p:HydroOrderCodeType">
    <annotation>
      <documentation>-- Definition --
A hydrologically meaningful ''order code'' for ordering hierarchies of watercourses and drainage basins.</documentation>
    </annotation>
  </element>
  <complexType name="HydroOrderCodeType">
    <sequence>
      <element name="order" type="string">
        <annotation>
          <documentation>-- Definition --
Number (or code) expressing the degree of branching or dividing in a stream or drainage basin system.

-- Description --
SOURCE [Based on UNESCO/WMO International Glossary of Hydrology].</documentation>
        </annotation>
      </element>
      <element name="orderScheme" type="string">
        <annotation>
          <documentation>-- Definition --
A description of the concept for ordering.

-- Description --
EXAMPLE Strahler, Horton, Pfaffstetter etc.</documentation>
        </annotation>
      </element>
      <element name="scope" type="string">
        <annotation>
          <documentation>-- Definition --
An indicator of the scope or origin for an order code (including whether it is national, supranational or European).

-- Description --
NOTE In the case of a national hydrographic identifier it may start with a two-letter country code as per ISO 3166-1-Alpha-2.</documentation>
        </annotation>
      </element>
    </sequence>
  </complexType>
  <complexType name="HydroOrderCodePropertyType">
    <sequence>
      <element ref="hy-p:HydroOrderCode"/>
    </sequence>
  </complexType>
  <element name="DamOrWeir" substitutionGroup="hy-p:ManMadeObject" type="hy-p:DamOrWeirType">
    <annotation>
      <documentation>-- Definition --
A permanent barrier across a watercourse used to impound water or to control its flow.

-- Description --
SOURCE [EuroRegionalMap].</documentation>
    </annotation>
  </element>
  <complexType name="DamOrWeirType">
    <complexContent>
      <extension base="hy-p:ManMadeObjectType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="DamOrWeirPropertyType">
    <sequence minOccurs="0">
      <element ref="hy-p:DamOrWeir"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="Rapids" substitutionGroup="hy-p:FluvialPoint" type="hy-p:RapidsType">
    <annotation>
      <documentation>-- Definition --
Portions of a stream with accelerated current where it descends rapidly but without a break in the slope of the bed sufficient to form a waterfall.

-- Description --
SOURCE [DFDD].</documentation>
    </annotation>
  </element>
  <complexType name="RapidsType">
    <complexContent>
      <extension base="hy-p:FluvialPointType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="RapidsPropertyType">
    <sequence minOccurs="0">
      <element ref="hy-p:Rapids"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="LandWaterBoundary" substitutionGroup="gml:AbstractFeature" type="hy-p:LandWaterBoundaryType">
    <annotation>
      <documentation>-- Definition --
The line where a land mass is in contact with a body of water.

-- Description --
SOURCE [DFDD].

NOTE The plane of reference for the land-water boundary should be a high water datum, such as ''Mean High Water Springs'', ''High Water'' or ''Mean Higher High Water''. Where there is little appreciable change in waterlevels / tide at the adjacent shore, then ''Mean Sea Level'' or ''Local Datum'' may be used.</documentation>
    </annotation>
  </element>
  <complexType name="LandWaterBoundaryType">
    <complexContent>
      <extension base="gml:AbstractFeatureType">
        <sequence>
          <element name="beginLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="endLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="geometry" type="gml:CurvePropertyType">
            <annotation>
              <documentation>-- Definition --
The geometry of the land-water boundary, as a curve.</documentation>
            </annotation>
          </element>
          <element name="inspireId" type="base:IdentifierPropertyType">
            <annotation>
              <documentation>-- Definition --
External object identifier of the spatial object.

-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.
</documentation>
            </annotation>
          </element>
          <element name="origin" nillable="true">
            <annotation>
              <documentation>-- Definition --
Origin of the land-water boundary.

-- Description --
EXAMPLE Natural, man-made, etc.; a sea defence is a land-water boundary of man-made origin.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="hy-p:OriginValueType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="waterLevelCategory" nillable="true">
            <annotation>
              <documentation>-- Definition --
Water-level defining the land-water boundary.

-- Description --
EXAMPLE High water, low water, etc.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:CodeType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="LandWaterBoundaryPropertyType">
    <sequence minOccurs="0">
      <element ref="hy-p:LandWaterBoundary"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="Falls" substitutionGroup="hy-p:FluvialPoint" type="hy-p:FallsType">
    <annotation>
      <documentation>-- Definition --
A vertically descending part of a watercourse where it falls from a height.

-- Description --
SOURCE [Based on DFDD].

EXAMPLE Waterfalls over a rock or a precipice.</documentation>
    </annotation>
  </element>
  <complexType name="FallsType">
    <complexContent>
      <extension base="hy-p:FluvialPointType">
        <sequence>
          <element name="height" nillable="true">
            <annotation>
              <documentation>-- Definition --
Distance measured from the lowest point of the base at ground or water level (downhill side/downstream side) to the tallest point of the spatial object.

-- Description --
SOURCE [DFDD].
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:LengthType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="FallsPropertyType">
    <sequence minOccurs="0">
      <element ref="hy-p:Falls"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <simpleType name="OriginValueType">
    <annotation>
      <documentation>-- Definition --
An enumeration type specifying a set of hydrographic ''origin'' categories (natural, man-made) for various hydrographic objects.</documentation>
    </annotation>
    <restriction base="string">
      <enumeration value="natural">
        <annotation>
          <documentation>-- Definition --
An indication that a spatial object is natural.
</documentation>
        </annotation>
      </enumeration>
      <enumeration value="manMade">
        <annotation>
          <documentation>-- Definition --
An indication that a spatial object is man-made.

-- Description --
SOURCE [DFDD].
</documentation>
        </annotation>
      </enumeration>
    </restriction>
  </simpleType>
  <element abstract="true" name="HydroPointOfInterest" substitutionGroup="gml:AbstractFeature" type="hy-p:HydroPointOfInterestType">
    <annotation>
      <documentation>-- Definition --
A natural place where water appears, disappears or changes its flow.

-- Description --
EXAMPLE Fluvial points (waterfall, cascade, rapids, breaker), spring/water hole (spring, source, geyser, thermal spring, natural fountain, well, also fumarole, artesian), sinkhole (sinkhole, drainage loss).

NOTE A hydro point of interest may create a flow constriction in the network.</documentation>
    </annotation>
  </element>
  <complexType abstract="true" name="HydroPointOfInterestType">
    <complexContent>
      <extension base="gml:AbstractFeatureType">
        <sequence>
          <element maxOccurs="unbounded" minOccurs="0" name="geographicalName" nillable="true">
            <annotation>
              <documentation>-- Definition --
A geographical name that is used to identify a hydrographic object in the real world. It provides a ''key'' for implicitly associating different representations of the object.

-- Description --
EXAMPLE A standing water in a mapping view may share the same geographical name as a WFD lake in a reporting view, implying they are both representations of the same real world object.</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="gn:GeographicalName"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="hydroId" nillable="true">
            <annotation>
              <documentation>-- Definition --
An identifier that is used to identify a hydrographic object in the real world. It provides a ''key'' for implicitly associating different representations of the object.

-- Description --
NOTE 1 The identifier may be a national hydrological identification code.

NOTE 2 More than one identifier may be required, for instance a watercourse may be assigned different identifying codes under national and European schemes.

EXAMPLE A lock in a mapping view may share the same identifier as a hydro node in a network view, implying they are both representations of the same real world object.</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="hy:HydroIdentifier"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="relatedHydroObject" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
A related hydrographic object representing the same real-world entity.</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">hy:HydroObject</targetElement>
              </appinfo>
            </annotation>
          </element>
          <element name="beginLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="endLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="geometry" nillable="true" type="gml:GeometricPrimitivePropertyType">
            <annotation>
              <documentation>-- Definition --
The geometry of the hydro point of interest, as a point, curve or surface.</documentation>
            </annotation>
          </element>
          <element name="inspireId" type="base:IdentifierPropertyType">
            <annotation>
              <documentation>-- Definition --
External object identifier of the spatial object.

-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.
</documentation>
            </annotation>
          </element>
          <element minOccurs="0" name="levelOfDetail">
            <annotation>
              <documentation>-- Definition --
Resolution, expressed as the inverse of an indicative scale or a ground distance.

-- Description --
NOTE The object is captured at a scale of this level of detail; rules apply for portrayal and visualisation.</documentation>
            </annotation>
            <complexType>
              <complexContent>
                <extension base="gml:AbstractMetadataPropertyType">
                  <sequence>
                    <element ref="gmd:MD_Resolution"/>
                  </sequence>
                </extension>
              </complexContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="HydroPointOfInterestPropertyType">
    <sequence minOccurs="0">
      <element ref="hy-p:HydroPointOfInterest"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
</schema>';    
    
    amt := length(buf);
   
    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 341;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (341, empty_clob(), 'INSPIRE', 'urn:x-inspire:specification:gmlas:HydroReporting:3.0/hydroreporting.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 341 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as hydroreporting_hy_r_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?><schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:hy="urn:x-inspire:specification:gmlas:HydroBase:3.0" xmlns:hy-r="urn:x-inspire:specification:gmlas:HydroReporting:3.0" xmlns:wfd="urn:x-inspire:specification:gmlas:WaterFrameworkDirective:0.0" elementFormDefault="qualified" targetNamespace="urn:x-inspire:specification:gmlas:HydroReporting:3.0" version="3.0">
  <annotation>
    <documentation>-- Definition --
The Reporting application schema contains spatial objects associated with reporting under European environmental directives. It satisfies the requirements of the ''reporting'' Use Case. The emphasis is on the Water Framework Directive.</documentation>
  </annotation>
  <import namespace="urn:x-inspire:specification:gmlas:HydroBase:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/hy/3.0/HydroBase.xsd"/>
  <import namespace="urn:x-inspire:specification:gmlas:WaterFrameworkDirective:0.0" schemaLocation="http://inspire.ec.europa.eu/schemas/wfd/0.0/WaterFrameworkDirective.xsd"/>
  <!--XML Schema document created by ShapeChange-->
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 342;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (342, empty_clob(), 'INSPIRE', 'urn:x-inspire:specification:gmlas:HydroBase:3.0/hydrobase.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 342 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as hydrobase_hy_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?><schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:gn="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" xmlns:hy="urn:x-inspire:specification:gmlas:HydroBase:3.0" xmlns:hy-n="urn:x-inspire:specification:gmlas:HydroNetwork:3.0" xmlns:hy-p="urn:x-inspire:specification:gmlas:HydroPhysicalWaters:3.0" xmlns:lc="urn:x-inspire:specification:gmlas:LandCover:0.0" xmlns:nrz="urn:x-inspire:specification:gmlas:NaturalRiskZones:0.0" xmlns:sr="urn:x-inspire:specification:gmlas:SeaRegions:0.0" xmlns:wfd="urn:x-inspire:specification:gmlas:WaterFrameworkDirective:0.0" elementFormDefault="qualified" targetNamespace="urn:x-inspire:specification:gmlas:HydroBase:3.0" version="3.0">
  <annotation>
    <documentation>-- Definition --
This package provides base classes used to identify real-world objects. These identities may be used to provide implicit semantic associations between different ''implementation views''.

-- Description --
EXAMPLE: A real-world object identified as the ''Rhine'' may be realised through a Network view (as a set of links and nodes), a Physical Waters view (as a Watercourse), and a reporting view (as a WFDRiver).</documentation>
  </annotation>
  <import namespace="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/gn/3.0/GeographicalNames.xsd"/>
  <import namespace="urn:x-inspire:specification:gmlas:HydroNetwork:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/hy-n/3.0/HydroNetwork.xsd"/>
  <import namespace="urn:x-inspire:specification:gmlas:WaterFrameworkDirective:0.0" schemaLocation="http://inspire.ec.europa.eu/schemas/wfd/0.0/WaterFrameworkDirective.xsd"/>
  <import namespace="urn:x-inspire:specification:gmlas:LandCover:0.0" schemaLocation="http://inspire.ec.europa.eu/schemas/lc/0.0/LandCover.xsd"/>
  <import namespace="urn:x-inspire:specification:gmlas:HydroPhysicalWaters:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/hy-p/3.0/HydroPhysicalWaters.xsd"/>
  <import namespace="urn:x-inspire:specification:gmlas:NaturalRiskZones:0.0" schemaLocation="http://inspire.ec.europa.eu/schemas/nz/0.0/NaturalRiskZones.xsd"/>
  <import namespace="urn:x-inspire:specification:gmlas:SeaRegions:0.0" schemaLocation="http://inspire.ec.europa.eu/schemas/sr/0.0/SeaRegions.xsd"/>
  <import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
  <!--XML Schema document created by ShapeChange-->
  <complexType name="HydroObjectPropertyType">
    <choice minOccurs="0">
      <element ref="hy-n:WatercourseSeparatedCrossing"/>
      <element ref="wfd:WFDWaterBody"/>
      <element ref="lc:Shore"/>
      <element ref="lc:Wetland"/>
      <element ref="lc:GlacierSnowfield"/>
      <element ref="hy-p:DrainageBasin"/>
      <element ref="hy-p:SurfaceWater"/>
      <element ref="hy-n:WatercourseLink"/>
      <element ref="hy-n:WatercourseLinkSequence"/>
      <element ref="nrz:InundatedLand"/>
      <element ref="hy-p:ManMadeObject"/>
      <element ref="sr:OceanRegion"/>
      <element ref="hy-n:HydroNode"/>
      <element ref="hy-p:HydroPointOfInterest"/>
    </choice>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="HydroIdentifier" substitutionGroup="gml:AbstractObject" type="hy:HydroIdentifierType">
    <annotation>
      <documentation>-- Definition --
A hydrographic thematic identifier.

-- Description --
NOTE May be used to hold a national hydrological identification code.</documentation>
    </annotation>
  </element>
  <complexType name="HydroIdentifierType">
    <sequence>
      <element minOccurs="0" name="classificationScheme" type="string">
        <annotation>
          <documentation>-- Definition --
A description of the identification scheme (National, European, etc.) being used.</documentation>
        </annotation>
      </element>
      <element name="localId" type="string">
        <annotation>
          <documentation>-- Definition --
A local identifier, assigned by some authority.

-- Description --
NOTE It will often be a national hydrographic identifier.</documentation>
        </annotation>
      </element>
      <element name="namespace" type="string">
        <annotation>
          <documentation>-- Definition --
An indicator of the scope for the local identifier.

-- Description --
NOTE In the case of a national hydrographic identifier it should be a two-letter country code as per ISO 3166-1-Alpha-2.</documentation>
        </annotation>
      </element>
    </sequence>
  </complexType>
  <complexType name="HydroIdentifierPropertyType">
    <sequence>
      <element ref="hy:HydroIdentifier"/>
    </sequence>
  </complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 343;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (343, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/inspire_dls/1.0/inspire_dls.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 343 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as inspire_dls_inspire_dls_1_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!--
12-JUN-2012 1.0.4 Renamed SpatialDataUniqueResourceIdentifier element to SpatialDataSetIdentifier.
                                   Added elements used in the Atom implementation and attributes used in the Opensearch
08-JUN-2012 1.0.3 Added SpatialDataUniqueResourceIdentifier element
03-FEB-2012 1.0.2 Created for Download Services ISO 19142/WFS 2.0
-->
<schema xmlns:inspire_dls="http://inspire.ec.europa.eu/schemas/inspire_dls/1.0" xmlns:inspire_common="http://inspire.ec.europa.eu/schemas/common/1.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xlink="http://www.w3.org/1999/xlink" targetNamespace="http://inspire.ec.europa.eu/schemas/inspire_dls/1.0" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0.4">
	<import namespace="http://www.opengis.net/ows/1.1" schemaLocation="http://schemas.opengis.net/ows/1.1.0/owsAll.xsd"/>
	<!--For JAXB Binding we use the local schema
	<import namespace="http://www.opengis.net/ows/1.1" schemaLocation="../../ows/1.1.0/owsAll.xsd"/>
-->
	<import namespace="http://inspire.ec.europa.eu/schemas/common/1.0" schemaLocation="../../common/1.0/common.xsd"/>
	<element name="ExtendedCapabilities" type="inspire_dls:ExtendedCapabilitiesType"/>
	<complexType name="ExtendedCapabilitiesType">
		<annotation>
			<documentation>Extended capabilities for OGC WFS 2.0 services</documentation>
		</annotation>
		<complexContent>
			<extension base="inspire_common:ExtendedCapabilitiesType">
				<sequence>
					<element name="SpatialDataSetIdentifier" type="inspire_common:uniqueResourceIdentifier" minOccurs="1" maxOccurs="unbounded">
						<annotation>
							<documentation>For each spatial data resource served by the Download Service, the most current Unique Resource Identifier shall be listed here </documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<annotation>
		<documentation>
			<!--Elements referenced in the Atom implementation of Download Services-->
		</documentation>
	</annotation>
	<element name="spatial_dataset_identifier_code" type="inspire_common:notEmptyString"/>
	<element name="spatial_dataset_identifier_namespace" type="anyURI"/>
	
	<annotation>
		<documentation>
			<!--Attributes referenced in the OpenSearch implementation of Download Services-->
		</documentation>
	</annotation>
	<attribute name="spatial_dataset_identifier_code" type="string"/>
	<attribute name="spatial_dataset_identifier_namespace" type="anyURI"/>
	<attribute name="crs" type="anyURI"/>
	
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 344;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (344, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/inspire_ds/1.0/inspire_ds.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 344 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as inspire_ds_inspire_ds_1_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!--
26-APR-2011 1.0.1 Conformity element:
                    Restricted allowed citations to "INSPIRE interoperability of spatial data sets and services", according to the MD regulation,
                    requirements for the conformity element (page 17 of the MD regulation).
                  Inspire Themes:
                    Removed leading blank for German, Bulgarian, Czech and Danish translations
17-FEB-2011 Changed alias to inspire_common
08-FEB-2011 Changed Extended Capabilities type name
31-JAN-2011 Removed language dependent schema implementations
25-JAN-2011 Removed unnecessary csw namespace declaration and import.
20-DEC-2010 Removed unnecessary srv namespace declaration.
					Restored inspire_ds alias
16-DEC-2010 Switched to INSPIRE Schema
-->
<schema xmlns:inspire_ds="http://inspire.ec.europa.eu/schemas/inspire_ds/1.0" xmlns:inspire_common="http://inspire.ec.europa.eu/schemas/common/1.0" xmlns:ows="http://www.opengis.net/ows" xmlns:jxb="http://java.sun.com/xml/ns/jaxb" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xlink="http://www.w3.org/1999/xlink" targetNamespace="http://inspire.ec.europa.eu/schemas/inspire_ds/1.0" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0.1" jxb:version="2.0">
	<import namespace="http://www.opengis.net/ows" schemaLocation="http://schemas.opengis.net/ows/1.0.0/owsAll.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/common/1.0" schemaLocation="../../common/1.0/common.xsd"/>
	<element name="ExtendedCapabilities" type="inspire_common:ExtendedCapabilitiesType" substitutionGroup="ows:ExtendedCapabilities"/>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);



    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 345;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (345, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/inspire_vs/1.0/inspire_vs.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 345 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as inspire_vs_inspire_vs_1_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!--
26-APR-2011 1.0.1 Conformity element:
                    Restricted allowed citations to "INSPIRE interoperability of spatial data sets and services", according to the MD regulation,
                    requirements for the conformity element (page 17 of the MD regulation).
                  Inspire Themes:
                    Removed leading blank for German, Bulgarian, Czech and Danish translations
17-MAR-2011 Changed alias inspire_com to inspire_common
08-FEB-2011 Changed Extended Capabilities type name
31-JAN-2011 Removed language dependent schema implementations
20-DEC-2010 Removed unnecessary srv namespace declaration.
					Restored inspire_vs alias
16-DEC-2010 Switched to INSPIRE Schema
-->
<schema xmlns:inspire_vs="http://inspire.ec.europa.eu/schemas/inspire_vs/1.0" xmlns:inspire_common="http://inspire.ec.europa.eu/schemas/common/1.0" xmlns:wms="http://www.opengis.net/wms" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xlink="http://www.w3.org/1999/xlink" targetNamespace="http://inspire.ec.europa.eu/schemas/inspire_vs/1.0" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0.1">
	<import namespace="http://www.opengis.net/wms" schemaLocation="http://schemas.opengis.net/wms/1.3.0/capabilities_1_3_0.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/common/1.0" schemaLocation="../../common/1.0/common.xsd"/>
	<element name="ExtendedCapabilities" type="inspire_common:ExtendedCapabilitiesType" substitutionGroup="wms:_ExtendedCapabilities"/>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 346;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (346, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/inspire_vs_ows11/1.0/inspire_vs_ows_11.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 346 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as inspire_vs_ows_11_inspire_vs_ows_11_1_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!--
26-APR-2011 1.0.1 Conformity element:
                    Restricted allowed citations to "INSPIRE interoperability of spatial data sets and services", according to the MD regulation,
                    requirements for the conformity element (page 17 of the MD regulation).
                  Inspire Themes:
                    Removed leading blank for German, Bulgarian, Czech and Danish translations
17-MAR-2011 Changed alias inspire_com to inspire_common
08-FEB-2011 Changed Extended Capabilities type name
31-JAN-2011 Removed language dependent schema implementations
20-DEC-2010 Removed unnecessary srv namespace declaration.
					Restored inspire_vs alias
16-DEC-2010 Switched to INSPIRE Schema
-->
<schema xmlns:inspire_vs="http://inspire.ec.europa.eu/schemas/inspire_vs_ows11/1.0" xmlns:inspire_common="http://inspire.ec.europa.eu/schemas/common/1.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xlink="http://www.w3.org/1999/xlink" targetNamespace="http://inspire.ec.europa.eu/schemas/inspire_vs_ows11/1.0" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0.1">
	<import namespace="http://www.opengis.net/ows/1.1" schemaLocation="http://schemas.opengis.net/ows/1.1.0/owsAll.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/common/1.0" schemaLocation="../../common/1.0/common.xsd"/>
	<element name="ExtendedCapabilities" type="inspire_common:ExtendedCapabilitiesType" substitutionGroup="ows:ExtendedCapabilities"/>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 347;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (347, empty_clob(), 'INSPIRE', 'urn:x-inspire:specification:gmlas:LandCover:0.0/landcover.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 347 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as landcover_lc_0_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?><schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="urn:x-inspire:specification:gmlas:BaseTypes:3.2" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:gn="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" xmlns:hy="urn:x-inspire:specification:gmlas:HydroBase:3.0" xmlns:lc="urn:x-inspire:specification:gmlas:LandCover:0.0" elementFormDefault="qualified" targetNamespace="urn:x-inspire:specification:gmlas:LandCover:0.0" version="0.0">
  <import namespace="urn:x-inspire:specification:gmlas:HydroBase:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/hy/3.0/HydroBase.xsd"/>
  <import namespace="urn:x-inspire:specification:gmlas:BaseTypes:3.2" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.2/BaseTypes.xsd"/>
  <import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
  <import namespace="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/gn/3.0/GeographicalNames.xsd"/>
  <import namespace="http://www.isotc211.org/2005/gmd" schemaLocation="http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd"/>
  <!--XML Schema document created by ShapeChange-->
  <element name="Shore" substitutionGroup="gml:AbstractFeature" type="lc:ShoreType">
    <annotation>
      <documentation>-- Definition --
The narrow strip of land in immediate contact with any body of water including the area between high and low water lines.

-- Description --
SOURCE [IHO S-32].

NOTE Regarded as a candidate spatial object in Annex II theme ''Land cover'' due to unconsolidated shore inclusion in coastal land-cover classificaction schemes.</documentation>
    </annotation>
  </element>
  <complexType name="ShoreType">
    <complexContent>
      <extension base="gml:AbstractFeatureType">
        <sequence>
          <element maxOccurs="unbounded" minOccurs="0" name="geographicalName" nillable="true">
            <annotation>
              <documentation>-- Definition --
A geographical name that is used to identify a hydrographic object in the real world. It provides a ''key'' for implicitly associating different representations of the object.

-- Description --
EXAMPLE A standing water in a mapping view may share the same geographical name as a WFD lake in a reporting view, implying they are both representations of the same real world object.</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="gn:GeographicalName"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="hydroId" nillable="true">
            <annotation>
              <documentation>-- Definition --
An identifier that is used to identify a hydrographic object in the real world. It provides a ''key'' for implicitly associating different representations of the object.

-- Description --
NOTE 1 The identifier may be a national hydrological identification code.

NOTE 2 More than one identifier may be required, for instance a watercourse may be assigned different identifying codes under national and European schemes.

EXAMPLE A lock in a mapping view may share the same identifier as a hydro node in a network view, implying they are both representations of the same real world object.</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="hy:HydroIdentifier"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="relatedHydroObject" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
A related hydrographic object representing the same real-world entity.</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">hy:HydroObject</targetElement>
              </appinfo>
            </annotation>
          </element>
          <element name="beginLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="composition" nillable="true">
            <annotation>
              <documentation>-- Definition --
'||'&'||'lt;font color="#1a1a1a"'||'&'||'gt;The primary type(s) of material composing a spatial object, exclusive of the surface.'||'&'||'lt;/font'||'&'||'gt;

-- Description --
'||'&'||'lt;font color="#1a1a1a"'||'&'||'gt;SOURCE  [Based on DFDD].'||'&'||'lt;/font'||'&'||'gt;

'||'&'||'lt;font color="#1a1a1a"'||'&'||'gt;NOTE The basis for ''primary'' may be, for example, compositional dominance or structural organization.'||'&'||'lt;/font'||'&'||'gt;</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:CodeType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="delineationKnown" nillable="true">
            <annotation>
              <documentation>-- Definition --
An indication that the delineation (for example: limits and information) of a spatial object is known.

-- Description --
SOURCE [Based on DFDD].</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="boolean">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="endLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="geometry" type="gml:SurfacePropertyType">
            <annotation>
              <documentation>-- Definition --
The geometry of the shore, as a surface.
</documentation>
            </annotation>
          </element>
          <element name="inspireId" type="base:IdentifierPropertyType">
            <annotation>
              <documentation>-- Definition --
External object identifier of the spatial object.

-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.
</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="ShorePropertyType">
    <sequence minOccurs="0">
      <element ref="lc:Shore"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="Wetland" substitutionGroup="gml:AbstractFeature" type="lc:WetlandType">
    <annotation>
      <documentation>-- Definition --
A poorly drained or periodically flooded area where the soil is saturated with water, and vegetation is supported.

-- Description --
SOURCE [EuroRegionalMap].

EXAMPLE Marsh/swamp, bog/moor.

NOTE Regarded as a candidate spatial object in Annex II theme ''Land cover'' due to explicit mention in 2007/2/EC Ann. II 2.</documentation>
    </annotation>
  </element>
  <complexType name="WetlandType">
    <complexContent>
      <extension base="gml:AbstractFeatureType">
        <sequence>
          <element maxOccurs="unbounded" minOccurs="0" name="geographicalName" nillable="true">
            <annotation>
              <documentation>-- Definition --
A geographical name that is used to identify a hydrographic object in the real world. It provides a ''key'' for implicitly associating different representations of the object.

-- Description --
EXAMPLE A standing water in a mapping view may share the same geographical name as a WFD lake in a reporting view, implying they are both representations of the same real world object.</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="gn:GeographicalName"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="hydroId" nillable="true">
            <annotation>
              <documentation>-- Definition --
An identifier that is used to identify a hydrographic object in the real world. It provides a ''key'' for implicitly associating different representations of the object.

-- Description --
NOTE 1 The identifier may be a national hydrological identification code.

NOTE 2 More than one identifier may be required, for instance a watercourse may be assigned different identifying codes under national and European schemes.

EXAMPLE A lock in a mapping view may share the same identifier as a hydro node in a network view, implying they are both representations of the same real world object.</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="hy:HydroIdentifier"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="relatedHydroObject" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
A related hydrographic object representing the same real-world entity.</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">hy:HydroObject</targetElement>
              </appinfo>
            </annotation>
          </element>
          <element name="beginLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="endLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="geometry" type="gml:SurfacePropertyType">
            <annotation>
              <documentation>-- Definition --
The geometry of the wetland, as a surface.</documentation>
            </annotation>
          </element>
          <element name="inspireId" type="base:IdentifierPropertyType">
            <annotation>
              <documentation>-- Definition --
External object identifier of the spatial object.

-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.
</documentation>
            </annotation>
          </element>
          <element minOccurs="0" name="localType" nillable="true" type="gmd:LocalisedCharacterString_PropertyType">
            <annotation>
              <documentation>-- Definition --
Provides ''local'' name for the type of wetland.

-- Description --
EXAMPLE Bog, swamp.</documentation>
            </annotation>
          </element>
          <element name="tidal" nillable="true">
            <annotation>
              <documentation>-- Definition --
Identifies whether the wetland is affected by tidal water.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="boolean">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="WetlandPropertyType">
    <sequence minOccurs="0">
      <element ref="lc:Wetland"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="GlacierSnowfield" substitutionGroup="gml:AbstractFeature" type="lc:GlacierSnowfieldType">
    <annotation>
      <documentation>-- Definition --
A large mass or river of ice formed by accumulation and compaction of snow on higher ground that is moving slowly down a slope or valley form above the snowline (glacier) or a large area permanently covered by snow and/or ice (snow field and/or ice-field).

-- Description --
SOURCE [DFDD].

NOTE Regarded as a placeholder in Annex II theme ''Land cover'' due its usual inclusion in land-cover classification schemes.</documentation>
    </annotation>
  </element>
  <complexType name="GlacierSnowfieldType">
    <complexContent>
      <extension base="gml:AbstractFeatureType">
        <sequence>
          <element maxOccurs="unbounded" minOccurs="0" name="geographicalName" nillable="true">
            <annotation>
              <documentation>-- Definition --
A geographical name that is used to identify a hydrographic object in the real world. It provides a ''key'' for implicitly associating different representations of the object.

-- Description --
EXAMPLE A standing water in a mapping view may share the same geographical name as a WFD lake in a reporting view, implying they are both representations of the same real world object.</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="gn:GeographicalName"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="hydroId" nillable="true">
            <annotation>
              <documentation>-- Definition --
An identifier that is used to identify a hydrographic object in the real world. It provides a ''key'' for implicitly associating different representations of the object.

-- Description --
NOTE 1 The identifier may be a national hydrological identification code.

NOTE 2 More than one identifier may be required, for instance a watercourse may be assigned different identifying codes under national and European schemes.

EXAMPLE A lock in a mapping view may share the same identifier as a hydro node in a network view, implying they are both representations of the same real world object.</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="hy:HydroIdentifier"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="relatedHydroObject" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
A related hydrographic object representing the same real-world entity.</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">hy:HydroObject</targetElement>
              </appinfo>
            </annotation>
          </element>
          <element name="beginLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="endLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="geometry" type="gml:SurfacePropertyType">
            <annotation>
              <documentation>-- Definition --
The geometry of the glacier/snowfield, as a surface.</documentation>
            </annotation>
          </element>
          <element name="inspireId" type="base:IdentifierPropertyType">
            <annotation>
              <documentation>-- Definition --
External object identifier of the spatial object.

-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.
</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="GlacierSnowfieldPropertyType">
    <sequence minOccurs="0">
      <element ref="lc:GlacierSnowfield"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 348;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (348, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/lcn/3.0/landcovernomenclature.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 348 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as landcovernomenclature_lcn_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:base2="http://inspire.ec.europa.eu/schemas/base2/1.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:lcn="http://inspire.ec.europa.eu/schemas/lcn/3.0" targetNamespace="http://inspire.ec.europa.eu/schemas/lcn/3.0" elementFormDefault="qualified" version="3.0">
	<annotation>
		<documentation>application schema for Land Cover Nomenclature</documentation>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/base/3.3" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/base2/1.0" schemaLocation="http://inspire.ec.europa.eu/schemas/base2/1.0/BaseTypes2.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="LandCoverNomenclature" type="lcn:LandCoverNomenclatureType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
Land Cover Nomenclature

-- Definition --
Information about reference national, institutional or local Land Cover nomenclature.

-- Description --
Land Cover Nomenclature allows to reference nomenclatures documentation and associated code list, and to define them through an external reference or included within the data according 19144-2.</documentation>
		</annotation>
	</element>
	<complexType name="LandCoverNomenclatureType">
		<sequence>
			<element name="embeddedDescription" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Name --
embedded Description

-- Definition --
An embedded encoding of the classification system according to ISO 19144-2.</documentation>
				</annotation>
				<complexType>
					<complexContent>
						<extension base="anyType">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</complexContent>
				</complexType>
			</element>
			<element name="inspireId" type="base:IdentifierPropertyType">
				<annotation>
					<documentation>-- Name --
inspireId

-- Definition --
External object identifier of the spatial object.

-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
				</annotation>
			</element>
			<element name="nomenclatureCodeList" type="anyURI">
				<annotation>
					<documentation>-- Name --
nomenclatureCodeList

-- Definition --
An http URI pointing to the code list attached to the nomenclature used.</documentation>
				</annotation>
			</element>
			<element name="externalDescription" nillable="true" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Name --
externalDescription

-- Definition --
Document describing the nomenclature used in this data set.</documentation>
				</annotation>
				<complexType>
					<complexContent>
						<extension base="gml:AbstractMemberType">
							<sequence minOccurs="0">
								<element ref="base2:DocumentCitation"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
						</extension>
					</complexContent>
				</complexType>
			</element>
			<element name="responsibleParty" type="base2:RelatedPartyPropertyType">
				<annotation>
					<documentation>-- Name --
responsible party

-- Definition --
Party responsible for the development and/or maintenance of the nomenclature.

-- Description --
The responsible party could be EEA, a national or local mapping  agency, ...</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="LandCoverNomenclaturePropertyType">
		<sequence>
			<element ref="lcn:LandCoverNomenclature"/>
		</sequence>
	</complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 349;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (349, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/lcr/3.0/landcoverraster.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 349 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as landcoverraster_lcr_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:gmlcov="http://www.opengis.net/gmlcov/1.0" xmlns:lcn="http://inspire.ec.europa.eu/schemas/lcn/3.0" xmlns:lcr="http://inspire.ec.europa.eu/schemas/lcr/3.0" targetNamespace="http://inspire.ec.europa.eu/schemas/lcr/3.0" elementFormDefault="qualified" version="3.0">
	<annotation>
		<documentation>application schema for Land Cover Raster</documentation>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/base/3.3" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/lcn/3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/lcn/3.0/LandCoverNomenclature.xsd"/>
	<import namespace="http://www.isotc211.org/2005/gmd" schemaLocation="http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<import namespace="http://www.opengis.net/gmlcov/1.0" schemaLocation="http://schemas.opengis.net/gmlcov/1.0/coverage.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="LandCoverGridCoverage" type="lcr:LandCoverGridCoverageType" substitutionGroup="gmlcov:RectifiedGridCoverage">
		<annotation>
			<documentation>-- Name --
Land Cover Grid Coverage

-- Definition --
A raster representation for Land Cover data.

-- Description --
This representation allows Land Cover data being supported by rectified grid coverage (ISO 19123).</documentation>
		</annotation>
	</element>
	<complexType name="LandCoverGridCoverageType">
		<complexContent>
			<extension base="gmlcov:AbstractDiscreteCoverageType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Name --
inspireId

-- Definition --
External object identifier of the spatial object.

-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="beginLifespanVersion" nillable="true">
						<annotation>
							<documentation>-- Name --
beginLifespanVersion

-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="endLifespanVersion" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
endLifespanVersion

-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="extent">
						<annotation>
							<documentation>-- Name --
extent

-- Definition --
Contains the extent of the data set.

-- Description --
NOTE	Extents may be specified in space, time or space-time.</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMetadataPropertyType">
									<sequence minOccurs="0">
										<element ref="gmd:EX_Extent"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="name" type="string">
						<annotation>
							<documentation>-- Name --
name

-- Definition --
Name of the Land Cover coverage.</documentation>
						</annotation>
					</element>
					<element name="nomenclatureDocumentation">
						<annotation>
							<documentation>-- Name --
nomenclatureDocumentation

-- Definition --
Information about the nomenclature used in this coverage.</documentation>
						</annotation>
					</element>
					<element name="validFrom" nillable="true">
						<annotation>
							<documentation>-- Name --
validFrom

-- Definition --
The time when the phenomenon started to exist in the real world.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="date">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="validTo" nillable="true">
						<annotation>
							<documentation>-- Name --
validTo

-- Definition --
The time from which the phenomenon no longer exists in the real world.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="date">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="LandCoverGridCoveragePropertyType">
		<sequence minOccurs="0">
			<element ref="lcr:LandCoverGridCoverage"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 350;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (350, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/lcv/3.0/landcovervector.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 350 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as landcovervector_lcv_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:lcn="http://inspire.ec.europa.eu/schemas/lcn/3.0" xmlns:lcv="http://inspire.ec.europa.eu/schemas/lcv/3.0" xmlns:sc="http://www.interactive-instruments.de/ShapeChange/AppInfo" xmlns:ns1="http://inspire.ec.europa.eu/schemas/lcn/3.0" targetNamespace="http://inspire.ec.europa.eu/schemas/lcv/3.0" elementFormDefault="qualified" version="3.0">
	<annotation>
		<documentation>application schema for Land Cover Vector</documentation>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/base/3.3" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/lcn/3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/lcn/3.0/LandCoverNomenclature.xsd"/>
	<import namespace="http://www.interactive-instruments.de/ShapeChange/AppInfo" schemaLocation="http://portele.de/ShapeChangeAppinfo.xsd"/>
	<import namespace="http://www.isotc211.org/2005/gmd" schemaLocation="http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="LandCoverDataset" type="lcv:LandCoverDatasetType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
Land Cover Data set

-- Definition --
A vector representation for Land Cover data.

-- Description --
This representation allows Land Cover data being supported by a vector geometry.</documentation>
		</annotation>
	</element>
	<complexType name="LandCoverDatasetType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Name --
inspireId

-- Definition --
External object identifier of the spatial object.

-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="beginLifespanVersion" nillable="true">
						<annotation>
							<documentation>-- Name --
beginLifespanVersion

-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="endLifespanVersion" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
endLifespanVersion

-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="extent">
						<annotation>
							<documentation>-- Name --
extent

-- Definition --
Contains the extent of the data set.

-- Description --
NOTE	Extents may be specified in space, time or space-time.</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMetadataPropertyType">
									<sequence minOccurs="0">
										<element ref="gmd:EX_Extent"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="name" type="string">
						<annotation>
							<documentation>-- Name --
name

-- Definition --
Name of the Land Cover data set.</documentation>
						</annotation>
					</element>
					<element name="nomenclatureDocumentation">
						<annotation>
							<documentation>-- Name --
nomenclatureDocumentation

-- Definition --
Information about the nomenclature used in this data set.</documentation>
						</annotation>
					</element>
					<element name="validFrom" nillable="true">
						<annotation>
							<documentation>-- Name --
validFrom

-- Definition --
The time when the phenomenon started to exist in the real world.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="date">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="validTo" nillable="true">
						<annotation>
							<documentation>-- Name --
validTo

-- Definition --
The time from which the phenomenon no longer exists in the real world.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="date">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="member" type="lcv:LandCoverUnitPropertyType" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
element

-- Definition --
A Land Cover Unit being part of the data set.

-- Description --
A Land Cover dataset is a collection of LandCover units, each one being called an element.</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="LandCoverDatasetPropertyType">
		<sequence minOccurs="0">
			<element ref="lcv:LandCoverDataset"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="LandCoverValue" type="lcv:LandCoverValueType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
Land Cover Value

-- Definition --
Generic class supporting Land Cover value and percentage.</documentation>
		</annotation>
	</element>
	<complexType name="LandCoverValueType">
		<sequence>
			<element name="class">
				<annotation>
					<documentation>-- Name --
class

-- Definition --
Assignment of a land cover spatial object to a land
cover class through a classification code identifier.

-- Description --
The identifier, eg 1, 1.1.2, ... (for CORINE LC classes) allow to access to the value and the definition or narrative description of the corresponding class.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="extensibility">any</taggedValue>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">technicalGuidance</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="coveredPercentage" nillable="true">
				<annotation>
					<documentation>-- Name --
Covered percentage

-- Definition --
Fraction of the LandCoverUnit being concerned with the classification value.</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="integer">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
		</sequence>
	</complexType>
	<complexType name="LandCoverValuePropertyType">
		<sequence>
			<element ref="lcv:LandCoverValue"/>
		</sequence>
	</complexType>
	<element name="LandCoverObservation" type="lcv:LandCoverObservationType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
Land Cover Observation

-- Definition --
Land Cover information interpreted at a specific time and place.</documentation>
		</annotation>
	</element>
	<complexType name="LandCoverObservationType">
		<sequence>
			<element name="class">
				<annotation>
					<documentation>-- Name -- 
class

-- Definition --
The assignment of a land cover class to a land cover unit through a classification code identifier

-- Description --
The identifier, eg 1.1.1, 1.1.2, ... (for CORINE LC classes) allow to access to the value and the definition or narrative description of the corresponding class.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="extensibility">any</taggedValue>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">technicalGuidance</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="mosaic" nillable="true" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Name --
mosaic

-- Definition --
List of classification values describing into details a land cover unit, associated with percentages.</documentation>
				</annotation>
				<complexType>
					<sequence>
						<element ref="lcv:LandCoverValue"/>
					</sequence>
					<attribute name="nilReason" type="gml:NilReasonType"/>
				</complexType>
			</element>
			<element name="observationDate" nillable="true">
				<annotation>
					<documentation>-- Name --
observationDate

-- Definition --
The observation date associated of an observation.

-- Description --
Defines the observation date of the classification value. It could be the date of an aerial/satellital acquisition or of an update on the field. The observation date allows the user to have accurate date of when each value was observed in the real word. In a database, not all polygon informations are necessarily updated at the same time.</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="dateTime">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
		</sequence>
	</complexType>
	<complexType name="LandCoverObservationPropertyType">
		<sequence>
			<element ref="lcv:LandCoverObservation"/>
		</sequence>
	</complexType>
	<element name="LandCoverUnit" type="lcv:LandCoverUnitType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
Land Cover Unit

-- Definition --
An individual element of the LC dataset represented by  a point or polygon.

-- Description --
Every unit support Land Cover information.</documentation>
		</annotation>
	</element>
	<complexType name="LandCoverUnitType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Name --
inspireId

-- Definition --
External object identifier of the spatial object.

-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="beginLifespanVersion" nillable="true">
						<annotation>
							<documentation>-- Name --
beginLifespanVersion

-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="endLifespanVersion" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
endLifespanVersion

-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="geometry" type="gml:GeometryPropertyType">
						<annotation>
							<documentation>-- Name --
geometry

-- Definition --
Spatial representation of the Land Cover unit.

-- Description --
NOTE Restricted to point or surface.</documentation>
						</annotation>
					</element>
					<element name="landCoverObservation" type="lcv:LandCoverObservationPropertyType" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
landCoverObservation

-- Definition --
Land cover information at a specific time and place.</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="LandCoverUnitPropertyType">
		<sequence minOccurs="0">
			<element ref="lcv:LandCoverUnit"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);
    



    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 351;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (351, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/lunom/3.0/landusenomenclature.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 351 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as landusenomenclature_lunom_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:gmlcov="http://www.opengis.net/gmlcov/1.0" xmlns:lunom="http://inspire.ec.europa.eu/schemas/lunom/3.0" xmlns:sc="http://www.interactive-instruments.de/ShapeChange/AppInfo" targetNamespace="http://inspire.ec.europa.eu/schemas/lunom/3.0" elementFormDefault="qualified" version="3.0">
	<annotation>
		<documentation>-- Name --
land use nomenclature</documentation>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/base/3.3" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd"/>
	<import namespace="http://www.interactive-instruments.de/ShapeChange/AppInfo" schemaLocation="http://portele.de/ShapeChangeAppinfo.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<import namespace="http://www.opengis.net/gmlcov/1.0" schemaLocation="http://schemas.opengis.net/gmlcov/1.0/coverage.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="HILUCSPresence" type="lunom:HILUCSPresenceType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
HILUCS presence

-- Definition --
Presence of one or several HILUCS values in an area, indicated either as the percentage covered for each value or as the values listed in their order of importance.

-- Description --
The HILUCS presence data type  enables the provision of information on land uses inside one land use object in order  to collect more than one land use existence perfectly identifiable by importance order or percentages. 
NOTE 1: The order of land use value presence without percentages enable providing  an order of dominance/importance of each land use present in the land use object
NOTE 2: The sum of the percentages can be  below 100%, or above. The order is provided according to the respective importance when the percentages are not known.</documentation>
		</annotation>
	</element>
	<complexType name="HILUCSPresenceType">
		<choice>
			<element name="orderedList" type="gml:ReferenceType" maxOccurs="unbounded">
				<annotation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="percentageList" type="lunom:HILUCSPercentagePropertyType" maxOccurs="unbounded"/>
		</choice>
	</complexType>
	<complexType name="HILUCSPresencePropertyType">
		<sequence>
			<element ref="lunom:HILUCSPresence"/>
		</sequence>
	</complexType>
	<element name="SpecificPercentage" type="lunom:SpecificPercentageType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
specific percentage
-- Definition --
Percentage of land use object that is covered by this specific presence.</documentation>
		</annotation>
	</element>
	<complexType name="SpecificPercentageType">
		<sequence>
			<element name="specificValue" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Definition --
specific value category for this specific percentage.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="percentage" type="integer">
				<annotation>
					<documentation>-- Definition --
Percentage of land use object that is covered by a specific presence.
-- Description --
NOTE The percentage is according to the socio-economic importance of the use. In section 5.2.1.1.2. examples of the use of percentages are given.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="SpecificPercentagePropertyType">
		<sequence>
			<element ref="lunom:SpecificPercentage"/>
		</sequence>
	</complexType>
	<element name="SpecificPresence" type="lunom:SpecificPresenceType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
specific presence

-- Definition --
Presence of one or several land use classification values in an area according to the code list
provided by the data provider, indicated either as the percentage covered for each value or as
the values listed in their order of importance.

-- Description --
NOTE 1: The order of land use value presence without percentages enable providing  an order of dominance/importance of each land use present in the land use object
NOTE 2: The sum of the percentages can be  below 100%, or above. The order is provided according to the respective importance when the percentages are not known.</documentation>
		</annotation>
	</element>
	<complexType name="SpecificPresenceType">
		<choice>
			<element name="orderedList" type="gml:ReferenceType" maxOccurs="unbounded">
				<annotation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="percentageList" type="lunom:SpecificPercentagePropertyType" maxOccurs="unbounded"/>
		</choice>
	</complexType>
	<complexType name="SpecificPresencePropertyType">
		<sequence>
			<element ref="lunom:SpecificPresence"/>
		</sequence>
	</complexType>
	<element name="HILUCSPercentage" type="lunom:HILUCSPercentageType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
HILUCS percentage
-- Definition --
Percentage of land use object that is covered by this HILUCS presence.
-- Description --
NOTE1:The percentage is according to the socio-economic or functional importance of the use.

NOTE2:examples are provided in the narrative description part of the data specification.</documentation>
		</annotation>
	</element>
	<complexType name="HILUCSPercentageType">
		<sequence>
			<element name="hilucsValue" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Definition --
HILUCS category for this HILUCS percentage.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="percentage" type="integer">
				<annotation>
					<documentation>-- Definition --
Percentage of land use object that is covered by this specific presence.
-- Description --
NOTE The percentage is according to the socio-economic importance of the use. In section 5.2.1.1.2. examples of the use of percentages are given.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="HILUCSPercentagePropertyType">
		<sequence>
			<element ref="lunom:HILUCSPercentage"/>
		</sequence>
	</complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 352;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (352, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/mr-core/3.0/mineralresourcescore.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 352 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as mineralresourcescore_mr_core_3_0.xsd
    -- Needed to separate this xsd into two pieces due to its size>32767.
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) by Chris Schubert (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:base2="http://inspire.ec.europa.eu/schemas/base2/1.0" xmlns:cgu="http://xmlns.geosciml.org/Utilities/3.0" xmlns:ge="http://inspire.ec.europa.eu/schemas/ge-core/3.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:mr-core="http://inspire.ec.europa.eu/schemas/mr-core/3.0" xmlns:sc="http://www.interactive-instruments.de/ShapeChange/AppInfo" xmlns:swe="http://www.opengis.net/swe/2.0" targetNamespace="http://inspire.ec.europa.eu/schemas/mr-core/3.0" elementFormDefault="qualified" version="3.0">
	<import namespace="http://inspire.ec.europa.eu/schemas/base/3.3" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/base2/1.0" schemaLocation="http://inspire.ec.europa.eu/schemas/base2/1.0/BaseTypes2.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/ge-core/3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/ge-core/3.0/GeologyCore.xsd"/>
	<import namespace="http://www.interactive-instruments.de/ShapeChange/AppInfo" schemaLocation="http://portele.de/ShapeChangeAppinfo.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<import namespace="http://www.opengis.net/swe/2.0" schemaLocation="http://schemas.opengis.net/sweCommon/2.0/swe.xsd"/>
	<import namespace="http://xmlns.geosciml.org/Utilities/3.0" schemaLocation="http://schemas.geosciml.org/cgiutilities/3.0/cgiUtilities.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="EarthResourceDimension" type="mr-core:EarthResourceDimensionType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Definition --
The size and volume of the earth resource.</documentation>
		</annotation>
	</element>
	<complexType name="EarthResourceDimensionType">
		<sequence>
			<element name="area" nillable="true" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Definition --
The area of the Earth Resource.</documentation>
				</annotation>
				<complexType>
					<complexContent>
						<extension base="gml:AbstractMemberType">
							<sequence minOccurs="0">
								<element ref="swe:QuantityRange"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
						</extension>
					</complexContent>
				</complexType>
			</element>
			<element name="depth" nillable="true" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Definition --
The depth of the Earth Resource.</documentation>
				</annotation>
				<complexType>
					<complexContent>
						<extension base="gml:AbstractMemberType">
							<sequence minOccurs="0">
								<element ref="swe:QuantityRange"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
						</extension>
					</complexContent>
				</complexType>
			</element>
			<element name="length" nillable="true" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Definition --
The length of the Earth Resource.</documentation>
				</annotation>
				<complexType>
					<complexContent>
						<extension base="gml:AbstractMemberType">
							<sequence minOccurs="0">
								<element ref="swe:QuantityRange"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
						</extension>
					</complexContent>
				</complexType>
			</element>
			<element name="width" nillable="true" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Definition --
The width of the Earth Resource.</documentation>
				</annotation>
				<complexType>
					<complexContent>
						<extension base="gml:AbstractMemberType">
							<sequence minOccurs="0">
								<element ref="swe:QuantityRange"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
						</extension>
					</complexContent>
				</complexType>
			</element>
		</sequence>
	</complexType>
	<complexType name="EarthResourceDimensionPropertyType">
		<sequence>
			<element ref="mr-core:EarthResourceDimension"/>
		</sequence>
	</complexType>
	<element name="Mine" type="mr-core:MineType" substitutionGroup="mr-core:MiningFeature">
		<annotation>
			<documentation>-- Definition --
An excavation carried out for the extraction of mineral deposits.

-- Description --
'||'&'||'amp;lsquo;True'||'&'||'amp;rsquo; mines are underground workings and open-pit workings (also called open-sky mines) generally for the extraction of metallic commodities. The Mine feature also includes open workings generally for the extraction of industrial minerals, commonly referred to as quarries.</documentation>
		</annotation>
	</element>
	<complexType name="MineType">
		<complexContent>
			<extension base="mr-core:MiningFeatureType">
				<sequence>
					<element name="beginLifespanVersion" nillable="true">
						<annotation>
							<documentation>-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="endLifespanVersion" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="relatedActivity" type="mr-core:MiningActivityPropertyType" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
The MiningActivity associated with the Mine.</documentation>
						</annotation>
					</element>
					<element name="startDate" type="gml:TimeInstantPropertyType" nillable="true">
						<annotation>
							<documentation>-- Definition --
Date on which the mine commenced operation.</documentation>
						</annotation>
					</element>
					<element name="mineName" type="mr-core:MineNamePropertyType" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Data type indicating the Mine Name and whether it is the preferred name.</documentation>
						</annotation>
					</element>
					<element name="sourceReference" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
The source reference for the mine.

-- Description --
Allows citing mine plans etc.</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">base2:DocumentCitation</targetElement>
							</appinfo>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence/>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="status" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Definition --
Operational status value of the mine.

-- Description --
EXAMPLE: Care '||'&'||'amp; Maintenance; Pending Approval; Operating continually.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="relatedMine" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
A related mine.

-- Description --
A mine currently exploited may result from the resumption and the extension of a - or several - former or older (abandoned) mine(s). Mines need not aggregate to form other mines, they may just be associated in some way or another (eg the Kalgoorlie SuperPit is associated with its preceding mines).</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="mr-core:Mine"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
					<element name="endDate" type="gml:TimeInstantPropertyType" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Date on which the mine ceased operation.</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="MinePropertyType">
		<sequence minOccurs="0">
			<element ref="mr-core:Mine"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="MiningFeature" type="mr-core:MiningFeatureType" abstract="true" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Definition --
Spatial object type grouping the common properties of mines and mining activities.</documentation>
		</annotation>
	</element>
	<complexType name="MiningFeatureType" abstract="true">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Definition --
External object identifier of the spatial object.</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="MiningFeaturePropertyType">
		<sequence minOccurs="0">
			<element ref="mr-core:MiningFeature"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="Resource" type="mr-core:ResourceType" substitutionGroup="mr-core:OreMeasure">
		<annotation>
			<documentation>-- Definition --
An accumulation of material of intrinsic economic interest in or on the Earth'||'&'||'amp;rsquo;s crust in such form, quality and quantity that there are reasonable prospects for economic extraction.

-- Description --
Synonyms: Mineral Resource; Coal Resource (s); Diamond (Gemstone) Resource; Potentially Mineable Mineralisation.</documentation>
		</annotation>
	</element>
	<complexType name="ResourceType">
		<complexContent>
			<extension base="mr-core:OreMeasureType">
				<sequence>
					<element name="category" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Definition --
Indication of whether the resource is measured, indicated, or inferred.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="includesReserves" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
A flag indicating whether the estimate of resources includes reserve values.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="boolean">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="ResourcePropertyType">
		<sequence>
			<element ref="mr-core:Resource"/>
		</sequence>
	</complexType>
	<element name="OreMeasure" type="mr-core:OreMeasureType" abstract="true" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Definition --
The estimate of the Reserve, Resource or Endowment ore amount.</documentation>
		</annotation>
	</element>
	<complexType name="OreMeasureType" abstract="true">
		<sequence>
			<element name="classificationMethodUsed" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Definition --
Means of calculating the measurement. 

-- Description --
EXAMPLE: JORC, PERC, Unspecified, UNESCO/World Bank and the Canadian CIM.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="date" type="gml:TimePrimitivePropertyType">
				<annotation>
					<documentation>-- Definition --
Date of calculated or estimated value.

-- Description --
This may be a single date or a range.</documentation>
				</annotation>
			</element>
			<element name="dimension" nillable="true">
				<annotation>
					<documentation>-- Definition --
Size of the body used in the calculation.</documentation>
				</annotation>
				<complexType>
					<sequence>
						<element ref="mr-core:EarthResourceDimension"/>
					</sequence>
					<attribute name="nilReason" type="gml:NilReasonType"/>
				</complexType>
			</element>
			<element name="proposedExtractionMethod" nillable="true">
				<annotation>
					<documentation>-- Definition --
The method proposed to extract the commodity.</documentation>
				</annotation>
				<complexType>
					<complexContent>
						<extension base="gml:AbstractMemberType">
							<sequence minOccurs="0">
								<element ref="swe:Category"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
						</extension>
					</complexContent>
				</complexType>
			</element>
			<element name="sourceReference" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Definition --
The reference for the OreMeasure values.</documentation>
					<appinfo>
						<targetElement xmlns="http://www.opengis.net/gml/3.2">base2:DocumentCitation</targetElement>
					</appinfo>
				</annotation>
				<complexType>
					<complexContent>
						<extension base="gml:AbstractMemberType">
							<sequence/>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
						</extension>
					</complexContent>
				</complexType>
			</element>
			<element name="ore">
				<annotation>
					<documentation>-- Definition --
Amount of ore.</documentation>
				</annotation>
				<complexType>
					<complexContent>
						<extension base="gml:AbstractMemberType">
							<sequence minOccurs="0">
								<element ref="swe:QuantityRange"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
						</extension>
					</complexContent>
				</complexType>
			</element>
			<element name="measureDetails" type="mr-core:CommodityMeasurePropertyType" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Definition --
A measure of the amount of each commodity, based on a reserve, resource or endowment calculation. 

-- Description --
This measure is obtained by multiplying the ore tonnage by the average grade of the commodity within the ore (generally expressed in tons of metal).</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="OreMeasurePropertyType">
		<sequence>
			<element ref="mr-core:OreMeasure"/>
		</sequence>
	</complexType>
	<element name="MineralDepositModel" type="mr-core:MineralDepositModelType" substitutionGroup="gml:AbstractGML">
		<annotation>
			<documentation>-- Definition --
Systematically arranged information describing the essential attributes of a class of mineral deposits. It may be empirical (descriptive) or theoretical (genetic).</documentation>
		</annotation>
	</element>
	<complexType name="MineralDepositModelType">
		<complexContent>
			<extension base="gml:AbstractGMLType">
				<sequence>
					<element name="mineralDepositGroup" type="gml:ReferenceType" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
A grouping of mineral deposits defined by generic characteristics

-- Description --
EXAMPLE: host rock, host structure, commodity, association with similar mineral processes e.g. porphyry. Regional, national and more universal lists e.g. Cox and Singer 1986.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="mineralDepositType" type="gml:ReferenceType" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Style of mineral occurrence or deposit. 

-- Description --
Generally a local or regional term. Should be referenced for definitions and descriptions. Single deposit terms may form member of a Mineral Deposit Group in local and regional schemas.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="MineralDepositModelPropertyType">
		<sequence minOccurs="0">
			<element ref="mr-core:MineralDepositModel"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="MiningActivity" type="mr-core:MiningActivityType" substitutionGroup="mr-core:MiningFeature">
		<annotation>
			<documentation>-- Definition --
The process of extracting metallic, non-metallic mineral, or industrial rock deposits from the Earth. 

-- Description --
The term may also include preliminary treatment eg. cleaning or sizing.</documentation>
		</annotation>
	</element>
	<complexType name="MiningActivityType">
		<complexContent>
			<extension base="mr-core:MiningFeatureType">
				<sequence>
					<element name="processingType" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Definition --
The type of processing carried out during the mining activity.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="deposit" nillable="true">
						<annotation>
							<documentation>-- Definition --
The deposit to which the mining activity is associated.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="mr-core:EarthResource"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
					<element name="associatedMine" nillable="true">
						<annotation>
							<documentation>-- Definition --
The mine where the mining activity takes, or took, place.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="mr-core:Mine"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
					<element name="activityDuration" type="gml:TimePeriodPropertyType">
						<annotation>
							<documentation>-- Definition --
Period, or extent in time, of  the mining activity. 

-- Description --
The beginning of the activity links the TM_Period to the TM_Instant at which it starts.  The ending links the TM_Period to the TM_Instant at which it ends.  For a variety of reasons, the position of the TM_Instant designated by ''begin'' or ''end'' may be inderterminate.</documentation>
						</annotation>
					</element>
					<element name="activityType" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Definition --
The type of mining activity.

-- Description --
EXAMPLE: Open Pit, Underground Mine, multiple, unspecified) or processing activity (eg Ore Processing) or production.  
Using activity to distinguish between the extraction, processing and production activities allows distinguishing between ore mined/grade/recovery, ore treated/grade/recovery and produced payable/plant recovery.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="oreProcessed" type="swe:QuantityPropertyType" nillable="true">
						<annotation>
							<documentation>-- Definition --
The amount of ore processed by the activity.</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="MiningActivityPropertyType">
		<sequence minOccurs="0">
			<element ref="mr-core:MiningActivity"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="MineName" type="mr-core:MineNameType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Definition --
A  data type indicating the Mine Name and whether it is the preferred name.</documentation>
		</annotation>
	</element>
	<complexType name="MineNameType">
		<sequence>
			<element name="isPreferred" type="boolean">
				<annotation>
					<documentation>-- Definition --
A boolean operator indicating if the value in mineName is the preferred name of the mine.</documentation>
				</annotation>
			</element>
			<element name="mineName" type="string">
				<annotation>
					<documentation>-- Definition --
The name of the mine.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="MineNamePropertyType">
		<sequence>
			<element ref="mr-core:MineName"/>
		</sequence>
	</complexType>
	<element name="CommodityMeasure" type="mr-core:CommodityMeasureType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Definition --
A measure of the amount of the commodity based on a Reserve, Resource or Endowment calculation.

-- Description --
Where OreMeasure is Resource or Reserve CommodityMeasure is mandatory</documentation>
		</annotation>
	</element>
	<complexType name="CommodityMeasureType">
		<sequence>
			<element name="commodityAmount" nillable="true">
				<annotation>
					<documentation>-- Definition --
The amount of the commodity.</documentation>
				</annotation>';
            
        
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    
    pos := pos + amt;
    buf :=        
'				<complexType>
					<complexContent>
						<extension base="gml:AbstractMemberType">
							<sequence minOccurs="0">
								<element ref="swe:QuantityRange"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
						</extension>
					</complexContent>
				</complexType>
			</element>
			<element name="cutOffGrade" nillable="true">
				<annotation>
					<documentation>-- Definition --
The cut off grade used for calculating the commodity measure.

-- Description --
The lowest concentration of a mineralized material that qualifies as ore in a given deposit (adapted from Neuendorf, 2005).</documentation>
				</annotation>
				<complexType>
					<complexContent>
						<extension base="gml:AbstractMemberType">
							<sequence minOccurs="0">
								<element ref="swe:QuantityRange"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
						</extension>
					</complexContent>
				</complexType>
			</element>
			<element name="grade" nillable="true">
				<annotation>
					<documentation>-- Definition --
The grade of the commodity.</documentation>
				</annotation>
				<complexType>
					<complexContent>
						<extension base="gml:AbstractMemberType">
							<sequence minOccurs="0">
								<element ref="swe:QuantityRange"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
						</extension>
					</complexContent>
				</complexType>
			</element>
			<element name="commodityOfInterest" type="mr-core:CommodityPropertyType" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Definition --
The commodity to which the CommodityMeasure refers.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="CommodityMeasurePropertyType">
		<sequence>
			<element ref="mr-core:CommodityMeasure"/>
		</sequence>
	</complexType>
	<element name="EarthResource" type="mr-core:EarthResourceType" abstract="true" substitutionGroup="ge:GeologicFeature">
		<annotation>
			<documentation>-- Definition --
The kinds of observable or inferred phenomena required to classify economic and non-economic earth resources.</documentation>
		</annotation>
	</element>
	<complexType name="EarthResourceType" abstract="true">
		<complexContent>
			<extension base="ge:GeologicFeatureType">
				<sequence>
					<element name="beginLifespanVersion" nillable="true">
						<annotation>
							<documentation>-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="endLifespanversion" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="explorationHistory" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Chronological list of surveys undertaken to better define the potential of a mineral occurrence.

-- Description --
Recaps the work which has been done from regional reconnaissance, surface detailed prospecting, subsurface prospecting, assessment of the resource, to evaluation of the ore deposit. Depending on the work done on occurrences and prospects, allows an estimate of the ''still to be discovered'' potential of an area. A detailed assessment with no result would lead to a pessimistic opinion.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="mr-core:ExplorationActivity"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
					<element name="commodityDescription" type="mr-core:CommodityPropertyType" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
The commodities present in the resource ranked by importance order.

-- Description --
 Determining the rank of a commodity is not as simple as it may look: not only the tonnage (expressed in tons of metal) has to be taken into account, but also the scarcity and thus the price of the commodity. A deposit containing 500,000 t Cu and only 50 t Au will be classified as an Au-(Cu) deposit.</documentation>
						</annotation>
					</element>
					<element name="resourceExtraction" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
One or more periods of mining activity of the earth resource.

-- Description --
Indicates if this resource is the subject of exploitation, and if so of which type. Depending on several factors (type of mineralization, size, grade, shape, depth, etc.) one or several (combined) methods may be used, including off site methods, surface mining (among which methods related to the exploitation of alluvial/elluvial deposits), underground mining. Knowledge about these methods is important as it may be strongly related to the quantity and type of wastes and environmental impacts generated by the extraction.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="mr-core:MiningActivity"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
					<element name="sourceReference" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
The source or reference for the Earth Resource.</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">base2:DocumentCitation</targetElement>
							</appinfo>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence/>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="dimension" nillable="true">
						<annotation>
							<documentation>-- Definition --
The size/volume of the earth resource.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="mr-core:EarthResourceDimension"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="expression" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
An indicator of whether an EarthResource appears on the surface or has been detected under cover rocks.</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="swe:Category"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="form" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
The orebody''s typical physical and structural relationship to wallrocks and associated rocks.

-- Description --
EXAMPLE: stratiform, stratabound, cross-cutting, vein, intrusive contact etc.</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="swe:Category"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="linearOrientation" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
The linear orientation of the Earth Resource.

-- Description --
EXAMPLE: Plunge etc.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="cgu:CGI_LinearOrientation"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="planarOrientation" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
The planar orientation of the Earth Resource.

-- Description --
EXAMPLE: Dip/Dip Direction etc.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="cgu:CGI_PlanarOrientation"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="shape" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
The typical geometrical shape of the Earth Resource.

-- Description --
EXAMPLE: lenticular, pipelike, irregular etc.</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="swe:Category"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="classification" nillable="true">
						<annotation>
							<documentation>-- Definition --
Classification of the EarthResource.

-- Description --
Systematically arranged information describing the essential attributes of a class of mineral deposits. May be empirical (descriptive) or theoretical (genetic).</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="mr-core:MineralDepositModel"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="oreAmount" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
The estimated or calculated amount of ore with the identification of the commodities contained and their grade.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="mr-core:OreMeasure"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="EarthResourcePropertyType">
		<sequence minOccurs="0">
			<element ref="mr-core:EarthResource"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="Endowment" type="mr-core:EndowmentType" substitutionGroup="mr-core:OreMeasure">
		<annotation>
			<documentation>-- Definition --
The quantity of a mineral (or a group of minerals for industrial rocks) in accumulations (deposits) meeting specified physical characteristics such as quality, size and depth.

-- Description --
Usually includes Resources, as unlike the latter, it does not have to have prospects for "eventual economic extraction". It often includes the total amount of a commodity originally introduced to a particular location during the deposit forming processes - and thus can include resources, reserves, past production and mining and metallurgical losses.</documentation>
		</annotation>
	</element>
	<complexType name="EndowmentType">
		<complexContent>
			<extension base="mr-core:OreMeasureType">
				<sequence>
					<element name="includesReserves" nillable="true">
						<annotation>
							<documentation>-- Definition --
A flag indicating if the estimate includes the reserves value.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="boolean">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="includesResources" nillable="true">
						<annotation>
							<documentation>-- Definition --
A flag indicating if the estimate includes the resources value.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="boolean">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="EndowmentPropertyType">
		<sequence>
			<element ref="mr-core:Endowment"/>
		</sequence>
	</complexType>
	<element name="Commodity" type="mr-core:CommodityType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Definition --
The material of economic interest in the EarthResource</documentation>
		</annotation>
	</element>
	<complexType name="CommodityType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="source" type="mr-core:EarthResourcePropertyType">
						<annotation>
							<documentation>-- Definition --
The deposit/resource from which the commodity comes.</documentation>
						</annotation>
					</element>
					<element name="commodity" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Definition --
The earth resource commodity.

-- Description --
EXAMPLE: Cu, Au, Dimension Stone etc.</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">mr-core:CommodityCodeValue</targetElement>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="commodityImportance" type="gml:ReferenceType" nillable="true">
						<annotation>
							<documentation>-- Definition --
The importance of the deposit for the commodity.

-- Description --
Several commodities may be of interest inside a deposit. A deposit may be a very large deposit for one commodity (this commodity is the main one) and only a medium-sized deposit for some other commodities. Such a ranking is based on a statistical study of a large set of deposits throughout the world to ensure that it is valid. It is made using histograms allowing for each commodity to define class boundaries and what is a super large, a large, a medium-sized etc deposit for this commodity. This classification is based on the potential or endowment: reserves + resources.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="commodityRank" nillable="true">
						<annotation>
							<documentation>-- Definition --
The rank of the commodity.

-- Description --
Commodity rank is based on endowment, i.e. (cumulated) past production + reserves (not including past production) + resources, or if the deposit has never been exploited, reserves + resources. A statistical comparison with a large set of deposits throughout the world enables the determination of the deposit as class A (very large), B (large), or C (medium-sized) for a particular commodity, and also which commodity is the main one, the 2nd one, etc. The rank of a commodity is thus not based on political or economic considerations.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="integer">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="CommodityPropertyType">
		<sequence minOccurs="0">
			<element ref="mr-core:Commodity"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="MineralOccurrence" type="mr-core:MineralOccurrenceType" substitutionGroup="mr-core:EarthResource">
		<annotation>
			<documentation>-- Definition --
'||'&'||'lt;font color="#400040"'||'&'||'gt;A mineral accumulation in the lithosphere. '||'&'||'lt;/font'||'&'||'gt;</documentation>
		</annotation>
	</element>
	<complexType name="MineralOccurrenceType">
		<complexContent>
			<extension base="mr-core:EarthResourceType">
				<sequence>
					<element name="type" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Definition --
The type of mineral occurrence. 

-- Description --
EXAMPLE: prospect, occurrence, mineral deposit, ore deposit.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="endusePotential" type="gml:ReferenceType" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
The end-use potential of the mineral.

-- Description --
EXAMPLE: for energy, fertilizer, building raw material.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="MineralOccurrencePropertyType">
		<sequence minOccurs="0">
			<element ref="mr-core:MineralOccurrence"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="Reserve" type="mr-core:ReserveType" substitutionGroup="mr-core:OreMeasure">
		<annotation>
			<documentation>-- Definition --
The economically mineable part of a Measured and/or Indicated Mineral Resource.

-- Description --
It includes diluting materials and allowances for losses, which may occur when the material is mined. '||'&'||'amp;lsquo;Marketable Coal Reserves'||'&'||'amp;rsquo; maybe reported in conjunction with, but not instead of, reports of Ore (Coal) Reserves. '||'&'||'amp;lsquo;Saleable product'||'&'||'amp;rsquo; (e.g. for industrial minerals) can be reported in conjunction with ore reserve.
Synonyms: Ore Reserve; Coal Reserve (s); Diamond (or gemstone) Ore Reserve; Mineral Reserves (not preferred, should be stated that used to mean the same as JORC'||'&'||'amp;rsquo;s Ore Reserve); Mineable production estimates</documentation>
		</annotation>
	</element>
	<complexType name="ReserveType">
		<complexContent>
			<extension base="mr-core:OreMeasureType">
				<sequence>
					<element name="category" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Definition --
The level of confidence of the estimate (proved, probable).</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="ReservePropertyType">
		<sequence>
			<element ref="mr-core:Reserve"/>
		</sequence>
	</complexType>
	<element name="ExplorationActivity" type="mr-core:ExplorationActivityType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Definition --
A period of exploration activity.</documentation>
		</annotation>
	</element>
	<complexType name="ExplorationActivityType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="activityDuration" type="gml:TimePeriodPropertyType">
						<annotation>
							<documentation>-- Definition --
Period, or extent in time, of  the exploration activity. 

-- Description --
The beginning of the activity links the TM_Period to the TM_Instant at which it starts.  The ending links the TM_Period to the TM_Instant at which it ends.  For a variety of reasons, the position of the TM_Instant designated by ''begin'' or ''end'' may be inderterminate.</documentation>
						</annotation>
					</element>
					<element name="activityType" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Definition --
The type of exploration activity.

-- Description --
EXAMPLE: geological mapping, drilling, geophysical surveys, geochemical mapping, etc.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="explorationResult" type="gml:ReferenceType" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
The result of the exploration activity.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="ExplorationActivityPropertyType">
		<sequence minOccurs="0">
			<element ref="mr-core:ExplorationActivity"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="MiningFeatureOccurrence" type="mr-core:MiningFeatureOccurrenceType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Definition --
A spatial representation of a MiningFeature.

-- Description --
A MiningFeatureOccurrence provides a link between a notional feature (description package) and one spatial representation of it, or part of it. The MiningFeatureOccurrence carries a geometry and the association with a Mining Feature provides specification of all the other descriptors.</documentation>
		</annotation>
	</element>
	<complexType name="MiningFeatureOccurrenceType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="shape" type="gml:GeometryPropertyType">
						<annotation>
							<documentation>-- Definition --
The geometry of the MiningFeature.</documentation>
						</annotation>
					</element>
					<element name="specification" type="mr-core:MiningFeaturePropertyType">
						<annotation>
							<documentation>-- Definition --
Indicates the MiningFeature that the MiningFeatureOccurrence specifies.</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="MiningFeatureOccurrencePropertyType">
		<sequence minOccurs="0">
			<element ref="mr-core:MiningFeatureOccurrence"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
</schema>';    
    
    amt := length(buf);
    
    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);


    -- mu xsd dir is empty!!!

    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 353;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (353, empty_clob(), 'INSPIRE', 'urn:x-inspire:specification:gmlas:Network:3.2/network.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 353 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as network_net_3_2.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?><schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="urn:x-inspire:specification:gmlas:BaseTypes:3.2" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:gn="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" xmlns:net="urn:x-inspire:specification:gmlas:Network:3.2" elementFormDefault="qualified" targetNamespace="urn:x-inspire:specification:gmlas:Network:3.2" version="3.2">
  <annotation>
    <documentation>Generic application schema for networks.</documentation>
  </annotation>
  <import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
  <import namespace="urn:x-inspire:specification:gmlas:BaseTypes:3.2" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.2/BaseTypes.xsd"/>
  <import namespace="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/gn/3.0/GeographicalNames.xsd"/>
  <!--XML Schema document created by ShapeChange-->
  <element name="SimpleLinearReference" substitutionGroup="net:LinkReference" type="net:SimpleLinearReferenceType">
    <annotation>
      <documentation>-- Definition --
A network reference that is restricted to part of a linear network element. The part is the part of the network element between fromPosition and toPosition.
</documentation>
    </annotation>
  </element>
  <complexType name="SimpleLinearReferenceType">
    <complexContent>
      <extension base="net:LinkReferenceType">
        <sequence>
          <element name="fromPosition" type="gml:LengthType">
            <annotation>
              <documentation>-- Definition --
The start position of the linear element, expressed as the distance from the start of the linear network element along its curve geometry.
</documentation>
            </annotation>
          </element>
          <element name="toPosition" type="gml:LengthType">
            <annotation>
              <documentation>-- Definition --
The end position of the linear element, expressed as the distance from the start of the linear network element along its curve geometry.
</documentation>
            </annotation>
          </element>
          <element minOccurs="0" name="offset" nillable="true">
            <annotation>
              <documentation>-- Definition --
An offset from the centerline geometry of the generalised link, where applicable; a positive offset is to the right in the direction of the link, a negative offset is to the left.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:LengthType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="SimpleLinearReferencePropertyType">
    <sequence>
      <element ref="net:SimpleLinearReference"/>
    </sequence>
  </complexType>
  <element name="SimplePointReference" substitutionGroup="net:LinkReference" type="net:SimplePointReferenceType">
    <annotation>
      <documentation>-- Definition --
A network reference that is restricted to a point on a linear network element. The point is the location on the network element at the position atPosition along the network. 
</documentation>
    </annotation>
  </element>
  <complexType name="SimplePointReferenceType">
    <complexContent>
      <extension base="net:LinkReferenceType">
        <sequence>
          <element name="atPosition" type="gml:LengthType">
            <annotation>
              <documentation>-- Definition --
Position of the point, expressed as the distance from the start of the linear network element along its curve geometry.
</documentation>
            </annotation>
          </element>
          <element minOccurs="0" name="offset" nillable="true">
            <annotation>
              <documentation>-- Definition --
An offset from the centerline geometry of the generalised link, where applicable; a positive offset is to the right in the direction of the link, a negative offset is to the left.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:LengthType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="SimplePointReferencePropertyType">
    <sequence>
      <element ref="net:SimplePointReference"/>
    </sequence>
  </complexType>
  <element name="GradeSeparatedCrossing" substitutionGroup="net:NetworkElement" type="net:GradeSeparatedCrossingType">
    <annotation>
      <documentation>-- Definition --
Indicator which of two or more intersecting elements is/are below and which is/are above, to be used if elevation coordinates are not present or cannot be trusted.

-- Description --
NOTE 1 In most cases, the number of elements will be two.

NOTE 2 In the normal case this is when elements intersect in the x/y-plane when the z coordinate is not present or is not accurate enough.
</documentation>
    </annotation>
  </element>
  <complexType name="GradeSeparatedCrossingType">
    <complexContent>
      <extension base="net:NetworkElementType">
        <sequence>
          <element maxOccurs="unbounded" minOccurs="2" name="element" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
Sequence of crossing links. The order reflects their elevation; the first link is the lower link.</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">net:Link</targetElement>
              </appinfo>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="GradeSeparatedCrossingPropertyType">
    <sequence minOccurs="0">
      <element ref="net:GradeSeparatedCrossing"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element abstract="true" name="LinkSet" substitutionGroup="net:NetworkElement" type="net:LinkSetType">
    <annotation>
      <documentation>-- Definition --
A collection of link sequences and/or individual links that has a specific function or significance in a network. 

-- Description --
NOTE This spatial object type supports the aggregation of links to form objects with branches, loops, parallel sequences of links, gaps, etc.

EXAMPLE A dual carriageway road, as a collection of the two link sequences that represent each carriageway. 
</documentation>
    </annotation>
  </element>
  <complexType abstract="true" name="LinkSetType">
    <complexContent>
      <extension base="net:NetworkElementType">
        <sequence>
          <element maxOccurs="unbounded" name="link">
            <annotation>
              <documentation>-- Definition --
The set of links and link sequences that constitute the link set.</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">net:GeneralisedLink</targetElement>
              </appinfo>
            </annotation>
            <complexType>
              <complexContent>
                <extension base="gml:AbstractMemberType">
                  <sequence/>
                  <attributeGroup ref="gml:AssociationAttributeGroup"/>
                </extension>
              </complexContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="LinkSetPropertyType">
    <sequence minOccurs="0">
      <element ref="net:LinkSet"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element abstract="true" name="NetworkElement" substitutionGroup="gml:AbstractFeature" type="net:NetworkElementType">
    <annotation>
      <documentation>-- Definition --
Abstract base type representing an element in a network. Every element in a network provides some function that is of interest in the network.
</documentation>
    </annotation>
  </element>
  <complexType abstract="true" name="NetworkElementType">
    <complexContent>
      <extension base="gml:AbstractFeatureType">
        <sequence>
          <element name="beginLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="inspireId" type="base:IdentifierPropertyType">
            <annotation>
              <documentation>-- Definition --
External object identifier of the spatial object.

-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.
</documentation>
            </annotation>
          </element>
          <element minOccurs="0" name="endLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element maxOccurs="unbounded" name="inNetwork" nillable="true" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
The networks in which a network element is a member.</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">net:Network</targetElement>
                <reversePropertyName xmlns="http://www.opengis.net/gml/3.2">net:elements</reversePropertyName>
              </appinfo>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="NetworkElementPropertyType">
    <sequence minOccurs="0">
      <element ref="net:NetworkElement"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="Network" substitutionGroup="gml:AbstractFeature" type="net:NetworkType">
    <annotation>
      <documentation>-- Definition --
A network is a collection of network elements.

-- Description --
The reason for collecting certain elements in a certain network may vary (e.g. connected elements for the same mode of transport)
</documentation>
    </annotation>
  </element>
  <complexType name="NetworkType">
    <complexContent>
      <extension base="gml:AbstractFeatureType">
        <sequence>
          <element maxOccurs="unbounded" minOccurs="0" name="geographicalName" nillable="true">
            <annotation>
              <documentation>-- Definition --
Geographical name for this network.
</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="gn:GeographicalName"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="elements" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
The collection of elements that constitutes the network.
</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">net:NetworkElement</targetElement>
                <reversePropertyName xmlns="http://www.opengis.net/gml/3.2">net:inNetwork</reversePropertyName>
              </appinfo>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <element abstract="true" name="NetworkArea" substitutionGroup="net:NetworkElement" type="net:NetworkAreaType">
    <annotation>
      <documentation>-- Definition --
A 2-dimensional element in a network. 
</documentation>
    </annotation>
  </element>
  <complexType abstract="true" name="NetworkAreaType">
    <complexContent>
      <extension base="net:NetworkElementType">
        <sequence>
          <element name="geometry" type="gml:SurfacePropertyType">
            <annotation>
              <documentation>-- Definition --
Represents the geometric properties of the area</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="NetworkAreaPropertyType">
    <sequence minOccurs="0">
      <element ref="net:NetworkArea"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element abstract="true" name="LinkSequence" substitutionGroup="net:GeneralisedLink" type="net:LinkSequenceType">
    <annotation>
      <documentation>-- Definition --
A network element which represents a continuous path in the network without any branches. The element has a defined beginning and end and every position on the link sequence is identifiable with one single parameter such as length. 

-- Description --
EXAMPLE A link sequence may represent a route. 
</documentation>
    </annotation>
  </element>
  <complexType abstract="true" name="LinkSequenceType">
    <complexContent>
      <extension base="net:GeneralisedLinkType">
        <sequence>
          <element maxOccurs="unbounded" name="link" type="net:DirectedLinkPropertyType">
            <annotation>
              <documentation>-- Definition --
The ordered collection of directed links that constitute the link sequence.
</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="LinkSequencePropertyType">
    <sequence minOccurs="0">
      <element ref="net:LinkSequence"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element abstract="true" name="NetworkProperty" substitutionGroup="gml:AbstractFeature" type="net:NetworkPropertyType">
    <annotation>
      <documentation>-- Definition --
Abstract base type representing phenomena located at or along a network element. This base type provides general properties to associate the network-related phenomena (network properties) with the network elements.

-- Description --
In the simplest case (NetworkReference), the network property applies to the whole network element. In the case of a Link, the spatial reference may be restricted to part of the Link by using a linear reference. ISO/TC 211 is currently in the early stages of developing a standard for Linear Referencing (ISO 19148). A simple mechanism to express linear references is provided in this version of the network model; it is expected that the model will be extended once ISO 19148 is stable. The current simple model requires for all linear references two expressions representing a distance from the start of the Link along its curve geometry. The network property applies to the part of the Link between fromPosition and toPosition.
</documentation>
    </annotation>
  </element>
  <complexType abstract="true" name="NetworkPropertyType">
    <complexContent>
      <extension base="gml:AbstractFeatureType">
        <sequence>
          <element maxOccurs="unbounded" name="networkRef" nillable="true">
            <annotation>
              <documentation>-- Definition --
Spatial reference of the network-related property.

-- Description --
This attribute provides an indirect spatial reference based on a reference to an element of an underlying network. See the chapter on Object Referencing in the Generic Conceptual Model for a discussion on modelling object references.
</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="net:NetworkReference"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element minOccurs="0" name="inspireId" type="base:IdentifierPropertyType">
            <annotation>
              <documentation>-- Definition --
External object identifier of the spatial object.

-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.
</documentation>
            </annotation>
          </element>
          <element name="beginLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="endLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="NetworkPropertyPropertyType">
    <sequence minOccurs="0">
      <element ref="net:NetworkProperty"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="CrossReference" substitutionGroup="gml:AbstractFeature" type="net:CrossReferenceType">
    <annotation>
      <documentation>-- Definition --
Represents a reference between two elements in the same network. 

-- Description --
The cross reference may represent the case where two elements are different representations of the same spatial object.
</documentation>
    </annotation>
  </element>
  <complexType name="CrossReferenceType">
    <complexContent>
      <extension base="gml:AbstractFeatureType">
        <sequence>
          <element maxOccurs="2" minOccurs="2" name="element" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
The cross referenced elements</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">net:NetworkElement</targetElement>
              </appinfo>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="CrossReferencePropertyType">
    <sequence minOccurs="0">
      <element ref="net:CrossReference"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="NetworkReference" substitutionGroup="gml:AbstractObject" type="net:NetworkReferenceType">
    <annotation>
      <documentation>-- Definition --
A reference to a network element.
</documentation>
    </annotation>
  </element>
  <complexType name="NetworkReferenceType">
    <sequence>
      <element name="element" type="gml:ReferenceType">
        <annotation>
          <documentation>-- Definition --
The referenced network element.</documentation>
          <appinfo>
            <targetElement xmlns="http://www.opengis.net/gml/3.2">net:NetworkElement</targetElement>
          </appinfo>
        </annotation>
      </element>
    </sequence>
  </complexType>
  <complexType name="NetworkReferencePropertyType">
    <sequence>
      <element ref="net:NetworkReference"/>
    </sequence>
  </complexType>
  <element abstract="true" name="Link" substitutionGroup="net:GeneralisedLink" type="net:LinkType">
    <annotation>
      <documentation>-- Definition --
Curvilinear network element that connects two positions and represents a homogeneous path in the network. The connected positions may be represented as nodes.
</documentation>
    </annotation>
  </element>
  <complexType abstract="true" name="LinkType">
    <complexContent>
      <extension base="net:GeneralisedLinkType">
        <sequence>
          <element name="centrelineGeometry" type="gml:CurvePropertyType">
            <annotation>
              <documentation>-- Definition --
The geometry that represents the centreline of the link.
</documentation>
            </annotation>
          </element>
          <element name="fictitious" type="boolean">
            <annotation>
              <documentation>-- Definition --
Indicator that the centreline geometry of the link is a straight line with no intermediate control points '||'&'||'amp;ndash; unless the straight line represents the geography in the resolution of the data set appropriately.
</documentation>
            </annotation>
          </element>
          <element minOccurs="0" name="endNode" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
The optional end node for this link. The end node may be the same instance as the start node. </documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">net:Node</targetElement>
                <reversePropertyName xmlns="http://www.opengis.net/gml/3.2">net:spokeEnd</reversePropertyName>
              </appinfo>
            </annotation>
          </element>
          <element minOccurs="0" name="startNode" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
The optional start node for this link.</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">net:Node</targetElement>
                <reversePropertyName xmlns="http://www.opengis.net/gml/3.2">net:spokeStart</reversePropertyName>
              </appinfo>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="LinkPropertyType">
    <sequence minOccurs="0">
      <element ref="net:Link"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="LinkReference" substitutionGroup="net:NetworkReference" type="net:LinkReferenceType">
    <annotation>
      <documentation>-- Definition --
A network reference to a linear network element.
</documentation>
    </annotation>
  </element>
  <complexType name="LinkReferenceType">
    <complexContent>
      <extension base="net:NetworkReferenceType">
        <sequence>
          <element name="applicableDirection" nillable="true">
            <annotation>
              <documentation>-- Definition --
The directions of the generalised link to which the reference applies.

In cases where a property does not apply '||'&'||'lt;i'||'&'||'gt;to'||'&'||'lt;/i'||'&'||'gt; a direction along a link, but represents a phenomenon '||'&'||'lt;i'||'&'||'gt;along'||'&'||'lt;/i'||'&'||'gt; a link, '||'&'||'amp;ldquo;inDirection'||'&'||'amp;rdquo; refers to the right side in the direction of the link.

-- Description --
EXAMPLE A speed limit is a property that applies to a direction of the link (or both directions) while a house number is a phenomenon along a link.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:CodeType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="LinkReferencePropertyType">
    <sequence>
      <element ref="net:LinkReference"/>
    </sequence>
  </complexType>
  <element abstract="true" name="GeneralisedLink" substitutionGroup="net:NetworkElement" type="net:GeneralisedLinkType">
    <annotation>
      <documentation>-- Definition --
Abstract base type representing a linear network element that may be used as a target in linear referencing.
</documentation>
    </annotation>
  </element>
  <complexType abstract="true" name="GeneralisedLinkType">
    <complexContent>
      <extension base="net:NetworkElementType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="GeneralisedLinkPropertyType">
    <sequence minOccurs="0">
      <element ref="net:GeneralisedLink"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="DirectedLink" substitutionGroup="gml:AbstractObject" type="net:DirectedLinkType">
    <annotation>
      <documentation>-- Definition --
A link either in its positive or negative direction.
</documentation>
    </annotation>
  </element>
  <complexType name="DirectedLinkType">
    <sequence>
      <element name="direction" type="gml:SignType">
        <annotation>
          <documentation>-- Definition --
Indicates if the directed link agrees (positive) or disagrees (negative) with the positive direction of the link.
</documentation>
        </annotation>
      </element>
      <element name="link" type="gml:ReferenceType">
        <annotation>
          <documentation>-- Definition --
The link</documentation>
          <appinfo>
            <targetElement xmlns="http://www.opengis.net/gml/3.2">net:Link</targetElement>
          </appinfo>
        </annotation>
      </element>
    </sequence>
  </complexType>
  <complexType name="DirectedLinkPropertyType">
    <sequence>
      <element ref="net:DirectedLink"/>
    </sequence>
  </complexType>
  <element name="NetworkConnection" substitutionGroup="net:NetworkElement" type="net:NetworkConnectionType">
    <annotation>
      <documentation>-- Definition --
Represents a logical connection between two or more network elements in different networks.

-- Description --
In the case where the networks are in different spatial data sets, a network connection object may exist in both data sets.
</documentation>
    </annotation>
  </element>
  <complexType name="NetworkConnectionType">
    <complexContent>
      <extension base="net:NetworkElementType">
        <sequence>
          <element name="type" nillable="true">
            <annotation>
              <documentation>-- Definition --
Categorisation of the network connection.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:CodeType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element maxOccurs="unbounded" minOccurs="2" name="element" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
Network elements in different networks
</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">net:NetworkElement</targetElement>
              </appinfo>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="NetworkConnectionPropertyType">
    <sequence minOccurs="0">
      <element ref="net:NetworkConnection"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element abstract="true" name="Node" substitutionGroup="net:NetworkElement" type="net:NodeType">
    <annotation>
      <documentation>-- Definition --
Represents a significant position in the network that always occurs at the beginning or the end of a link.

-- Description --
NOTE if a topological representation of the network is used the road node is either a topological connection between two or more links or the termination of a ink. If a geometric representation of the network is used road nodes are represented by points or alternatively another geometric shape. [EuroRoadS]
</documentation>
    </annotation>
  </element>
  <complexType abstract="true" name="NodeType">
    <complexContent>
      <extension base="net:NetworkElementType">
        <sequence>
          <element name="geometry" type="gml:PointPropertyType">
            <annotation>
              <documentation>-- Definition --
The location of the node.
</documentation>
            </annotation>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="spokeEnd" nillable="true" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
The links that enter the node.

-- Description --
NOTE In the INSPIRE context, this spoke property is to be published when this information is published in current exchange formats of the data set.</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">net:Link</targetElement>
                <reversePropertyName xmlns="http://www.opengis.net/gml/3.2">net:endNode</reversePropertyName>
              </appinfo>
            </annotation>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="spokeStart" nillable="true" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
The links that leave the node.

-- Description --
NOTE In the INSPIRE context, this spoke property is to be published when this information is published in current exchange formats of the data set.</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">net:Link</targetElement>
                <reversePropertyName xmlns="http://www.opengis.net/gml/3.2">net:startNode</reversePropertyName>
              </appinfo>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="NodePropertyType">
    <sequence minOccurs="0">
      <element ref="net:Node"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 354;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (354, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/nz-core/3.0/naturalriskzonescore.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 354 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as naturalriskzonescore_nz_core_3_0.xsd
    -- Needed to separate this xsd into two pieces due to its size>32767.
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:base2="http://inspire.ec.europa.eu/schemas/base2/1.0" xmlns:ef="http://inspire.ec.europa.eu/schemas/ef/3.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:gmlcov="http://www.opengis.net/gmlcov/1.0" xmlns:nz-core="http://inspire.ec.europa.eu/schemas/nz-core/3.0" xmlns:sc="http://www.interactive-instruments.de/ShapeChange/AppInfo" targetNamespace="http://inspire.ec.europa.eu/schemas/nz-core/3.0" elementFormDefault="qualified" version="3.0">
	<import namespace="http://inspire.ec.europa.eu/schemas/base/3.3" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/base2/1.0" schemaLocation="http://inspire.ec.europa.eu/schemas/base2/1.0/BaseTypes2.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/ef/3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/ef/3.0/EnvironmentalMonitoringFacilities.xsd"/>
	<import namespace="http://www.interactive-instruments.de/ShapeChange/AppInfo" schemaLocation="http://portele.de/ShapeChangeAppinfo.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<import namespace="http://www.opengis.net/gmlcov/1.0" schemaLocation="http://schemas.opengis.net/gmlcov/1.0/coverage.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="AbstractRiskZone" type="nz-core:AbstractRiskZoneType" abstract="true" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Definition --
A risk zone is the spatial extent of a combination of the consequences of an event (hazard) and the associated probability/likelihood of its occurrence.</documentation>
		</annotation>
	</element>
	<complexType name="AbstractRiskZoneType" abstract="true">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="beginLifeSpanVersion" nillable="true">
						<annotation>
							<documentation>-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="endLifeSpanVersion" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Definition --
External object identifier of the spatial object.</documentation>
						</annotation>
					</element>
					<element name="sourceOfRisk" type="nz-core:NaturalHazardClassificationPropertyType">
						<annotation>
							<documentation>-- Definition --
A generic classification and a specific classification of the type of hazard which is the source of risk.</documentation>
						</annotation>
					</element>
					<element name="validityPeriod" type="gml:TimePeriodPropertyType" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Future finite time frame where the model applies.

-- Description --
It is an interval of dates, or the expression of a time frame for which the estimates are meant (eg: until 2090; summer of 2011; winter seasons until 2015).</documentation>
						</annotation>
					</element>
					<element name="exposedElement" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
The element that is within a hazardous area.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="nz-core:AbstractExposedElement"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
					<element name="source" nillable="true">
						<annotation>
							<documentation>-- Definition --
The hazard which is considered for the creation of the risk zone object.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="nz-core:AbstractHazardArea"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="AbstractRiskZonePropertyType">
		<sequence minOccurs="0">
			<element ref="nz-core:AbstractRiskZone"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="AbstractObservedEvent" type="nz-core:AbstractObservedEventType" abstract="true" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Definition --
A natural phenomenon relevant to the study of natural hazards which occurred and which has been observed.</documentation>
		</annotation>
	</element>
	<complexType name="AbstractObservedEventType" abstract="true">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="beginLifeSpanVersion" nillable="true">
						<annotation>
							<documentation>-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="endLifeSpanVersion" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Definition --
External object identifier of the spatial object.</documentation>
						</annotation>
					</element>
					<element name="nameOfEvent" nillable="true">
						<annotation>
							<documentation>-- Definition --
common name of the observed event.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="string">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="typeOfHazard" type="nz-core:NaturalHazardClassificationPropertyType">
						<annotation>
							<documentation>-- Definition --
A generic classification and a specific classification of the type of hazard.</documentation>
						</annotation>
					</element>
					<element name="validFrom" nillable="true">
						<annotation>
							<documentation>-- Definition --
The time when the observed event started to exist in the real world.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="validTo" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
The time from which the observed event no longer exists in the real world.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="isMonitoredBy" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
The program that monitors the observed event.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="ef:EnvironmentalMonitoringProgramme"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="AbstractObservedEventPropertyType">
		<sequence minOccurs="0">
			<element ref="nz-core:AbstractObservedEvent"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="ExposedElementCoverage" type="nz-core:ExposedElementCoverageType" substitutionGroup="gmlcov:AbstractCoverage">
		<annotation>
			<documentation>-- Definition --
A coverage representating continuous information about exposed elements.</documentation>
		</annotation>
	</element>
	<complexType name="ExposedElementCoverageType">
		<complexContent>
			<extension base="gmlcov:AbstractCoverageType">
				<sequence>
					<element name="typeOfElement" nillable="true">
						<annotation>
							<documentation>-- Definition --
A classification of the exposed element.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="nz-core:ExposedElementClassification"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="ExposedElementCoveragePropertyType">
		<sequence minOccurs="0">
			<element ref="nz-core:ExposedElementCoverage"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="VulnerabilityAssessment" type="nz-core:VulnerabilityAssessmentType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Definition --
Assessment of the vulnerability.

-- Description --
It contains piece of information about the source the vulnerability, about the level of vulnerability and about the magnitude or intensity of the hazard for which vulnerability is assessed.</documentation>
		</annotation>
	</element>
	<complexType name="VulnerabilityAssessmentType">
		<sequence>
			<element name="sourceOfVulnerability" type="nz-core:NaturalHazardClassificationPropertyType">
				<annotation>
					<documentation>-- Definition --
The type of hazard for which the vulnerability is assessed.</documentation>
				</annotation>
			</element>
			<element name="levelOfVulnerability" nillable="true">
				<annotation>
					<documentation>-- Definition --
Level of vulnerability.

-- Description --
When assessed quantitatively, it is a percentage.</documentation>
				</annotation>
				<complexType>
					<sequence>
						<element ref="nz-core:LevelOrIntensity"/>
					</sequence>
					<attribute name="nilReason" type="gml:NilReasonType"/>
				</complexType>
			</element>
			<element name="magnitudeOrIntensityOfHazard" nillable="true">
				<annotation>
					<documentation>-- Definition --
An expression of the magnitude or the intensity of a phenomenon.

-- Description --
It may address a value within the Richter scale, or a description of the european macro-seismic scale, or a flood flow, etc...</documentation>
				</annotation>
				<complexType>
					<sequence>
						<element ref="nz-core:LevelOrIntensity"/>
					</sequence>
					<attribute name="nilReason" type="gml:NilReasonType"/>
				</complexType>
			</element>
			<element name="typeOfElement" nillable="true">
				<annotation>
					<documentation>-- Definition --
A classification of the exposed element.</documentation>
				</annotation>
				<complexType>
					<sequence>
						<element ref="nz-core:ExposedElementClassification"/>
					</sequence>
					<attribute name="nilReason" type="gml:NilReasonType"/>
				</complexType>
			</element>
		</sequence>
	</complexType>
	<complexType name="VulnerabilityAssessmentPropertyType">
		<sequence>
			<element ref="nz-core:VulnerabilityAssessment"/>
		</sequence>
	</complexType>
	<element name="AbstractExposedElement" type="nz-core:AbstractExposedElementType" abstract="true" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Definition --
SOURCE : [UNISDR, 2009]

People, property, systems, or other elements present in hazard zones that are thereby subject to potential losses.</documentation>
		</annotation>
	</element>
	<complexType name="AbstractExposedElementType" abstract="true">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Definition --
External object identifier of the exposed element.</documentation>
						</annotation>
					</element>
					<element name="beginLifeSpanVersion" nillable="true">
						<annotation>
							<documentation>-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="endLifeSpanVersion" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="validFrom" nillable="true">
						<annotation>
							<documentation>-- Definition --
The time when the exposed element started to exist in the real world.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="validTo" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
The time from which the exposed element no longer exists in the real world.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="sourceOfSpatialRepresentation" type="gml:FeaturePropertyType" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
The source object which is used to represent the exposed element.</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="AbstractExposedElementPropertyType">
		<sequence minOccurs="0">
			<element ref="nz-core:AbstractExposedElement"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="NaturalHazardClassification" type="nz-core:NaturalHazardClassificationType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Definition --
This class provides piece of information about the nature of the natural hazard as well as the type of hazard which is the source of risk.</documentation>
		</annotation>
	</element>
	<complexType name="NaturalHazardClassificationType">
		<sequence>
			<element name="hazardCategory" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Definition --
A generic classification of types of natural hazards or risks.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="extensibility">narrower</taggedValue>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="vocabulary">http://inspire.ec.europa.eu/codeList/RiskOrHazardCategory</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="specificHazardType" type="gml:ReferenceType" nillable="true">
				<annotation>
					<documentation>-- Definition --
Additional classification of the natural hazard that further specifies the hazard type according to a nomenclature that is specific to this dataset.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="NaturalHazardClassificationPropertyType">
		<sequence>
			<element ref="nz-core:NaturalHazardClassification"/>
		</sequence>
	</complexType>
	<element name="ObservedEvent" type="nz-core:ObservedEventType" substitutionGroup="nz-core:AbstractObservedEvent">
		<annotation>
			<documentation>-- Definition --
Discrete spatial objects representing natural phenomenon relevant to the study of natural hazards which occurred, or is currently occuring, and which has been observed.</documentation>
		</annotation>
	</element>
	<complexType name="ObservedEventType">
		<complexContent>
			<extension base="nz-core:AbstractObservedEventType">
				<sequence>
					<element name="geometry" type="gml:GeometryPropertyType">
						<annotation>
							<documentation>-- Definition --
Geometric representation of the spatial extent covered by the observed event.</documentation>
						</annotation>
					</element>
					<element name="magnitudeOrIntensity" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
An expression of the magnitude or the intensity of a phenomenon.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="nz-core:LevelOrIntensity"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="ObservedEventPropertyType">
		<sequence minOccurs="0">
			<element ref="nz-core:ObservedEvent"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="QuantitativeLikelihood" type="nz-core:QuantitativeLikelihoodType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Definition --

A frequency of occurrence or return period of a hazard phenomenon.</documentation>
		</annotation>
	</element>
	<complexType name="QuantitativeLikelihoodType">
		<sequence>
			<element name="probabilityOfOccurrence" nillable="true">
				<annotation>
					<documentation>-- Definition --
The probability of occurrence of a hazard event, expressed as a value between 0 and 1. 

-- Description --
This is the inverse value of the return period.</documentation>
				</annotation>';
                
        
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    
    pos := pos + amt;
    buf :=        
'				<complexType>
					<simpleContent>
						<extension base="double">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
			<element name="returnPeriod" nillable="true">
				<annotation>
					<documentation>-- Definition --
Long-term average interval of time or number of years within which an event will be equalled or exceeded [UNESCO].</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="double">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
		</sequence>
	</complexType>
	<complexType name="QuantitativeLikelihoodPropertyType">
		<sequence>
			<element ref="nz-core:QuantitativeLikelihood"/>
		</sequence>
	</complexType>
	<element name="ObservedEventCoverage" type="nz-core:ObservedEventCoverageType" substitutionGroup="gmlcov:AbstractCoverage">
		<annotation>
			<documentation>-- Definition --
A coverage representing continuous information about observed events.</documentation>
		</annotation>
	</element>
	<complexType name="ObservedEventCoverageType">
		<complexContent>
			<extension base="gmlcov:AbstractCoverageType">
				<sequence/>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="ObservedEventCoveragePropertyType">
		<sequence minOccurs="0">
			<element ref="nz-core:ObservedEventCoverage"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="LevelOrIntensity" type="nz-core:LevelOrIntensityType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Definition --
Quantitative or qualitative assessment of either risk, hazard or vulnerability.

-- Description --
Common concept for assessing the level of risk, or the level of hazard, or the level of vulnerability.</documentation>
		</annotation>
	</element>
	<complexType name="LevelOrIntensityType">
		<sequence>
			<element name="qualitativeValue" nillable="true">
				<annotation>
					<documentation>-- Definition --
A qualitative assessment of the level or intensity.</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="string">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
			<element name="quantitativeValue" nillable="true">
				<annotation>
					<documentation>-- Definition --
A quantitative assessment of the level or intensity.</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="gml:MeasureType">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
			<element name="assessmentMethod" nillable="true">
				<annotation>
					<documentation>-- Definition --
A citation to the method used to express the level or intensity.</documentation>
				</annotation>
				<complexType>
					<complexContent>
						<extension base="gml:AbstractMemberType">
							<sequence minOccurs="0">
								<element ref="base2:DocumentCitation"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
						</extension>
					</complexContent>
				</complexType>
			</element>
		</sequence>
	</complexType>
	<complexType name="LevelOrIntensityPropertyType">
		<sequence>
			<element ref="nz-core:LevelOrIntensity"/>
		</sequence>
	</complexType>
	<element name="RiskZone" type="nz-core:RiskZoneType" substitutionGroup="nz-core:AbstractRiskZone">
		<annotation>
			<documentation>-- Definition --
Discrete spatial objects representing the spatial extent of a combination of the consequences of an event (hazard) and the associated probability/likelihood of its occurrence.</documentation>
		</annotation>
	</element>
	<complexType name="RiskZoneType">
		<complexContent>
			<extension base="nz-core:AbstractRiskZoneType">
				<sequence>
					<element name="geometry" type="gml:SurfacePropertyType">
						<annotation>
							<documentation>-- Definition --
Geometric representation of spatial extent covered by this risk zone.</documentation>
						</annotation>
					</element>
					<element name="levelOfRisk" nillable="true">
						<annotation>
							<documentation>-- Definition --
The level of risk is an assessment of the combination of the consequences of an event (hazard) and the associated probability/likelihood of the occurrence of the event.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="nz-core:LevelOrIntensity"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="RiskZonePropertyType">
		<sequence minOccurs="0">
			<element ref="nz-core:RiskZone"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<simpleType name="DeterminationMethodValueType">
		<annotation>
			<documentation>-- Definition --
An enumeration to describe the method used to define the area of hazard or risk.

-- Description --
There are several ways to delineate the perimeter of a hazard or a risk : to model it, or to assess it indirectly</documentation>
		</annotation>
		<restriction base="string">
			<enumeration value="modelling">
				<annotation>
					<documentation>-- Definition --
The area has been computed according to a model.</documentation>
				</annotation>
			</enumeration>
			<enumeration value="indirectDetermination">
				<annotation>
					<documentation>-- Definition --
The area has been defined by interpretation of available data and/or information.</documentation>
				</annotation>
			</enumeration>
		</restriction>
	</simpleType>
	<element name="HazardCoverage" type="nz-core:HazardCoverageType" substitutionGroup="nz-core:AbstractHazardArea">
		<annotation>
			<documentation>-- Definition --
A coverage representing continuous information about a type of natural hazard.</documentation>
		</annotation>
	</element>
	<complexType name="HazardCoverageType">
		<complexContent>
			<extension base="nz-core:AbstractHazardAreaType">
				<sequence/>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="HazardCoveragePropertyType">
		<sequence minOccurs="0">
			<element ref="nz-core:HazardCoverage"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="RiskCoverage" type="nz-core:RiskCoverageType" substitutionGroup="gmlcov:AbstractCoverage">
		<annotation>
			<documentation>-- Definition --
A coverage representation of natural risks.</documentation>
		</annotation>
	</element>
	<complexType name="RiskCoverageType">
		<complexContent>
			<extension base="gmlcov:AbstractCoverageType">
				<sequence/>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="RiskCoveragePropertyType">
		<sequence minOccurs="0">
			<element ref="nz-core:RiskCoverage"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="AbstractHazardArea" type="nz-core:AbstractHazardAreaType" abstract="true" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Definition --
An area affected by a natural hazard.

-- Description --
A natural hazard is a natural process or phenomenon that may cause loss of life, injury or other impacts, property damage, loss livelihoods and services, social and economic disruption, or environmental damage. [Council of The European Union - Commission Staff Working Paper - Risk Assessment and Mapping Guidelines for Disaster Management].</documentation>
		</annotation>
	</element>
	<complexType name="AbstractHazardAreaType" abstract="true">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="beginLifeSpanVersion" nillable="true">
						<annotation>
							<documentation>-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="determinationMethod" type="nz-core:DeterminationMethodValueType">
						<annotation>
							<documentation>-- Definition --
Specifies if the hazard area result is delineated after modelling or determined after interpretation.</documentation>
						</annotation>
					</element>
					<element name="endLifeSpanVersion" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Definition --
External object identifier of the hazard area.</documentation>
						</annotation>
					</element>
					<element name="typeOfHazard" type="nz-core:NaturalHazardClassificationPropertyType">
						<annotation>
							<documentation>-- Definition --
A generic classification and a specific classification of the type of natural hazard.</documentation>
						</annotation>
					</element>
					<element name="validityPeriod" type="gml:TimePeriodPropertyType" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Future finite time frame where the hazard applies.

-- Description --
It is an interval of dates, or the expression of a time frame for which the estimates are meant (eg: until 2090; summer of 2011; winter seasons until 2015).</documentation>
						</annotation>
					</element>
					<element name="source" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
The observed event that triggered the modelling of a hazard area.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="nz-core:AbstractObservedEvent"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="AbstractHazardAreaPropertyType">
		<sequence minOccurs="0">
			<element ref="nz-core:AbstractHazardArea"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="ExposedElement" type="nz-core:ExposedElementType" substitutionGroup="nz-core:AbstractExposedElement">
		<annotation>
			<documentation>-- Definition --
Discrete spatial objects representing exposed element.</documentation>
		</annotation>
	</element>
	<complexType name="ExposedElementType">
		<complexContent>
			<extension base="nz-core:AbstractExposedElementType">
				<sequence>
					<element name="geometry" type="gml:GeometryPropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Geometric representation of the exposed element.

-- Description --
If the feature is linked to a spatially referenced INSPIRE feature, then it has no geometry. If not, then it has a geometry.</documentation>
						</annotation>
					</element>
					<element name="assessmentOfVulnerability" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Assessment of the vulnerability of the exposed element.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="nz-core:VulnerabilityAssessment"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="ExposedElementPropertyType">
		<sequence minOccurs="0">
			<element ref="nz-core:ExposedElement"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="HazardArea" type="nz-core:HazardAreaType" substitutionGroup="nz-core:AbstractHazardArea">
		<annotation>
			<documentation>-- Definition --
Discrete spatial objects representing a natural hazard.</documentation>
		</annotation>
	</element>
	<complexType name="HazardAreaType">
		<complexContent>
			<extension base="nz-core:AbstractHazardAreaType">
				<sequence>
					<element name="geometry" type="gml:SurfacePropertyType">
						<annotation>
							<documentation>-- Definition --
Geometric representation of spatial extent covered by the hazard area.</documentation>
						</annotation>
					</element>
					<element name="likelihoodOfOccurrence" nillable="true">
						<annotation>
							<documentation>-- Definition --
Likelihood is a general concept relating to the chance of an event occuring.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="nz-core:LikelihoodOfOccurrence"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="magnitudeOrIntensity" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
An expression of the magnitude or the intensity of a phenomenon.

-- Description --
It may address a value within the Richter scale, or a description of the european macro-seismic scale, or a flood flow, etc...</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="nz-core:LevelOrIntensity"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="HazardAreaPropertyType">
		<sequence minOccurs="0">
			<element ref="nz-core:HazardArea"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="LikelihoodOfOccurrence" type="nz-core:LikelihoodOfOccurrenceType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Definition --
Likelihood is a general concept relating to the chance of an event occurring. 

-- Description --
Likelihood is generally expressed as a probability or a frequency. [EXCIFF].</documentation>
		</annotation>
	</element>
	<complexType name="LikelihoodOfOccurrenceType">
		<sequence>
			<element name="qualitativeLikelihood" nillable="true">
				<annotation>
					<documentation>-- Definition --
A qualitative assessment of the likelihood of occurrence of a hazard. 

-- Description --
Sometimes, this is known as susceptibility.</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="string">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
			<element name="quantitativeLikelihood" nillable="true">
				<annotation>
					<documentation>-- Definition --
A frequency of occurence or return period of a hazard phenomenon. 

-- Description --
Sometimes, this is known as susceptibility.</documentation>
				</annotation>
				<complexType>
					<sequence>
						<element ref="nz-core:QuantitativeLikelihood"/>
					</sequence>
					<attribute name="nilReason" type="gml:NilReasonType"/>
				</complexType>
			</element>
			<element name="assessmentMethod" nillable="true">
				<annotation>
					<documentation>-- Definition --
A citation to the method used to express the likelihood.</documentation>
				</annotation>
				<complexType>
					<complexContent>
						<extension base="gml:AbstractMemberType">
							<sequence minOccurs="0">
								<element ref="base2:DocumentCitation"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
						</extension>
					</complexContent>
				</complexType>
			</element>
		</sequence>
	</complexType>
	<complexType name="LikelihoodOfOccurrencePropertyType">
		<sequence>
			<element ref="nz-core:LikelihoodOfOccurrence"/>
		</sequence>
	</complexType>
	<element name="ExposedElementClassification" type="nz-core:ExposedElementClassificationType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Definition --
This class provides piece of information about the nature of the exposed element which is relevant to risk analysis.</documentation>
		</annotation>
	</element>
	<complexType name="ExposedElementClassificationType">
		<sequence>
			<element name="exposedElementCategory" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Definition --
A generic classification of the types of elements that are exposed to a risk.</documentation>
				</annotation>
			</element>
			<element name="specificExposedElementType" type="gml:ReferenceType" nillable="true">
				<annotation>
					<documentation>-- Definition --
An additional denomination of exposed element according to a nomenclature that is specific to this dataset.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="ExposedElementClassificationPropertyType">
		<sequence>
			<element ref="nz-core:ExposedElementClassification"/>
		</sequence>
	</complexType>
</schema>';
    
    amt := length(buf);
    
    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 355;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (355, empty_clob(), 'INSPIRE', 'urn:x-inspire:specification:gmlas:NaturalRiskZones:0.0/naturalriskzones.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 355 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as naturalriskzones_nz_0_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?><schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="urn:x-inspire:specification:gmlas:BaseTypes:3.2" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:gn="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" xmlns:hy="urn:x-inspire:specification:gmlas:HydroBase:3.0" xmlns:hy-p="urn:x-inspire:specification:gmlas:HydroPhysicalWaters:3.0" xmlns:nrz="urn:x-inspire:specification:gmlas:NaturalRiskZones:0.0" elementFormDefault="qualified" targetNamespace="urn:x-inspire:specification:gmlas:NaturalRiskZones:0.0" version="0.0">
  <import namespace="urn:x-inspire:specification:gmlas:HydroBase:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/hy/3.0/HydroBase.xsd"/>
  <import namespace="urn:x-inspire:specification:gmlas:HydroPhysicalWaters:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/hy-p/3.0/HydroPhysicalWaters.xsd"/>
  <import namespace="urn:x-inspire:specification:gmlas:BaseTypes:3.2" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.2/BaseTypes.xsd"/>
  <import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
  <import namespace="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/gn/3.0/GeographicalNames.xsd"/>
  <!--XML Schema document created by ShapeChange-->
  <element name="Embankment" substitutionGroup="hy-p:ManMadeObject" type="nrz:EmbankmentType">
    <annotation>
      <documentation>-- Definition --
A man-made raised long mound of earth or other material.

-- Description --
SOURCE [DFDD].

NOTE 1 Includes retaining walls, harbours, dikes.

NOTE 2 Regarded as a candidate spatial object in Annex III theme ''Natural risk zones'' due to its role in limiting flooding.
</documentation>
    </annotation>
  </element>
  <complexType name="EmbankmentType">
    <complexContent>
      <extension base="hy-p:ManMadeObjectType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="EmbankmentPropertyType">
    <sequence minOccurs="0">
      <element ref="nrz:Embankment"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="InundatedLand" substitutionGroup="gml:AbstractFeature" type="nrz:InundatedLandType">
    <annotation>
      <documentation>-- Definition --
A tract periodically covered by flood water, excluding tidal waters.

-- Description --
SOURCE [DFDD].

NOTE 1 It may be caused by either uncontrolled inundation (for example: flooding due to a river overflowing its banks or low-lying regions accumulating standing water following severe rainfall) or controlled inundation (for example: flooded by the regulation of the level of a reservoir). [DFDD].

NOTE 2 Inundation for irrigation purposes is excluded.

NOTE 3 Regarded as a candidate spatial object in Annex III theme ''Natural risk zones'' due to the relationship (by definition) with flooding.</documentation>
    </annotation>
  </element>
  <complexType name="InundatedLandType">
    <complexContent>
      <extension base="gml:AbstractFeatureType">
        <sequence>
          <element maxOccurs="unbounded" minOccurs="0" name="geographicalName" nillable="true">
            <annotation>
              <documentation>-- Definition --
A geographical name that is used to identify a hydrographic object in the real world. It provides a ''key'' for implicitly associating different representations of the object.

-- Description --
EXAMPLE A standing water in a mapping view may share the same geographical name as a WFD lake in a reporting view, implying they are both representations of the same real world object.</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="gn:GeographicalName"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="hydroId" nillable="true">
            <annotation>
              <documentation>-- Definition --
An identifier that is used to identify a hydrographic object in the real world. It provides a ''key'' for implicitly associating different representations of the object.

-- Description --
NOTE 1 The identifier may be a national hydrological identification code.

NOTE 2 More than one identifier may be required, for instance a watercourse may be assigned different identifying codes under national and European schemes.

EXAMPLE A lock in a mapping view may share the same identifier as a hydro node in a network view, implying they are both representations of the same real world object.</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="hy:HydroIdentifier"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="relatedHydroObject" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
A related hydrographic object representing the same real-world entity.</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">hy:HydroObject</targetElement>
              </appinfo>
            </annotation>
          </element>
          <element name="beginLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="endLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="geometry" type="gml:SurfacePropertyType">
            <annotation>
              <documentation>-- Definition --
The geometry of the inundated land, as a surface.</documentation>
            </annotation>
          </element>
          <element name="inspireId" type="base:IdentifierPropertyType">
            <annotation>
              <documentation>-- Definition --
External object identifier of the spatial object.

-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.
</documentation>
            </annotation>
          </element>
          <element name="inundationReturnPeriod" nillable="true">
            <annotation>
              <documentation>-- Definition --
The average period (in years) between the occurences of an inundation event.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="double">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="inundationType" nillable="true">
            <annotation>
              <documentation>-- Definition --
The type of a land subject to inundation based on the cause of its flooding.

-- Description --
SOURCE [DFDD].</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:CodeType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="InundatedLandPropertyType">
    <sequence minOccurs="0">
      <element ref="nrz:InundatedLand"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 356;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (356, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/of/3.0/oceanfeatures.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 356 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as oceanfeatures_of_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:of="http://inspire.ec.europa.eu/schemas/of/3.0" targetNamespace="http://inspire.ec.europa.eu/schemas/of/3.0" elementFormDefault="qualified" version="3.0">
	<import namespace="http://inspire.ec.europa.eu/schemas/base/3.3" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd"/>
	<!--XML Schema document created by ShapeChange-->
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 357;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (357, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/oi/3.0/orthoimagery.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 357 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as orthoimagery_oi_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:gmlcov="http://www.opengis.net/gmlcov/1.0" xmlns:oi="http://inspire.ec.europa.eu/schemas/oi/3.0" xmlns:sc="http://www.interactive-instruments.de/ShapeChange/AppInfo" targetNamespace="http://inspire.ec.europa.eu/schemas/oi/3.0" elementFormDefault="qualified" version="3.0">
	<annotation>
		<documentation>-- Name --
orthoimagery</documentation>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/base/3.3" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd"/>
	<import namespace="http://www.interactive-instruments.de/ShapeChange/AppInfo" schemaLocation="http://portele.de/ShapeChangeAppinfo.xsd"/>
	<import namespace="http://www.isotc211.org/2005/gmd" schemaLocation="http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<import namespace="http://www.opengis.net/gmlcov/1.0" schemaLocation="http://schemas.opengis.net/gmlcov/1.0/coverage.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="OrthoimageCoverage" type="oi:OrthoimageCoverageType" substitutionGroup="gmlcov:RectifiedGridCoverage">
		<annotation>
			<documentation>-- Name --
orthoimage coverage

-- Definition --
Raster image of the Earth surface that has been geometrically corrected ("orthorectified") to remove distortion caused by differences in elevation, sensor tilt and, optionally, by sensor optics.

-- Description --
NOTE 1 An orthoimage coverage is a continuous coverage based on a rectified quadrilateral grid. It is provided with an interpolation method to evaluate value records at any direct position within its domain. 

NOTE 2 An orthoimage coverage can be derived from one single input image or from different input images which have been mosaicked and merged together.

NOTE 3 An orthoimage coverage may be an aggregation of subsets extracted from other orthoimage coverages. For the avoidance of data duplication, this kind of aggregated orthoimage is dynamically constructed thanks to references to the contributing orthoimage coverages .</documentation>
		</annotation>
	</element>
	<complexType name="OrthoimageCoverageType">
		<complexContent>
			<extension base="gmlcov:AbstractDiscreteCoverageType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Name --
inspire identifier

-- Definition --
External object identifier of the spatial object.

-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="domainExtent" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
domain extent

-- Definition --
Extent of the spatiotemporal domain of the coverage.

-- Description --
SOURCE [ISO 19123]

NOTE 1 The data type EX_Extent is defined in ISO 19103. Extents may be specified in both space and time.

NOTE 2 The domain extent shall be specified in space at least by using a subtype of EX_GeographicExtent (EX_BoundingPolygon, EX_GeographicBoundingBox or EX_GeographicDescription).  The whole geographic extent of the orthoimage coverage is affected, including areas where grid points hold nil reason values.</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMetadataPropertyType">
									<sequence minOccurs="0">
										<element ref="gmd:EX_Extent"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="footprint" type="gml:MultiSurfacePropertyType" nillable="true">
						<annotation>
							<documentation>-- Name --
footprint

-- Definition --
Geographic area enclosing valid data of the orthoimage coverage.

-- Description --
NOTE 1 The footprint shall be enclosed in the geographic domain extent that it refines.

NOTE 2 This property is mandatory if the OrthoimageCoverage instance is an aggregation of other OrthoimageCoverage instances or if mosaic elements are provided.</documentation>
						</annotation>
					</element>
					<element name="interpolationType" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Name --
interpolation type

-- Definition --
Mathematical method which shall be used to evaluate a continuous coverage, i.e. determine the values of the coverage at any direct position within the domain of the coverage.

-- Description --
NOTE 1 Nearestneighbor is set as a default value in case where this information is omitted by data producers.

NOTE 2 A continuous grid coverage that uses nearest neighbour interpolation acts as a discrete surface coverage.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="name" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
name

-- Definition --
Free text name of the orthoimage coverage.

-- Description --
NOTE This field is intended to hold a name that a data provider may use in addition to the inspire identifier

EXAMPLE 1 "Orthofoto''s, middenschalig, kleur, provincie Limburg, opname 2011" is the name used by the Flemish Geographic Information Agency (AGIV) to indicate the OrthoImageCoverage Instance holding the orthophotomosaic covering the administrative unit ''provincie Limburg'' at a resolution of 25 cm ''middenschalig'' acquired in the year 2011 ''opname 2011''

EXAMPLE 2  "BDOrtho coverage on Savoie at 50 cm - 2011" could be the name of an OrthoimageCoverage instance corresponding to a subset of the BDOrtho product of IGN France, the orthophoto of the "department" Savoie (an administrative unit) at a resolution of 50 cm.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="string">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="phenomenonTime" type="gml:TimePeriodPropertyType" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
phenomenon time

-- Definition --
Description of the observation/acquisition extent in time.

-- Description --
NOTE 1 This temporal extent refers to the range in time in which the image(s) contributing to the orthoImage coverage has/have been acquired.

NOTE 2 When the acquisition is considered as instantaneous, despite the exposure time, the end date and time can be identical to the begin date and time.

EXAMPLE 1 begin: 2011-10-30 end: 2011-10-30

EXAMPLE 2 begin: 2011-06-07T14:31:02Z end: 2011-06-07T16:10:54Z.</documentation>
						</annotation>
					</element>
					<element name="beginLifespanVersion" type="gml:TimePositionType" nillable="true">
						<annotation>
							<documentation>-- Name --
begin lifespan version

-- Definition --
Temporal position at which this version of the spatial object was inserted or changed in the spatial data set.

-- Description --
NOTE Since this information is not always automatically recorded by a system, but can be captured manually, the provision of the time is not required here. That is the reason why TM_Position was chosen as value type instead of DateTime, which is, however, commonly used in other INSPIRE data specifications.</documentation>
						</annotation>
					</element>
					<element name="endLifespanVersion" type="gml:TimePositionType" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
end lifespan version

-- Definition --
Temporal position at which this version of the spatial object was superseded or retired from the spatial data set.

-- Description --
NOTE Since this information is not always automatically recorded by a system, but can be captured manually, the provision of the time is not required here. That is the reason why TM_Position was chosen as value type instead of DateTime, which is, however, commonly used in other INSPIRE data specifications.</documentation>
						</annotation>
					</element>
					<element name="contributingOrthoimageCoverage" type="oi:OrthoimageAggregationPropertyType" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Reference to the orthoimage coverages that compose an aggregated orthoimage coverage.</documentation>
						</annotation>
					</element>
					<element name="mosaicElement" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Spatial representation of the acquisition time of a mosaicked orthoimage coverage.

-- Description --
NOTE This association shall be used only when the orthoimage coverage is a mosaic.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="oi:MosaicElement"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="OrthoimageCoveragePropertyType">
		<sequence minOccurs="0">
			<element ref="oi:OrthoimageCoverage"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="SingleMosaicElement" type="oi:SingleMosaicElementType" substitutionGroup="oi:MosaicElement">
		<annotation>
			<documentation>-- Name --
single mosaic element

-- Definition --
Mosaic element relating to a single input image.

-- Description --
NOTE The geometry of a single mosaic element corresponds exactly to the contributing area, in the mosaic, of the single input image.</documentation>
		</annotation>
	</element>
	<complexType name="SingleMosaicElementType">
		<complexContent>
			<extension base="oi:MosaicElementType">
				<sequence>
					<element name="imageSourceReference" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
image source reference

-- Definition --
Reference to the input image.

-- Description --
NOTE 1 There is no restriction on the nature of the input image. It can be raw or pre-processed or orthorectified, for instance.

NOTE 2 modelling and delivery of input images lie outside the scope of the present specification.

NOTE 3 Identifiers of the input images should be URIs in the '||'&'||'amp;ldquo;http'||'&'||'amp;rdquo; scheme (See D2.7) though full national or local codes are allowed.

EXAMPLE: http://land.data.gov.uk/id/imagery/2011-5864726.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="string">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="SingleMosaicElementPropertyType">
		<sequence minOccurs="0">
			<element ref="oi:SingleMosaicElement"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="MosaicElement" type="oi:MosaicElementType" abstract="true" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
mosaic element

-- Definition --
Abstract type identifying both the contributing area and the acquisition time of one or several input images used to generate a mosaicked orthoimage coverage.

-- Description --
NOTE The main purpose of this feature type is the provision of a mechanism for describing the spatial distribution of the acquisition dates and times over a mosaicked orthoimage. The acquisition time can be supplied either for each individual input image, or for sets of input images grouped together according to temporal criteria.</documentation>
		</annotation>
	</element>
	<complexType name="MosaicElementType" abstract="true">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
inspire identifier

-- Definition --
External object identifier of the spatial object.

-- Description --
NOTE 1 An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.

NOTE 2 This property should be used to reference indirect MosaicElement instances from Orthoimage instances unambiguously.</documentation>
						</annotation>
					</element>
					<element name="geometry" type="gml:MultiSurfacePropertyType">
						<annotation>
							<documentation>-- Name --
geometry

-- Definition --
Geometric representation spatially delineating the date and time of acquisition of the several input images that contribute to the final mosaic.

-- Description --
NOTE The boundaries of the geometries are commonly based on the seamlines used for the mosaicking process.</documentation>
						</annotation>
					</element>
					<element name="phenomenonTime" type="gml:TimePeriodPropertyType">
						<annotation>
							<documentation>-- Name --
phenomenon time

-- Definition --
Description of the observation/acquisition extent in time of the input image(s).

-- Description --
NOTE 1 This temporal extent refers to the interval of time in wich the input image(s) was/were acquired by the sensor.

NOTE 2 When the acquisition is considered as instantaneous, despite the exposure time, the end date and time can be identical to the begin date and time.

EXAMPLE 1 begin: 2011-10-30 end: 2011-10-30

EXAMPLE 2 begin: 2011-06-07T14:31:02Z end: 2011-06-07T16:10:54Z.</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="MosaicElementPropertyType">
		<sequence minOccurs="0">
			<element ref="oi:MosaicElement"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="AggregatedMosaicElement" type="oi:AggregatedMosaicElementType" substitutionGroup="oi:MosaicElement">
		<annotation>
			<documentation>-- Name --
aggregated mosaic element

-- Definition --
Mosaic element relating to several input images that share the same acquisition time at a given level of definition (e.g. day, month).

-- Description --
NOTE The geometry of an aggregated mosaic element corresponds to the union of the contributing areas, in the mosaic, of several input images.</documentation>
		</annotation>
	</element>
	<complexType name="AggregatedMosaicElementType">
		<complexContent>
			<extension base="oi:MosaicElementType">
				<sequence/>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="AggregatedMosaicElementPropertyType">
		<sequence minOccurs="0">
			<element ref="oi:AggregatedMosaicElement"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="OrthoimageAggregation" type="oi:OrthoimageAggregationType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
orthoimage aggregation

-- Definition --
Geometrical characteristics of the orthoimage aggregation.</documentation>
		</annotation>
	</element>
	<complexType name="OrthoimageAggregationType">
		<sequence>
			<element name="contributingFootprint" type="gml:MultiSurfacePropertyType">
				<annotation>
					<documentation>-- Name --
contributing footprint

-- Definition --
Geometric representation delineating the geographic area of an orthoimage coverage that contributes to the aggregated orthoimage coverage.</documentation>
				</annotation>
			</element>
			<element name="contributingOrthoimageCoverage" type="oi:OrthoimageCoveragePropertyType">
				<annotation>
					<documentation>-- Definition --
Reference to the orthoimage coverages that compose an aggregated orthoimage coverage.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="OrthoimageAggregationPropertyType">
		<sequence>
			<element ref="oi:OrthoimageAggregation"/>
		</sequence>
	</complexType>
</schema>'; 
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 358;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (358, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/omop/2.0/observableproperties.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 358 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as observableproperties_omop_2_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:omop="http://inspire.ec.europa.eu/schemas/omop/2.0" xmlns:sc="http://www.interactive-instruments.de/ShapeChange/AppInfo" targetNamespace="http://inspire.ec.europa.eu/schemas/omop/2.0" elementFormDefault="qualified" version="2.0">
	<annotation>
		<documentation>-- Definition --
Application Schema for Observable Properties</documentation>
	</annotation>
	<import namespace="http://www.interactive-instruments.de/ShapeChange/AppInfo" schemaLocation="http://portele.de/ShapeChangeAppinfo.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="RangeConstraint" type="omop:RangeConstraintType" substitutionGroup="omop:Constraint">
		<annotation>
			<documentation>-- Name --
Range Constraint

-- Definition --
A numerical range constraint on some property e.g.  wavelength '||'&'||'gt;=300nm and wavelength '||'&'||'lt;=600nm

-- Description --
A numerical range constraint on some property e.g. wavelength '||'&'||'gt;=300nm and wavelength '||'&'||'lt;=600nm
e.g. To be used when data is observed in particular bands or groupings based on a numerical quantity.</documentation>
		</annotation>
	</element>
	<complexType name="RangeConstraintType">
		<complexContent>
			<extension base="omop:ConstraintType">
				<sequence>
					<element name="value" type="omop:RangeBoundsPropertyType" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
value

-- Definition --
The numerical value range of the property that is constrained</documentation>
						</annotation>
					</element>
					<element name="uom" type="gml:UnitOfMeasureType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
uom

-- Definition --
Units of measure used in the constraint</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">null:UnitOfMeasure</targetElement>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="RangeConstraintPropertyType">
		<sequence>
			<element ref="omop:RangeConstraint"/>
		</sequence>
	</complexType>
	<simpleType name="ComparisonOperatorValueType">
		<annotation>
			<documentation>-- Name --
ComparisonOperatorValue
-- Definition --
An enumeration of  comparison operators (e.g. greater than)</documentation>
		</annotation>
		<restriction base="string">
			<enumeration value="equalTo">
				<annotation>
					<documentation>-- Name --
equalTo

-- Definition --
Exactly equal to</documentation>
				</annotation>
			</enumeration>
			<enumeration value="notEqualTo">
				<annotation>
					<documentation>-- Name --
notEqualTo

-- Definition --
Not exactly equal to</documentation>
				</annotation>
			</enumeration>
			<enumeration value="lessThan">
				<annotation>
					<documentation>-- Name --
lessThan

-- Definition --
Less than</documentation>
				</annotation>
			</enumeration>
			<enumeration value="greaterThan">
				<annotation>
					<documentation>-- Name --
greaterThan

-- Definition --
Greater Than</documentation>
				</annotation>
			</enumeration>
			<enumeration value="lessThanOrEqualTo">
				<annotation>
					<documentation>-- Name --
lessThanOrEqualTo

-- Definition --
Less than or exactly equal to</documentation>
				</annotation>
			</enumeration>
			<enumeration value="greaterThanOrEqualTo">
				<annotation>
					<documentation>-- Name --
greaterThanOrEqualTo

-- Definition --
Greater than or exactly equal to</documentation>
				</annotation>
			</enumeration>
		</restriction>
	</simpleType>
	<element name="AbstractObservableProperty" type="omop:AbstractObservablePropertyType" abstract="true" substitutionGroup="gml:AbstractGML">
		<annotation>
			<documentation>-- Name --
Abstract Observable Property
-- Definition --
An abstract class that represents an observable property (or phenomenon).
-- Description --
An abstract class that represents an observable property (or phenomenon). This class is intended to be used in the context of ISO 19156 ''observedProperty'' role but may be used in other contexts.</documentation>
		</annotation>
	</element>
	<complexType name="AbstractObservablePropertyType" abstract="true">
		<complexContent>
			<extension base="gml:AbstractGMLType">
				<sequence>
					<element name="label" type="string" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
label

-- Definition --
A human readable title for the observable property</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="AbstractObservablePropertyPropertyType">
		<sequence minOccurs="0">
			<element ref="omop:AbstractObservableProperty"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="StatisticalMeasure" type="omop:StatisticalMeasureType" substitutionGroup="gml:AbstractGML">
		<annotation>
			<documentation>-- Name --
Statistical Measure

-- Definition --
A descripton of some statistical measure e.g. "daily maximum"

-- Description --
A descripton of some statistical measure e.g. "daily maximum"
The measure is usually some function over some time (e.g. an hour, a day)  or space (e.g. a length, area or volume)
Other aggregation types can be supported via the ''otherAggregation'' extension point.</documentation>
		</annotation>
	</element>
	<complexType name="StatisticalMeasureType">
		<complexContent>
			<extension base="gml:AbstractGMLType">
				<sequence>
					<element name="derivedFrom" type="omop:StatisticalMeasurePropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
derived from

-- Definition --
One statistical measure may be derived from another. e.g. Monthly Maximum temperatures may be derived from Daily Mean temperatures.</documentation>
						</annotation>
					</element>
					<element name="statisticalFunction" type="gml:ReferenceType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
statisticalFunction

-- Definition --
A statistical function e.g. (mean)</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">technicalGuidance</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="aggregationTimePeriod" type="duration" minOccurs="0">
						<annotation>
							<documentation>-- Name --
aggregationTimePeriod
-- Definition --
A temporal range over which a statistic is calculated. e.g. A day, An hour.</documentation>
						</annotation>
					</element>
					<element name="aggregationLength" type="gml:LengthType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
aggregationLength
-- Definition --
A one dimensional spatial range over which a statistic is calculated for example 1 metre.</documentation>
						</annotation>
					</element>
					<element name="aggregationArea" type="gml:AreaType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
aggregationArea
-- Definition --
A two dimensional spatial range over which a statistic is calculated for example 1 square metre</documentation>
						</annotation>
					</element>
					<element name="aggregationVolume" type="gml:VolumeType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
aggregationVolume
-- Definition --
A three dimensional spatial range over which a statistic is calculated for example 1 cubic metre</documentation>
						</annotation>
					</element>
					<element name="otherAggregation" minOccurs="0">
						<annotation>
							<documentation>-- Name --
otherAggregation
-- Definition --
Any other type of aggregation.</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="gml:AbstractObject"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="label" type="string" minOccurs="0">
						<annotation>
							<documentation>-- Name --
label

-- Definition --
A human readable title for the statistical measure</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="StatisticalMeasurePropertyType">
		<sequence minOccurs="0">
			<element ref="omop:StatisticalMeasure"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="OtherConstraint" type="omop:OtherConstraintType" substitutionGroup="omop:Constraint">
		<annotation>
			<documentation>-- Name -- 
Other Constraint

-- Definition --
A constraint, not modelled in a structured way, but may be described using the freetext ''description'' attribute.</documentation>
		</annotation>
	</element>
	<complexType name="OtherConstraintType">
		<complexContent>
			<extension base="omop:ConstraintType">
				<sequence>
					<element name="description" type="string">
						<annotation>
							<documentation>-- Name -- 
description

-- Definition --
A description of the constraint.</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="OtherConstraintPropertyType">
		<sequence>
			<element ref="omop:OtherConstraint"/>
		</sequence>
	</complexType>
	<element name="Constraint" type="omop:ConstraintType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
Constraint
-- Definition --
A constraint on some property e.g. wavelength = 200nm.
-- Description --
A constraint on some property e.g. wavelength = 200nm. This property is  typically not the same property as the base phenomenon of the observed property. e.g. 
the observed property has a base phenomenon ''radiance''. 
a constraint is added to say ''wavelength = 200nm''
So the overall ObservableProperty which is represented is ''radiance where wavelength = 200nm''
The Constraint class is specialised into several specific classes covering Scalar, Range and Categorical constraints</documentation>
		</annotation>
	</element>
	<complexType name="ConstraintType">
		<sequence>
			<element name="constrainedProperty" type="gml:ReferenceType" minOccurs="0">
				<annotation>
					<documentation>-- Name --
constrainedProperty

-- Definition --
The property being constrained. e.g. ''colour'' if the constraint is ''colour = blue''</documentation>
					<appinfo>
						<targetElement xmlns="http://www.opengis.net/gml/3.2">omop:PhenomenonTypeValue</targetElement>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">technicalGuidance</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="label" type="string" minOccurs="0">
				<annotation>
					<documentation>-- Name --
description

-- Definition --
A human readable title for the constraint as a whole</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="ConstraintPropertyType">
		<sequence>
			<element ref="omop:Constraint"/>
		</sequence>
	</complexType>
	<element name="CompositeObservableProperty" type="omop:CompositeObservablePropertyType" substitutionGroup="omop:AbstractObservableProperty">
		<annotation>
			<documentation>-- Name --
Composite Observable Property

-- Definition --
A composite of mulitple Observable Properties.

-- Description --
A composite of multiple Observable Properties, for example U,V winds.
There is no requirement that the observable properties in the composite are related to each other. 
A composite observable property  may have components which are observabel properties or other composite observable properties.</documentation>
		</annotation>
	</element>
	<complexType name="CompositeObservablePropertyType">
		<complexContent>
			<extension base="omop:AbstractObservablePropertyType">
				<sequence>
					<element name="count" type="integer">
						<annotation>
							<documentation>-- Name --
count 

-- Definition --
Number of components  in this composite</documentation>
						</annotation>
					</element>
					<element name="component" type="omop:AbstractObservablePropertyPropertyType" minOccurs="2" maxOccurs="unbounded"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="CompositeObservablePropertyPropertyType">
		<sequence minOccurs="0">
			<element ref="omop:CompositeObservableProperty"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="ObservableProperty" type="omop:ObservablePropertyType" substitutionGroup="omop:AbstractObservableProperty">
		<annotation>
			<documentation>-- Name --
Observable Property

-- Definition --
Represents a single observable property e.g. ''temperature''.

-- Description --
The Observable Property represents a single observable property e.g. ''temperature''. It may have associations to additional constraints or measures that make it more complex e.g. ''daily mean temperature''.</documentation>
		</annotation>
	</element>
	<complexType name="ObservablePropertyType">
		<complexContent>
			<extension base="omop:AbstractObservablePropertyType">
				<sequence>
					<element name="restriction" type="omop:ConstraintPropertyType" minOccurs="0" maxOccurs="unbounded"/>
					<element name="basePhenomenon" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Name --
basePhenomenon

-- Definition --
The phenomenon that the Observable Property description builds upon.


-- Description --
The phenomenon that the Observable Property description builds upon. e.g. if the Observable property describes ''monthly minimum temperature'' then the basePhenomenon should reference the vocabulary term ''temperature''.</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">omop:PhenomenonTypeValue</targetElement>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">technicalGuidance</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="uom" type="gml:UnitOfMeasureType" minOccurs="0">
						<annotation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">null:UnitOfMeasure</targetElement>
							</appinfo>
						</annotation>
					</element>
					<element name="statisticalMeasure" minOccurs="0" maxOccurs="unbounded">
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="omop:StatisticalMeasure"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="ObservablePropertyPropertyType">
		<sequence minOccurs="0">
			<element ref="omop:ObservableProperty"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="RangeBounds" type="omop:RangeBoundsType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
Range Bounds

-- Definition --
The start and end bounding values of a numerical range (e.g. start '||'&'||'gt;=50, end '||'&'||'lt;=99)</documentation>
		</annotation>
	</element>
	<complexType name="RangeBoundsType">
		<sequence>
			<element name="startComparison" type="omop:ComparisonOperatorValueType">
				<annotation>
					<documentation>-- Name --
startComparison

-- Definition --
The comparator used for the lower range limit (e.g. greaterThanOrEqualTo)</documentation>
				</annotation>
			</element>
			<element name="rangeStart" type="double">
				<annotation>
					<documentation>-- Name --
rangeStart

-- Definition --
The lower limit of the range.</documentation>
				</annotation>
			</element>
			<element name="endComparison" type="omop:ComparisonOperatorValueType">
				<annotation>
					<documentation>-- Name --
endComparison

-- Definition --
The comparator used for the upper range limit (e.g. lessThan)</documentation>
				</annotation>
			</element>
			<element name="rangeEnd" type="double">
				<annotation>
					<documentation>-- Name --
rangeEnd

-- Definition --
The upper limit of the range.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="RangeBoundsPropertyType">
		<sequence>
			<element ref="omop:RangeBounds"/>
		</sequence>
	</complexType>
	<element name="CategoryConstraint" type="omop:CategoryConstraintType" substitutionGroup="omop:Constraint">
		<annotation>
			<documentation>-- Name --
Category Constraint

-- Definition --
A constraint based on some qualifying category.  e..g  colour = ''Red''.

-- Description --
A constraint based on some qualifying category.  e..g  colour = ''Red''.
The value (''Red'') of the constraint (''colour'') can be any string, although it may be desirable to constrain this in particular application domains.</documentation>
		</annotation>
	</element>
	<complexType name="CategoryConstraintType">
		<complexContent>
			<extension base="omop:ConstraintType">
				<sequence>
					<element name="comparison" type="omop:ComparisonOperatorValueType">
						<annotation>
							<documentation>-- Name --
comparison

-- Definition --
A comparison operator. In the case of a category constraint it should be ''equalTo'' or ''notEqualTo''.</documentation>
						</annotation>
					</element>
					<element name="value" type="string" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
value

-- Definition --
The value of the property that is constrained e.g. ''blue'' (if the constrained property is colour)</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="CategoryConstraintPropertyType">
		<sequence>
			<element ref="omop:CategoryConstraint"/>
		</sequence>
	</complexType>
	<element name="ScalarConstraint" type="omop:ScalarConstraintType" substitutionGroup="omop:Constraint">
		<annotation>
			<documentation>-- Name --
Scalar Constraint
-- Definition --
A numerical scalar constraint on some property e.g. length '||'&'||'gt;= 1m
-- Description --
A scalar constraint on some property e.g. length '||'&'||'gt;= 1m</documentation>
		</annotation>
	</element>
	<complexType name="ScalarConstraintType">
		<complexContent>
			<extension base="omop:ConstraintType">
				<sequence>
					<element name="value" type="double" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
value

-- Definition --
The numerical value of the property that is constrained</documentation>
						</annotation>
					</element>
					<element name="comparison" type="omop:ComparisonOperatorValueType">
						<annotation>
							<documentation>-- Name --
comparison

-- Definition --
The comparator to be used in the constraint e.g. greaterThan</documentation>
						</annotation>
					</element>
					<element name="uom" type="gml:UnitOfMeasureType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
uom

-- Definition --
Units of measure used in the constraint</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">null:UnitOfMeasure</targetElement>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="ScalarConstraintPropertyType">
		<sequence>
			<element ref="omop:ScalarConstraint"/>
		</sequence>
	</complexType>
</schema>'; 
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 359;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (359, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/omor/2.0/observationreferences.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 359 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as observationreferences_omor_2_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:om="http://www.opengis.net/om/2.0" xmlns:omor="http://inspire.ec.europa.eu/schemas/omor/2.0" targetNamespace="http://inspire.ec.europa.eu/schemas/omor/2.0" elementFormDefault="qualified" version="2.0">
	<annotation>
		<documentation>-- Definition --
Application Schema for Observation References</documentation>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/base/3.3" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd"/>
	<import namespace="http://www.isotc211.org/2005/gmd" schemaLocation="http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<import namespace="http://www.opengis.net/om/2.0" schemaLocation="http://schemas.opengis.net/om/2.0/observation.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="ObservationSet" type="omor:ObservationSetType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
ObservationSet

-- Definition --
Links a set of Observations

-- Description --
This class is used to link multiple related Observations together</documentation>
		</annotation>
	</element>
	<complexType name="ObservationSetType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Name --
inspireId

-- Definition --
External object identifier of the spatial object.

-- Description --</documentation>
						</annotation>
					</element>
					<element name="extent">
						<annotation>
							<documentation>-- Name --
extent

-- Definition --
Information about the spatial and temporal extent.</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMetadataPropertyType">
									<sequence minOccurs="0">
										<element ref="gmd:EX_Extent"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="member" type="om:OM_ObservationPropertyType" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
member
-- Definition --
One member of the ObservationSet</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="ObservationSetPropertyType">
		<sequence minOccurs="0">
			<element ref="omor:ObservationSet"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
</schema>'; 
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 360;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (360, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/ompr/2.0/processes.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 360 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as processes_ompr_2_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:base2="http://inspire.ec.europa.eu/schemas/base2/1.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:ompr="http://inspire.ec.europa.eu/schemas/ompr/2.0" xmlns:sc="http://www.interactive-instruments.de/ShapeChange/AppInfo" targetNamespace="http://inspire.ec.europa.eu/schemas/ompr/2.0" elementFormDefault="qualified" version="2.0r">
	<annotation>
		<documentation>-- Definition --
Application Schema for Processes</documentation>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/base/3.3" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/base2/1.0" schemaLocation="http://inspire.ec.europa.eu/schemas/base2/1.0/BaseTypes2.xsd"/>
	<import namespace="http://www.interactive-instruments.de/ShapeChange/AppInfo" schemaLocation="http://portele.de/ShapeChangeAppinfo.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="Process" type="ompr:ProcessType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
Process

-- Definition --
Description of an observation process</documentation>
		</annotation>
	</element>
	<complexType name="ProcessType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" nillable="true">
						<annotation>
							<documentation>-- Name --
inspireId

-- Definition --
External object identifier of the spatial object.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="base:Identifier"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="name" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
name

-- Definition --
Name of the Process</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="string">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="type" nillable="true">
						<annotation>
							<documentation>-- Name --
type

-- Definition --
Type of process.

-- Description --
EXAMPLE raingauge, numerical model.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="string">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="documentation" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
documentation

-- Definition --
Further information ( online/offline) associated with the  process .</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="base2:DocumentCitation"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="processParameter" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
process parameter

-- Definition --
Parameter controlling the application of the process and as a consequence its output.

-- Description --
Typical examples of using processParameter are: description of  instrumentation settings for a specific measurement or measurement series ; description of intial contidions in  numerical computations e.g. simulations.  

NOTE   The  values of a procesParameter are stored in  OM_Observation.parameter'||'&'||'gt;NamedValue.value as they are specific to the event of the observation  and not to the  applied process .  The relevant OM_Observation.parameter'||'&'||'gt;NamedValue.name shall be the same with Process.processParameter'||'&'||'gt;ProcessParameter.name.

EXAMPLE  Analysis time of a forecast
'||'&'||'lt;ul'||'&'||'gt;
	'||'&'||'lt;li'||'&'||'gt;Instance of Process'||'&'||'lt;/li'||'&'||'gt;
'||'&'||'lt;/ul'||'&'||'gt;
Process.processParameter'||'&'||'gt;ProcessParameter.name:
'||'&'||'lt;i'||'&'||'gt;http://inspire.jrc.ec.europa.eu/inspire/processParameterValue.html#AnalysisTime'||'&'||'lt;/i'||'&'||'gt;
'||'&'||'lt;ul'||'&'||'gt;
	'||'&'||'lt;li'||'&'||'gt;Instance of OM_Observation'||'&'||'lt;/li'||'&'||'gt;
'||'&'||'lt;/ul'||'&'||'gt;
OM_OObservation.parameter'||'&'||'gt;NamedValue.name:
'||'&'||'lt;i'||'&'||'gt;http://inspire.jrc.ec.europa.eu/inspire/processParameterValue.html#AnalysisTime'||'&'||'lt;/i'||'&'||'gt;
OM_Observation.parameter'||'&'||'gt;NamedValue.value:
'||'&'||'lt;i'||'&'||'gt;00z-15/05/2011'||'&'||'lt;/i'||'&'||'gt;</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="ompr:ProcessParameter"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="responsibleParty" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
responsible party

-- Definition --
Individual or organisation related to the process.

-- Description --
EXAMPLE For a numerical simulation a responsible party may be the NWP centre which conducted the simulation</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="base2:RelatedParty"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="ProcessPropertyType">
		<sequence minOccurs="0">
			<element ref="ompr:Process"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="ProcessParameter" type="ompr:ProcessParameterType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
Process Parameter

-- Definition --
Description of the given parameter</documentation>
		</annotation>
	</element>
	<complexType name="ProcessParameterType">
		<sequence>
			<element name="name" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Name --
name

-- Definition --
Name of the process parameter.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">technicalGuidance</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="description" type="string" minOccurs="0">
				<annotation>
					<documentation>-- Name --
description

-- Definition --
Description of the process parameter.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="ProcessParameterPropertyType">
		<sequence>
			<element ref="ompr:ProcessParameter"/>
		</sequence>
	</complexType>
</schema>'; 
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 361;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (361, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/omso/2.0/specialisedobservations.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 361 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as specialisedobservations_omso_2_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:om="http://www.opengis.net/om/2.0" xmlns:omor="http://inspire.ec.europa.eu/schemas/omor/2.0" xmlns:omso="http://inspire.ec.europa.eu/schemas/omso/2.0" xmlns:wml2="http://www.opengis.net/waterml/2.0" targetNamespace="http://inspire.ec.europa.eu/schemas/omso/2.0" elementFormDefault="qualified" version="2.0">
	<annotation>
		<documentation>-- Definition --
Application schema for specialist types of Observations</documentation>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/omor/2.0" schemaLocation="http://inspire.ec.europa.eu/schemas/omor/2.0/ObservationReferences.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<import namespace="http://www.opengis.net/om/2.0" schemaLocation="http://schemas.opengis.net/om/2.0/observation.xsd"/>
	<import namespace="http://www.opengis.net/waterml/2.0" schemaLocation="http://inspire.ec.europa.eu/draft-schemas/waterml/2.0rfc/waterml2.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="ProfileObservation" type="omso:ProfileObservationType" substitutionGroup="om:OM_Observation">
		<annotation>
			<documentation>-- Name --
ProfileObservation

-- Definition --
Observation representing  the measurement of a property along a vertical profile in space at a single time instant.

-- Description --
A ProfileObservatation is an Observation representing  the measurement of a property along a vertical profice in space at a single time instant. For example a CTD profile measuring salinty at different depths in the ocean.</documentation>
		</annotation>
	</element>
	<complexType name="ProfileObservationType">
		<complexContent>
			<extension base="om:OM_ObservationType">
				<sequence/>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="ProfileObservationPropertyType">
		<sequence minOccurs="0">
			<element ref="omso:ProfileObservation"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="TimeLocationValueTriple" type="omso:TimeLocationValueTripleType" substitutionGroup="wml2:TimeValuePair">
		<annotation>
			<documentation>-- Name --
TimeLocationValue Triple

-- Definition --
A triple set of Time, location, value (measurement). For example, at a point along a trajectory.</documentation>
		</annotation>
	</element>
	<complexType name="TimeLocationValueTripleType">
		<complexContent>
			<extension base="wml2:TimeValuePairType">
				<sequence>
					<element name="location" type="gml:PointPropertyType">
						<annotation>
							<documentation>-- Name --
location

-- Definition --
Geographic location where value is valid.</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="TimeLocationValueTriplePropertyType">
		<sequence>
			<element ref="omso:TimeLocationValueTriple"/>
		</sequence>
	</complexType>
	<element name="GridObservation" type="omso:GridObservationType" substitutionGroup="om:OM_Observation">
		<annotation>
			<documentation>-- Name --
GridObservation

-- Definition --
Observation representing a gridded field at a single time instant.
-- Description --
A GridObservation is an observation of some phenomenon (or phenomena) over a gridded field. E.g. Output from a model, or rectified, georeferenced satellite data.
The result of a GridObservation is a discrete coverage within a compound spatiotemporal CRS where the domain consists of a two- or three-dimensional grid of points, all having the same time instant temporal component.</documentation>
		</annotation>
	</element>
	<complexType name="GridObservationType">
		<complexContent>
			<extension base="om:OM_ObservationType">
				<sequence/>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="GridObservationPropertyType">
		<sequence minOccurs="0">
			<element ref="omso:GridObservation"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="GridSeriesObservation" type="omso:GridSeriesObservationType" substitutionGroup="om:OM_Observation">
		<annotation>
			<documentation>-- Name --
GridSeriesObservation

-- Definition --
Observation representing an evolving gridded field at a succession of time instants.
-- Description --
A GridSeriesObservation is a time series of gridded fields representing the same phenomenon (or phenomena) over a series of times. E.g. Ocean model output.
The result of a GridSeriesObservation is a discrete coverage within a compound spatiotemporal CRS where the domain consists of a series of two- or three-dimensional grids of points, each at a successive time instant.</documentation>
		</annotation>
	</element>
	<complexType name="GridSeriesObservationType">
		<complexContent>
			<extension base="om:OM_ObservationType">
				<sequence/>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="GridSeriesObservationPropertyType">
		<sequence minOccurs="0">
			<element ref="omso:GridSeriesObservation"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="PointObservation" type="omso:PointObservationType" substitutionGroup="om:OM_Observation">
		<annotation>
			<documentation>-- Name --
Point Observation
-- Definition --
Observation that represents a measurement of a property at a single point in time and space.
-- Description --
The PointObservation represents a single measurement or estimation of a property at a single point in time and space. For example a single temperture measurement at a fixed weather station.</documentation>
		</annotation>
	</element>
	<complexType name="PointObservationType">
		<complexContent>
			<extension base="om:OM_ObservationType">
				<sequence/>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="PointObservationPropertyType">
		<sequence minOccurs="0">
			<element ref="omso:PointObservation"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="MultiPointObservation" type="omso:MultiPointObservationType" substitutionGroup="om:OM_Observation">
		<annotation>
			<documentation>-- Name --
MultiPointObservation 
-- Definition --
Observation that represents a set of measurements all made at exactly the same time but at different locations
-- Description --
The MultiPointObservation is an Observation that represents a set of measurements all made at exactly the same time but at different locations, for example a distributed sensor network reporting the temperature at 10am. The result of this observation is a MultiPointCoverage.</documentation>
		</annotation>
	</element>
	<complexType name="MultiPointObservationType">
		<complexContent>
			<extension base="om:OM_ObservationType">
				<sequence/>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="MultiPointObservationPropertyType">
		<sequence minOccurs="0">
			<element ref="omso:MultiPointObservation"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="PointTimeSeriesObservation" type="omso:PointTimeSeriesObservationType" substitutionGroup="om:OM_Observation">
		<annotation>
			<documentation>-- Name --
PointTimeSeriesObservation 
-- Definition --
Observation that represents a time-series of point measurements of a property at a fixed location in space
-- Description --
A PointTimeSeriesObservation is a time series of observations made at the same fixed spatial location e.g. Measurements made repeatedly by a fixed monitoring instrument.</documentation>
		</annotation>
	</element>
	<complexType name="PointTimeSeriesObservationType">
		<complexContent>
			<extension base="om:OM_ObservationType">
				<sequence/>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="PointTimeSeriesObservationPropertyType">
		<sequence minOccurs="0">
			<element ref="omso:PointTimeSeriesObservation"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="PointObservationCollection" type="omso:PointObservationCollectionType" substitutionGroup="omor:ObservationSet">
		<annotation>
			<documentation>-- Name --
PointObservationCollection
-- Definition --
A collection of Point Observations.
-- Description --
The PointObservationCollection is a collection of separate PointObservations. In the case where it is useful to group together a set of otherwise independent PointObservations the PointObservationCollection should be used to make this grouping. The grouping may be made on any basis e.g. it may be useful to group together PointObservations made by the same instrument or Environmental Facility, or in a particular measurement campaign. Each member of the PointObservationCollection must be a single PointObservation.</documentation>
		</annotation>
	</element>
	<complexType name="PointObservationCollectionType">
		<complexContent>
			<extension base="omor:ObservationSetType">
				<sequence/>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="PointObservationCollectionPropertyType">
		<sequence minOccurs="0">
			<element ref="omso:PointObservationCollection"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="TrajectoryObservation" type="omso:TrajectoryObservationType" substitutionGroup="om:OM_Observation">
		<annotation>
			<documentation>-- Name --
TrajectoryObservation

-- Definition --
Observation representing  the measurement of a property along a meandering curve in time and space.

-- Description --
A TrajectoryObservatation is an Observation representing  the measurement of a property along a meandering curve in time and space. For example a Pollutant concentration from a mobile air quality sensor.</documentation>
		</annotation>
	</element>
	<complexType name="TrajectoryObservationType">
		<complexContent>
			<extension base="om:OM_ObservationType">
				<sequence/>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="TrajectoryObservationPropertyType">
		<sequence minOccurs="0">
			<element ref="omso:TrajectoryObservation"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 362;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (362, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/pd/3.0/populationdistributiondemography.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 362 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as populationdistributiondemography_pd_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:base2="http://inspire.ec.europa.eu/schemas/base2/1.0" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:pd="http://inspire.ec.europa.eu/schemas/pd/3.0" xmlns:sc="http://www.interactive-instruments.de/ShapeChange/AppInfo" xmlns:su-core="http://inspire.ec.europa.eu/schemas/su-core/3.0" targetNamespace="http://inspire.ec.europa.eu/schemas/pd/3.0" elementFormDefault="qualified" version="3.0">
	<annotation>
		<documentation>-- Name --
Population distribution - demography</documentation>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/base/3.3" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/base2/1.0" schemaLocation="http://inspire.ec.europa.eu/schemas/base2/1.0/BaseTypes2.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/su-core/3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/su-core/3.0/StatisticalUnitCore.xsd"/>
	<import namespace="http://www.interactive-instruments.de/ShapeChange/AppInfo" schemaLocation="http://portele.de/ShapeChangeAppinfo.xsd"/>
	<import namespace="http://www.isotc211.org/2005/gmd" schemaLocation="http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="StatisticalValue" type="pd:StatisticalValueType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
Statistical value

-- Definition --
The pieces of datum of the distribution.</documentation>
		</annotation>
	</element>
	<complexType name="StatisticalValueType">
		<sequence>
			<element name="value" type="double" minOccurs="0">
				<annotation>
					<documentation>-- Name --
Value

-- Definition --
The value for the piece of datum.</documentation>
				</annotation>
			</element>
			<element name="specialValue" type="gml:ReferenceType" minOccurs="0">
				<annotation>
					<documentation>-- Name --
Special value

-- Definition --
Some conventional string when value for the piece of datum cannot be provided: missing value, value hidden because of confidentiality.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="conventionallyLocatedProportion" type="double" minOccurs="0">
				<annotation>
					<documentation>-- Name --
Conventionally located proportion

-- Definition --
The proportion of population counted in the piece of datum but that cannot actually be physically located anywhere within the area of interest.

EXAMPLE: This proportion will include homeless people who where given the address of the organisation that distributes social benefis to them.</documentation>
				</annotation>
			</element>
			<element name="approximatelyLocatedPopulationProportion" type="double" minOccurs="0">
				<annotation>
					<documentation>-- Name --
Approximately located proportion

-- Definition --
The proportion of population count that doesn'||'&'||'amp;rsquo;t follow the common rule for location. '||'&'||'amp;ldquo;Population'||'&'||'amp;rdquo; can be persons if persons are counted, dwellings if the StatisticalDatadistribution is about dwellings, etc.

EXAMPLE : A statistical distribution of the people is supposed to have been produced after the people were located in the cadastral parcel they live in. For some incorrectness in the registers used, the actual location of the cadastral parcel was not found fro some of them and an estimated location was computed. The number of people in this case must be reported in the attribute.</documentation>
				</annotation>
			</element>
			<element name="comment" type="gmd:PT_FreeText_PropertyType" minOccurs="0">
				<annotation>
					<documentation>-- Name --
Comment

-- Definition --
Free style comment about the value.</documentation>
				</annotation>
			</element>
			<element name="flags" type="gmd:PT_FreeText_PropertyType" minOccurs="0">
				<annotation>
					<documentation>-- Name --
Flags

-- Definition --
A set of one-character encoded comments about the data.</documentation>
				</annotation>
			</element>
			<element name="periodOfMeasurement" type="gml:TimePeriodPropertyType" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Name --
Period of measurement

-- Definition --
The collection period of the statistical value. This period overrides the period specified in the associated statistical distribution.</documentation>
				</annotation>
			</element>
			<element name="status" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Name --
Status

-- Definition --
The status of the statistical data.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="dimensions" type="pd:DimensionsPropertyType">
				<annotation>
					<documentation>-- Name --
Dimensions

-- Definition --
The part of the world the piece of datum refers to. Dimensions contains a description of the geographic location (2D dimension) together with possible additional dimensions when population counts are produced simultaneously for different individual characteristics.

EXAMPLE: A simple population count for each part of the area of Dissemination will need only identification of these parts, while population count by gender will require and additional dimension (gender) to make a difference between the male and the female.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="StatisticalValuePropertyType">
		<sequence>
			<element ref="pd:StatisticalValue"/>
		</sequence>
	</complexType>
	<element name="StatisticalDistribution" type="pd:StatisticalDistributionType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
Statistical distribution

-- Definition --
Set of measures describing how a phenomenon is spread within some part of the 2D world.</documentation>
		</annotation>
	</element>
	<complexType name="StatisticalDistributionType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
INSPIRE identifier

-- Definition --
External object identifier of the spatial object.

-- Description --
An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="areaOfDissemination" type="gml:SurfacePropertyType">
						<annotation>
							<documentation>-- Name --
Area of dissemination

-- Definition --
The part of the 2D world the StatisticalDataDistribution describes.</documentation>
						</annotation>
					</element>
					<element name="universe" type="gmd:PT_FreeText_PropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
Universe

-- Definition --
When distribution is related to a subset of the population and not the population in its whole, the literal description of the way this subset was defined.

EXAMPLE : A dataset can give the population distribution of the unemployed persons under 25. The variable will be '||'&'||'amp;ldquo;unemployedPopulation'||'&'||'amp;rdquo;, the measure a '||'&'||'amp;ldquo;count '||'&'||'amp;ldquo; and the measurementUnit '||'&'||'amp;ldquo;person'||'&'||'amp;rdquo;. The only way to express that the distribution doesn'||'&'||'amp;rsquo;t cover the whole unemployed population would be to describe that situation in the Unviverse attribute.</documentation>
						</annotation>
					</element>
					<element name="domain" type="gmd:PT_FreeText_PropertyType">
						<annotation>
							<documentation>-- Name --
Domain

-- Definition --
The part of statistical knowledge the data refers to.

-- Description --
EXAMPLES: Demography, activity, etc.</documentation>
						</annotation>
					</element>
					<element name="measure" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Name --
Measure

-- Definition --
The measure concerned by the distribution.

-- Description --
EXAMPLE: Population by age and gender, households by size, etc.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">technicalGuidance</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="measurementMethod" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Name --
Measurement method

-- Definition --
The description of the statistic measurement method.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="measurementUnit" type="gml:UnitOfMeasureType">
						<annotation>
							<documentation>-- Name --
Measurement unit

-- Definition --
The unit of the measurement.</documentation>
						</annotation>
					</element>
					<element name="notCountedProportion" type="double" minOccurs="0">
						<annotation>
							<documentation>-- Name --
Not counted proportion

-- Definition --
The proportion of population of the area of interest that is not counted in any of its spatial components.

-- Description --
EXAMPLE: This situation can occur when the total population of the area of interest is collected by some process (e.g. administrative register) but population in the spatial components of the area of interest by another process (e.g. estimation).</documentation>
						</annotation>
					</element>
					<element name="periodOfMeasurement" type="gml:TimePeriodPropertyType">
						<annotation>
							<documentation>-- Name --
Period of measurement

-- Definition --
The date or period the observation has been taken, the data was collected.</documentation>
						</annotation>
					</element>
					<element name="periodOfReference" type="gml:TimePeriodPropertyType">
						<annotation>
							<documentation>-- Name --
Period of reference

-- Definition --
The period when the data is supposed to give a picture of the area of interest.</documentation>
						</annotation>
					</element>
					<element name="periodOfValidity" type="gml:TimePeriodPropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
Period of validity

-- Definition --
The period in which the data remains relevant.

-- Description --
Outside this period the data will not be used and must be replaced by new data. In most cases this is forever and the 2nd date is left empty.</documentation>
						</annotation>
					</element>
					<element name="beginLifeSpanVersion" nillable="true">
						<annotation>
							<documentation>-- Name --
Begin life span version

-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="endLifeSpanVersion" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
End life span version

-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="generalStatus" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Name --
general status

-- Definition --
The status of the statistical data distribution.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="value" type="pd:StatisticalValuePropertyType" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
Value

-- Definition --
The statistical values composing the distribution.</documentation>
						</annotation>
					</element>
					<element name="classification" type="pd:ClassificationPropertyType" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
Classification

-- Definition --
Additional classifications used to split a total value of the described phenomenon. The StatisticalDistribution object will provide actually several distributions, one for each item of the used classification.

NB: When no classification is provided, the statistical value is the total population.</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="StatisticalDistributionPropertyType">
		<sequence minOccurs="0">
			<element ref="pd:StatisticalDistribution"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="ClassificationItem" type="pd:ClassificationItemType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
Classification item

-- Definition --
An item composing a classification.

-- Description --
EXAMPLE: The classification with a type "gender" is composed of the items "female", "male" and "unknown".</documentation>
		</annotation>
	</element>
	<complexType name="ClassificationItemType">
		<sequence>
			<element name="type" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Name --
Type

-- Definition --
The classification item type.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
					</appinfo>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="ClassificationItemPropertyType">
		<sequence>
			<element ref="pd:ClassificationItem"/>
		</sequence>
	</complexType>
	<element name="Classification" type="pd:ClassificationType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
Classification

-- Definition --
A classification used for a statistical distribution.

-- Description --
This code list describes the classification of the provided statistical values. It is the composition of the classification items.</documentation>
		</annotation>
	</element>
	<complexType name="ClassificationType">
		<sequence>
			<element name="type" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Name --
Type

-- Definition --
The classification type.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="item" type="pd:ClassificationItemPropertyType" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Name --
Item

-- Definition --
The items composing the classification.

-- Description --
EXAMPLE: The classification with a type "gender" is composed of the items "female", "male" and "unknown".</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="ClassificationPropertyType">
		<sequence>
			<element ref="pd:Classification"/>
		</sequence>
	</complexType>
	<element name="Dimensions" type="pd:DimensionsType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
Dimensions

-- Definition --
The identification of what the piece of datum refers to in terms of geographic location or individual characteristics.</documentation>
		</annotation>
	</element>
	<complexType name="DimensionsType">
		<sequence>
			<element name="spatial" type="su-core:StatisticalUnitPropertyType">
				<annotation>
					<documentation>-- Name --
Spatial

-- Definition --
The spatial dimension of the statistical value.</documentation>
				</annotation>
			</element>
			<element name="thematic" type="pd:ClassificationItemPropertyType" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Name --
Thematic

-- Definition --
The thematic dimensions of the statistical value.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="DimensionsPropertyType">
		<sequence>
			<element ref="pd:Dimensions"/>
		</sequence>
	</complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 363;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (363, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/pf/3.0/productionandindustrialfacilities.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 363 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as productionandindustrialfacilities_pf_3_0.xsd
    -- Needed to separate this xsd into two pieces due to its size>32767.
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:act-core="http://inspire.ec.europa.eu/schemas/act-core/3.0" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:base2="http://inspire.ec.europa.eu/schemas/base2/1.0" xmlns:bu-base="http://inspire.ec.europa.eu/schemas/bu-base/3.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:pf="http://inspire.ec.europa.eu/schemas/pf/3.0" xmlns:sc="http://www.interactive-instruments.de/ShapeChange/AppInfo" targetNamespace="http://inspire.ec.europa.eu/schemas/pf/3.0" elementFormDefault="qualified" version="3.0">
	<annotation>
		<documentation>-- Name --
Production And Industrial Facilities - Core</documentation>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/bu-base/3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/bu-base/3.0/BuildingsBase.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/act-core/3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/act-core/3.0/ActivityComplex_Core.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/base/3.3" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/base2/1.0" schemaLocation="http://inspire.ec.europa.eu/schemas/base2/1.0/BaseTypes2.xsd"/>
	<import namespace="http://www.interactive-instruments.de/ShapeChange/AppInfo" schemaLocation="http://portele.de/ShapeChangeAppinfo.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="TypeOfProductionBuildingValue" type="pf:TypeOfProductionBuildingValueType" substitutionGroup="gml:AbstractGML">
		<annotation>
			<appinfo>
				<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="extensibility">any</taggedValue>
				<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="vocabulary">http://inspire.ec.europa.eu/code List/TypeOfProductionBuildingType</taggedValue>
			</appinfo>
		</annotation>
	</element>
	<complexType name="TypeOfProductionBuildingValueType">
		<complexContent>
			<extension base="gml:AbstractGMLType">
				<sequence/>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="TypeOfProductionBuildingValuePropertyType">
		<sequence minOccurs="0">
			<element ref="pf:TypeOfProductionBuildingValue"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="ProductionInstallationPart" type="pf:ProductionInstallationPartType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
production installation part

-- Definition --
A single engineered facility that performs specific functionalities related with a production activity.

--Description --

This level of description covers specific parts of the Production Installation which must be registered by the legal mandate of the competent authorities. Points of emission as chimneys (for pollutants) or tanks (for special products), will be included in this definition.</documentation>
		</annotation>
	</element>
	<complexType name="ProductionInstallationPartType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Definition --
External object identifier of the spatial object.

-- Description --
NOTE  An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="thematicId" type="base2:ThematicIdentifierPropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Thematic object identifier (e.g. ICAO location identifiers for airports or NUTS codes for administrative areas).

-- Description --
It may be the identification code provided by the Member States to identify the object on their own databases.</documentation>
						</annotation>
					</element>
					<element name="pointGeometry" type="gml:PointPropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Spatial property of the spatial object with a value that is a vector geometry type from ISO 19107.

-- Description --
This is the basic geometry property for the Production Installation Part and it is set as an optional property to identify the location point for the Installation Part. It is intended, if available, to furnish an additional spatial information beside the basic mandatory geometry fixed for the Production Facility.</documentation>
						</annotation>
					</element>
					<element name="surfaceGeometry" type="gml:SurfacePropertyType" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Spatial property of the spatial object with a value that is a vector geometry type from ISO 19107.

-- Description --
This is the secondary geometry property for the Production Installation Part and it is set as an optional property to identify the location area for the Installation Part. It is intended, if available, to furnish a detailed spatial information beside the basic mandatory geometry fixed for the Production Facility.</documentation>
						</annotation>
					</element>
					<element name="name" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Official denomination or proper or conventional name of the installation part.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="string">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="description" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Descriptive statement about the installation part.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="string">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="status" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
The state or condition of the installation part, with regard to the functional and operational order, in which it is arranged for a limited or extended time period.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="pf:StatusType"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="type" nillable="true">
						<annotation>
							<documentation>-- Definition --
Special kind of an installation part, denoting the operative function which has to be performed.

-- Description --
EXAMPLE  Chimney, pump.</documentation>
						</annotation>
					</element>
					<element name="technique" type="gml:ReferenceType" nillable="true">
						<annotation>
							<documentation>-- Definition --
Method to reduce pollutant concentration due to the emissions of a technical component, tipically a chimney.

-- Description --
This information is referring to a list of predefined potential values.
The reference values are holded in the PollutionAbatementTechnique code list.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">IR</taggedValue>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="ProductionInstallationPartPropertyType">
		<sequence minOccurs="0">
			<element ref="pf:ProductionInstallationPart"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="StatusType" type="pf:StatusTypeType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Definition --
The state or condition of a technical component, with regard to the functional and operational order, in which it is arranged for a limited or extended time period.

-- Description --
It applies equally to the technical unit (facility, installation or installation part), to the production site, to the parcel and to the production building.</documentation>
		</annotation>
	</element>
	<complexType name="StatusTypeType">
		<sequence>
			<element name="statusType" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Definition --
The state or condition of a technical component referring to a list of predefined potential values.

-- Description --
The reference values are holded in the ConditionOfFacilityValue code list.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">IR</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="description" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Definition --
Descriptive statement about the declared status.</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="string">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
			<element name="validFrom" nillable="true">
				<annotation>
					<documentation>-- Definition --
The starting time of validity for a status type.

-- Description --
A date gives values for year, month and day.</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="date">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
			<element name="validTo" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Definition --
The ending time of validity for a status type.

-- Description --
A date gives values for year, month and day.</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="date">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
		</sequence>
	</complexType>
	<complexType name="StatusTypePropertyType">
		<sequence>
			<element ref="pf:StatusType"/>
		</sequence>
	</complexType>
	<element name="ProductionFacility" type="pf:ProductionFacilityType" substitutionGroup="act-core:ActivityComplex">
		<annotation>
			<documentation>-- Name --
production facility

-- Definition --

One or more installations on the same site operated by the same natural or legal person,
designed, built or installed to serve specific production or industrial purposes, comprehending
all infrastructure, equipment and materials.

-- Description --
A production facility groups together a single installation, set of installations or production processes (stationary or mobile), which can be defined within a single geographical boundary, organizational unit or production process. A production facility can also be identified as one or more installations located on the same site that are operated by the same natural or legal person and in which production activities are being carried out. Such a facility groups potentially the land, buildings, and equipment used in carrying on an industrial business or other undertaking or service.</documentation>
		</annotation>
	</element>
	<complexType name="ProductionFacilityType">
		<complexContent>
			<extension base="act-core:ActivityComplexType">
				<sequence>
					<element name="surfaceGeometry" type="gml:SurfacePropertyType" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Spatial property of the spatial object with a value that is a vector geometry type from ISO 19107.

-- Description --
This is the secondary geometry property for the Production Facility and it is set as an optional property to identify the location area for the Facility. It is intended, if available, to furnish a more detailed spatial information in addition to the basic mandatory geometry.</documentation>
						</annotation>
					</element>
					<element name="riverBasinDistrict" minOccurs="0">
						<annotation>
							<documentation>-- Definition -- 
Code identifier and/or name assigned to the basin district of a watercourse. 

-- Description --
NOTE  Information required (not registered in the Hydrography Theme) according to Article 3(1) of Directive 2000/60/EC of the European Parliament and of the Council of 23 October 2000 establishing
a framework for Community action in the field of water policy (OJ L 327, 22.12.2000, p. 1). Directive as amended by Decision
No 2455/2001/EC (OJ L 331, 15.12.2001, p. 1).</documentation>
						</annotation>
					</element>
					<element name="status" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
The state or condition of the facility, with regard to the functional and operational order, in which it is arranged for a limited or extended time period.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="pf:StatusType"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="groupedPlot" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>A Plot is grouped by one or more Facilities (this means a Plot may be shared by different Facilities)</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="pf:ProductionPlot"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="hostingSite" nillable="true" minOccurs="0">
						<annotation>
							<documentation>A Site hosts one or more Facilities</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="pf:ProductionSite"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
					<element name="groupedInstallation" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>An Installation is grouped by one Facility</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="pf:ProductionInstallation"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="groupedBuilding" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="pf:ProductionBuilding"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="ProductionFacilityPropertyType">
		<sequence minOccurs="0">
			<element ref="pf:ProductionFacility"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="ProductionBuilding" type="pf:ProductionBuildingType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
production building

-- Definition --
Artificial construction, part of the production facility that are useful to host or provide shelter to activity development.

-- Description --
Inside a facility, and in relation with the definition of building, this entity should represent a construction under responsibility of the facility, either as an independent unit or as a functional infrastructure for an installation.</documentation>
		</annotation>
	</element>
	<complexType name="ProductionBuildingType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="thematicId" type="base2:ThematicIdentifierPropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Thematic object identifier (e.g. ICAO location identifiers for airports or NUTS codes for administrative areas).

-- Description --
It may be the identification code provided by the Member States to identify the object on their own databases.</documentation>
						</annotation>
					</element>';
            
        
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    
    pos := pos + amt;
    buf :=        
'					<element name="typeOfBuilding" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition -- 
Descriptive classification about the production and industrial building.</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="pf:TypeOfProductionBuildingValue"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="status" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
The state or condition of the production and industrial building, with regard to the functional and operational order, in which it is arranged for a limited or extended time period.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="pf:StatusType"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="geometry" type="gml:GeometryPropertyType" nillable="true" minOccurs="0"/>
					<element name="building" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<complexType>
							<sequence minOccurs="0">
								<element ref="bu-base:AbstractBuilding"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="ProductionBuildingPropertyType">
		<sequence minOccurs="0">
			<element ref="pf:ProductionBuilding"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="ProductionPlot" type="pf:ProductionPlotType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
Production Plot

-- Definition --
A portion of land or water part of a production facility destined to functional purposes.
-- Description --
A potential sub-division of a major site as delimited extension of land in which are performed extensive operations related with the activity or one of the activities performed by a facility.</documentation>
		</annotation>
	</element>
	<complexType name="ProductionPlotType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Definition --
External object identifier of the spatial object.

-- Description --
NOTE  An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="thematicId" type="base2:ThematicIdentifierPropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Thematic object identifier (e.g. ICAO location identifiers for airports or NUTS codes for administrative areas).

-- Description --
It may be the identification code provided by the Member States to identify the object on their own databases.</documentation>
						</annotation>
					</element>
					<element name="geometry" type="gml:SurfacePropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Spatial property of the spatial object with a value that is a vector geometry type from ISO 19107.

-- Description --
This is the geometry property for the Parcel and it is set as a optional property to identify the location area for the Parcel. It is intended, if available, to furnish a detailed spatial information beside the basic mandatory geometry fixed for the Production Facility.</documentation>
						</annotation>
					</element>
					<element name="status" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
The state or condition of the plot, with regard to the functional and operational order, in which it is arranged for a limited or extended time period.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="pf:StatusType"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="ProductionPlotPropertyType">
		<sequence minOccurs="0">
			<element ref="pf:ProductionPlot"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="TechnicalUnit" type="pf:TechnicalUnitType" abstract="true" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
technical unit

-- Definition --
Represents the common "abstract level" for production infrastructures: facilities, installations, installation parts. 


-- Description --
It applies since the production infrastructures (facility, installation, installation part) may have an UML "equivalent behaviour": this means they have properties in common and the same associations to be reused.</documentation>
		</annotation>
	</element>
	<complexType name="TechnicalUnitType" abstract="true">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence/>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="TechnicalUnitPropertyType">
		<sequence minOccurs="0">
			<element ref="pf:TechnicalUnit"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="ProductionInstallation" type="pf:ProductionInstallationType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
production installation

-- Definition --
A technical unit, such as machinery,  apparatus, devices or equipment placed in position or connected for use.

-- Description --
Stationary technical unit part of a facility where one or more activities are carried out, and any other directly associated activities which have a technical connection to the activities carried out on that site and which could have an effect on the environment.
May be a technical unit within an establishment in which dangerous substances are produced, used, handled or stored.</documentation>
		</annotation>
	</element>
	<complexType name="ProductionInstallationType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Definition --
External object identifier of the spatial object.

-- Description --
NOTE  An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="thematicId" type="base2:ThematicIdentifierPropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Thematic object identifier (e.g. ICAO location identifiers for airports or NUTS codes for administrative areas).

-- Description --
It may be the identification code provided by the Member States to identify the object on their own databases.</documentation>
						</annotation>
					</element>
					<element name="pointGeometry" type="gml:PointPropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Spatial property of the spatial object with a value that is a vector geometry type from ISO 19107.

-- Description --
This is the basic geometry property for the Production Installation and it is set as an optional property to identify the location point for the Installation. It is intended, if available, to furnish an additional spatial information beside the basic mandatory geometry fixed for the Production Facility.</documentation>
						</annotation>
					</element>
					<element name="surfaceGeometry" type="gml:SurfacePropertyType" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Spatial property of the spatial object with a value that is a vector geometry type from ISO 19107.

-- Description --
This is the secondary geometry property for the Production Installation and it is set as an optional property to identify the location area for the Installation. It is intended, if available, to furnish a detailed spatial information beside the basic mandatory geometry fixed for the Production Facility.</documentation>
						</annotation>
					</element>
					<element name="name" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Official denomination or proper or conventional name of the installation.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="string">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="description" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Descriptive statement about the installation.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="string">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="status" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
The state or condition of the installation, with regard to its functional and operational order, in which it is arranged for a limited or extended time period.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="pf:StatusType"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="type" nillable="true">
						<annotation>
							<documentation>-- Definition --
Special kind of an installation, denoting the operative function which has to be performed.

-- Description --
EXAMPLE  Radiological installation, containing radiological equipment.</documentation>
						</annotation>
					</element>
					<element name="groupedInstallationPart" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>An InstallationPart is grouped by one Installation</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="pf:ProductionInstallationPart"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="ProductionInstallationPropertyType">
		<sequence minOccurs="0">
			<element ref="pf:ProductionInstallation"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="ProductionSite" type="pf:ProductionSiteType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
production site

-- Definition --
All land at a distinct geographic location where the production facility was, is, or is intended to be located. This includes all infrastructure, equipment and materials;

-- Description --
An area of land or water that one or more process plants is or may be situated on, or else a single location, in which, if there is more than one manufacturer of (a) substance(s), certain infrastructure and facilities are shared.
A continuous surface, maritime or terrestrial in which production facilities have been already implanted or urban and/or engineering activities have been developed for production purposes. The location will be defined by means of geographical boundaries within which activities under the control of an organization may be carried out. The geographical boundaries may be on land and in water, and include above and below surface structures, both natural and man-made.</documentation>
		</annotation>
	</element>
	<complexType name="ProductionSiteType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Definition --
External object identifier of the spatial object.

-- Description --
NOTE  An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="thematicId" type="base2:ThematicIdentifierPropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Thematic object identifier (e.g. ICAO location identifiers for airports or NUTS codes for administrative areas).

-- Description --
It may be the identification code provided by the Member States to identify the object on their own databases.</documentation>
						</annotation>
					</element>
					<element name="geometry" type="gml:MultiSurfacePropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Spatial property of the spatial object with a value that is a vector geometry type from ISO 19107.

-- Description --
This is the geometry property for the Production Site and it is set as an optional property to identify the location area for the Site. It is intended, if available, to furnish a detailed spatial information beside the basic mandatory geometry fixed for the Production Facility.</documentation>
						</annotation>
					</element>
					<element name="sitePlan" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
External reference to documentation concerning the configuration and organisation of the site ((Site Plans, technical descriptions, ...).</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="base2:DocumentCitation"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="name" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Official denomination or proper or conventional name of the site.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="string">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="description" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Descriptive statement about the site.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="string">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="status" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
The state or condition of the site, with regard to the functional and operational order, in which it is arranged for a limited or extended time period.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="pf:StatusType"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="ProductionSitePropertyType">
		<sequence minOccurs="0">
			<element ref="pf:ProductionSite"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
</schema>';    
    
    amt := length(buf);
    
    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 364;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (364, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/plu/3.0/plannedlanduse.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 364 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as plannedlanduse_plu_3_0.xsd
    -- Needed to separate this xsd into two pieces due to its size>32767.
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:base2="http://inspire.ec.europa.eu/schemas/base2/1.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:lunom="http://inspire.ec.europa.eu/schemas/lunom/3.0" xmlns:plu="http://inspire.ec.europa.eu/schemas/plu/3.0" xmlns:sc="http://www.interactive-instruments.de/ShapeChange/AppInfo" targetNamespace="http://inspire.ec.europa.eu/schemas/plu/3.0" elementFormDefault="qualified" version="3.0">
	<annotation>
		<documentation>-- Name --
planned land use</documentation>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/base/3.3" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/base2/1.0" schemaLocation="http://inspire.ec.europa.eu/schemas/base2/1.0/BaseTypes2.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/lunom/3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/lunom/3.0/LandUseNomenclature.xsd"/>
	<import namespace="http://www.interactive-instruments.de/ShapeChange/AppInfo" schemaLocation="http://portele.de/ShapeChangeAppinfo.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="ZoningElement" type="plu:ZoningElementType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
zoning element
-- Definition --
A spatial object which is homogeneous regarding the permitted uses of land based on zoning which separate one set of land uses from another.
-- Description --
Zoning elements refer to the regulation of the kinds of activities which will be acceptable on particular lots (such as open space, residential, agricultural, commercial or industrial).  The intensity of use at which those activities can be performed (from low-density housing such as single family homes to high-density such as high-rise apartment buildings), the height of buildings, the amount of space that structures may occupy, the proportions of the types of space on a lot, such as how much landscaped space, impervious surface, traffic lanes, and parking may be provided.</documentation>
		</annotation>
	</element>
	<complexType name="ZoningElementType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Definition --
External object identifier of the spatial object.
-- Description --
An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="geometry" type="gml:MultiSurfacePropertyType">
						<annotation>
							<documentation>-- Definition --
Geometry of this zoning element</documentation>
						</annotation>
					</element>
					<element name="validFrom" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
The date when the phenomenon started to exist in the real world.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="date">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="validTo" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
The time from which the phenomenon no longer exists in the real world.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="date">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="hilucsLandUse" type="gml:ReferenceType" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Land use HILUCS class that is dominant in this land use object.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="beginLifespanVersion" nillable="true">
						<annotation>
							<documentation>-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="hilucsPresence" nillable="true">
						<annotation>
							<documentation>-- Name --
land use presence

-- Definition --
Actual presence of a land use HILUCS category wihtin the object.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="lunom:HILUCSPresence"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="specificLandUse" type="gml:ReferenceType" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Land Use Category according to the nomenclature specific to this data set.
-- Description --
Reference to an entry in the classfication that is part of the SpecificLandUseClassification.</documentation>
						</annotation>
					</element>
					<element name="specificPresence" nillable="true">
						<annotation>
							<documentation>-- Name --
land use presence
-- Definition --
Actual presence of a land use category wihtin the object.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="lunom:SpecificPresence"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="regulationNature" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Definition --
Legal nature of the land use indication.
-- Description --
NOTE Indicates whether the land use indication is legally binding or not.</documentation>
						</annotation>
					</element>
					<element name="endLifespanVersion" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="processStepGeneral" type="gml:ReferenceType" nillable="true">
						<annotation>
							<documentation>-- Definition --
General indication of the step of the planning process that the zoning element is undergoing.
-- Description --
NOTE This enumeration contains values that are common to most planning systems.</documentation>
						</annotation>
					</element>
					<element name="backgroundMap" nillable="true">
						<annotation>
							<documentation>-- Name --
background map
-- Definition --
Identification of the background map that has been used for constructing this zoning element.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="plu:BackgroundMapValue"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="dimensioningIndication" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Specifications about the dimensioning of the urban developments.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="plu:DimensioningIndicationValue"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="officialDocument" type="gml:ReferenceType" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Textual Regulation that is part of this zoning element.</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">plu:OfficialDocumentation</targetElement>
							</appinfo>
						</annotation>
					</element>
					<element name="plan" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Definition --
SpatialPlan which this ZoningElement belongs to.</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">plu:SpatialPlan</targetElement>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">plu:member</reversePropertyName>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="ZoningElementPropertyType">
		<sequence minOccurs="0">
			<element ref="plu:ZoningElement"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="OfficialDocumentation" type="plu:OfficialDocumentationType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
official documentation

-- Definition --
The official documentation that composes the spatial plan; it may be composed of, the applicable legislation, the regulations, cartographic elements, descriptive elements that may be associated with the complete spatial plan, a zoning element or a supplementary regulation . In some Member States the actual textual regulation will be part of the data set (and can be put in the regulationText attribute), in other Member States the text will not be part of the data set and will be referenced via a reference to a document or a legal act.

At least one of the three voidable values shall be provided.

-- Description --
NOTE: The LegislationCitation is the value type of the attribute regulation reference. An example of a regulation reference would be: http://www2.vlaanderen.be /ruimtelijk/grup/00350/00362_00001/data/ 212_00362_00001_d_0BVR.pdf.</documentation>
		</annotation>
	</element>
	<complexType name="OfficialDocumentationType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Definition --
External object identifier of this spatial textual regulation.
-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="legislationCitation" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Reference to the document that contains the text of the regulation.</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="base2:LegislationCitation"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="regulationText" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Text of the regulation.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="string">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="planDocument" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Citation of scanned plans and structural drawings which may sometimes be geo-referenced or not,. E.g. raster images, vector drawings or scanned text.</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="base2:DocumentCitation"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="OfficialDocumentationPropertyType">
		<sequence minOccurs="0">
			<element ref="plu:OfficialDocumentation"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="DimensioningIndicationMeasureValue" type="plu:DimensioningIndicationMeasureValueType" substitutionGroup="plu:DimensioningIndicationValue">
		<annotation>
			<documentation>-- Name --
dimension indication measure value
-- Definition --
Dimensioning indication whose value is a measure.</documentation>
		</annotation>
	</element>
	<complexType name="DimensioningIndicationMeasureValueType">
		<complexContent>
			<extension base="plu:DimensioningIndicationValueType">
				<sequence>
					<element name="value" type="gml:MeasureType"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="DimensioningIndicationMeasureValuePropertyType">
		<sequence>
			<element ref="plu:DimensioningIndicationMeasureValue"/>
		</sequence>
	</complexType>
	<element name="DimensioningIndicationIntegerValue" type="plu:DimensioningIndicationIntegerValueType" substitutionGroup="plu:DimensioningIndicationValue">
		<annotation>
			<documentation>-- Name --
dimension indication integer value
-- Definition --
Dimensioning indication whose value is of type integer.</documentation>
		</annotation>
	</element>
	<complexType name="DimensioningIndicationIntegerValueType">
		<complexContent>
			<extension base="plu:DimensioningIndicationValueType">
				<sequence>
					<element name="value" type="integer"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="DimensioningIndicationIntegerValuePropertyType">
		<sequence>
			<element ref="plu:DimensioningIndicationIntegerValue"/>
		</sequence>
	</complexType>
	<element name="DimensioningIndicationCharacterValue" type="plu:DimensioningIndicationCharacterValueType" substitutionGroup="plu:DimensioningIndicationValue">
		<annotation>
			<documentation>-- Name --
dimension indication character value
-- Definition --
Dimensioning indication whose value is of type CharacterString.</documentation>
		</annotation>
	</element>
	<complexType name="DimensioningIndicationCharacterValueType">
		<complexContent>
			<extension base="plu:DimensioningIndicationValueType">
				<sequence>
					<element name="value" type="string">
						<annotation>
							<documentation>-- Definition --
value of the dimension indications.</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="DimensioningIndicationCharacterValuePropertyType">
		<sequence>
			<element ref="plu:DimensioningIndicationCharacterValue"/>
		</sequence>
	</complexType>
	<element name="SupplementaryRegulation" type="plu:SupplementaryRegulationType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
supplementary regulation
-- Definition --
A spatial object (point, line or polygon) of a spatial plan that provides supplementary information and/or limitation of the use of land/water necessary for spatial planning reasons or to formalise external rules defined in legal text.
-- Description --
NOTE the supplementary regulations affects all land use that overlap with the geometry
EXAMPLE an air field generates restriction in its surroundings regarding aircraft landing, radar and telecommunication devices. It is the buffer around these artefacts that generates the supplementary regulation on the Land Use.</documentation>
		</annotation>
	</element>
	<complexType name="SupplementaryRegulationType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="validFrom" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
First date at which this version of this supplementary regulation is valid in reality.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="date">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="validTo" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
The time from which the supplementary regulation is no longer valid.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="date">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="specificSupplementaryRegulation" type="gml:ReferenceType" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Reference to a category of supplementary regulation provided in a specific nomenclature of supplementary regulations provided by the data provider.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="processStepGeneral" type="gml:ReferenceType" nillable="true">
						<annotation>
							<documentation>-- Definition --
General indication of the step of the planning process that the supplementary regulation is undergoing.
-- Description --
NOTE This enumeration contains values that are common to most planning systems.</documentation>
						</annotation>
					</element>
					<element name="backgroundMap" nillable="true">
						<annotation>
							<documentation>-- Name --
background map
-- Definition --
Identification of the background map that has been used for constructing the supplementary regulation.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="plu:BackgroundMapValue"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="beginLifespanVersion" nillable="true">
						<annotation>
							<documentation>-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="dimensioningIndication" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Specifications about the dimensioning that are added to the dimensioning of the zoning elements that overlap the geometry of the supplementary regulation.</documentation>
						</annotation>';            
        
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    
    pos := pos + amt;
    buf :=        
'						<complexType>
							<sequence>
								<element ref="plu:DimensioningIndicationValue"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Definition --
External object identifier of the spatial object.
-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="endLifespanVersion" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="geometry" type="gml:GeometryPropertyType">
						<annotation>
							<documentation>-- Definition --
Geometry of the piece of land on which the supplementary regulation applies.</documentation>
						</annotation>
					</element>
					<element name="inheritedFromOtherPlans" nillable="true">
						<annotation>
							<documentation>-- Name --
inherited from other plans
-- Definition --
Indication whether the supplementary regulation is inherited from another spatial plan.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="boolean">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="specificRegulationNature" nillable="true">
						<annotation>
							<documentation>-- Name --
specific regulation nature
-- Definition --
Legal nature of the land use regulation from a national perspective.
-- Description --
On member state level the legal classification for plan regulations may be complex. A supplementary regulation may be principally "bindingOnlyForAuthorities" but according to national law this regulation have to be more specified to explain the specific degree of binding. (e.g. on state or regional planning level in Germany: principles of spatial planning, other spatial planning requirements or goals of spatial planning).

NOTE This attribute complements the information provided by the attribute regulationNature.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="string">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="name" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Official name of the supplementary regulation</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="string">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="regulationNature" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Definition --
Legal nature of the land use regulation.
-- Description --
NOTE Indicates whether the land use regulation is legally binding or not.</documentation>
						</annotation>
					</element>
					<element name="supplementaryRegulation" type="gml:ReferenceType" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Code of the supplementary regulation from the hierarchical supplementary regulation code list agreed at the European level.</documentation>
						</annotation>
					</element>
					<element name="officialDocument" type="gml:ReferenceType" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Link to the Textual regulations that correspond to this supplementary regulation.</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">plu:OfficialDocumentation</targetElement>
							</appinfo>
						</annotation>
					</element>
					<element name="plan" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Definition --
Link to the plan this supplementary regulation is part of.</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">plu:SpatialPlan</targetElement>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">plu:restriction</reversePropertyName>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="SupplementaryRegulationPropertyType">
		<sequence minOccurs="0">
			<element ref="plu:SupplementaryRegulation"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="DimensioningIndicationValue" type="plu:DimensioningIndicationValueType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
Dimension Indication
-- Definition --
Specifications about the dimensioning of the urban developments.</documentation>
		</annotation>
	</element>
	<complexType name="DimensioningIndicationValueType">
		<sequence>
			<element name="indicationReference" type="string">
				<annotation>
					<documentation>-- Definition --
Description of the dimension indication.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="DimensioningIndicationValuePropertyType">
		<sequence>
			<element ref="plu:DimensioningIndicationValue"/>
		</sequence>
	</complexType>
	<element name="SpatialPlan" type="plu:SpatialPlanType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
spatial plan
-- Definition --
A set of documents that indicates a strategic direction for the development of a given geographic area, states the policies, priorities, programmes and land allocations that will implement the strategic direction and influences the distribution of people and activities in spaces of various scales. Spatial plans may be developed for urban planning, regional planning, environmental planning, landscape planning, national spatial plans, or spatial planning at the Union level.</documentation>
		</annotation>
	</element>
	<complexType name="SpatialPlanType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Definition --
External object identifier of the spatial plan.
-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="extent" type="gml:MultiSurfacePropertyType">
						<annotation>
							<documentation>-- Definition --
Geometrical union of all the instances of the spatial objects ZoningElement and SupplementaryRegulation. When a SpatialPlan is only composed of a document, the attribute extent is the border of the cartographic image that contains the land use information (i.e. the land use map extent).</documentation>
						</annotation>
					</element>
					<element name="beginLifespanVersion" nillable="true">
						<annotation>
							<documentation>-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="officialTitle" type="string">
						<annotation>
							<documentation>-- Definition --
Official title of the spatial plan.</documentation>
						</annotation>
					</element>
					<element name="levelOfSpatialPlan" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Name --
level of spatial plan
-- Definition --
Level of the administrative units covered by the plan.
-- Description --
Member states should make a mapping to this enumeration.</documentation>
						</annotation>
					</element>
					<element name="endLifespanVersion" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="validFrom" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
First date at which this spatial plan is valid in reality.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="date">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="validTo" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
The time from which the spatial plan no longer exists in the real world.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="date">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="alternativeTitle" nillable="true">
						<annotation>
							<documentation>-- Definition --
Alternative (unofficial) title of the spatial plan.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="string">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="planTypeName" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Definition --
Name of the type of plan that the Member State has given to the plan. 
-- Description --
NOTE The admissible values for this attribute are managed at the member state level via a code list

EXAMPLE:
FR: DTA, SCOT, PLU, etc.
DE: Bebauungsplan, Flaechennutzungsplan, Regionalplan, Landesentwicklungsplan 
NL:  bestemmingsplan, structuurvisie.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="processStepGeneral" type="gml:ReferenceType" nillable="true">
						<annotation>
							<documentation>-- Definition --
General indication of the step of the planning process that the plan is undergoing.
-- Description --
NOTE This enumeration contains values that are common to most planning systems.</documentation>
						</annotation>
					</element>
					<element name="backgroundMap" nillable="true">
						<annotation>
							<documentation>-- Name --
background map
-- Definition --
Identification of the background map that has been used for constructing this Plan.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="plu:BackgroundMapValue"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="ordinance" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Reference to relevant administrative ordinance.
-- Description --
NOTE This attribute is multiple because, independently from the current legal status of the plan, there can be references to more than one ordinance, in relation to the different steps that the planning process has already undergone (e.g. ordinance for the preparation of a new plan, ordinance of adoption, ordinance of approval, etc.).</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="plu:OrdinanceValue"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="officialDocument" type="gml:ReferenceType" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Link to the official documents that relate to the spatial plan.</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">plu:OfficialDocumentation</targetElement>
							</appinfo>
						</annotation>
					</element>
					<element name="member" type="gml:ReferenceType" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Reference to the ZoningElements which belong to this SpatialPlan.</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">plu:ZoningElement</targetElement>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">plu:plan</reversePropertyName>
							</appinfo>
						</annotation>
					</element>
					<element name="restriction" type="gml:ReferenceType" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Links to supplementary regulations providing information and/or limitations on the use of land/water that supplements the zoning as part of this spatial plan.</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">plu:SupplementaryRegulation</targetElement>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">plu:plan</reversePropertyName>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="SpatialPlanPropertyType">
		<sequence minOccurs="0">
			<element ref="plu:SpatialPlan"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="DimensioningIndicationRealValue" type="plu:DimensioningIndicationRealValueType" substitutionGroup="plu:DimensioningIndicationValue">
		<annotation>
			<documentation>-- Name --
dimension indication real value
-- Definition --
Dimensioning indication whose value is a floating point number.</documentation>
		</annotation>
	</element>
	<complexType name="DimensioningIndicationRealValueType">
		<complexContent>
			<extension base="plu:DimensioningIndicationValueType">
				<sequence>
					<element name="value" type="double"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="DimensioningIndicationRealValuePropertyType">
		<sequence>
			<element ref="plu:DimensioningIndicationRealValue"/>
		</sequence>
	</complexType>
	<element name="OrdinanceValue" type="plu:OrdinanceValueType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Definition --
Reference to administrative ordinance. Ordinance is a regulation/rule that is adopted by an authority that is legally mandated to take such ordinance.</documentation>
		</annotation>
	</element>
	<complexType name="OrdinanceValueType">
		<sequence>
			<element name="ordinanceDate" type="dateTime">
				<annotation>
					<documentation>-- Definition --
Date of the relevant administrative ordinance.
-- Description --
NOTE This attribute is multiple because, independently from the current legal status of the plan, there can be references to the dates of more than one ordinance, in relation to the different steps that the planning process has already undergone (e.g. ordinance for the preparation of a new plan, ordinance of adoption, ordinance of approval, etc.).</documentation>
				</annotation>
			</element>
			<element name="ordinanceReference" type="string">
				<annotation>
					<documentation>-- Definition --
Reference to relevant administrative ordinance.
-- Description --
NOTE This attribute is multiple because, independently from the current legal status of the plan, there can be references to more than one ordinance, in relation to the different steps that the planning process has already undergone (e.g. ordinance for the preparation of a new plan, ordinance of adoption, ordinance of approval, etc.).</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="OrdinanceValuePropertyType">
		<sequence>
			<element ref="plu:OrdinanceValue"/>
		</sequence>
	</complexType>
	<element name="BackgroundMapValue" type="plu:BackgroundMapValueType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Definition --
Information regarding the map that has been used as a background in the definition of a spatial plan, a zoning element or a supplementary regulation.</documentation>
		</annotation>
	</element>
	<complexType name="BackgroundMapValueType">
		<sequence>
			<element name="backgroundMapDate" type="dateTime">
				<annotation>
					<documentation>-- Name --
background map date
-- Definition --
Date of the background map used.</documentation>
				</annotation>
			</element>
			<element name="backgroundMapReference" type="string">
				<annotation>
					<documentation>-- Definition --
Reference to the background map that has been used.</documentation>
				</annotation>
			</element>
			<element name="backgroudMapURI" nillable="true">
				<annotation>
					<documentation>-- Name --
background map URI
-- Definition --
URI referring to service that provides background map.</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="anyURI">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
		</sequence>
	</complexType>
	<complexType name="BackgroundMapValuePropertyType">
		<sequence>
			<element ref="plu:BackgroundMapValue"/>
		</sequence>
	</complexType>
</schema>'; 
    
    amt := length(buf);

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 365;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (365, empty_clob(), 'INSPIRE', 'urn:x-inspire:specification:gmlas:ProtectedSites:3.0/protectedsites.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 365 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as protectedsites_ps_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?><schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="urn:x-inspire:specification:gmlas:BaseTypes:3.2" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:gn="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" xmlns:ps="urn:x-inspire:specification:gmlas:ProtectedSites:3.0" elementFormDefault="qualified" targetNamespace="urn:x-inspire:specification:gmlas:ProtectedSites:3.0" version="3.0">
  <import namespace="urn:x-inspire:specification:gmlas:BaseTypes:3.2" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.2/BaseTypes.xsd"/>
  <import namespace="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/gn/3.0/GeographicalNames.xsd"/>
  <import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
  <import namespace="http://www.isotc211.org/2005/gmd" schemaLocation="http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd"/>
  <!--XML Schema document created by ShapeChange-->
  <element name="ProtectedSite" substitutionGroup="gml:AbstractFeature" type="ps:ProtectedSiteType">
    <annotation>
      <documentation>-- Definition --
An area designated or managed within a framework of international, Community and Member States'' legislation to achieve specific conservation objectives.

-- Description --
Each protected site has a boundary defined through formal, legal or administrative agreements or decisions. The establishment of a protected site is normally underpinned by legislation and thus given weight in decisions about land use change and spatial planning. Each Site is normally selected as a representative example of a wider resource and selected through a formal criterion based approach. A protected site can be a contiguous extent of land/sea or a collection of discrete areas that together represent a single formal Protected Site.  This class has the attributes, constraints and associations that are part of the Simple application schema.
</documentation>
    </annotation>
  </element>
  <complexType name="ProtectedSiteType">
    <complexContent>
      <extension base="gml:AbstractFeatureType">
        <sequence>
          <element name="geometry" type="gml:GeometryPropertyType">
            <annotation>
              <documentation>-- Definition --
The geometry defining the boundary of the Protected Site.

-- Description --
The geometry may be determined by a wide range of methods, including surveying, digitisation or visual reference to natural features or cadastral boundaries and may be defined by the legal document that creates the protected area. The geometry included in a data set that uses this data model is stored as a fixed geometry by coordinates, not by reference to natural, cadastral or administrative boundaries, although it may originally have been defined from these.
</documentation>
            </annotation>
          </element>
          <element name="inspireID" type="base:IdentifierPropertyType">
            <annotation>
              <documentation>-- Definition --
External object identifier of the protected site.

-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.
</documentation>
            </annotation>
          </element>
          <element name="legalFoundationDate" nillable="true">
            <annotation>
              <documentation>-- Definition --
The date that the protected site was legally created. This is the date that the real world object was created, not the date that its representation in an information system was created.

-- Description --
NOTE In the case of Natura2000 sites, a protected site may go through several different stages (for example, proposed as SCI, confirmed as SCI, designated as SAC). A new version of the site is created for each of these different stages (because there is a change in the designation), and the new version should have the date on which the new stage was legally assigned as the legalFoundationDate (for example, when designated as a SAC, the version for the SAC would have the designation date as the legalFoundationDate).
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="legalFoundationDocument" nillable="true">
            <annotation>
              <documentation>-- Definition --
A URL or text citation referencing the legal act that created the Protected Site.</documentation>
            </annotation>
            <complexType>
              <complexContent>
                <extension base="gml:AbstractMetadataPropertyType">
                  <sequence>
                    <element ref="gmd:CI_Citation"/>
                  </sequence>
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </complexContent>
            </complexType>
          </element>
          <element maxOccurs="unbounded" name="siteDesignation" nillable="true">
            <annotation>
              <documentation>-- Definition --
The designation (type) of Protected Site. 

-- Description --
At least one designation is required, but designations may be available using a number of different designation schemes, all of which can be accommodated in the DesignationSchemeValue codelist.
</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="ps:DesignationType"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="siteName" nillable="true">
            <annotation>
              <documentation>-- Definition --
The name of the Protected Site.

-- Description --
NOTE 1 Several names in different languages may be expressed.

NOTE 2 It is recommended that the language of the name (part of the GeographicalName data type) be filled where ever possible. This is an important identifying attribute of a Protected Site.
</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="gn:GeographicalName"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element maxOccurs="unbounded" name="siteProtectionClassification" nillable="true">
            <annotation>
              <documentation>-- Definition --
The classification of the protected site based on the purpose for protection.

-- Description --
The site may have more than one classification.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="ps:ProtectionClassificationValueType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="ProtectedSitePropertyType">
    <sequence minOccurs="0">
      <element ref="ps:ProtectedSite"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <simpleType name="ProtectionClassificationValueType">
    <annotation>
      <documentation>-- Definition --
The protected site classification based on the purpose of protection.</documentation>
    </annotation>
    <restriction base="string">
      <enumeration value="natureConservation">
        <annotation>
          <documentation>-- Definition --
The Protected Site is protected for the maintenance of biological diversity.</documentation>
        </annotation>
      </enumeration>
      <enumeration value="archaeological">
        <annotation>
          <documentation>-- Definition --
The Protected Site is protected for the maintenance of archaeological heritage.</documentation>
        </annotation>
      </enumeration>
      <enumeration value="cultural">
        <annotation>
          <documentation>-- Definition --
The Protected Site is protected for the maintenance of cultural heritage.</documentation>
        </annotation>
      </enumeration>
      <enumeration value="ecological">
        <annotation>
          <documentation>-- Definition --
The Protected Site is protected for the maintenance of ecological stability.</documentation>
        </annotation>
      </enumeration>
      <enumeration value="landscape">
        <annotation>
          <documentation>-- Definition --
The Protected Site is protected for the maintenance of landscape characteristics.</documentation>
        </annotation>
      </enumeration>
      <enumeration value="environment">
        <annotation>
          <documentation>-- Definition --
The Protected Site is protected for the maintenance of environmental stability.</documentation>
        </annotation>
      </enumeration>
      <enumeration value="geological">
        <annotation>
          <documentation>-- Definition --
The Protected Site is protected for the maintenance of geological characteristics.</documentation>
        </annotation>
      </enumeration>
    </restriction>
  </simpleType>
  <element name="DesignationType" substitutionGroup="gml:AbstractObject" type="ps:DesignationTypeType">
    <annotation>
      <documentation>-- Definition --
A data type designed to contain a designation for the Protected Site, including the designation scheme used and the value within that scheme.
</documentation>
    </annotation>
  </element>
  <complexType name="DesignationTypeType">
    <sequence>
      <element name="designationScheme" type="gml:CodeType">
        <annotation>
          <documentation>-- Definition --
The scheme from which the designation code comes.</documentation>
        </annotation>
      </element>
      <element name="designation" type="gml:CodeType">
        <annotation>
          <documentation>-- Definition --
The actual Site designation.</documentation>
        </annotation>
      </element>
      <element minOccurs="0" name="percentageUnderDesignation" type="anyURI">
        <annotation>
          <documentation>-- Definition --
The percentage of the site that falls under the designation. This is used in particular for the IUCN categorisation. If a value is not provided for this attribute, it is assumed to be 100%</documentation>
        </annotation>
      </element>
    </sequence>
  </complexType>
  <complexType name="DesignationTypePropertyType">
    <sequence>
      <element ref="ps:DesignationType"/>
    </sequence>
  </complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 366;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (366, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/sd/3.0/speciesdistribution.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 366 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as speciesdistribution_sd_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:base2="http://inspire.ec.europa.eu/schemas/base2/1.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:sc="http://www.interactive-instruments.de/ShapeChange/AppInfo" xmlns:sd="http://inspire.ec.europa.eu/schemas/sd/3.0" targetNamespace="http://inspire.ec.europa.eu/schemas/sd/3.0" elementFormDefault="qualified" version="3.0">
	<annotation>
		<documentation>Application schema for Species Distribution</documentation>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/base/3.3" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/base2/1.0" schemaLocation="http://inspire.ec.europa.eu/schemas/base2/1.0/BaseTypes2.xsd"/>
	<import namespace="http://www.interactive-instruments.de/ShapeChange/AppInfo" schemaLocation="http://portele.de/ShapeChangeAppinfo.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="PopulationSizeType" type="sd:PopulationSizeTypeType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
population size type

-- Definition --
A range value indicating the counted, estimated or calculated occurrences or population sizes, which is defined by an upper and a lower limit.

-- Description --
A range density (or abundance) value for species occurrence in the individual species distribution units either counted, estimated or calculated based on defined counting units,  or using upper and lower bounds.</documentation>
		</annotation>
	</element>
	<complexType name="PopulationSizeTypeType">
		<sequence>
			<element name="countingMethod" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Name --
counting method

-- Definition --
Method of providing a number for the indication of the abundance of a species within a specific species distribution unit.

-- Description --
To obtain a density or abundance estimate the data set provider can either count, estimate or calculate the population abundance.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="countingUnit" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Name --
counting unit

-- Definition --
What has been counted, estimated or calculated when compiling information on the abundance of a species within the species distribution unit.

-- Description --
This parameter defines which species population units that has collected or retrieved.
EXAMPLE Colonies, individuals, juvenile, larvae, pairs, shoals, shoots, tufts.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">technicalGuidance</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="populationSize" type="sd:RangeTypePropertyType">
				<annotation>
					<documentation>-- Name --
population size

-- Definition --
A range value indicating the counted, estimated or calculated occurrences or population sizes using upper and lower bounds.

-- Description --
A range density (or abundance) value for species occurrence in the individual species distribution units either counted, estimated or calculated based on defined counting units,  or using upper and lower bounds.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="PopulationSizeTypePropertyType">
		<sequence>
			<element ref="sd:PopulationSizeType"/>
		</sequence>
	</complexType>
	<element name="SpeciesDistributionUnit" type="sd:SpeciesDistributionUnitType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
species distribution unit

-- Definition --
Occurrence of animal and plant species aggregated by grid, region, administrative unit or other analytical unit. 

-- Description --
Pan-European, national or local mapping initiatives, resulting in spatial data for species in terrestrial and marine environments, e.g. for birds, insects, mammals, amphibians, reptiles, fish or vascular plants. 

NOTE 1 Only species are mentioned in the INSPIRE definition. But earlier INSPIRE documents (INPIRE IMS, 2003) mentions both species or species grouped e.g. to families. So we interprete species as taxa, which means taxonomic units at any systematic rank, like subspecies, species, genus, family etc.</documentation>
		</annotation>
	</element>
	<complexType name="SpeciesDistributionUnitType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
inspire id

-- Definition --
External object identifier of the spatial object.

-- Description --
An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="geometry" type="gml:GeometryPropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
geometry

-- Definition --
The geometry of each unit in a collection.

-- Description --
The geometry (e.g. line or polygon) of each individual spatial objects in the collection</documentation>
						</annotation>
					</element>
					<element name="speciesName" type="sd:SpeciesNameTypePropertyType">
						<annotation>
							<documentation>-- Name --
species name

-- Definition --
Identifier and scientific name, including the author, taken from an international reference list, optionally completed by a locally used name and its taxonomic concept relationship to the reference name.

-- Description --
The authorized ReferenceSpeciesScheme provides reference species list which defines the ReferenceSpeciesName with its scientific name plus author and ReferenceSpeciesId.  The LocalSpeciesName provides nomenclatural and taxonomical information about the locally used species name and the taxonomic concepts implied by the use of this name according to a given reference. If omitted the name and concept given by the referenceSpeciesId according to the referenceSpeciesScheme has been used locally.</documentation>
						</annotation>
					</element>
					<element name="distributionInfo" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
distribution info

-- Definition --
The description of the subject of distribution (occurrences or population), the indication of the count of observations or population size of the particular species, species group or taxon rank and its distribution or isolation within the species distribution unit.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="sd:DistributionInfoType"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="beginLifespanVersion" nillable="true">
						<annotation>
							<documentation>-- Name --
begin lifespan version

-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.

-- Description --
NOTE This date is recorded to enable the generation of change only update files.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="endLifespanVersion" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
begin lifespan version

-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.

-- Description --
NOTE This date is recorded to enable the generation of change only update files.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="spatialObject" type="gml:FeaturePropertyType" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
spatial object

-- Definition --
A reference to a another spatial object defining the spatial extent of a distribution unit.

-- Description --
EXAMPLE A specific administrative area.</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="SpeciesDistributionUnitPropertyType">
		<sequence minOccurs="0">
			<element ref="sd:SpeciesDistributionUnit"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="SpeciesDistributionDataSet" type="sd:SpeciesDistributionDataSetType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
species  distribution data set

-- Definition --
This data set is a collection of individual spatial objects (units) in a distribution of species.

-- Description --
Collection of individual spatial objects of allowed geometry where a species occurs.</documentation>
		</annotation>
	</element>
	<complexType name="SpeciesDistributionDataSetType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
inspire id

-- Definition --
External object identifier of the spatial object.

-- Description --
An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="name" nillable="true">
						<annotation>
							<documentation>-- Name --
name

-- Definition --
Name of a specific data set provided for Species Distribution.

-- Description --
A short descriptive identification name for a specific dataset provided by an institution.
EXAMPLE 1 Redlisted_species_Norway
EXAMPLE 2 Invasive_alien_species_ Ireland
EXAMPLE 3 Articles17_report_Germany</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="string">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="domainExtent" type="gml:MultiSurfacePropertyType" nillable="true">
						<annotation>
							<documentation>-- Name --
domain extent

-- Definition --
The geographic extent of the domain of the feature collection.</documentation>
						</annotation>
					</element>
					<element name="beginLifespanVersion" nillable="true">
						<annotation>
							<documentation>-- Name --
begin lifespan version

-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.

-- Description --
NOTE This date is recorded to enable the generation of change only update files.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="endLifespanVersion" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
begin lifespan version

-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.

-- Description --
NOTE This date is recorded to enable the generation of change only update files.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="documentBasis" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
documentBasis

-- Definition --
Reference to or citation of a document describing a campaign or a legal act which is the basis for the data set.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="base2:DocumentCitation"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
					<element name="member" type="sd:SpeciesDistributionUnitPropertyType" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
member

-- Definition --
Individual spatial objects in a collection of spatial objects.

-- Description --
Individual spatial objects of allowed geometry where a species occurs.</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="SpeciesDistributionDataSetPropertyType">
		<sequence minOccurs="0">
			<element ref="sd:SpeciesDistributionDataSet"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="RangeType" type="sd:RangeTypeType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
range type

-- Definition --
Value indicating the upper and lower limits of the counting, estimation or calculation of occurrences.</documentation>
		</annotation>
	</element>
	<complexType name="RangeTypeType">
		<sequence>
			<element name="upperBound" type="integer" minOccurs="0">
				<annotation>
					<documentation>-- Name --
upper bound

-- Definition --
The upper limit of the range.  If the value of this attribute is null and lowerBound is populated, this implies that the value is between the lowerBound and infinity.</documentation>
				</annotation>
			</element>
			<element name="lowerBound" type="integer" minOccurs="0">
				<annotation>
					<documentation>-- Name --
lower bound

-- Definition --
The lower limit of the range.  If the value of this attribute is null and upperBound is populated, this implies that the value is between the upperBound and zero.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="RangeTypePropertyType">
		<sequence>
			<element ref="sd:RangeType"/>
		</sequence>
	</complexType>
	<element name="SpeciesNameType" type="sd:SpeciesNameTypeType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
species name type

-- Definition --
Identifier and scientific name, including the author, taken from an international reference list, optionally completed by a locally used name and its taxonomic concept relationship to the reference name.

-- Description --
The authorized ReferenceSpeciesScheme provides reference species list which defines the ReferenceSpeciesName with its scientific name plus author and ReferenceSpeciesId.  The LocalSpeciesName provides nomenclatural and taxonomical information about the locally used species name and the taxonomic concepts implied by the use of this name according to a given reference.</documentation>
		</annotation>
	</element>
	<complexType name="SpeciesNameTypeType">
		<sequence>
			<element name="referenceSpeciesId" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Name --
reference species id

-- Definition --
Identifier of one of the reference lists given by the referenceSpeciesScheme.

-- Description --
In the referenceSpeciesScheme the species IDs are linked to scientific names and corresponding authors using GUIDs</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="referenceSpeciesScheme" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Name --
reference species scheme

-- Definition --
Reference list defining a nomenclatural and taxonomical standard to which all local names and taxonomic concepts shall be mapped.

-- Description --
Code list of accepted PAN-European taxonomical reference lists defining the nomenclature and taxonomical concept of a given species name. This must not be regarded as the ultimate taxonomic truth: this will always change. It serves as a definition of a taxonomic concept described by systematic and synonym relations where other names and there inherent taxonomic concepts can be mapped to. The code list comprises of Eu-Nomen, EUNIS and Natura2000. In these sources harmonized species GUIDs and names are maintained by institutions with an assignment outside INSPIRE and the species names are to be retrieved through webservices using GUIDs. Only one of these list must be used for one taxon. The priority is as follows: 1) EU-Nomen, 2) EUNIS, 3) Natura2000. This implies: if a taxon is listed in EU-Nomen, this reference must be used as first choice. If it is not listed in EU-Nomen, the second choice is EUNIS, if not in EUNIS, Natura2000 can be used.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="referenceSpeciesName" nillable="true">
				<annotation>
					<documentation>-- Name --
reference species name

-- Definition --
The scientific name, including the author, used in the authorized ReferenceSpeciesScheme.

-- Description --
The authorized ReferenceSpeciesScheme (EU-Nomen, Unis and Nature Directives) provides reference species lists which defines the ReferenceSpeciesName with its scientific name plus author and ReferenceSpeciesId.</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="string">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
			<element name="localSpeciesId" type="gml:ReferenceType" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Name --
local species id

-- Definition --
Identifier used in national nomenclature.

-- Description --
The taxonID used in national nomenclature databases.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">technicalGuidance</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="localSpeciesScheme" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Name --
local species scheme

-- Definition --
Name of local species classification scheme (bibliographic reference).</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="string">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
			<element name="localSpeciesName" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Name --
local species name

-- Definition --
Scientific name, including the author, used in national nomenclature with its national taxonomic concept.

-- Description --
The LocalSpeciesName provides nomenclatural and taxonomical information about the locally used species name and the taxonomic concepts implied by the use of this name according to a given reference. If omitted the name and concept given by the referenceSpeciesId according to the referenceSpeciesScheme has been used locally.</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="string">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
			<element name="qualifier" type="gml:ReferenceType" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Name --
qualifier

-- Definition --
Specifies the taxonomic concept relationship between local species identifier and the reference species identifier.

-- Description --
Defines how the local species name conceptually is related to the referenceSpeciesID, either congruent, included in, includes,  overlaps or excludes</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
					</appinfo>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="SpeciesNameTypePropertyType">
		<sequence>
			<element ref="sd:SpeciesNameType"/>
		</sequence>
	</complexType>
	<element name="DistributionInfoType" type="sd:DistributionInfoTypeType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
distribution info type

-- Definition --
The description of the status of the subject of distribution within the species distribution unit, including the indication of the abundance by counting, estimation or calculation of the number of occurrences or population size of the particular species.</documentation>
		</annotation>
	</element>
	<complexType name="DistributionInfoTypeType">
		<sequence>
			<element name="occurrenceCategory" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Name --
occurrence category

-- Definition --
The species population density in the species distribution unit.

-- Description --
A species abundance (population density) in classes (common, rare, very rare, present or absent) in an individual species distribution unit.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="residencyStatus" type="gml:ReferenceType" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Name --
residency status

-- Definition --
Information on the status of residency of a species regarding nativeness versus introduction and permanency.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">technicalGuidance</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="populationSize" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Name --
population size

-- Definition --
A range value indicating the counted, estimated or calculated occurrences or population sizes, using an upper and a lower limit.

-- Description --
A range density (or abundance) value for species occurrence in the individual species distribution units either counted, estimated or calculated based on defined counting units, or using upper and lower bounds.</documentation>
				</annotation>
				<complexType>
					<sequence>
						<element ref="sd:PopulationSizeType"/>
					</sequence>
					<attribute name="nilReason" type="gml:NilReasonType"/>
				</complexType>
			</element>
			<element name="sensitiveInfo" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Name --
sensitive info

-- Definition --
Boolean value that indicates whether the location of a specific species is sensitive. 

-- Description --
This can be used to filter out or generalize sensitive data. Generalized representation can be larger spatial objects e.g. grid cells.

NOTE A species location e.g. breeding location, of vulnerable, endangered or protected species may by law be excluded from distribution or spatially generalised from detailed locations to lower resolutions in more extensive grid cells to avoid environmental crime.</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="boolean">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
			<element name="populationType" type="gml:ReferenceType" nillable="true" minOccurs="0">
				<annotation>
					<documentation>-- Name --
population type

-- Definition --
The permanency of populations, particularly with regard to migratory species within a given species distribution unit.

-- Description --
Kind of species occurrence or population data that are collected.
EXAMPLE Permanent, reproducing, concentration or wintering (for migratory species).</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="collectedFrom" nillable="true">
				<annotation>
					<documentation>-- Name --
collected from

-- Definition --
The date when the collecting of the original species occurrence data started.

-- Description --
The starting date for the collection/registration of the primary species occurrence data.</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="date">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
			<element name="collectedTo" nillable="true">
				<annotation>
					<documentation>-- Name --
collected to

-- Definition --
The date when the collecting of the original species occurrence data stopped.

-- Description --
The last date for the collection/registration of the primary species occurrence data.</documentation>
				</annotation>
				<complexType>
					<simpleContent>
						<extension base="date">
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
		</sequence>
	</complexType>
	<complexType name="DistributionInfoTypePropertyType">
		<sequence>
			<element ref="sd:DistributionInfoType"/>
		</sequence>
	</complexType>
</schema>'; 
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 367;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (367, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/selu/3.0/sampledexistinglanduse.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 367 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as sampledexistinglanduse_selu_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:lunom="http://inspire.ec.europa.eu/schemas/lunom/3.0" xmlns:selu="http://inspire.ec.europa.eu/schemas/selu/3.0" targetNamespace="http://inspire.ec.europa.eu/schemas/selu/3.0" elementFormDefault="qualified" version="3.0">
	<annotation>
		<documentation>-- Name --
sampled land use</documentation>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/base/3.3" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/lunom/3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/lunom/3.0/LandUseNomenclature.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="ExistingLandUseSample" type="selu:ExistingLandUseSampleType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
existing land use sample
-- Definition --
Description of the existing land use that is present at the specific location.</documentation>
		</annotation>
	</element>
	<complexType name="ExistingLandUseSampleType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Definition --
External object identifier of the land use sample.
-- Description --
An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="location" type="gml:PointPropertyType">
						<annotation>
							<documentation>-- Definition --
Location where the land use sample is taken.</documentation>
						</annotation>
					</element>
					<element name="beginLifespanVersion" nillable="true">
						<annotation>
							<documentation>-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="hilucsLandUse" type="gml:ReferenceType" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Land use HILUCS classes that are present in this existing land use sample.
-- Description --
NOTE The Sampled Existing Land Use model enables the provision of information on land uses inside one land use object. The ExistingLandUseObject may be associated with 1 to many HILUCSLandUse that represents the Land Uses for the polygon from the economical point of view. It makes possible the assignment of more than one HILUCSLandUse existences when they cannot be managed by HILUCSPresences.</documentation>
						</annotation>
					</element>
					<element name="hilucsPresence" nillable="true">
						<annotation>
							<documentation>-- Name --
land use presence
-- Definition --
Actual presence of a land use category according to HILUCS within the object.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="lunom:HILUCSPresence"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="specificLandUse" type="gml:ReferenceType" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Land Use Category according to the nomenclature specific to this data set.
-- Description --
Reference to an entry in the classfication that is part of the SpecificLandUseClassification provided by the data producer.</documentation>
						</annotation>
					</element>
					<element name="observationDate" nillable="true">
						<annotation>
							<documentation>-- Name --
Observation Date.
-- Definition --
The observation date associated to a description.
-- Description --
Defines the observation date of the description. It could be the date of an aerial/satellital acquisition or a field survey. The observation date allows the user to have accurate date of when the description was made in the real word. In a database, not all object informations are necessarily captured at the same time.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="date">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="specificPresence" nillable="true">
						<annotation>
							<documentation>-- Definition --
Actual presence of a land use category within the object.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="lunom:SpecificPresence"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="endLifespanVersion" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="validFrom" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
The time when the phenomenon started to exist in the real world.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="date">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="validTo" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
The time from which the phenomenon no longer exists in the real world.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="date">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="dataset" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Definition --
Data set to which this sample belongs.</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">selu:SampledExistingLandUseDataSet</targetElement>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">selu:member</reversePropertyName>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="ExistingLandUseSamplePropertyType">
		<sequence minOccurs="0">
			<element ref="selu:ExistingLandUseSample"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="SampledExistingLandUseDataSet" type="selu:SampledExistingLandUseDataSetType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
sampled existing land use data set
-- Definition --
A sampled existing land use data set is a collection of locations for which information on existing (present or past) land uses is provided.</documentation>
		</annotation>
	</element>
	<complexType name="SampledExistingLandUseDataSetType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Definition --
External object identifier of the sampled land use data set.
-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="extent" type="gml:MultiSurfacePropertyType">
						<annotation>
							<documentation>-- Definition --
The convex hull of all the instances of the spatial object type ExistingLandUseSample.</documentation>
						</annotation>
					</element>
					<element name="name" type="string">
						<annotation>
							<documentation>-- Definition --
Human readable name of the data set.</documentation>
						</annotation>
					</element>
					<element name="beginLifespanVersion" nillable="true">
						<annotation>
							<documentation>-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="endLifespanVersion" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="validFrom" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
First date at which this data set is valid in reality.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="date">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="validTo" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
The time from which the data set no longer exists in the real world.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="date">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="member" type="gml:ReferenceType" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Reference to the members of the sampled existing land use data set.</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">selu:ExistingLandUseSample</targetElement>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">selu:dataset</reversePropertyName>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="SampledExistingLandUseDataSetPropertyType">
		<sequence minOccurs="0">
			<element ref="selu:SampledExistingLandUseDataSet"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
</schema>'; 
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 368;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (368, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/so/3.0/soil.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 368 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as soil_so_3_0.xsd
    -- Needed to separate this xsd into three pieces due to its size>32767.
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:ge="http://inspire.ec.europa.eu/schemas/ge-core/3.0" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:gmlcov="http://www.opengis.net/gmlcov/1.0" xmlns:omop="http://inspire.ec.europa.eu/schemas/omop/2.0" xmlns:ompr="http://inspire.ec.europa.eu/schemas/ompr/2.0" xmlns:ps="urn:x-inspire:specification:gmlas:ProtectedSites:3.0" xmlns:sc="http://www.interactive-instruments.de/ShapeChange/AppInfo" xmlns:so="http://inspire.ec.europa.eu/schemas/so/3.0" xmlns:spec="http://www.opengis.net/samplingSpecimen/2.0" targetNamespace="http://inspire.ec.europa.eu/schemas/so/3.0" elementFormDefault="qualified" version="3.0">
	<annotation>
		<documentation>Soil model</documentation>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/base/3.3" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/ge-core/3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/ge-core/3.0/GeologyCore.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/omop/2.0" schemaLocation="http://inspire.ec.europa.eu/schemas/omop/2.0/ObservableProperties.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/ompr/2.0" schemaLocation="http://inspire.ec.europa.eu/schemas/ompr/2.0/Processes.xsd"/>
	<import namespace="http://www.interactive-instruments.de/ShapeChange/AppInfo" schemaLocation="http://portele.de/ShapeChangeAppinfo.xsd"/>
	<import namespace="http://www.isotc211.org/2005/gmd" schemaLocation="http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<import namespace="http://www.opengis.net/gmlcov/1.0" schemaLocation="http://schemas.opengis.net/gmlcov/1.0/coverage.xsd"/>
	<import namespace="http://www.opengis.net/samplingSpecimen/2.0" schemaLocation="http://schemas.opengis.net/samplingSpecimen/2.0/specimen.xsd"/>
	<import namespace="urn:x-inspire:specification:gmlas:ProtectedSites:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/ps/3.0/ProtectedSites.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="SoilThemeDescriptiveParameterType" type="so:SoilThemeDescriptiveParameterTypeType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
soil theme descriptive parameter type

-- Definition --
data type providing a descriptive property for the soil-related property (soil theme) that is represented by its associated SoilThemeCoverage.

-- Description --
this datatype exists of a name and if needed a unit of measurement.
EXAMPLE confidence level for each value in the SoilThemeCoverage (pH in the topsoil)</documentation>
		</annotation>
	</element>
	<complexType name="SoilThemeDescriptiveParameterTypeType">
		<sequence>
			<element name="soilThemeDescriptiveParameterName" type="string">
				<annotation>
					<documentation>-- Name --
soil theme descriptive parameter name

-- Definition --
Name of the parameter to provide extra information on the values of the related  SoilThemeCoverage.

-- Description --
EXAMPLE soilThemeDescriptiveParameterName = confidence level. SoilThemeCoverage = coverage representing the pH of the topsoil</documentation>
				</annotation>
			</element>
			<element name="uom" type="gml:UnitOfMeasureType" minOccurs="0">
				<annotation>
					<documentation>-- Name --
unit of measure

-- Definition --
the unit of measure that is used to express the soilThemeDescriptiveParameter.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="SoilThemeDescriptiveParameterTypePropertyType">
		<sequence>
			<element ref="so:SoilThemeDescriptiveParameterType"/>
		</sequence>
	</complexType>
	<element name="DerivedProfilePresenceInSoilBody" type="so:DerivedProfilePresenceInSoilBodyType" substitutionGroup="gml:AbstractGML">
		<annotation>
			<documentation>-- Name --
derived profile presence in soil body

-- Definition --
indicates the percentages (lower and upper boundary) that the derived profile takes part in the Soil body.

-- Description --
NOTE 1 A soil body is characterized by one or more derived soil profiles in a defined geographic area. When the soil body is characterized by more than one derived profiles, the distribution area of these derived soil profiles is not spatially defined, but their presence is indicated by a range of percentages.

NOTE 2 The sum of lower boundary parts should not exceed 100%. 

NOTE 3 If not a range, but a specific percentage is used then the lower and upper boundaries are equal.</documentation>
		</annotation>
	</element>
	<complexType name="DerivedProfilePresenceInSoilBodyType">
		<complexContent>
			<extension base="gml:AbstractGMLType">
				<sequence>
					<element name="derivedProfilePercentageRange" nillable="true">
						<annotation>
							<documentation>-- Name --
derived profile percentage range.

-- Definition --
Interval that defines the minimum and maximum percentage of the area of the soil body represented by a specific derived soil profile.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="so:RangeType"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="isDescribedBy" nillable="true">
						<annotation>
							<documentation>-- Definition --
Link to a derived soil profile that characterizes the soil body, possibly in combination with other derived soil profiles.
The association has additional properties as defined in the association class DerivedProfilePresenceInSoilBody.

-- Description --
This association constitutes the link to those derived soil profiles that inform about the internal structure and properties of the soil body.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="so:DerivedSoilProfile"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="DerivedProfilePresenceInSoilBodyPropertyType">
		<sequence minOccurs="0">
			<element ref="so:DerivedProfilePresenceInSoilBody"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="SoilHorizon" type="so:SoilHorizonType" substitutionGroup="so:ProfileElement">
		<annotation>
			<documentation>-- Name --
soil horizon

-- Definition -- 
Domain of a soil with a certain vertical extension, more or less parallel to the surface and homogeneous for most morphological and analytical characteristics, developed in a parent material layer through pedogenic processes or made up of in-situ sedimented organic residues of up-growing plants (peat).

-- Description --
SOURCE ISO/WD 28258, modified
NOTE Horizons may be part of a layer.</documentation>
		</annotation>
	</element>
	<complexType name="SoilHorizonType">
		<complexContent>
			<extension base="so:ProfileElementType">
				<sequence>
					<element name="FAOHorizonNotation" nillable="true">
						<annotation>
							<documentation>-- Name --
FAO horizon notation

-- Definition --
designation of the soil horizon.

-- Description --
The FAO horizon notation is a code system characterizing horizons regarding the dominant soil forming processes that have been active during the horizon formation. This code summarizes many observations of the soil description and gives an impression about the genetic processes that have formed the soil under observation. 

NOTE The horizon notation is a combination of several letter, number and symbols.

SOURCE Guidelines for soil description, 4'||'&'||'lt;sup'||'&'||'gt;th'||'&'||'lt;/sup'||'&'||'gt; edition, Food and Agricultural Organization of the United Nations, Rome, 2006

EXAMPLE Bw: meaning B horizon with a development of colour and/or structure.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="so:FAOHorizonNotationType"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="otherHorizonNotation" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
other horizon notation

-- Definition --
designation of the soil horizon according to a specific classification system.

-- Description --
A code system characterizing horizons regarding the dominant soil forming processes that have been active during the horizon formation. This code summarizes many observations of the soil description and gives information about the genetic processes that have formed the soil under observation.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="so:OtherHorizonNotationType"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="SoilHorizonPropertyType">
		<sequence minOccurs="0">
			<element ref="so:SoilHorizon"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="FAOHorizonNotationType" type="so:FAOHorizonNotationTypeType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
FAO horizon notation type

-- Definition --
A classification of a horizon according to the Horizon classification system specified in '||'&'||'lt;i'||'&'||'gt;Guidelines for soil description, 4th edition'||'&'||'lt;/i'||'&'||'gt;, Food and Agriculture Organization of the United Nations, Rome, 2006.

-- Description --
A code system that denotes horizons in which the same dominant soil forming processes has been active similarly. This code summarizes many observations of the soil description and gives an impression about the genetic processes that have formed the soil under observation.

NOTE The horizon notation according to FAO (2006) is a combination of several symbols:
- A number that gives information about discontinuities, i.e. the number of the material in which the soil has formed, counted up from the soil surface, but not for the first material.
- One or two capital letters that designate the type of master horizon (or transitional horizon), possibly separated by a slash
- Lower case letters that designate subordinate characteristics of the horizon. 
- A number that designates horizontal subdivisions of otherwise similarly denoted horizon parts
- A prime that enables to distinguish two horizons that have the same naming, but formed in different cycles of pedogenesis. 

EXAMPLE 2B'' tg1 

SOURCE 1 Page 67 - 77 of the '||'&'||'lt;i'||'&'||'gt;Guidelines for soil description, 4th edition'||'&'||'lt;/i'||'&'||'gt;, Food and Agriculture Organization of the United Nations, Rome, 2006. (ISBN 92-5-105521-1)</documentation>
		</annotation>
	</element>
	<complexType name="FAOHorizonNotationTypeType">
		<sequence>
			<element name="FAOHorizonDiscontinuity" type="integer" minOccurs="0">
				<annotation>
					<documentation>-- Name --
FAO horizon discontinuity

-- Definition --
number used to indicate a discontinuity in the horizon notation.

-- Description --
In mineral soils, Arabic numerals are used as prefixes to indicate discontinuities. Wherever needed, they are used preceding A, E, B, C and R. They are not used with I and W, although these symbols clearly indicate a discontinuity. These prefixes are distinct from Arabic numerals used as suffixes to denote vertical subdivisions.
A discontinuity is a significant change in particle-size distribution or mineralogy that indicates a difference in the material from which the horizons formed or a significant difference in age or both, unless that difference in age is indicated by the suffix b. Symbols to identify discontinuities are used only when they will contribute substantially to the reader''s understanding of relationships among horizons. The stratification common in soils formed in alluvium is not designated as discontinuities unless particle-size distribution differs markedly from layer to layer even though genetic horizons have formed in the contrasting layers. 
Where a soil has formed entirely in one kind of material, a prefix is omitted from the symbol; the whole profile is material 1. Similarly, the uppermost material in a profile having two or more contrasting materials is understood to be material 1, but the number is omitted. Numbering starts with the second layer of contrasting material, which is designated 2. Underlying contrasting layers are numbered consecutively. 

SOURCE: '||'&'||'lt;i'||'&'||'gt;Guidelines for soil description, 4th edition'||'&'||'lt;/i'||'&'||'gt;, Food and Agriculture Organization of the United Nations, Rome, 2006.

NOTE a discontinuity is a boundary between two geogenic layers.</documentation>
				</annotation>
			</element>
			<element name="FAOHorizonMaster" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Name --
FAO horizon master

-- Definition --
symbol of the master part of the horizon notation.

-- Description --
SOURCE Guidelines for soil description (4th ed.) FAO 2006 p. 67</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="FAOPrime" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Name --
FAO prime

-- Definition --
A prime and double prime may be used to connotate master horizon symbol of the lower of two respectively three horizons having identical Arabic-numeral prefixes and letter combinations.

-- Description --
Identical designations may be appropriate for two or more horizons or layers separated by at least one horizon or layer of a different kind in the same pedon. The sequence A-E-Bt-E-Btx-C is an example - the soil has two E horizons. To make communication easier, a prime is used with the master horizon symbol of the lower of two horizons having identical letter designations: A-E-Bt-E''Btx-C.The prime is applied to the capital letter designation, and any lower case symbol follows it: B''t. The prime is not used unless all letters of the designations of two different layers are identical. Prime can be used for both minerals or organic soils.

SOURCE: '||'&'||'lt;i'||'&'||'gt;Guidelines for soil description, 4th edition'||'&'||'lt;/i'||'&'||'gt;, Food and Agriculture Organization of the United Nations, Rome, 2006.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="FAOHorizonSubordinate" type="gml:ReferenceType" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Name --
horizon subordinate

-- Definition --
Designations of subordinate distinctions and features within the master horizons and layers are based on profile characteristics observable in the field and are applied during the description of the soil at the site.

-- Description --
Lower case letters are used as suffixes to designate specific kinds of master horizons and layers, and other features.

SOURCE '||'&'||'lt;i'||'&'||'gt;Guidelines for soil description, 4th edition'||'&'||'lt;/i'||'&'||'gt;, Food and Agriculture Organization of the United Nations, Rome, 2006. table 85</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="FAOHorizonVertical" type="integer" minOccurs="0">
				<annotation>
					<documentation>-- Name --
horizon vertical

-- Definition --
Order number of the vertical subdivision in the horizon notation.

-- Description --
The number is used to designate the horizontal subdivision of a horizon identified by a single set of letter symbol on the basis of structure, texture, colour, etc. 
The number 1 is used to designate the upper part of the horizon. The number 2 the part of the horizon situated below, etc. If there is no horizontal subdivision made, no number is given.

NOTE the use of the word vertical is misleading in the '||'&'||'lt;i'||'&'||'gt;Guidelines for soil description, 4th edition'||'&'||'lt;/i'||'&'||'gt;, Food and Agriculture Organization of the United Nations, Rome, 2006., because the horizons are separated in two or several horizontal subdomains. Vertical denotes the order in vertical direction.</documentation>
				</annotation>
			</element>
			<element name="isOriginalClassification" type="boolean">
				<annotation>
					<documentation>-- Name --
is original classification

-- Definition --
Boolean value to indicate whether the FAO horizon notation was the original notation to describe the horizon.

-- Description --
This is to indicate whether the horizon notation has been determined in the field (or for derived profiles during the original derivation), or has been adapted, changed or assigned on the basis of the original horizon description later. This might be relevant data quality information.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="FAOHorizonNotationTypePropertyType">
		<sequence>
			<element ref="so:FAOHorizonNotationType"/>
		</sequence>
	</complexType>
	<element name="WRBSoilNameType" type="so:WRBSoilNameTypeType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
WRB soil name type

-- Definition --
an identification of the soil profile according to the profile to according to "World Reference Base for Soil Resources 2006, first update 2007", World Soil Resources Reports No. 103. FAO, Rome. 

-- Description --
NOTE The structure of the WRBSoilNameType was based on the '||'&'||'lt;i'||'&'||'gt;World reference base for soil resources 2006'||'&'||'lt;/i'||'&'||'gt;, '||'&'||'lt;i'||'&'||'gt;first update 2007'||'&'||'lt;/i'||'&'||'gt;, World Soil Resources Reports No. 103, Food and Agriculture Organization of the United
Nations, Rome, 2007.
EXAMPLE Lixic Vertic Ferralsol (Ferric, Rhodic), WRB 2006, update 2007.</documentation>
		</annotation>
	</element>
	<complexType name="WRBSoilNameTypeType">
		<sequence>
			<element name="WRBQualifierGroup" type="so:WRBQualifierGroupTypePropertyType" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Name --
WRB qualifier group

-- Definition --
data type to define the a group of a qualifier and its possible specifier(s), its place and position with regard to the WRBReferenceSoilGroup it belongs to.</documentation>
				</annotation>
			</element>
			<element name="WRBReferenceSoilGroup" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Name --
WRB reference soilgroup (RSG)

-- Definition --
first level of classification of the World Reference Base for Soil Resources.

-- Description --
'||'&'||'lt;i'||'&'||'gt;Reference Soil Groups'||'&'||'lt;/i'||'&'||'gt; are distinguished by the presence (or absence) of specific '||'&'||'lt;i'||'&'||'gt;diagnostic horizons, properties '||'&'||'lt;/i'||'&'||'gt;and/or'||'&'||'lt;i'||'&'||'gt; materials.'||'&'||'lt;/i'||'&'||'gt;
NOTE The WRB soil classification system comprises 32 different RSGs.
SOURCE '||'&'||'lt;i'||'&'||'gt;World reference base for soil resources 2006'||'&'||'lt;/i'||'&'||'gt;, '||'&'||'lt;i'||'&'||'gt;first update 2007'||'&'||'lt;/i'||'&'||'gt;, World Soil Resources Reports No. 103, Food and Agriculture Organization of the United Nations, Rome, 2007.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="isOriginalClassification" type="boolean">
				<annotation>
					<documentation>-- Name --
is original classification

-- Definition --
Boolean value to indicate whether the WRB classification system was the original classification system to describe the soil profile.

-- Description --
This is to indicate whether the soil assignation according to WRB has been determined in the field (or for - derived - profiles during the original derivation process), or has been adapted, changed or re-assigned on the basis of the original soil description or assignation later. This might be relevant data quality information.</documentation>
				</annotation>
			</element>
			<element name="over" type="so:WRBSoilNameTypePropertyType" minOccurs="0">
				<annotation>
					<documentation>-- Definition --
An association to indicate that in the WRB classification a soil profile covers another developed, older soil.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="WRBSoilNameTypePropertyType">
		<sequence>
			<element ref="so:WRBSoilNameType"/>
		</sequence>
	</complexType>
	<element name="SoilThemeDescriptiveCoverage" type="so:SoilThemeDescriptiveCoverageType" substitutionGroup="gmlcov:RectifiedGridCoverage">
		<annotation>
			<documentation>-- Name --
soil theme descriptive coverage

-- Definition --
a spatial object type that is associated to the soil theme coverage and holds additional information on values of a property of the soil theme coverage.

-- Description --
This coverage can only exist in relation to a base coverage SoilThemeCoverage, it has the same domain and spatial extent as the base coverage. And it gives extra information on the values of the base coverages
SOURCE Adapted from "Coverage" [ISO 19123:2005].
EXAMPLE coverage indicating the confidence level of the pH values reported in the associated SoilThemeCoverage.</documentation>
		</annotation>
	</element>
	<complexType name="SoilThemeDescriptiveCoverageType">
		<complexContent>
			<extension base="gmlcov:AbstractDiscreteCoverageType">
				<sequence>
					<element name="beginLifespanVersion" type="dateTime">
						<annotation>
							<documentation>-- Name --
begin life span version

-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
						</annotation>
					</element>
					<element name="endLifespanVersion" type="dateTime" minOccurs="0">
						<annotation>
							<documentation>-- Name --
end life span version

-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
						</annotation>
					</element>
					<element name="domainExtent" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
Domain extent.

-- Definition --
The attribute domainExtent shall contain the extent of the spatiotemporal domain of the coverage.  The data type EX_Extent, is defined in ISO 19103.  Extents may be specified in both space and time. 

-- Description --
SOURCE Adapted from [ISO 19123:2005].</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMetadataPropertyType">
									<sequence minOccurs="0">
										<element ref="gmd:EX_Extent"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="soilThemeDescriptiveParameter" type="so:SoilThemeDescriptiveParameterTypePropertyType">
						<annotation>
							<documentation>-- Name --
soil theme descriptive parameter

-- Definition --
a descriptive property for the soil-related property (soil theme) that is represented by its associated SoilThemeCoverage.

-- Description --
EXAMPLE confidence level for each value in the SoilThemeCoverage (pH in the topsoil)</documentation>
						</annotation>
					</element>
					<element name="isDescribing" nillable="true">
						<annotation>
							<documentation>-- Definition --
this association allows for a certain SoilThemeCoverage to have a related Coverage which does not have a meaning without the base coverage. 

-- Description --
EXAMPLE a coverage of the pH of the topsoil is associated with a coverage with exactly the same extent and domain reporting on the level of confidence of the pH values of the base coverage.</documentation>
							<appinfo>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">so:isDescribedBy</reversePropertyName>
							</appinfo>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="so:SoilThemeCoverage"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="SoilThemeDescriptiveCoveragePropertyType">
		<sequence minOccurs="0">
			<element ref="so:SoilThemeDescriptiveCoverage"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="OtherSoilNameType" type="so:OtherSoilNameTypeType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
other soil name type

-- Definition --
an identification of the soil profile according to a specific classification scheme.

-- Description --
EXAMPLE Fluventic Haploxerept, according to Soil Taxonomy (USDA 2006).</documentation>
		</annotation>
	</element>
	<complexType name="OtherSoilNameTypeType">
		<sequence>
			<element name="soilName" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Name --
soil name

-- Definition --
name of the soil profile according to a specific classification scheme.

-- Description --
EXAMPLE Fluventic Haploxerept, according to Soil Taxonomy (USDA 2006).</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">technicalGuidance</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="isOriginalClassification" type="boolean">
				<annotation>
					<documentation>-- Name --
is original classification

-- Definition --
Boolean value to indicate whether the specified classification scheme was the original classification scheme to describe the profile.

-- Description --
This is to indicate whether the soil assignation has been determined in the field (or for - derived soil profiles during the original derivation process), or has been adapted, changed or re-assigned on the basis of the original soil description or assignation later. This might be relevant for data quality information.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="OtherSoilNameTypePropertyType">
		<sequence>
			<element ref="so:OtherSoilNameType"/>
		</sequence>
	</complexType>
	<element name="SoilProfile" type="so:SoilProfileType" abstract="true" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
soil profile

-- Definition -- 
description of the soil that is characterized by a vertical succession of profile elements.

-- Description --
NOTE The soil profile is abstracted from observations in a trial pit or a boring, or derived from expert knowledge using other soil profiles.</documentation>
		</annotation>
	</element>
	<complexType name="SoilProfileType" abstract="true">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
inspire Id

-- Definition --
External object identifier of the soil profile.

-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="localIdentifier" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
local identifier

-- Definition --
unique identifier of the soil profile given by the data provider of the dataset.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="string">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="WRBSoilName" nillable="true">
						<annotation>
							<documentation>-- Name --
WRB soil name

-- Definition --
identification of the soil profile.
-- Description --
NOTE The structure of the WRBSoilNameType was based on the World reference base for soil resources 2006, first update 2007. World Soil Resources Reports no 103. Food and Agriculture Organization of the United Nations, Rome 2007.
EXAMPLE Lixic Vertic Ferralsol (Ferric, Rhodic); WRB version 2006 (update 2007) or 2010.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="so:WRBSoilNameType"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="otherSoilName" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
other soil name

-- Definition --
Identification of the soil profile according to a specific classification scheme.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="so:OtherSoilNameType"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="validFrom" nillable="true">
						<annotation>
							<documentation>-- Name --
valid from

-- Definition --
The time when the phenomenon started to exist in the real world.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="validTo" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
valid to

-- Definition --
The time from which the phenomenon no longer exists in the real world.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="beginLifespanVersion" nillable="true">
						<annotation>
							<documentation>-- Name --
begin lifespan version

-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
						</annotation>';
            
        
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    
    pos := pos + amt;
    buf :=        
'						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="endLifespanVersion" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
end lifespan version

-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="isDescribedBy" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
the profile elements (layers and/or horizons) constituting the soil profile.

-- Description --
A profile element is always part of a soil profile.</documentation>
							<appinfo>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">so:isPartOf</reversePropertyName>
							</appinfo>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="so:ProfileElement"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="SoilProfilePropertyType">
		<sequence minOccurs="0">
			<element ref="so:SoilProfile"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="SoilLayer" type="so:SoilLayerType" substitutionGroup="so:ProfileElement">
		<annotation>
			<documentation>-- Name --
Soil layer

-- Definition --
domain of a soil with a certain vertical extension developed through non-pedogenic processes, displaying a change in structure and/or composition to possibly over- or underlying adjacent domains, or a grouping of soil horizons or other sub-domains with a special purpose.

-- Description --
NOTE1 Different kinds of layer concepts are covered by this definition. 

EXAMPLE 1 Geogenic layers: These are domains, resulting from e.g. sedimentation (as non-pedogenic) processes, that display an unconformity to possibly over- or underlying adjacent domains.

EXAMPLE 2 Topsoil and Subsoil: These can be domains that group different soil horizon types (e.g. A vs. B horizons), or a special case of fixed depths with only two depth ranges (e.g. 0-15 cm: topsoil and, 15-75 cm: subsoil).

EXAMPLE 3 Depth intervals: They are often used in soil monitoring, sampling of contaminated sites and in modelling and include: (i) depth increments (also called fixed depths) that are often used for sampling, e.g. 0-30cm, 30-60cm, and so on, (ii) a single depth range in which a soil sample ('||'&'||'amp;rdquo;specimen'||'&'||'amp;rdquo;) is taken and for which the analytical result is valid, and (iii) soil slicing, that is, profile segmentation according to a specified vector, for instance, either regularly spaced intervals (1cm), or a user-defined vector of segment boundaries (i.e. 0-10, 10-25, 25-50, 50-100). Slicing is used in modelling to generate continuous depth functions for soil properties.

EXAMPLE 4: In the framework of soils deeply modified by human activity, artificial layers may be due to different kinds of deposits (concrete, bricks, '||'&'||'amp;hellip;). 
SOURCE WD ISO28258, modified</documentation>
		</annotation>
	</element>
	<complexType name="SoilLayerType">
		<complexContent>
			<extension base="so:ProfileElementType">
				<sequence>
					<element name="layerType" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Name --
layer type

-- Definition --
assignation of a layer according to the concept that fits its kind.

-- Description --
EXAMPLE Topsoil: meaning the upper part of the natural mineral soil that is generally dark coloured and has a higher content of organic matter and nutrients when compared to the mineral horizons below.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="layerRockType" type="gml:ReferenceType" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
layer rock type
'||'&'||'lt;font color="#ff0000"'||'&'||'gt;
'||'&'||'lt;/font'||'&'||'gt;-- Definition --
type of the material in which the layer developed.

-- Description --
simplified list of  terms to '||'&'||'amp;ldquo;classify'||'&'||'amp;rdquo; geologic units</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="layerGenesisProcess" type="gml:ReferenceType" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
layer genesis process

-- Definition --
last non-pedogenic process (geologic or anthropogenic) that coined the material composition and internal structure of the layer.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="layerGenesisEnvironment" type="gml:ReferenceType" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
layer genesis environment

-- Definition --
setting in which the last non-pedogenic process (geologic or anthropogenic) that coined the material composition and internal structure of the layer took place.

-- Description --
The material in which a soil develops is influenced by the environmental situation in which the processes of its formation took place, e.g. sedimentation from water results in quite differently structured layers when it has been deposited in running water than in a lake.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="layerGenesisProcessState" type="gml:ReferenceType" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
layer genesis process state

-- Definition --
indication whether the process specified in layerGenesisProcess is on-going or seized in the past.

-- Description --
Process state gives an idea whether current non-pedogenic processes affect the soil or not. E.g. on current floodplains, input of sediments during seasonal flooding events is received, with comparatively young soil development in it, while in older fluvial sediments that are no longer under a regime of seasonal or irregular flooding, soil development might be more advanced.</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="SoilLayerPropertyType">
		<sequence minOccurs="0">
			<element ref="so:SoilLayer"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="SoilDerivedObject" type="so:SoilDerivedObjectType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
soil derived object

-- Definition --
A spatial object type for representing spatial objects with soil-related property derived from one or more soil and possibly other non soil properties.

-- Description --
NOTE Soil thematic maps can be derived directly from the involved soil database (organic matter content, pH, texture, etc.) or they can be derived by using pedotransfer functions or pedotransfer rules (e.g. plant available water in the rooting depth). Derivation can be simple extraction from a single data field, or a complex combination of different kind of data and application of e.g. mathematical or expert knowledge-based procedures.</documentation>
		</annotation>
	</element>
	<complexType name="SoilDerivedObjectType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
inspire Id

-- Definition --
External object identifier of the SoilDerivedObject.

-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="geometry" type="gml:GeometryPropertyType">
						<annotation>
							<documentation>-- Name --
geometry

-- Definition --
the geometry defining the soil derived object.

-- Description --
A spatial representation of soil information becomes spatially explicit by delineating areas with similar values according to the soil (or other) property that is represented.</documentation>
						</annotation>
					</element>
					<element name="isBasedOnSoilBody" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Link to a soil body on whose properties the derived value is based.
-- Description --
A soil derived object can be created based on the soil properties of one or more soil bodies. If this information shall not be included or does not apply, the association can be empty.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="so:SoilBody"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
					<element name="isBasedOnObservedSoilProfile" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Link to an observed soil profile on whose properties the derived value is based.
-- Description --
A soil derived object can be created based on the soil properties of one or more observed soil profiles. If this information shall not be included or does not apply, the association can be empty.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="so:ObservedSoilProfile"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
					<element name="isBasedOnSoilDerivedObject" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Link to a soil derived object on whose properties the derived value is based.
-- Description --
A soil derived object can be created based on the properties of one or more other soil derived objects. If this information shall not be included or does not apply, the association can be empty.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="so:SoilDerivedObject"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="SoilDerivedObjectPropertyType">
		<sequence minOccurs="0">
			<element ref="so:SoilDerivedObject"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="OtherHorizonNotationType" type="so:OtherHorizonNotationTypeType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
other horizon notation type

-- Definition --
classification of a horizon according to a specific classification system.

-- Description --
A code system denoting horizons in which the same dominant soil forming processes have been active in the same way. This code summarizes many observations of the soil description and gives an impression about the genetic processes that have formed the soil under observation.</documentation>
		</annotation>
	</element>
	<complexType name="OtherHorizonNotationTypeType">
		<sequence>
			<element name="horizonNotation" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Name --
horizon notation

-- Definition --
notation characterizing the soil horizon according to a specified classification system.

-- Description --
NOTE This is also called horizon designation value, horizon designation or horizon symbol.
EXAMPLE '||'&'||'amp;ldquo;ss'||'&'||'amp;rdquo; connotes slickensides in Soil taxonomy (FAO uses '||'&'||'amp;ldquo;I'||'&'||'amp;rdquo; for this).
The notation in several classification systems can be the same as well: '||'&'||'amp;ldquo;Ap'||'&'||'amp;rdquo; is a A horizon which has been ploughed (according German Bodenkundliche Kartieranleitung, 5th ed).</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">technicalGuidance</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="isOriginalClassification" type="boolean">
				<annotation>
					<documentation>-- Name --
is original classification

-- Definition --
Boolean value to indicate whether the specified horizon notation system was the original notation system to describe the horizon.

-- Description --
This is to indicate whether the horizon notation has been determined in the field (or for derived soil profiles during the original derivation), or has been adapted, changed or assigned on the basis of the original horizon description later. This might be relevant for data quality information.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="OtherHorizonNotationTypePropertyType">
		<sequence>
			<element ref="so:OtherHorizonNotationType"/>
		</sequence>
	</complexType>
	<element name="ObservedSoilProfile" type="so:ObservedSoilProfileType" substitutionGroup="so:SoilProfile">
		<annotation>
			<documentation>-- Name --
observed soil profile

-- Definition -- 
a representation of a soil profile found on a specific location which is described on the basis of observations in a trial pit or with a borehole.

-- Description --
The observed soil profile corresponds to a set of data taken directly from a georeferenced'||'&'||'lt;b'||'&'||'gt; '||'&'||'lt;/b'||'&'||'gt;soil profile, described in the field, and often sampled and analyzed in the laboratory.</documentation>
		</annotation>
	</element>
	<complexType name="ObservedSoilProfileType">
		<complexContent>
			<extension base="so:SoilProfileType">
				<sequence>
					<element name="location" type="so:SoilPlotPropertyType">
						<annotation>
							<documentation>-- Definition --
the location of an observed profile is the soilplot.</documentation>
							<appinfo>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">so:observedProfile</reversePropertyName>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="ObservedSoilProfilePropertyType">
		<sequence minOccurs="0">
			<element ref="so:ObservedSoilProfile"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="ProfileElement" type="so:ProfileElementType" abstract="true" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
profile element

-- Definition --
An abstract spatial object type grouping soil layers and / or horizons for functional/operational aims.

-- Description --
Profile element is the general term for both horizons and layers.</documentation>
		</annotation>
	</element>
	<complexType name="ProfileElementType" abstract="true">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
inspire Id

-- Definition --
External object identifier of the profile element.

-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="particleSizeFraction" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
particle size fraction

-- Definition --
Mineral part of the soil, fractioned on the basis of size (diameter), limits of the particles. It indicates how much of the mineral soil material is composed of soil particles of the specified size range.
-- Description --

SOURCE NRCS Natural Resources Conservation Service, Soil survey laboratory information manual, Soil survey investigation report n.45 version 1.0 May 1995 pag. 11</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="so:ParticleSizeFractionType"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="profileElementDepthRange" type="so:RangeTypePropertyType">
						<annotation>
							<documentation>-- Name --
profile element depth range

-- Definition --
Upper and lower depth of the profile element (layer or horizon) measured from the surface (0 cm) of a soil profile (in cm).

-- Description --
Depth range consists of the average upper and lower depth of appearance of the profile element from the surface.

NOTE Most soil boundaries are zones of transition rather than sharp lines of division. The average depth of the upper boundaries and the average depth of the lower boundaries of each profile element are given in centimetres, measured from the surface (including organic and mineral covers) of the soil downwards, i.e. all depth values are positive numbers. 
EXAMPLE H horizon 0-5 cm, A horizon 5-30 cm, B horizon 30-80 cm

NOTE Following rules should be taken into account
'||'&'||'amp;nbsp;
'||'&'||'lt;ul'||'&'||'gt;
	'||'&'||'lt;li'||'&'||'gt;lowerValue and upperValue: should be positive values, '||'&'||'lt;/li'||'&'||'gt;
	'||'&'||'lt;li'||'&'||'gt;upperValue is the depth from the top of the element (e.g. 20)'||'&'||'lt;/li'||'&'||'gt;
	'||'&'||'lt;li'||'&'||'gt;lowerValue is the depth of the bottom of the element (e.g. 40)'||'&'||'lt;/li'||'&'||'gt;
	'||'&'||'lt;li'||'&'||'gt;if only upperValue is indicated: it is assumed that the lowerValue is unknown; this is only possible for the deepest layer or horizon of a profile.'||'&'||'lt;/li'||'&'||'gt;
	'||'&'||'lt;li'||'&'||'gt;if only lowerValue is indicated: it is assumed that the upperValue equals 0, and thus the range is between 0 and the lowerValue value'||'&'||'lt;/li'||'&'||'gt;
'||'&'||'lt;/ul'||'&'||'gt;</documentation>
						</annotation>
					</element>
					<element name="beginLifespanVersion" nillable="true">
						<annotation>
							<documentation>-- Name --
begin lifespan version

-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="endLifespanVersion" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
end lifespan version

-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="isPartOf" type="so:SoilProfilePropertyType">
						<annotation>
							<documentation>-- Definition --
link to the soil profile which the profile element constitutes.</documentation>
							<appinfo>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">so:isDescribedBy</reversePropertyName>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="ProfileElementPropertyType">
		<sequence minOccurs="0">
			<element ref="so:ProfileElement"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="DerivedSoilProfile" type="so:DerivedSoilProfileType" substitutionGroup="so:SoilProfile">
		<annotation>
			<documentation>-- Name --
derived soil profile

-- Definition --
non-point-located soil profile that serves as a reference profile for a specific soil type in a certain geographical area.

-- Description --
The characteristics of a derived soil profile are mostly derived (e.g. averaged) from one or several observed profiles of the same soil type in the area of interest, or are designed with expert knowledge about the same kind of landscape.

NOTE 1 The derived soil profile represents the average or typical profile that characterizes the so called soil typological unit, soil series.</documentation>
		</annotation>
	</element>
	<complexType name="DerivedSoilProfileType">
		<complexContent>
			<extension base="so:SoilProfileType">
				<sequence>
					<element name="isDerivedFrom" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
link to one or more observed soil profiles from which this profile has been derived.

-- Description --
A derived soil profile can be derived from one to many observed soil profiles. If no observed profiles are provided or have been used to produce the derivedSoilProfile, this association can be left empty.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="so:ObservedSoilProfile"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="DerivedSoilProfilePropertyType">
		<sequence minOccurs="0">
			<element ref="so:DerivedSoilProfile"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="SoilThemeCoverage" type="so:SoilThemeCoverageType" substitutionGroup="gmlcov:RectifiedGridCoverage">
		<annotation>
			<documentation>-- Name --
soil theme coverage

-- Definition --
a spatial object type that holds values for a property based on one or more soil and possibly non soil parameters within its spatial, temporal or spatiotemporal domain.

-- Description --
SOURCE Adapted from "Coverage" [ISO 19123:2005].</documentation>
		</annotation>
	</element>
	<complexType name="SoilThemeCoverageType">
		<complexContent>
			<extension base="gmlcov:AbstractDiscreteCoverageType">
				<sequence>
					<element name="beginLifespanVersion" type="dateTime">
						<annotation>
							<documentation>-- Name --
begin life span version

-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
						</annotation>
					</element>
					<element name="endLifespanVersion" type="dateTime" minOccurs="0">
						<annotation>
							<documentation>-- Name --
end life span version

-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
						</annotation>
					</element>
					<element name="domainExtent" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
Domain extent.

-- Definition --
The attribute domainExtent shall contain the extent of the spatiotemporal domain of the coverage.  The data type EX_Extent, is defined in ISO 19103.  Extents may be specified in both space and time. 

-- Description --
SOURCE Adapted from [ISO 19123:2005].</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMetadataPropertyType">
									<sequence minOccurs="0">
										<element ref="gmd:EX_Extent"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="validTimeFrom" nillable="true">
						<annotation>
							<documentation>-- Name --
valid time from

-- Definition --
The ValidTime specifies the time window for which measurements have been captured to calculate the thematic soil property relevant for that period. The start time defines when the period began.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="date">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="validTimeTo" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
valid time to

-- Definition --
The ValidTime specifies the time window for which measurements have been captured to calculate the thematic soil property relevant for that period. The end time defines when the period stopped.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="date">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="soilThemeParameter" type="so:SoilThemeParameterTypePropertyType">
						<annotation>
							<documentation>-- Name --
soil theme parameter

-- Definition --
A soil-related property (soil theme) that is represented by this coverage.

-- Description --
EXAMPLE Land irrigation suitability, pH in the topsoil, etc</documentation>
						</annotation>
					</element>
					<element name="isDescribedBy" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
this association allows for a certain SoilThemeCoverage to have a related Coverage which does not have a meaning without the base coverage.

-- Description --
EXAMPLE a coverage of the pH of the topsoil is associated with a coverage with exactly the same extent and domain reporting on the level of confidence of the pH values of the base coverage.</documentation>
							<appinfo>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">so:isDescribing</reversePropertyName>
							</appinfo>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="so:SoilThemeDescriptiveCoverage"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="SoilThemeCoveragePropertyType">
		<sequence minOccurs="0">
			<element ref="so:SoilThemeCoverage"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="RangeType" type="so:RangeTypeType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
range type

-- Definition --
A range value defined by an upper limit and a lower limit.</documentation>
		</annotation>
	</element>';
            
        
    amt := length(buf);
    
    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    
    pos := pos + amt;
    buf :=        
'	<complexType name="RangeTypeType">
		<sequence>
			<element name="upperValue" type="double" minOccurs="0">
				<annotation>
					<documentation>-- Name --
upper value

-- Definition --
value defining the upper limit of a specific property.</documentation>
				</annotation>
			</element>
			<element name="lowerValue" type="double" minOccurs="0">
				<annotation>
					<documentation>-- Name --
lower value

-- Definition --
value defining the lower limit of a specific property.</documentation>
				</annotation>
			</element>
			<element name="uom" type="gml:UnitOfMeasureType" minOccurs="0">
				<annotation>
					<documentation>-- Name --
unit of measure

-- Definition --
The unit of measure that is used to express the values of the range.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="RangeTypePropertyType">
		<sequence>
			<element ref="so:RangeType"/>
		</sequence>
	</complexType>
	<element name="SoilPlot" type="so:SoilPlotType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
soil plot

-- Definition --
spot where a specific soil investigation is carried out.

-- Description --
NOTE 1: For observed soil profiles, a spot location has to be defined. It is the place on which the observation is made. The profile is an observation made on the plot.

NOTE 2: All types of plots only provide locality, but no soil information itself. 

EXAMPLE A borehole is the location where you gather the information to abstract a profile information from.

SOURCE GS Soil</documentation>
		</annotation>
	</element>
	<complexType name="SoilPlotType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
inspire Id

-- Definition --
External object identifier of the soil plot.

-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="soilPlotLocation" type="spec:LocationPropertyType">
						<annotation>
							<documentation>-- Name --
soil plot location

-- Definition --
a reference to a location on the earth; it can be a point location identified by coordinates or a description of the location using text or an identifier.

-- Description --
EXAMPLE reference to a place name, municipality or reference to an exact X,Y location</documentation>
						</annotation>
					</element>
					<element name="soilPlotType" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Name --
soil plot type

-- Definition --
gives information on what kind of plot the observation of the soil is made on.

-- Description --
NOTE Trial pits, boreholes or samples can be seen as types of soil plots.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="beginLifespanVersion" nillable="true">
						<annotation>
							<documentation>-- Name --
begin lifespan version

-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="endLifespanVersion" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
end lifespan version

-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="observedProfile" nillable="true">
						<annotation>
							<documentation>-- Definition --
Link to the observed soil profile for which the soil plot provides location information.

-- Description --
the soil plot is the location at which the profile has been observed.</documentation>
							<appinfo>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">so:location</reversePropertyName>
							</appinfo>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="so:ObservedSoilProfile"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
					<element name="locatedOn" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
link to the soil site on which the soil plot is located or to which the soil plot is belonging.

-- Description --
a soil plot (location of a soil observation) is located on maximum 1 soil site.</documentation>
							<appinfo>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">so:isObservedOnLocation</reversePropertyName>
							</appinfo>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="so:SoilSite"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="SoilPlotPropertyType">
		<sequence minOccurs="0">
			<element ref="so:SoilPlot"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="SoilBody" type="so:SoilBodyType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
soil body

-- Definition --
Part of the soil cover that is delineated and that is homogeneous with regard to certain soil properties and/or spatial patterns.

-- Description --
The soils present in the soil body are characterized by one or more derived soil profiles that are found together in the area specified by the '||'&'||'amp;ldquo;geometry'||'&'||'amp;rdquo; attribute of the SoilBody.

NOTE 1 If several derived soil profiles are used to describe the soil body, the spatial distribution of the soil they describe within the soil body is not defined, but their presence is indicated by a range percentage of area. The underlying reason behind the fact of not delineating the different soils within a soil body is the target scale of the map or spatial dataset. This means that geographical accuracy and preciseness of soil characterization depend on and vary with the target scale, i.e. the soil body can be delineated differently among scales.

NOTE 2 The concept of soil body is a correlate of the concept soil mapping unit, and the soils of a soilbody might form e.g. a soil association, a soil complex, etc.</documentation>
		</annotation>
	</element>
	<complexType name="SoilBodyType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
inspire Id

-- Definition --
External object identifier of the soil body.

-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="geometry" type="gml:MultiSurfacePropertyType">
						<annotation>
							<documentation>-- Name --
geometry

-- Definition --
The geometry defining the boundary of the Soil Body.</documentation>
						</annotation>
					</element>
					<element name="soilBodyLabel" nillable="true">
						<annotation>
							<documentation>-- Name --
soil body label

-- Definition --
Label to identify the soil body according to the specified reference framework (metadata).

-- Description --
NOTE in traditional soil maps, this is the identifier for the explanatory text of the mapping unit of the legend.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="string">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="beginLifespanVersion" nillable="true">
						<annotation>
							<documentation>-- Name --
begin lifespan version

-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="endLifespanVersion" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
end lifespan version

-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="isDescribedBy" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Link to a derived soil profile that characterizes the soil body, possibly in combination with other derived soil profiles.
The association has additional properties as defined in the association class DerivedProfilePresenceInSoilBody.

-- Description --
This association constitutes the link to those derived soil profiles that inform about the internal structure and properties of the soil body.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="so:DerivedProfilePresenceInSoilBody"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="SoilBodyPropertyType">
		<sequence minOccurs="0">
			<element ref="so:SoilBody"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="SoilThemeParameterType" type="so:SoilThemeParameterTypeType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
soil theme parameter type

-- Definition --
A soil-related property (soil theme) that is represented by this coverage. It is composed of a parameter name coming from a codelist SoilDerivedObjectParameterNameValue and a Unit of Measure used for expressing that parameter.

-- Description --
EXAMPLE Land irrigation suitability, pH in the topsoil, etc</documentation>
		</annotation>
	</element>
	<complexType name="SoilThemeParameterTypeType">
		<sequence>
			<element name="soilThemeParameterName" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Name --
soil theme parameter name

-- Definition --
name of the parameter represented by the soilThemeCoverage.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">technicalGuidance</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="uom" type="gml:UnitOfMeasureType" minOccurs="0">
				<annotation>
					<documentation>-- Name --
unit of measure

-- Definition --
the unit of measure that is used to express the soilThemeParameter.

-- Description --
EXAMPLE cm to express the soilThemeParameter "depth of the B-horizon"</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="SoilThemeParameterTypePropertyType">
		<sequence>
			<element ref="so:SoilThemeParameterType"/>
		</sequence>
	</complexType>
	<element name="ParticleSizeFractionType" type="so:ParticleSizeFractionTypeType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
particle size fraction type

-- Definition --
share of the soil that is composed of mineral soil particles of the size within the size range specified.

-- Description --
Mineral part of the soil, fractioned on the basis of size (diameter), limits of the particles. It is the fine earth fraction. That is, the portion of the soil that passes through a 2 mm diameter sieve opening.
The grain (or particle) size distribution characterizes the soil mineral material, based on the share of each equivalent diameter class of the individual particles.

SOURCE1 NRCS Natural Resources Conservation Service, Soil survey laboratory information manual, Soil survey investigation report n.45 version 1.0 May 1995 pag. 11
SOURCE2 GLOSSARY OF SOIL SCIENCE TERMS</documentation>
		</annotation>
	</element>
	<complexType name="ParticleSizeFractionTypeType">
		<sequence>
			<element name="fractionContent" type="double">
				<annotation>
					<documentation>-- Name --
fraction content

-- Definition --
Percentage of the defined fraction.

-- Description --
SOURCE NRCS Natural Resources Conservation Service, Soil survey laboratory information manual, Soil survey investigation report n.45 version 1.0 May 1995 pag. 11
NOTE sum of the percentages of all the fractions should be equal to 100 percentage
EXAMPLE percentage value (weight/weight)</documentation>
				</annotation>
			</element>
			<element name="fractionParticleSizeRange" type="so:RangeTypePropertyType">
				<annotation>
					<documentation>-- Name --
fraction particle size range

-- Definition --
upper and lower limit of the particle size of the defined fraction (expressed in micrometers (um))

-- Description --
SOURCE NRCS Natural Resources Conservation Service, Soil survey laboratory information manual, Soil survey investigation report n.45 version 1.0 May 1995 pag. 11
EXAMPLE upper limit = 63um , lower limit =20um</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="ParticleSizeFractionTypePropertyType">
		<sequence>
			<element ref="so:ParticleSizeFractionType"/>
		</sequence>
	</complexType>
	<element name="SoilSite" type="so:SoilSiteType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
soil site

-- Definition -- 
area within a larger survey, study or monitored area, where a specific soil investigation is carried out.

-- Description --
Site provides the object to describe:
a.)	the surroundings of the plot

and/or

b.)	the larger piece of land that is directly linked to and described by all soil investigations on its one or more spots (SoilPlots). It thus provides the object to which soil data of different kind (or the same kind, but at different points in time, e.g. in soil monitoring) obtained on different plots is related as if it would have been collected at the very same place. This allows for:

1.	combination of data that cannot be obtained on the very same place 
EXAMPLE: a soil pit and investigations on earthworm abundance cannot be done in the same place, but possibly some metres apart from each other. Nonetheless shall the results of both investigations be combined to inform about the soil state.
or
2.	comparison of soil condition after some time has elapsed. 
EXAMPLE: Organic carbon stock has been investigated using data from two monitoring periods that had to be conducted on spatially slightly separated places because the sampling is destructive. Nonetheless are the results of both periods regarded as giving an idea how organic carbon stock has changed over the years at the same place.

The site is also the object to state the date and time information on validity, etc.

The soil site might have delineation, but can be located with a centre or reference point location only. Delineated soil sites - possibly in the form of cadastral parcels - are especially used in the inventory of contaminated areas.

NOTE Any plot can be linked to one specific site only, but several plots to one site. 

SOURCE GS Soil, modified</documentation>
		</annotation>
	</element>
	<complexType name="SoilSiteType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
inspire Id

-- Definition --
External object identifier of the soil site.

-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="geometry" type="gml:GeometryPropertyType">
						<annotation>
							<documentation>-- Name --
geometry

-- Definition --
The geometry defining the soil site.

-- Description --
This can be a polygon defining an area in which the survey was conducted, but it can also be a point location which is used as reference point according to which the soil plots are determined.</documentation>
						</annotation>
					</element>
					<element name="soilInvestigationPurpose" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Name --
soil investigation purpose

-- Definition --
indication why a survey was conducted.

-- Description --
For soil two main purposes are identified to carry out soil surveys. One is to classify the soil as a result of soil forming processes (generalSurvey) and the other one is to investigate soil for a specific reason (specificSurvey) like a possible contamination as a result of contaminating activities. This information gives the data user an idea about possible bias in the selection of the site and therefore representativeness of the data that were obtained for a special purpose.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="validFrom" nillable="true">
						<annotation>
							<documentation>-- Name --
valid from

-- Definition --
The time when the phenomenon started to exist in the real world.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="validTo" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
valid to

-- Definition --
The time from which the phenomenon no longer exists in the real world.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="beginLifespanVersion" nillable="true">
						<annotation>
							<documentation>-- Name --
begin lifespan version

-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="endLifespanVersion" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
end lifespan version

-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="isObservedOnLocation" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
link to a location(s) where the soil site has been investigated.

-- Description --
A soil site with a specific investigation purpose can be observed on several locations (soil plots) inside that site area. If only a centre point location is provided, the set of links to soil plots state that the information from these plots can be combined in a meaningful way, i.e. the combination is valid.</documentation>
							<appinfo>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">so:locatedOn</reversePropertyName>
							</appinfo>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="so:SoilPlot"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="SoilSitePropertyType">
		<sequence minOccurs="0">
			<element ref="so:SoilSite"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="WRBQualifierGroupType" type="so:WRBQualifierGroupTypeType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
WRB qualifier group type

-- Definition --
A data type to define the group of a qualifier and its possible specifier(s), its place and position with regard to the World Reference Base (WRB) Reference Soil Group (RSG) it belongs to according to '||'&'||'lt;i'||'&'||'gt;World reference base for soil resources 2006'||'&'||'lt;/i'||'&'||'gt;, '||'&'||'lt;i'||'&'||'gt;first update 2007'||'&'||'lt;/i'||'&'||'gt;, World Soil Resources Reports No. 103, Food and Agriculture Organization of the United Nations, Rome, 2007.</documentation>
		</annotation>
	</element>
	<complexType name="WRBQualifierGroupTypeType">
		<sequence>
			<element name="qualifierPlace" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Name --
qualifier place

-- Definition --
attribute to indicate the placement of the Qualifier with regard to the WRB reference soil group (RSG). The placement can be in front of the RSG i.e. ''prefix'' or it can be behind the RSG i.e. ''suffix''.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="qualifierPosition" type="integer">
				<annotation>
					<documentation>-- Name --
qualifier position

-- Definition --
number to indicate the position of a qualifier with regard to the WRB reference soil group (RSG) it belongs to and with regard to its placement to that (RSG) i.e. as a prefix or a suffix.

-- Description --
If there are one or more prefix qualifiers: one of the qualifiers is in position 1, the other qualifiers are in position 2, 3, etc.; position 1 is the position closest to the RSG; position 2 is the position second closest to the RSG; etc
If there are one or more suffix qualifiers: one of the qualifiers is in position 1, the other qualifiers are in position 2, 3, etc.; position 1 is the position closest to the RSG; position 2 is the position second closest to the RSG; etc</documentation>
				</annotation>
			</element>
			<element name="WRBqualifier" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Name --
WRB qualifier

-- Definition --
name element of WRB, 2nd level of classification

-- Description --
SOURCE '||'&'||'lt;i'||'&'||'gt;World reference base for soil resources 2006'||'&'||'lt;/i'||'&'||'gt;, '||'&'||'lt;i'||'&'||'gt;first update 2007'||'&'||'lt;/i'||'&'||'gt;, World Soil Resources Reports No. 103, Food and Agriculture Organization of the United Nations, Rome, 2007.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="WRBspecifier" type="gml:ReferenceType" minOccurs="0" maxOccurs="2">
				<annotation>
					<documentation>-- Name --
WRB specifier

-- Definition --
code that indicates the degree of expression of a qualifier or the depth range of which the qualifier applies.

-- Description --
Specifiers may be used to indicate depth of occurrence, or to express the intensity of soil characteristics. 
EXAMPLE Buried layers can be indicated by the specifier "Thapto".

NOTE 1 The specifier code is always added after the qualifier code. Exceptions are defined in the qualifier list of WRB.

NOTE 2 Some specifiers can be combined with each other for one qualifier.

SOURCE '||'&'||'lt;i'||'&'||'gt;World reference base for soil resources 2006'||'&'||'lt;/i'||'&'||'gt;, '||'&'||'lt;i'||'&'||'gt;first update 2007'||'&'||'lt;/i'||'&'||'gt;, World Soil Resources Reports No. 103, Food and Agriculture Organization of the United Nations, Rome, 2007.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
					</appinfo>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="WRBQualifierGroupTypePropertyType">
		<sequence>
			<element ref="so:WRBQualifierGroupType"/>
		</sequence>
	</complexType>
</schema>'; 
    
    amt := length(buf);
    
    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 369;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (369, empty_clob(), 'INSPIRE', 'urn:x-inspire:specification:gmlas:SeaRegions:0.0/searegions.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 369 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as searegions_sr_0_0.xsd
    -- Version 3.0 is embedded into "Hydro - Physical Waters" schema (http://inspire.ec.europa.eu/schemas/hy-p/)
    -- Version 3.0 of SeaRegions.xsd will therefore be published together with the updated schemas for the "Hydro - Physical Waters" package.
    buf :=
'<?xml version="1.0" encoding="UTF-8"?><schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="urn:x-inspire:specification:gmlas:BaseTypes:3.2" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:gn="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" xmlns:hy="urn:x-inspire:specification:gmlas:HydroBase:3.0" xmlns:lc="urn:x-inspire:specification:gmlas:LandCover:0.0" xmlns:sr="urn:x-inspire:specification:gmlas:SeaRegions:0.0" elementFormDefault="qualified" targetNamespace="urn:x-inspire:specification:gmlas:SeaRegions:0.0" version="0.0">
  <annotation>
    <documentation>-- Definition --
Physical conditions of seas and saline water bodies divided into regions and sub-regions with common characteristics. (2007/2/EC)

A historical version of the theme definition is found in the INSPIRE IMS paper:
- Seas and saline water bodies divided into regions and sub-regions. Each region with common characteristics, concerning water flow/ circulation, adjacent river catchments, bio-chemical or temperature of water, based on scientific criteria. Detailed information at regional level exist. (INSPIRE IMS, 2003)

Both ''Oceanographic geographical features'' and ''Sea-regions'' are concerned with physical conditions of marine water-masses. (This is a similar overlap to that which exists for themes 7.13 "Atmospheric Conditions" and 7.14 "Meteorological geographical features".) To resolve the ambiguity, we consider the multi-level approach to data needs assessment applied in ETC. Data at local or regional level are often needed for management and policy implementation, while lower resolution (''smaller scale'') data are often required for reporting and policy development/evaluation. The latter includes summaries and integrated data products.

We regard the "Sea regions" theme as focussing on the local/regional level coastal zone.

Whereas 7.15 ''Oceanographic geographical features'' focuses on physical conditions and general circulation of offshore oceanic waters, the ''Sea regions'' theme is concerned with marine features of the coastal zone ? regions defined as ''transitional waters'' and ''coastal waters'' in the Water Framework Directive:
- transitional waters: bodies of surface water in the vicinity of river mouths which are partly saline in character as a result of their proximity to coastal waters but which are substantially influenced by freshwater flows
- coastal waters: surface water on the landward side of a line, every point of which is at a distance of one nautical mile on the seaward side from the nearest point of the baseline from which the breadth of territorial waters is measured, extending where appropriate up to the outer limit of transitional waters

The World Meteorological Organisation also has a geometry-based sea region classification, dividing the ocean into Marsden Squares.
Both biotic and physical parameters and indicators are important in the classification and delineation of sea regions. Physical data requirements for important indicators defined in the WFD and the Integrated Coastal Zone Management policy are outlined in the ETC paper. These include:
- nutrients (nitrate, phosphate and nitrogen: phosphorus ratio) by regional sea and water body type
- concentrations of hazardous substances and pollutants (incl. heavy metals, persistent organic pollutants)
- productivity indicators (incl. surface cholorophyll-a)
- biological classification of waters
- water masses/layers characterised by bulk temperature and salinity properties
- polar area features (incl. pack ice)
- wind (climatological and meteorolog- benthic parameters (sediment, benthic communities/habitats)
- sea level
- chemical species and concentrations
- physical characteristics (incl. temperature, salinity)
- currents (including surface currents)
- tidal zones
- wavesrequired</documentation>
  </annotation>
  <import namespace="urn:x-inspire:specification:gmlas:HydroBase:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/hy/3.0/HydroBase.xsd"/>
  <import namespace="urn:x-inspire:specification:gmlas:BaseTypes:3.2" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.2/BaseTypes.xsd"/>
  <import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
  <import namespace="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/gn/3.0/GeographicalNames.xsd"/>
  <import namespace="urn:x-inspire:specification:gmlas:LandCover:0.0" schemaLocation="http://inspire.ec.europa.eu/schemas/lc/0.0/LandCover.xsd"/>
  <!--XML Schema document created by ShapeChange-->
  <element name="OceanRegion" substitutionGroup="gml:AbstractFeature" type="sr:OceanRegionType">
    <annotation>
      <documentation>-- Definition --
One of the three large regions of the world-wide ocean, each with associated sub- and marginal areas and subject to an independent flow-regime.

-- Description --
SOURCE [DFDD].

NOTE Regarded as a candidate spatial object in Annex II theme ''Sea Regions'' due to the close fit to the definition in 2007/2/EC Ann III. 16.</documentation>
    </annotation>
  </element>
  <complexType name="OceanRegionType">
    <complexContent>
      <extension base="gml:AbstractFeatureType">
        <sequence>
          <element maxOccurs="unbounded" minOccurs="0" name="geographicalName" nillable="true">
            <annotation>
              <documentation>-- Definition --
A geographical name that is used to identify a hydrographic object in the real world. It provides a ''key'' for implicitly associating different representations of the object.

-- Description --
EXAMPLE A standing water in a mapping view may share the same geographical name as a WFD lake in a reporting view, implying they are both representations of the same real world object.</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="gn:GeographicalName"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="hydroId" nillable="true">
            <annotation>
              <documentation>-- Definition --
An identifier that is used to identify a hydrographic object in the real world. It provides a ''key'' for implicitly associating different representations of the object.

-- Description --
NOTE 1 The identifier may be a national hydrological identification code.

NOTE 2 More than one identifier may be required, for instance a watercourse may be assigned different identifying codes under national and European schemes.

EXAMPLE A lock in a mapping view may share the same identifier as a hydro node in a network view, implying they are both representations of the same real world object.</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="hy:HydroIdentifier"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="relatedHydroObject" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
A related hydrographic object representing the same real-world entity.</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">hy:HydroObject</targetElement>
              </appinfo>
            </annotation>
          </element>
          <element name="beginLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="endLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="geometry" nillable="true" type="gml:SurfacePropertyType">
            <annotation>
              <documentation>-- Definition --
The geometry of the ocean region, as a surface.</documentation>
            </annotation>
          </element>
          <element name="inspireId" type="base:IdentifierPropertyType">
            <annotation>
              <documentation>-- Definition --
External object identifier of the spatial object.

-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.
</documentation>
            </annotation>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="foreshore" nillable="true" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
The part of the shore or beach which lies between the low water mark and the upper limit of normal wave action.

-- Description --
SOURCE [DFDD].</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">lc:Shore</targetElement>
              </appinfo>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="OceanRegionPropertyType">
    <sequence minOccurs="0">
      <element ref="sr:OceanRegion"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 370;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (370, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/su-core/3.0/statisticalunitcore.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 370 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as statisticalunitcore_su_core_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:su-core="http://inspire.ec.europa.eu/schemas/su-core/3.0" targetNamespace="http://inspire.ec.europa.eu/schemas/su-core/3.0" elementFormDefault="qualified" version="3.0">
	<annotation>
		<documentation>-- Name --
Statistical Units Base

-- Definition --
The base  package. It provides most abstract classes required to link the grid and vector view of statistical units.</documentation>
	</annotation>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="StatisticalUnit" type="su-core:StatisticalUnitType" abstract="true" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
Statistical unit

-- Definition --
Unit for dissemination or use of statistical information.

-- Description --
SOURCE [INSPIRE Directive:2007].

EXAMPLE grid cell, point, line, polygon.

NOTE Spatial features of any INSPIRE application schema can be considered as a statistical unit, because all can be used as spatial reference. This class is provided to represent features that are used only to disseminate statistical information and that are not included in another INSPIRE application schema.</documentation>
		</annotation>
	</element>
	<complexType name="StatisticalUnitType" abstract="true">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence/>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="StatisticalUnitPropertyType">
		<sequence minOccurs="0">
			<element ref="su-core:StatisticalUnit"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
</schema>'; 
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 371;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (371, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/su-grid/3.0/statisticalunitgrid.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 371 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as statisticalunitgrid_su_grid_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:su-core="http://inspire.ec.europa.eu/schemas/su-core/3.0" xmlns:su-grid="http://inspire.ec.europa.eu/schemas/su-grid/3.0" targetNamespace="http://inspire.ec.europa.eu/schemas/su-grid/3.0" elementFormDefault="qualified" version="3.0">
	<annotation>
		<documentation>-- Name --
Statistical Units Grid

-- Definition --
Package containing classes to represent statistical grids.</documentation>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/base/3.3" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/su-core/3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/su-core/3.0/StatisticalUnitCore.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="StatisticalGrid" type="su-grid:StatisticalGridType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
Statistical grid

-- Definition --
A grid composed of statistical cells.

-- Description --
Such grid is associated with an upper grid, that has a bigger resolution, and a lower grid that has a lower resolution. Some statistical grids are organised into a hierarchy of grids with different resolutions. The cells composing two linked grids have to satisfy some topological constraints: each cell of the upper grid should be the aggregation of cells of the lower grid.

EXAMPLE The hierarchical structure is a quadtree if the grids are composed of quadrilateral cells and each cell is composed of less than four cells of the lower level.</documentation>
		</annotation>
	</element>
	<complexType name="StatisticalGridType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Name --
INSPIRE identifier

-- Definition --
External object identifier of the spatial object.

-- Description --
An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="EPSGCode" type="integer" minOccurs="0">
						<annotation>
							<documentation>-- Name --
EPSGCode

-- Definition --
The EPSG code to identify the grid Coordinate Referencing System.

-- Description --
This information is relevant only if all cells of the grid have the same CRS.</documentation>
						</annotation>
					</element>
					<element name="resolution" type="su-grid:StatisticalGridResolutionPropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
Resolution

-- Definition --
The grid resolution.

-- Description --
This information is relevant only if all cells of the grid have the same resolution.</documentation>
						</annotation>
					</element>
					<element name="origin" type="gml:DirectPositionType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
Origin

-- Definition --
The position of the origin point of the grid in the specified coordinate reference system (if defined).

-- Description --
The origin point is the lower left grid point.</documentation>
						</annotation>
					</element>
					<element name="width" type="integer" minOccurs="0">
						<annotation>
							<documentation>-- Name --
Width

-- Definition --
The grid width, in cell number (if defined).</documentation>
						</annotation>
					</element>
					<element name="height" type="integer" minOccurs="0">
						<annotation>
							<documentation>-- Name --
Height

-- Definition --
The grid height, in cell number (if defined).</documentation>
						</annotation>
					</element>
					<element name="cells" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
The cells composing a grid.</documentation>
							<appinfo>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">su-grid:grid</reversePropertyName>
							</appinfo>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="su-grid:StatisticalGridCell"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="lower" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
The immediately lower statistical grid.</documentation>
							<appinfo>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">su-grid:upper</reversePropertyName>
							</appinfo>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="su-grid:StatisticalGrid"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
					<element name="upper" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
The immediately upper statistical grid.</documentation>
							<appinfo>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">su-grid:lower</reversePropertyName>
							</appinfo>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="su-grid:StatisticalGrid"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="StatisticalGridPropertyType">
		<sequence minOccurs="0">
			<element ref="su-grid:StatisticalGrid"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="StatisticalGridResolution" type="su-grid:StatisticalGridResolutionType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
Statistical grid resolution

-- Definition --
A statistical unit resolution value.

-- Definition --
The resolution can be a distance or an angle.</documentation>
		</annotation>
	</element>
	<complexType name="StatisticalGridResolutionType">
		<choice>
			<element name="lengthResolution" type="gml:LengthType">
				<annotation>
					<documentation>-- Name --
Length resolution

-- Definition --
A distance resolution.</documentation>
				</annotation>
			</element>
			<element name="angleResolution" type="gml:AngleType">
				<annotation>
					<documentation>-- Name --
Angle resolution

-- Definition --
An angle resolution.</documentation>
				</annotation>
			</element>
		</choice>
	</complexType>
	<complexType name="StatisticalGridResolutionPropertyType">
		<sequence>
			<element ref="su-grid:StatisticalGridResolution"/>
		</sequence>
	</complexType>
	<element name="StatisticalGridCell" type="su-grid:StatisticalGridCellType" substitutionGroup="su-core:StatisticalUnit">
		<annotation>
			<documentation>-- Name --
Statistical grid cell

-- Definition --
Unit for dissemination or use of statistical information that is represented as a grid cell.

-- Description --
A statistical grid cell is associated with:
- the unique statistical grid cell of its upper level (if any) it is covered by,
- the statistical grid cells of its lower level (if any) it covers.

NB Statistical grid cells are squares.

EXAMPLE In a quadtree structure, some cells are associated with the four cells they are decomposed into.</documentation>
		</annotation>
	</element>
	<complexType name="StatisticalGridCellType">
		<complexContent>
			<extension base="su-core:StatisticalUnitType">
				<sequence>
					<element name="code" nillable="true">
						<annotation>
							<documentation>-- Name --
Code

-- Definition --
A cell code.

-- Description --
This code is composed of:
1. A coordinate reference system part, represented by the word CRS, followed by the EPSG code.
2. A resolution and position part:
- If the coordinate reference system is projected, the word RES followed by the grid resolution in meters and the letter m. Then, the letter N followed by the northing value in meters, and the letter E followed by the easting value in meters too.
- If the coordinate reference system is not projected, the word RES followed by the grid resolution in degree-minute-second, followed by the word dms. Then the word LON followed by the longitude value in degree-minute-second, and word LAT followed by the latitude value in degree-minute-second.
For both cases, the given position is the position of the lower left cell corner.

NOTE: This code acts like an identifier.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="string">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="geographicalPosition" nillable="true">
						<annotation>
							<documentation>-- Name --
Geographical position

-- Definition --
The grid cell lower left corner geographical position.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="gml:DirectPositionType">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="gridPosition" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
Grid position

-- Definition --
The grid cell position within the grid based on the grid coordinates.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="su-grid:GridPosition"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="geometry" nillable="true">
						<annotation>
							<documentation>-- Name --
Geometry

-- Definition --
The grid cell geometry.</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="gml:PolygonPatch"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="lowers" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
The immediately lower statistical grid cells.</documentation>
							<appinfo>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">su-grid:upper</reversePropertyName>
							</appinfo>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="su-grid:StatisticalGridCell"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="upper" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
The immediately upper statistical grid cell.</documentation>
							<appinfo>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">su-grid:lowers</reversePropertyName>
							</appinfo>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="su-grid:StatisticalGridCell"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
					<element name="grid" type="su-grid:StatisticalGridPropertyType">
						<annotation>
							<documentation>-- Definition --
The grid made up of cells.</documentation>
							<appinfo>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">su-grid:cells</reversePropertyName>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="StatisticalGridCellPropertyType">
		<sequence minOccurs="0">
			<element ref="su-grid:StatisticalGridCell"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="GridPosition" type="su-grid:GridPositionType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
Grid position

-- Definition --
A grid cell position within a grid.</documentation>
		</annotation>
	</element>
	<complexType name="GridPositionType">
		<sequence>
			<element name="x" type="integer">
				<annotation>
					<documentation>-- Name --
x-axis value

-- Definition --
The position of the cell on the horizontal axis, starting from the left side, toward the right, from 0 to the grid width -1.</documentation>
				</annotation>
			</element>
			<element name="y" type="integer">
				<annotation>
					<documentation>-- Name --
y-axis value

-- Definition --
The position of the cell on the vertical axis, starting from the bottom toward the top, from 0 to the grid height -1.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="GridPositionPropertyType">
		<sequence>
			<element ref="su-grid:GridPosition"/>
		</sequence>
	</complexType>
</schema>'; 
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 372;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (372, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/su-vector/3.0/statisticalunitvector.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 372 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as statisticalunitvector_su_vector_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:au="urn:x-inspire:specification:gmlas:AdministrativeUnits:3.0" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:base2="http://inspire.ec.europa.eu/schemas/base2/1.0" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:gn="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" xmlns:sc="http://www.interactive-instruments.de/ShapeChange/AppInfo" xmlns:su-core="http://inspire.ec.europa.eu/schemas/su-core/3.0" xmlns:su-vector="http://inspire.ec.europa.eu/schemas/su-vector/3.0" targetNamespace="http://inspire.ec.europa.eu/schemas/su-vector/3.0" elementFormDefault="qualified" version="3.0">
	<annotation>
		<documentation>-- Name --
Statistical Units Vector

-- Definition --
Package containing classes to represent statistical units with vector geometries.</documentation>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/base/3.3" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/base2/1.0" schemaLocation="http://inspire.ec.europa.eu/schemas/base2/1.0/BaseTypes2.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/su-core/3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/su-core/3.0/StatisticalUnitCore.xsd"/>
	<import namespace="http://www.interactive-instruments.de/ShapeChange/AppInfo" schemaLocation="http://portele.de/ShapeChangeAppinfo.xsd"/>
	<import namespace="http://www.isotc211.org/2005/gmd" schemaLocation="http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<import namespace="urn:x-inspire:specification:gmlas:AdministrativeUnits:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/au/3.0/AdministrativeUnits.xsd"/>
	<import namespace="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/gn/3.0/GeographicalNames.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="StatisticalTessellation" type="su-vector:StatisticalTessellationType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
Statistical tesselation

-- Definition --
A tesselation composed of area statistical units.

-- Description --
EXAMPLE A NUTS regions coverage.</documentation>
		</annotation>
	</element>
	<complexType name="StatisticalTessellationType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Name --
INSPIRE identifier

-- Definition --
External object identifier of the spatial object.

-- Description --
An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="units" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
The units composing a tesselation.</documentation>
							<appinfo>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">su-vector:tesselation</reversePropertyName>
							</appinfo>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="su-vector:AreaStatisticalUnit"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="lower" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
The immediately lower statistical tessellation.</documentation>
							<appinfo>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">su-vector:upper</reversePropertyName>
							</appinfo>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="su-vector:StatisticalTessellation"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
					<element name="upper" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
The immediately upper statistical tessellation.</documentation>
							<appinfo>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">su-vector:lower</reversePropertyName>
							</appinfo>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="su-vector:StatisticalTessellation"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="StatisticalTessellationPropertyType">
		<sequence minOccurs="0">
			<element ref="su-vector:StatisticalTessellation"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="VectorStatisticalUnitGeometry" type="su-vector:VectorStatisticalUnitGeometryType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
Vector statistical unit geometry

-- Definition --
A geometrical representation for vector statistical units.

-- Description --
Vector statistical units can have several representations depending on the context they are used for. It is adviced to produce at least one reference geometry.

EXAMPLE1: A vector statistical units may be represented both by an area and a point geometry. Such point can be the center of gravity or a label location.

EXAMPLE2: For mapping, different generalised representations of vector statistical units are required. These geometries depend on the visualisation scale.</documentation>
		</annotation>
	</element>
	<complexType name="VectorStatisticalUnitGeometryType">
		<sequence>
			<element name="geometry" type="gml:GeometryPropertyType">
				<annotation>
					<documentation>-- Name --
Geometry

-- Definition --
The geometry.</documentation>
				</annotation>
			</element>
			<element name="geometryDescriptor" type="su-vector:GeometryDescriptorPropertyType">
				<annotation>
					<documentation>-- Name --
Geometry descriptor

-- Definition --
The statistical unit geometry descriptor.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="VectorStatisticalUnitGeometryPropertyType">
		<sequence>
			<element ref="su-vector:VectorStatisticalUnitGeometry"/>
		</sequence>
	</complexType>
	<element name="VectorStatisticalUnit" type="su-vector:VectorStatisticalUnitType" substitutionGroup="su-core:StatisticalUnit">
		<annotation>
			<documentation>-- Name --
Vector statistical unit

-- Definition --
Statistical unit represented as a vector geometry (point, line or surface).</documentation>
		</annotation>
	</element>
	<complexType name="VectorStatisticalUnitType">
		<complexContent>
			<extension base="su-core:StatisticalUnitType">
				<sequence>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Name --
INSPIRE identifier

-- Definition --
External object identifier of the spatial object.

-- Description --
An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="thematicId" type="base2:ThematicIdentifierPropertyType" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
Thematic identifier

-- Definition --
Descriptive unique object identifier applied to spatial objects in a defined information theme. 

-- Description --
Some statistical units may be assigned multiple thematic identifiers.

EXAMPLE: NUTS codes are thematic identifiers.</documentation>
						</annotation>
					</element>
					<element name="country" type="gmd:Country_PropertyType">
						<annotation>
							<documentation>-- Name --
Country

-- Definition --
The code of the country the object belongs to.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">technicalGuidance</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="geographicalName" type="gn:GeographicalNamePropertyType" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
Geographical name

-- Definition --
Possible geographical names of the object.</documentation>
						</annotation>
					</element>
					<element name="beginLifespanVersion" nillable="true">
						<annotation>
							<documentation>-- Name --
Begin lifespan version

-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="endLifespanVersion" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
End lifespan version

-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="validityPeriod" type="gml:TimePeriodPropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Name --
Validity period

-- Definition --
The period when the statistical unit is supposed to be preferably used and not.</documentation>
						</annotation>
					</element>
					<element name="referencePeriod" type="gml:TimePeriodPropertyType">
						<annotation>
							<documentation>-- Name --
Reference period

-- Definition --
The period when the data is supposed to give a picture of the territorial division in statistical units.</documentation>
						</annotation>
					</element>
					<element name="geometry" type="su-vector:VectorStatisticalUnitGeometryPropertyType" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
Geometries

-- Definition --
Geometrical representations of the vector statistical unit.</documentation>
						</annotation>
					</element>
					<element name="evolutions" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
All the evolutions the statistical unit has encountered.</documentation>
							<appinfo>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">su-vector:units</reversePropertyName>
							</appinfo>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="su-vector:Evolution"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="VectorStatisticalUnitPropertyType">
		<sequence minOccurs="0">
			<element ref="su-vector:VectorStatisticalUnit"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="Evolution" type="su-vector:EvolutionType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
Evolution

-- Definition --
Representation of vector statistical unit evolution.</documentation>
		</annotation>
	</element>
	<complexType name="EvolutionType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="date" type="dateTime">
						<annotation>
							<documentation>-- Name --
Date

-- Definition --
The date when the change occured.</documentation>
						</annotation>
					</element>
					<element name="evolutionType" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Name --
Evolution type

-- Definition --
The type of evolution.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">technicalGuidance</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="areaVariation" nillable="true">
						<annotation>
							<documentation>-- Name --
Area variation

-- Definition --
The area variation during the evolution. This attribute has to be populated only if the type is "change".</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="gml:AreaType">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="populationVariation" nillable="true">
						<annotation>
							<documentation>-- Name --
Population variation

-- Definition --
The population variation during the evolution. This attribute has to be populated only if the type is "change".</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="integer">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="finalUnitVersions" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
All the final unit versions concerned by the evolution.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="su-vector:VectorStatisticalUnit"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
					<element name="units" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
All the units concerned by the evolution.</documentation>
							<appinfo>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">su-vector:evolutions</reversePropertyName>
							</appinfo>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="su-vector:VectorStatisticalUnit"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
					<element name="initialUnitVersions" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
All the initial unit versions concerned by the evolution.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="su-vector:VectorStatisticalUnit"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="EvolutionPropertyType">
		<sequence minOccurs="0">
			<element ref="su-vector:Evolution"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="AreaStatisticalUnit" type="su-vector:AreaStatisticalUnitType" substitutionGroup="su-vector:VectorStatisticalUnit">
		<annotation>
			<documentation>-- Name --
Area statistical unit

-- Definition --
Vector statistical unit with a surfacic reference geometry.

-- Description --
Such object can be composed of other area statistical unit.

EXAMPLE A country area, an administrative unit, a NUTS region.</documentation>
		</annotation>
	</element>
	<complexType name="AreaStatisticalUnitType">
		<complexContent>
			<extension base="su-vector:VectorStatisticalUnitType">
				<sequence>
					<element name="areaValue" type="gml:AreaType">
						<annotation>
							<documentation>-- Name --
Area value

-- Definition --
The area of the reference geometry.</documentation>
						</annotation>
					</element>
					<element name="landAreaValue" nillable="true">
						<annotation>
							<documentation>-- Name --
Land area value

-- Definition --
The area of the above-water part.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="gml:AreaType">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="livableAreaValue" nillable="true">
						<annotation>
							<documentation>-- Name --
Livable area value

-- Definition --
The area of the livable part.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="gml:AreaType">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="administrativeUnit" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Administrative units used to buid the area statistical unit.</documentation>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="au:AdministrativeUnit"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
					<element name="lowers" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
The area statistical units of the next lower level.</documentation>
							<appinfo>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">su-vector:uppers</reversePropertyName>
							</appinfo>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="su-vector:AreaStatisticalUnit"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="uppers" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
The area statistical units of the next upper level.</documentation>
							<appinfo>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">su-vector:lowers</reversePropertyName>
							</appinfo>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="su-vector:AreaStatisticalUnit"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
					<element name="successors" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Successors of the area statistical unit.</documentation>
							<appinfo>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">su-vector:predecessors</reversePropertyName>
							</appinfo>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="su-vector:AreaStatisticalUnit"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
					<element name="predecessors" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Definition --
Predecessors of the area statistical unit.</documentation>
							<appinfo>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">su-vector:successors</reversePropertyName>
							</appinfo>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="su-vector:AreaStatisticalUnit"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
					<element name="tesselation" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
The tesselation composed of units.</documentation>
							<appinfo>
								<reversePropertyName xmlns="http://www.opengis.net/gml/3.2">su-vector:units</reversePropertyName>
							</appinfo>
						</annotation>
						<complexType>
							<sequence minOccurs="0">
								<element ref="su-vector:StatisticalTessellation"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
							<attributeGroup ref="gml:OwnershipAttributeGroup"/>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="AreaStatisticalUnitPropertyType">
		<sequence minOccurs="0">
			<element ref="su-vector:AreaStatisticalUnit"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="GeometryDescriptor" type="su-vector:GeometryDescriptorType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
Geometry descriptor

-- Definition --
A descriptor for vector statistical unit geometry.</documentation>
		</annotation>
	</element>
	<complexType name="GeometryDescriptorType">
		<sequence>
			<element name="geometryType" type="gml:ReferenceType">
				<annotation>
					<documentation>-- Name --
Geometry type

-- Definition --
The geometry type.</documentation>
					<appinfo>
						<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
					</appinfo>
				</annotation>
			</element>
			<element name="mostDetailedScale" type="integer" minOccurs="0">
				<annotation>
					<documentation>-- Name --
Most detailed scale

-- Definition --
The most detailed scale the generalised geometry is supposed to be suitable for (expressed as the inverse of an indicative scale).</documentation>
				</annotation>
			</element>
			<element name="leastDetailedScale" type="integer" minOccurs="0">
				<annotation>
					<documentation>-- Name --
Least detailed scale

-- Definition --
The least detailed scale the generalised geometry is supposed to be suitable for (expressed as the inverse of an indicative scale).</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="GeometryDescriptorPropertyType">
		<sequence>
			<element ref="su-vector:GeometryDescriptor"/>
		</sequence>
	</complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 373;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (373, empty_clob(), 'INSPIRE', 'urn:x-inspire:specification:gmlas:StatisticalUnits:0.0/statisticalunits.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 373 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as statisticalunits_su_0_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?><schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="urn:x-inspire:specification:gmlas:BaseTypes:3.2" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:stat="urn:x-inspire:specification:gmlas:StatisticalUnits:0.0" elementFormDefault="qualified" targetNamespace="urn:x-inspire:specification:gmlas:StatisticalUnits:0.0" version="0.0">
  <import namespace="urn:x-inspire:specification:gmlas:BaseTypes:3.2" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.2/BaseTypes.xsd"/>
  <import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
  <!--XML Schema document created by ShapeChange-->
  <element name="NUTSRegion" substitutionGroup="gml:AbstractFeature" type="stat:NUTSRegionType">
    <annotation>
      <documentation>-- Definition --
Territorial unit for statistics defined in the framework of the Regulation (EC) No 1059/2003 of the European Parliament and of the Council of 26 May 2003.

-- Description --
NOTE NUTS regions subdivide each Member State into a whole number of territorial units for statistic at NUTS1 level. Each of these is then subdivided into regions at NUTS2 level and these in turn into regions at NUTS3 level.
</documentation>
    </annotation>
  </element>
  <complexType name="NUTSRegionType">
    <complexContent>
      <extension base="gml:AbstractFeatureType">
        <sequence>
          <element name="geometry" type="gml:MultiSurfacePropertyType">
            <annotation>
              <documentation>-- Definition --
Geometric representation of spatial area covered by this NUTS-region.
</documentation>
            </annotation>
          </element>
          <element name="inspireId" type="base:IdentifierPropertyType">
            <annotation>
              <documentation>-- Definition --
External object identifier of the spatial object.

-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.
</documentation>
            </annotation>
          </element>
          <element name="NUTSCode" type="string">
            <annotation>
              <documentation>-- Definition --
Unique code of the territorial unit for statistics as defined in the framework of the Regulation (EC) No 1059/2003 of the European Parliament and of the Council of 26 May 2003.

-- Description --
EXAMPLE A NUTScode from Denmark could be DK031.
</documentation>
            </annotation>
          </element>
          <element name="beginLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="endLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="NUTSRegionPropertyType">
    <sequence minOccurs="0">
      <element ref="stat:NUTSRegion"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
</schema>'; 
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 374;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (374, empty_clob(), 'INSPIRE', 'urn:x-inspire:specification:gmlas:AirTransportNetwork:3.0/airtransportnetwork.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 374 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as airtransportnetwork_tn_a_3_0.xsd
    -- Needed to separate this xsd into two pieces due to its size>32767.
    buf :=
'<?xml version="1.0" encoding="UTF-8"?><schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:bui="urn:x-inspire:specification:gmlas:Buildings:0.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:net="urn:x-inspire:specification:gmlas:Network:3.2" xmlns:tn="urn:x-inspire:specification:gmlas:CommonTransportElements:3.0" xmlns:tn-a="urn:x-inspire:specification:gmlas:AirTransportNetwork:3.0" elementFormDefault="qualified" targetNamespace="urn:x-inspire:specification:gmlas:AirTransportNetwork:3.0" version="3.0">
  <annotation>
    <documentation>-- Definition --
This package defines the types that are used on the air transport subtheme.</documentation>
  </annotation>
  <import namespace="urn:x-inspire:specification:gmlas:Network:3.2" schemaLocation="http://inspire.ec.europa.eu/schemas/net/3.2/Network.xsd"/>
  <import namespace="urn:x-inspire:specification:gmlas:CommonTransportElements:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/tn/3.0/CommonTransportElements.xsd"/>
  <import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
  <import namespace="urn:x-inspire:specification:gmlas:Buildings:0.0" schemaLocation="http://inspire.ec.europa.eu/schemas/bu/0.0/Buildings.xsd"/>
  <!--XML Schema document created by ShapeChange-->
  <element name="StandardInstrumentDeparture" substitutionGroup="tn-a:ProcedureLink" type="tn-a:StandardInstrumentDepartureType">
    <annotation>
      <documentation>-- Definition --
A designated instrument flight rule (IFR) departure route linking the aerodrome or a specific runway of the aerodrome with a specified significant point, normally on a designated ATS route, at which the en-route phase of a flight commences.

-- Description --
SOURCE [AIXM5.0].

NOTE 1 Acronym: SID.

NOTE 2 It corresponds to the take-off phase. Each airport/heliport could have various SID linking the different runways to one or various significant points, usually connected to air routes.
</documentation>
    </annotation>
  </element>
  <complexType name="StandardInstrumentDepartureType">
    <complexContent>
      <extension base="tn-a:ProcedureLinkType">
        <sequence>
          <element name="designator" nillable="true">
            <annotation>
              <documentation>-- Definition --
The full textual designator of the Standard Instrument Departure.

-- Description --
SOURCE [AIXM5.0]. 
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="string">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="StandardInstrumentDeparturePropertyType">
    <sequence minOccurs="0">
      <element ref="tn-a:StandardInstrumentDeparture"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="StandardInstrumentArrival" substitutionGroup="tn-a:ProcedureLink" type="tn-a:StandardInstrumentArrivalType">
    <annotation>
      <documentation>-- Definition --
A designated instrument flight rule (IFR) arrival route linking a significant point, normally on an ATS route, with a point from which a published instrument approach procedure can be commenced.

-- Description --
SOURCE [AIXM5.0].

NOTE 1 Acronym: STAR.

NOTE 2 It corresponds to the initial approach during the landing phase. Each airport/heliport could have various STAR linking significant points (usually connected to air routes) to the points designated to start the landing on a specific runway.
</documentation>
    </annotation>
  </element>
  <complexType name="StandardInstrumentArrivalType">
    <complexContent>
      <extension base="tn-a:ProcedureLinkType">
        <sequence>
          <element name="designator" nillable="true">
            <annotation>
              <documentation>-- Definition --
The textual designator of the Standard Instrument Arrival.

-- Description --
SOURCE [AIXM5.0].
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="string">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="StandardInstrumentArrivalPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-a:StandardInstrumentArrival"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="ApronArea" substitutionGroup="tn:TransportArea" type="tn-a:ApronAreaType">
    <annotation>
      <documentation>-- Definition --
A defined area, on a land aerodrome/heliport, intended to accommodate aircraft/helicopters for purposes of loading and unloading passengers, mail or cargo, and for fuelling, parking or maintenance.

-- Description --
SOURCE [Apron - AIXM5.0].
</documentation>
    </annotation>
  </element>
  <complexType name="ApronAreaType">
    <complexContent>
      <extension base="tn:TransportAreaType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="ApronAreaPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-a:ApronArea"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="TaxiwayArea" substitutionGroup="tn:TransportArea" type="tn-a:TaxiwayAreaType">
    <annotation>
      <documentation>-- Definition --
A defined path at an aerodrome/heliport established for the taxiing of aircraft/helicopters and intended to provide a link between one part of the aerodrome and another.

-- Description --
SOURCE [Taxiway - AIXM5.0].

NOTE This includes aircraft/helicopter stand taxilines, apron taxiways, rapid exit taxiways, air taxiways etc.
</documentation>
    </annotation>
  </element>
  <complexType name="TaxiwayAreaType">
    <complexContent>
      <extension base="tn:TransportAreaType">
        <sequence>
          <element name="designator" nillable="true">
            <annotation>
              <documentation>-- Definition --
The textual designator of the taxiway.

-- Description --
SOURCE [AIXM5.0].</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="string">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="TaxiwayAreaPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-a:TaxiwayArea"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="AerodromeNode" substitutionGroup="tn-a:AirNode" type="tn-a:AerodromeNodeType">
    <annotation>
      <documentation>-- Definition --
Node located at the aerodrome reference point of an airport/heliport, which is used to represent it in a simplified way.

DEFINITION Aerodrome Reference Point (ARP): The designated geographical location of an aerodrome, located near the initial or planned geometric centre of the aerodrome and normally remaining where originally established [AIXM3.3].

DEFINITION Airport/heliport: A defined area on land or water (including any buildings, installations and equipment) intended to be used either wholly or in part for the arrival, departure and surface movement of aircraft/helicopters [AIXM5.0].

-- Description --
SOURCE [AIXM5.0].




</documentation>
    </annotation>
  </element>
  <complexType name="AerodromeNodeType">
    <complexContent>
      <extension base="tn-a:AirNodeType">
        <sequence>
          <element name="designatorIATA" nillable="true">
            <annotation>
              <documentation>-- Definition --
The three letter IATA designator of the aerodrome (airport/heliport).

-- Description --
SOURCE [AIXM5.0].
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="string">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="locationIndicatorICAO" nillable="true">
            <annotation>
              <documentation>-- Definition --
The four letter ICAO location indicator of the aerodrome (airport/heliport), as listed in ICAO DOC 7910.

-- Description --
SOURCE [AIXM5.0].
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="string">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="controlTowers" nillable="true" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
The set of control towers belonging to an aerodrome (airport/heliport).</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">bui:ControlTower</targetElement>
                <reversePropertyName xmlns="http://www.opengis.net/gml/3.2">bui:airportHeliport</reversePropertyName>
              </appinfo>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="AerodromeNodePropertyType">
    <sequence minOccurs="0">
      <element ref="tn-a:AerodromeNode"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="ProcedureLink" substitutionGroup="tn-a:AirLink" type="tn-a:ProcedureLinkType">
    <annotation>
      <documentation>-- Definition --
A series of predetermined manoeuvres with specified protection from obstacles.

-- Description --
SOURCE [Procedure - AIXM5.0].

NOTE 1 A defined airway connector designed for channelling the flow of traffic as necessary for the provision of air traffic services during the take-off or landing phase, which links an airport/heliport to a significant point, usually connected to one or more air routes.

NOTE 2 When a airport/heliport is not connected with a standardized airway connector to the rest of the air network, this object can be used as a fictitious connector between the airport/heliport and a significant point on one or more ATS routes - for example for VFR (Visual Flight Rules) flights.

NOTE 3 Nevertheless, three main types of standardized Procedures are usually defined for IFR (Instrument Flight Rules) flights:
- Standard Instrument Departure (SID), corresponding to the take-off phase.
- Standard Instrument Arrival (STAR), corresponding to the initial approach during the landing phase.
- Instrument Approach Procedure (IAP), corresponding to the final approach and arrival during the landing phase.
</documentation>
    </annotation>
  </element>
  <complexType name="ProcedureLinkType">
    <complexContent>
      <extension base="tn-a:AirLinkType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="ProcedureLinkPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-a:ProcedureLink"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="AirRouteLink" substitutionGroup="tn-a:AirLink" type="tn-a:AirRouteLinkType">
    <annotation>
      <documentation>-- Definition --
A portion of a route to be flown usually without an intermediate stop, as defined by two consecutive significant points.

-- Description --
SOURCE [AirRouteSegment - AIXM5.0].

NOTE The presence of air nodes (normally defining Significant Points) is not mandated.
</documentation>
    </annotation>
  </element>
  <complexType name="AirRouteLinkType">
    <complexContent>
      <extension base="tn-a:AirLinkType">
        <sequence>
          <element name="airRouteLinkClass" nillable="true">
            <annotation>
              <documentation>-- Definition --
The class or type of an air route link.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:CodeType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="AirRouteLinkPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-a:AirRouteLink"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="LowerAltitudeLimit" substitutionGroup="tn:TransportProperty" type="tn-a:LowerAltitudeLimitType">
    <annotation>
      <documentation>-- Definition --
Altitude that defines the lower limit of an air transport network object.

-- Description --
NOTE When applied to an AirRouteLink it corresponds to the Lowest Safe Altitude, which is defined in order to provide safety for navigation.
</documentation>
    </annotation>
  </element>
  <complexType name="LowerAltitudeLimitType">
    <complexContent>
      <extension base="tn:TransportPropertyType">
        <sequence>
          <element name="altitude" type="gml:MeasureType">
            <annotation>
              <documentation>-- Definition --
Value of the altitude limit.</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="LowerAltitudeLimitPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-a:LowerAltitudeLimit"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="UseRestriction" substitutionGroup="tn:TransportProperty" type="tn-a:UseRestrictionType">
    <annotation>
      <documentation>-- Definition --
The restrictions to the use of an air network object.
</documentation>
    </annotation>
  </element>
  <complexType name="UseRestrictionType">
    <complexContent>
      <extension base="tn:TransportPropertyType">
        <sequence>
          <element name="restriction" type="gml:CodeType">
            <annotation>
              <documentation>-- Definition --
The type of use restriction for the air network object.</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="UseRestrictionPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-a:UseRestriction"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element abstract="true" name="AirLink" substitutionGroup="tn:TransportLink" type="tn-a:AirLinkType">
    <annotation>
      <documentation>-- Definition --
A linear spatial object that describes the geometry and connectivity of the air network between two points in the network.</documentation>
    </annotation>
  </element>
  <complexType abstract="true" name="AirLinkType">
    <complexContent>
      <extension base="tn:TransportLinkType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="AirLinkPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-a:AirLink"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="AirRoute" substitutionGroup="tn:TransportLinkSet" type="tn-a:AirRouteType">
    <annotation>
      <documentation>-- Definition --
A specified route designed for channelling the flow of traffic as necessary for the provision of air traffic services, from the end of the take-off and initial climb phase to the commencement of the approach and landing phase.

-- Description --
SOURCE [Route - AIXM5.0].

NOTE A collection of air link sequences and or individual air links that are characterized by one or more thematic identifiers and /or properties, which perform a Route.
</documentation>
    </annotation>
  </element>
  <complexType name="AirRouteType">
    <complexContent>
      <extension base="tn:TransportLinkSetType">
        <sequence>
          <element name="airRouteType" nillable="true">
            <annotation>
              <documentation>-- Definition --
Route classification.

-- Description --
SOURCE [AIXM5.0].
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:CodeType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="designator" nillable="true">
            <annotation>
              <documentation>-- Definition --
Code or designator that identifies an Air Route.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="string">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="AirRoutePropertyType">
    <sequence minOccurs="0">
      <element ref="tn-a:AirRoute"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="Navaid" substitutionGroup="tn-a:AirNode" type="tn-a:NavaidType">
    <annotation>
      <documentation>-- Definition --
One or more Navaid Equipments providing navigation services.

DEFINITION Navaid equipment: A physical navaid equipment like VOR, DME, localizer, TACAN or etc.

-- Description --
SOURCE [AIXM5.0].

NOTE 1 
The Navaid Equipment share business rules like paired frequencies [AIXM5.0].
</documentation>
    </annotation>
  </element>
  <complexType name="NavaidType">
    <complexContent>
      <extension base="tn-a:AirNodeType">
        <sequence>
          <element name="navaidType" nillable="true">
            <annotation>
              <documentation>-- Definition --
Type of the navaid service.

-- Description --
SOURCE [AIXM5.0].

EXAMPLES ILS, MLS, VORTAC, VOR/DME.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:CodeType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="designator" nillable="true">
            <annotation>
              <documentation>-- Definition --
The coded identifier given to the navaid system.

-- Description --
SOURCE [AIXM5.0].</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="string">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="NavaidPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-a:Navaid"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="RunwayArea" substitutionGroup="tn:TransportArea" type="tn-a:RunwayAreaType">
    <annotation>
      <documentation>-- Definition --
A defined rectangular area on a land aerodrome/heliport prepared for the landing and take-off of aircraft.

-- Description --
SOURCE [Runway - AIXM5.0].

NOTE 1 This includes the concept of Final Approach and Take-Off Area (FATO) for helicopters [Runway - AIXM5.0].

NOTE 2 The runway strip is a defined area including the runway and stopway, if provided, intended : a) to reduce the risk of damage to aircraft running off a runway; and b) to protect aircraft flying over it during take-off or landing operations [ICAO].
</documentation>
    </annotation>
  </element>
  <complexType name="RunwayAreaType">
    <complexContent>
      <extension base="tn:TransportAreaType">
        <sequence>
          <element name="designator" nillable="true">
            <annotation>
              <documentation>-- Definition --
The full textual designator of the runway, used to uniquely identify it at an aerodrome/heliport which has more than one.

-- Description --
SOURCE [AIXM5.0].</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="string">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>';
            
        
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    
    pos := pos + amt;
    buf :=        
'          <element name="runwayType" nillable="true">
            <annotation>
              <documentation>-- Definition --
The type of runway, either runway for airplanes or final approach and take off area (FATO) for helicopters.

-- Description --
SOURCE Adapted from [AIXM5.0].
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:CodeType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="RunwayAreaPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-a:RunwayArea"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="ElementLength" substitutionGroup="tn:TransportProperty" type="tn-a:ElementLengthType">
    <annotation>
      <documentation>-- Definition --
The physical length of the element.
</documentation>
    </annotation>
  </element>
  <complexType name="ElementLengthType">
    <complexContent>
      <extension base="tn:TransportPropertyType">
        <sequence>
          <element name="length" type="gml:MeasureType">
            <annotation>
              <documentation>-- Definition --
The physical length of the element.

-- Description --
NOTE 1 The value of the physical length of the runway [AIXM5.0], when applied to RunwayArea.

NOTE 2 Value for the length of the taxiway [AIXM5.0], when applied to TaxiwayArea.

NOTE 3 The value of the physical length of the touchdown and lift-off area [AIXM5.0], when applied to TouchDownLiftOff.
</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="ElementLengthPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-a:ElementLength"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="TouchDownLiftOff" substitutionGroup="tn-a:AirNode" type="tn-a:TouchDownLiftOffType">
    <annotation>
      <documentation>-- Definition --
A load bearing area on which a helicopter may touch down or lift-off.

-- Description --
SOURCE [AIXM5.0]. 
</documentation>
    </annotation>
  </element>
  <complexType name="TouchDownLiftOffType">
    <complexContent>
      <extension base="tn-a:AirNodeType">
        <sequence>
          <element name="designator" nillable="true">
            <annotation>
              <documentation>-- Definition --
The textual designator of the touch down and lift-off area.

-- Description --
SOURCE [AIXM5.0].</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="string">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="TouchDownLiftOffPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-a:TouchDownLiftOff"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="AerodromeArea" substitutionGroup="tn:TransportArea" type="tn-a:AerodromeAreaType">
    <annotation>
      <documentation>-- Definition --
A defined area on land or water (including any buildings, installations and equipment) intended to be used either wholly or in part for the arrival, departure and surface movement of aircraft and/or helicopters.

-- Description --
SOURCE [AIXM5.0].

NOTE An area spatial object which is used to represent the physical limits of all the facilities which form part of an inland aerodrome.
</documentation>
    </annotation>
  </element>
  <complexType name="AerodromeAreaType">
    <complexContent>
      <extension base="tn:TransportAreaType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="AerodromeAreaPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-a:AerodromeArea"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="FieldElevation" substitutionGroup="tn:TransportProperty" type="tn-a:FieldElevationType">
    <annotation>
      <documentation>-- Definition --
The aerodrome elevation as the vertical distance between the highest point of the landing area of an aerodrome and mean sea level. 

-- Description --
SOURCE [AIXM5.0].

NOTE This might be different from the elevation of the Aerodrome Reference Point.
</documentation>
    </annotation>
  </element>
  <complexType name="FieldElevationType">
    <complexContent>
      <extension base="tn:TransportPropertyType">
        <sequence>
          <element name="altitude" type="gml:MeasureType">
            <annotation>
              <documentation>-- Definition --
Value of the field altitude.</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="FieldElevationPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-a:FieldElevation"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="ElementWidth" substitutionGroup="tn:TransportProperty" type="tn-a:ElementWidthType">
    <annotation>
      <documentation>-- Definition --
The physical width of the element.
</documentation>
    </annotation>
  </element>
  <complexType name="ElementWidthType">
    <complexContent>
      <extension base="tn:TransportPropertyType">
        <sequence>
          <element name="width" type="gml:MeasureType">
            <annotation>
              <documentation>-- Definition --
The physical width of the element.

-- Description --
NOTE 1 The value of the physical width of the runway [AIXM5.0], when applied to RunwayArea.

NOTE 2 The value of the physical width of the taxiway [AIXM5.0], when applied to TaxiwayArea.

NOTE 3 The value of the physical width of the touchdown and lift-off area [AIXM5.0], when applied to TouchDownLiftOff.
</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="ElementWidthPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-a:ElementWidth"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="AirspaceArea" substitutionGroup="tn:TransportArea" type="tn-a:AirspaceAreaType">
    <annotation>
      <documentation>-- Definition --
A defined volume in the air, described as horizontal projection with vertical limits.

-- Description --
SOURCE [AirspaceVolume - AIXM5.0].

NOTE 1 Definition of Airspace: A defined three dimensional region of space relevant to air traffic [AIXM5.0].

NOTE 2 Airspace regions are managed by air traffic control systems to provide a safe IFR (Instrument Flight Rules) navigation for air traffic services and aircrafts.
</documentation>
    </annotation>
  </element>
  <complexType name="AirspaceAreaType">
    <complexContent>
      <extension base="tn:TransportAreaType">
        <sequence>
          <element name="AirspaceAreaType" type="gml:CodeType">
            <annotation>
              <documentation>-- Definition --
A code indicating the general structure or characteristics of a particular airspace.

-- Description --
SOURCE [Airspace.type - AIXM5.0].
</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="AirspaceAreaPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-a:AirspaceArea"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="DesignatedPoint" substitutionGroup="tn-a:AirNode" type="tn-a:DesignatedPointType">
    <annotation>
      <documentation>-- Definition --
A geographical location not marked by the site of a radio navigation aid, used in defining an ATS route, the flight path of an aircraft or for other navigation or ATS purposes.

-- Description --
SOURCE [AIXM5.0].

NOTE Examples of Designated points are compulsory and non-compulsory reporting points.
</documentation>
    </annotation>
  </element>
  <complexType name="DesignatedPointType">
    <complexContent>
      <extension base="tn-a:AirNodeType">
        <sequence>
          <element name="designator" nillable="true">
            <annotation>
              <documentation>-- Definition --
The coded designator of the point. 

-- Description --
SOURCE [AIXM5.0].

EXAMPLE The five-letter ICAO name of the point.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="string">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="DesignatedPointPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-a:DesignatedPoint"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element abstract="true" name="AirNode" substitutionGroup="tn:TransportNode" type="tn-a:AirNodeType">
    <annotation>
      <documentation>-- Definition --
A node which occurs in a air network.</documentation>
    </annotation>
  </element>
  <complexType abstract="true" name="AirNodeType">
    <complexContent>
      <extension base="tn:TransportNodeType">
        <sequence>
          <element name="significantPoint" type="boolean">
            <annotation>
              <documentation>-- Definition --
Attribute which indicates whether the air node is or is not a significant point.

DEFINITION Significant point: A specified geographical location used to define an ATS route, the flight path of an aircraft or for other navigation/ATS purposes [AIXM5.0].

-- Description --
NOTE Significant Points are specific air nodes which normally define air routes.
</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="AirNodePropertyType">
    <sequence minOccurs="0">
      <element ref="tn-a:AirNode"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="SurfaceComposition" substitutionGroup="tn:TransportProperty" type="tn-a:SurfaceCompositionType">
    <annotation>
      <documentation>-- Definition --
The composition of an aerodrome/heliport related surface.
</documentation>
    </annotation>
  </element>
  <complexType name="SurfaceCompositionType">
    <complexContent>
      <extension base="tn:TransportPropertyType">
        <sequence>
          <element name="surfaceComposition" type="gml:CodeType">
            <annotation>
              <documentation>-- Definition --
A code indicating the composition of an aerodrome/heliport related surface. 

-- Description --
SOURCE [SurfaceCharacteristics.composition - AIXM5.0].

EXAMPLES Asphalt, concrete.
</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="SurfaceCompositionPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-a:SurfaceComposition"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="UpperAltitudeLimit" substitutionGroup="tn:TransportProperty" type="tn-a:UpperAltitudeLimitType">
    <annotation>
      <documentation>-- Definition --
Altitude that defines the upper limit of an air transport network object.
</documentation>
    </annotation>
  </element>
  <complexType name="UpperAltitudeLimitType">
    <complexContent>
      <extension base="tn:TransportPropertyType">
        <sequence>
          <element name="altitude" type="gml:MeasureType">
            <annotation>
              <documentation>-- Definition --
Value of the altitude limit.</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="UpperAltitudeLimitPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-a:UpperAltitudeLimit"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="AirLinkSequence" substitutionGroup="tn:TransportLinkSequence" type="tn-a:AirLinkSequenceType">
    <annotation>
      <documentation>-- Definition --
A linear spatial object, composed of an ordered collection of air links, which represents a continuous path in the air network without any branches. 

-- Description --
NOTE 1 The element has a defined beginning and end and every position on the air link sequence is identifiable with one single parameter such as length. It describes an element of the air network, which could be characterized by one or more thematical identifiers and/or properties.

NOTE 2 This collection of air links is equivalent to RoutePortion feature in AIXM5.0. RoutePortion: A group of two or more consecutive segments of the same route, which have the usage and/or the same flight restrictions [AIXM5.0].
</documentation>
    </annotation>
  </element>
  <complexType name="AirLinkSequenceType">
    <complexContent>
      <extension base="tn:TransportLinkSequenceType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="AirLinkSequencePropertyType">
    <sequence minOccurs="0">
      <element ref="tn-a:AirLinkSequence"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="AerodromeType" substitutionGroup="tn:TransportProperty" type="tn-a:AerodromeTypeType">
    <annotation>
      <documentation>-- Definition --
A code specifying the type of aerodrome.

-- Description --
SOURCE [AIXM5.0].

EXAMPLE Aerodrome only, combined aerodrome/heliport or simple landing site.
</documentation>
    </annotation>
  </element>
  <complexType name="AerodromeTypeType">
    <complexContent>
      <extension base="tn:TransportPropertyType">
        <sequence>
          <element name="aerodromeType" type="gml:CodeType">
            <annotation>
              <documentation>-- Definition --
The type of aerodrome.
</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="AerodromeTypePropertyType">
    <sequence minOccurs="0">
      <element ref="tn-a:AerodromeType"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="ConditionOfAirFacility" substitutionGroup="tn:ConditionOfFacility" type="tn-a:ConditionOfAirFacilityType">
    <annotation>
      <documentation>-- Definition --
State of an air transport network element with regards to its completion and use.
</documentation>
    </annotation>
  </element>
  <complexType name="ConditionOfAirFacilityType">
    <complexContent>
      <extension base="tn:ConditionOfFacilityType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="ConditionOfAirFacilityPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-a:ConditionOfAirFacility"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="RunwayCentrelinePoint" substitutionGroup="tn-a:AirNode" type="tn-a:RunwayCentrelinePointType">
    <annotation>
      <documentation>-- Definition --
An operationally significant position on the center line of a runway direction.

-- Description --
SOURCE [AIXM5.0].

NOTE 1 The role of the point along the runway direction centreline is indicated within the pointRole attribute. 

NOTE 2 Runway centreline points are used to connect the Procedure Links that connect an airport/heliport to the rest of the air network.

EXAMPLE A typical example is the runway threshold [AIXM5.0].
</documentation>
    </annotation>
  </element>
  <complexType name="RunwayCentrelinePointType">
    <complexContent>
      <extension base="tn-a:AirNodeType">
        <sequence>
          <element name="pointRole" type="gml:CodeType">
            <annotation>
              <documentation>-- Definition --
The role of the point along the runway direction centreline.

-- Description --
SOURCE [AIXM5.0].</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="RunwayCentrelinePointPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-a:RunwayCentrelinePoint"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="InstrumentApproachProcedure" substitutionGroup="tn-a:ProcedureLink" type="tn-a:InstrumentApproachProcedureType">
    <annotation>
      <documentation>-- Definition --
A series of predetermined manoeuvres by reference to flight instruments with specified protection from obstacles from the initial approach fix, or where applicable, from the beginning of a defined arrival route to a point from which a landing can be completed and thereafter, if a landing is not completed, to a position at which holding or en route obstacle clearance criteria apply.

-- Description --
SOURCE  [AIXM5.0].

NOTE 1 Acronym: IAP.

NOTE 2 It corresponds to the final approach and arrival during the landing phase. 

NOTE 3 A specific runway of an airport/heliport usually has more than one IAP, depending on the landing direction on it.
</documentation>
    </annotation>
  </element>
  <complexType name="InstrumentApproachProcedureType">
    <complexContent>
      <extension base="tn-a:ProcedureLinkType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="InstrumentApproachProcedurePropertyType">
    <sequence minOccurs="0">
      <element ref="tn-a:InstrumentApproachProcedure"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="AerodromeCategory" substitutionGroup="tn:TransportProperty" type="tn-a:AerodromeCategoryType">
    <annotation>
      <documentation>-- Definition --
Aerodrome category concerning the scope and importance of the air traffic services offered from and to it.
</documentation>
    </annotation>
  </element>
  <complexType name="AerodromeCategoryType">
    <complexContent>
      <extension base="tn:TransportPropertyType">
        <sequence>
          <element name="aerodromeCategory" type="gml:CodeType">
            <annotation>
              <documentation>-- Definition --
Value which indicates the category of an aerodrome.</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="AerodromeCategoryPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-a:AerodromeCategory"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
</schema>';     
    
    amt := length(buf);

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 375;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (375, empty_clob(), 'INSPIRE', 'urn:x-inspire:specification:gmlas:CableTransportNetwork:3.0/cabletransportnetwork.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 375 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as cabletransportnetwork_tn_c_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?><schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:net="urn:x-inspire:specification:gmlas:Network:3.2" xmlns:tn="urn:x-inspire:specification:gmlas:CommonTransportElements:3.0" xmlns:tn-c="urn:x-inspire:specification:gmlas:CableTransportNetwork:3.0" elementFormDefault="qualified" targetNamespace="urn:x-inspire:specification:gmlas:CableTransportNetwork:3.0" version="3.0">
  <annotation>
    <documentation>-- Definition --
This package defines the types that are used on the cable subtheme.</documentation>
  </annotation>
  <import namespace="urn:x-inspire:specification:gmlas:Network:3.2" schemaLocation="http://inspire.ec.europa.eu/schemas/net/3.2/Network.xsd"/>
  <import namespace="urn:x-inspire:specification:gmlas:CommonTransportElements:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/tn/3.0/CommonTransportElements.xsd"/>
  <import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
  <!--XML Schema document created by ShapeChange-->
  <element name="CablewayNode" substitutionGroup="tn:TransportNode" type="tn-c:CablewayNodeType">
    <annotation>
      <documentation>-- Definition --
A point spatial object that is used to represent connectivity between two consecutive cableway links.
</documentation>
    </annotation>
  </element>
  <complexType name="CablewayNodeType">
    <complexContent>
      <extension base="tn:TransportNodeType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="CablewayNodePropertyType">
    <sequence minOccurs="0">
      <element ref="tn-c:CablewayNode"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="CablewayLink" substitutionGroup="tn:TransportLink" type="tn-c:CablewayLinkType">
    <annotation>
      <documentation>-- Definition --
Linear spatial object that describes the geometry and connectivity of a cable network between two points in a cableway transport network.

-- Description --
NOTE Cableway transport is a form of transport based on a cable suspended normally from a set of consecutive towers.
</documentation>
    </annotation>
  </element>
  <complexType name="CablewayLinkType">
    <complexContent>
      <extension base="tn:TransportLinkType">
        <sequence>
          <element name="cablewayType" nillable="true">
            <annotation>
              <documentation>-- Definition --
The type of a cableway transport.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:CodeType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="CablewayLinkPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-c:CablewayLink"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="CablewayLinkSequence" substitutionGroup="tn:TransportLinkSequence" type="tn-c:CablewayLinkSequenceType">
    <annotation>
      <documentation>-- Definition --
An ordered collection of cableway links that are characterized by one or more thematic identifiers and/or properties.
</documentation>
    </annotation>
  </element>
  <complexType name="CablewayLinkSequenceType">
    <complexContent>
      <extension base="tn:TransportLinkSequenceType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="CablewayLinkSequencePropertyType">
    <sequence minOccurs="0">
      <element ref="tn-c:CablewayLinkSequence"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="CablewayLinkSet" substitutionGroup="tn:TransportLinkSet" type="tn-c:CablewayLinkSetType">
    <annotation>
      <documentation>-- Definition --
A collection of cableway link sequences and or individual cableway links that has a specific function or significance in a cable transport network. 
</documentation>
    </annotation>
  </element>
  <complexType name="CablewayLinkSetType">
    <complexContent>
      <extension base="tn:TransportLinkSetType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="CablewayLinkSetPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-c:CablewayLinkSet"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 376;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (376, empty_clob(), 'INSPIRE', 'urn:x-inspire:specification:gmlas:RailwayTransportNetwork:3.0/railwaytransportnetwork.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 376 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as railwaytransportnetwork_tn_ra_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?><schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:net="urn:x-inspire:specification:gmlas:Network:3.2" xmlns:tn="urn:x-inspire:specification:gmlas:CommonTransportElements:3.0" xmlns:tn-ra="urn:x-inspire:specification:gmlas:RailwayTransportNetwork:3.0" xmlns:tn-ro="urn:x-inspire:specification:gmlas:RoadTransportNetwork:3.0" elementFormDefault="qualified" targetNamespace="urn:x-inspire:specification:gmlas:RailwayTransportNetwork:3.0" version="3.0.1">
  <annotation>
    <documentation>-- Definition --
This package defines the types that are used on the rail subtheme</documentation>
  </annotation>
  <import namespace="urn:x-inspire:specification:gmlas:Network:3.2" schemaLocation="http://inspire.ec.europa.eu/schemas/net/3.2/Network.xsd"/>
  <import namespace="urn:x-inspire:specification:gmlas:CommonTransportElements:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/tn/3.0/CommonTransportElements.xsd"/>
  <import namespace="urn:x-inspire:specification:gmlas:RoadTransportNetwork:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/tn-ro/3.0/RoadTransportNetwork.xsd"/>
  <import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
  <!--XML Schema document created by ShapeChange-->
  <element name="DesignSpeed" substitutionGroup="tn:TransportProperty" type="tn-ra:DesignSpeedType">
    <annotation>
      <documentation>-- Definition --
The specification of the maximum speed to which a railway line is designed for.
</documentation>
    </annotation>
  </element>
  <complexType name="DesignSpeedType">
    <complexContent>
      <extension base="tn:TransportPropertyType">
        <sequence>
          <element name="speed" type="gml:SpeedType">
            <annotation>
              <documentation>-- Definition --
The specification of the maximum speed to which a railway line is designed for.</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="DesignSpeedPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-ra:DesignSpeed"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="RailwayLinkSequence" substitutionGroup="tn:TransportLinkSequence" type="tn-ra:RailwayLinkSequenceType">
    <annotation>
      <documentation>-- Definition --
A linear spatial object, composed of an ordered collection of railway links, which represents a continuous path in a railway network without any branches. The element has a defined beginning and end and every position on the railway link sequence is identifiable with one single parameter such as length. It describes an element of the railway network, characterized by one or more thematical identifiers and/or properties.
</documentation>
    </annotation>
  </element>
  <complexType name="RailwayLinkSequenceType">
    <complexContent>
      <extension base="tn:TransportLinkSequenceType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="RailwayLinkSequencePropertyType">
    <sequence minOccurs="0">
      <element ref="tn-ra:RailwayLinkSequence"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="RailwayYardNode" substitutionGroup="tn-ra:RailwayNode" type="tn-ra:RailwayYardNodeType">
    <annotation>
      <documentation>-- Definition --
A railway node which occurs within a railway yard area.

DEFINTION Railway yard: An area crossed by a number of parallel railway tracks (usually more than two) interconnected between them, which are used to stop trains in order to load / unload freight without interrupting the traffic of a main railway line.
</documentation>
    </annotation>
  </element>
  <complexType name="RailwayYardNodeType">
    <complexContent>
      <extension base="tn-ra:RailwayNodeType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="RailwayYardNodePropertyType">
    <sequence minOccurs="0">
      <element ref="tn-ra:RailwayYardNode"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <simpleType name="MinMaxTrackValueType">
    <annotation>
      <documentation>-- Definition --
Values to indicate whether number of tracks are counted as the maximum, minimum or average number.</documentation>
    </annotation>
    <restriction base="string">
      <enumeration value="average">
        <annotation>
          <documentation>-- Definition --
The number of tracks is the average value for a given part of the railway network.
</documentation>
        </annotation>
      </enumeration>
      <enumeration value="maximum">
        <annotation>
          <documentation>-- Definition --
The number of tracks is the maximum value for a given part of the railway network.
</documentation>
        </annotation>
      </enumeration>
      <enumeration value="minimum">
        <annotation>
          <documentation>-- Definition --
The number of tracks is the minimum value for a given part of the railway network.
</documentation>
        </annotation>
      </enumeration>
    </restriction>
  </simpleType>
  <element name="RailwayLink" substitutionGroup="tn:TransportLink" type="tn-ra:RailwayLinkType">
    <annotation>
      <documentation>-- Definition --
A linear spatial object that describes the geometry and connectivity of a railway network between two points in the network.

-- Description --
NOTE Railway links can be used to represent stretches of railway with one or multiple tracks.
</documentation>
    </annotation>
  </element>
  <complexType name="RailwayLinkType">
    <complexContent>
      <extension base="tn:TransportLinkType">
        <sequence>
          <element name="fictitious" nillable="true">
            <annotation>
              <documentation>-- Definition --
The railway link does not represent a real and existing railway track but a fictitious trajectory.

-- Description --
EXAMPLE A fictitious trajectory to connect railway links across a turntable.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="boolean">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="RailwayLinkPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-ra:RailwayLink"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="RailwayYardArea" substitutionGroup="tn:TransportArea" type="tn-ra:RailwayYardAreaType">
    <annotation>
      <documentation>-- Definition --
An area spatial object which is used to represent the topographical limits of a railway yard.

DEFINITION Railway yard: An area crossed by a number of parallel railway tracks (usually more than two) interconnected between them, which are used to stop trains in order to load / unload freight without interrupting the traffic of a main railway line.
</documentation>
    </annotation>
  </element>
  <complexType name="RailwayYardAreaType">
    <complexContent>
      <extension base="tn:TransportAreaType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="RailwayYardAreaPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-ra:RailwayYardArea"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="RailwayStationCode" substitutionGroup="tn:TransportProperty" type="tn-ra:RailwayStationCodeType">
    <annotation>
      <documentation>-- Definition --
The unique code assigned to a railway station.
</documentation>
    </annotation>
  </element>
  <complexType name="RailwayStationCodeType">
    <complexContent>
      <extension base="tn:TransportPropertyType">
        <sequence>
          <element name="stationCode" type="string">
            <annotation>
              <documentation>-- Definition --
A unique code assigned to a railway station.</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="RailwayStationCodePropertyType">
    <sequence minOccurs="0">
      <element ref="tn-ra:RailwayStationCode"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="RailwayType" substitutionGroup="tn:TransportProperty" type="tn-ra:RailwayTypeType">
    <annotation>
      <documentation>-- Definition --
The type of railway transport the line is designed for.
</documentation>
    </annotation>
  </element>
  <complexType name="RailwayTypeType">
    <complexContent>
      <extension base="tn:TransportPropertyType">
        <sequence>
          <element name="type" type="gml:CodeType">
            <annotation>
              <documentation>-- Definition --
The type of railway transport to which the line is designed for.</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="RailwayTypePropertyType">
    <sequence minOccurs="0">
      <element ref="tn-ra:RailwayType"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="NominalTrackGauge" substitutionGroup="tn:TransportProperty" type="tn-ra:NominalTrackGaugeType">
    <annotation>
      <documentation>-- Definition --
The nominal distance between the two outer rails (gauge) of a railway track.
</documentation>
    </annotation>
  </element>
  <complexType name="NominalTrackGaugeType">
    <complexContent>
      <extension base="tn:TransportPropertyType">
        <sequence>
          <element minOccurs="0" name="nominalGauge" nillable="true">
            <annotation>
              <documentation>-- Definition --
A single value that identifies the track gauge.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:MeasureType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="nominalGaugeCategory" nillable="true">
            <annotation>
              <documentation>-- Definition --
Provision of the gauge of a railway track as a fuzzy category with respect to the European standard nominal gauge.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="tn-ra:TrackGaugeCategoryValueType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="NominalTrackGaugePropertyType">
    <sequence minOccurs="0">
      <element ref="tn-ra:NominalTrackGauge"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="RailwayNode" substitutionGroup="tn:TransportNode" type="tn-ra:RailwayNodeType">
    <annotation>
      <documentation>-- Definition --
A point spatial object which represents a significant point along the railway network or defines an intersection of railway tracks used to describe its connectivity.</documentation>
    </annotation>
  </element>
  <complexType name="RailwayNodeType">
    <complexContent>
      <extension base="tn:TransportNodeType">
        <sequence>
          <element name="formOfNode" nillable="true">
            <annotation>
              <documentation>-- Definition --
The function of a railway node within the railway network.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:CodeType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="RailwayNodePropertyType">
    <sequence minOccurs="0">
      <element ref="tn-ra:RailwayNode"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="NumberOfTracks" substitutionGroup="tn:TransportProperty" type="tn-ra:NumberOfTracksType">
    <annotation>
      <documentation>-- Definition --
The number of tracks for a railway stretch.

-- Description --
This is dependent on the resolution of the data.
</documentation>
    </annotation>
  </element>
  <complexType name="NumberOfTracksType">
    <complexContent>
      <extension base="tn:TransportPropertyType">
        <sequence>
          <element name="minMaxNumberOfTracks" nillable="true">
            <annotation>
              <documentation>-- Definition --
Indicates whether the number of tracks are counted as minimum or maximum value.

-- Description --
NOTE This attribute only applies when the value in numberOfTracks is not an exact value.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="tn-ra:MinMaxTrackValueType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="numberOfTracks" type="integer">
            <annotation>
              <documentation>-- Definition --
The number of tracks present.</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="NumberOfTracksPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-ra:NumberOfTracks"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="RailwayStationArea" substitutionGroup="tn:TransportArea" type="tn-ra:RailwayStationAreaType">
    <annotation>
      <documentation>-- Definition --
An area spatial object which is used to represent the topographical limits of the facilities of a railway station (buildings, railway yards, installations and equipment) devoted to carry out railway station operations.
</documentation>
    </annotation>
  </element>
  <complexType name="RailwayStationAreaType">
    <complexContent>
      <extension base="tn:TransportAreaType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="RailwayStationAreaPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-ra:RailwayStationArea"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <simpleType name="TrackGaugeCategoryValueType">
    <annotation>
      <documentation>-- Definition --
The possible categories of railways concerning its nominal track gauge.</documentation>
    </annotation>
    <restriction base="string">
      <enumeration value="broad">
        <annotation>
          <documentation>-- Definition --
The nominal track gauge property is broader than the standard one.</documentation>
        </annotation>
      </enumeration>
      <enumeration value="standard">
        <annotation>
          <documentation>-- Definition --
The nominal track gauge property is equal to the European standard (1435 millimetres).
</documentation>
        </annotation>
      </enumeration>
      <enumeration value="narrow">
        <annotation>
          <documentation>-- Definition --
The nominal track gauge property is narrower than the standard one.</documentation>
        </annotation>
      </enumeration>
      <enumeration value="notApplicable">
        <annotation>
          <documentation>-- Definition --
The definition of a nominal track gauge property is not applicable to the type of railway transport.

-- Description --
EXAMPLE Monorail.</documentation>
        </annotation>
      </enumeration>
    </restriction>
  </simpleType>
  <element name="RailwayLine" substitutionGroup="tn:TransportLinkSet" type="tn-ra:RailwayLineType">
    <annotation>
      <documentation>-- Definition --
A collection of railway link sequences and or individual railway links that are characterized by one or more thematical identifiers and/or properties.

-- Description --
EXAMPLE Railway lines characterized by a specific identification code, used by railroad companies or tourist railways, identified by a specific name.
</documentation>
    </annotation>
  </element>
  <complexType name="RailwayLineType">
    <complexContent>
      <extension base="tn:TransportLinkSetType">
        <sequence>
          <element name="railwayLineCode" nillable="true">
            <annotation>
              <documentation>-- Definition --
A code assigned to a railway line which is unique within a Member State.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="string">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="RailwayLinePropertyType">
    <sequence minOccurs="0">
      <element ref="tn-ra:RailwayLine"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="RailwayArea" substitutionGroup="tn:TransportArea" type="tn-ra:RailwayAreaType">
    <annotation>
      <documentation>-- Definition --
Surface occupied by a railway track, including ballast.</documentation>
    </annotation>
  </element>
  <complexType name="RailwayAreaType">
    <complexContent>
      <extension base="tn:TransportAreaType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="RailwayAreaPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-ra:RailwayArea"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="RailwayStationNode" substitutionGroup="tn-ra:RailwayNode" type="tn-ra:RailwayStationNodeType">
    <annotation>
      <documentation>-- Definition --
A railway node which represents the location of a railway station along the railway network.
</documentation>
    </annotation>
  </element>
  <complexType name="RailwayStationNodeType">
    <complexContent>
      <extension base="tn-ra:RailwayNodeType">
        <sequence>
          <element name="numberOfPlatforms" nillable="true">
            <annotation>
              <documentation>-- Definition --
A value indicating the number of platforms available at a railway station.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="integer">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="RailwayStationNodePropertyType">
    <sequence minOccurs="0">
      <element ref="tn-ra:RailwayStationNode"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="RailwayUse" substitutionGroup="tn:TransportProperty" type="tn-ra:RailwayUseType">
    <annotation>
      <documentation>-- Definition --
The current use of the railway.
</documentation>
    </annotation>
  </element>
  <complexType name="RailwayUseType">
    <complexContent>
      <extension base="tn:TransportPropertyType">
        <sequence>
          <element name="use" type="gml:CodeType">
            <annotation>
              <documentation>-- Definition --
The current use of the railway.
</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="RailwayUsePropertyType">
    <sequence minOccurs="0">
      <element ref="tn-ra:RailwayUse"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="RailwayElectrification" substitutionGroup="tn:TransportProperty" type="tn-ra:RailwayElectrificationType">
    <annotation>
      <documentation>-- Definition --
Indication whether the railway is provided with an electric system to power vehicles moving along it.
</documentation>
    </annotation>
  </element>
  <complexType name="RailwayElectrificationType">
    <complexContent>
      <extension base="tn:TransportPropertyType">
        <sequence>
          <element name="electrified" type="boolean">
            <annotation>
              <documentation>-- Definition --
Inidicates whether the railway is provided with an electric system to power vehicles moving along it.
</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="RailwayElectrificationPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-ra:RailwayElectrification"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 377;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (377, empty_clob(), 'INSPIRE', 'urn:x-inspire:specification:gmlas:RoadTransportNetwork:3.0/roadtransportnetwork.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 377 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as roadtransportnetwork_tn_ro_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?><schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:gn="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" xmlns:net="urn:x-inspire:specification:gmlas:Network:3.2" xmlns:tn="urn:x-inspire:specification:gmlas:CommonTransportElements:3.0" xmlns:tn-ro="urn:x-inspire:specification:gmlas:RoadTransportNetwork:3.0" elementFormDefault="qualified" targetNamespace="urn:x-inspire:specification:gmlas:RoadTransportNetwork:3.0" version="3.0">
  <annotation>
    <documentation>-- Definition --
This package defines the types that are used on the road subtheme.</documentation>
  </annotation>
  <import namespace="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/gn/3.0/GeographicalNames.xsd"/>
  <import namespace="urn:x-inspire:specification:gmlas:CommonTransportElements:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/tn/3.0/CommonTransportElements.xsd"/>
  <import namespace="urn:x-inspire:specification:gmlas:Network:3.2" schemaLocation="http://inspire.ec.europa.eu/schemas/net/3.2/Network.xsd"/>
  <import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
  <!--XML Schema document created by ShapeChange-->
  <element name="Road" substitutionGroup="tn:TransportLinkSet" type="tn-ro:RoadType">
    <annotation>
      <documentation>-- Definition --
A collection of road link sequences and/or individual road links that are characterized by one or more thematic identifiers and/or properties.

-- Description --
EXAMPLE Examples are roads characterized by a specific identification code, used by road management authorities or tourist routes, identified by a specific name.
</documentation>
    </annotation>
  </element>
  <complexType name="RoadType">
    <complexContent>
      <extension base="tn:TransportLinkSetType">
        <sequence>
          <element minOccurs="0" name="localRoadCode" nillable="true">
            <annotation>
              <documentation>-- Definition --
Identification code assigned to the road by the local road authority.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="string">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="nationalRoadCode" nillable="true">
            <annotation>
              <documentation>-- Definition --
The national number of the road.

-- Description --
SOURCE [Euroroads].
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="string">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="RoadPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-ro:Road"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="RoadServiceType" substitutionGroup="tn:TransportProperty" type="tn-ro:RoadServiceTypeType">
    <annotation>
      <documentation>-- Definition --
Description of the type of road service area and the available facilities.
</documentation>
    </annotation>
  </element>
  <complexType name="RoadServiceTypeType">
    <complexContent>
      <extension base="tn:TransportPropertyType">
        <sequence>
          <element maxOccurs="unbounded" minOccurs="0" name="availableFacility" type="gml:CodeType">
            <annotation>
              <documentation>-- Definition --
Facility that is available for a given road service area.</documentation>
            </annotation>
          </element>
          <element name="type" type="gml:CodeType">
            <annotation>
              <documentation>-- Definition --
Type of road service area.</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="RoadServiceTypePropertyType">
    <sequence minOccurs="0">
      <element ref="tn-ro:RoadServiceType"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="RoadLinkSequence" substitutionGroup="tn:TransportLinkSequence" type="tn-ro:RoadLinkSequenceType">
    <annotation>
      <documentation>-- Definition --
A linear spatial object, composed of an ordered collection of road links, which represents a continuous path in a road network without any branches. The element has a defined beginning and end and every position on the road link sequence is identifiable with one single parameter such as length. It describes an element of the road network, characterized by one or more thematic identifiers and/or properties.
</documentation>
    </annotation>
  </element>
  <complexType name="RoadLinkSequenceType">
    <complexContent>
      <extension base="tn:TransportLinkSequenceType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="RoadLinkSequencePropertyType">
    <sequence minOccurs="0">
      <element ref="tn-ro:RoadLinkSequence"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="RoadServiceArea" substitutionGroup="tn:TransportArea" type="tn-ro:RoadServiceAreaType">
    <annotation>
      <documentation>-- Definition --
Surface annexed to a road and devoted to offer particular services for it.

-- Description --
EXAMPLES Gas station, rest area, toll area.
</documentation>
    </annotation>
  </element>
  <complexType name="RoadServiceAreaType">
    <complexContent>
      <extension base="tn:TransportAreaType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="RoadServiceAreaPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-ro:RoadServiceArea"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="FormOfWay" substitutionGroup="tn:TransportProperty" type="tn-ro:FormOfWayType">
    <annotation>
      <documentation>-- Definition --
A classification based on the physical properties of the Road Link.

-- Description --
SOURCE Based on [EuroRoadS].
</documentation>
    </annotation>
  </element>
  <complexType name="FormOfWayType">
    <complexContent>
      <extension base="tn:TransportPropertyType">
        <sequence>
          <element name="formOfWay" type="gml:CodeType">
            <annotation>
              <documentation>-- Definition --
Physical form of the way.</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="FormOfWayPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-ro:FormOfWay"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="VehicleTrafficArea" substitutionGroup="tn:TransportArea" type="tn-ro:VehicleTrafficAreaType">
    <annotation>
      <documentation>-- Definition --
Surface that represents the part of a road which is used for the normal traffic of vehicles.</documentation>
    </annotation>
  </element>
  <complexType name="VehicleTrafficAreaType">
    <complexContent>
      <extension base="tn:TransportAreaType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="VehicleTrafficAreaPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-ro:VehicleTrafficArea"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="RoadSurfaceCategory" substitutionGroup="tn:TransportProperty" type="tn-ro:RoadSurfaceCategoryType">
    <annotation>
      <documentation>-- Definition --
Specification of the state of the surface of the associated Road Element. Indicates whether a road is paved or unpaved.

-- Description --
SOURCE [GDF3, Euroroads].
</documentation>
    </annotation>
  </element>
  <complexType name="RoadSurfaceCategoryType">
    <complexContent>
      <extension base="tn:TransportPropertyType">
        <sequence>
          <element name="surfaceCategory" type="gml:CodeType">
            <annotation>
              <documentation>-- Definition --
Type of road surface.</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="RoadSurfaceCategoryPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-ro:RoadSurfaceCategory"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <simpleType name="MinMaxLaneValueType">
    <annotation>
      <documentation>-- Definition --
Values to indicate whether number of lanes are counted as the maximum, minimum or average number.

-- Description --
SOURCE Adapted from [Euroroads].</documentation>
    </annotation>
    <restriction base="string">
      <enumeration value="maximum">
        <annotation>
          <documentation>-- Definition --
The number of lanes is the maximum value for a given part of the road network.

-- Description --
SOURCE Adapted from [Euroroads].
</documentation>
        </annotation>
      </enumeration>
      <enumeration value="minimum">
        <annotation>
          <documentation>-- Definition --
The number of lanes is the minimum value for a given part of the road network.

-- Description --
SOURCE [Euroroads].
</documentation>
        </annotation>
      </enumeration>
      <enumeration value="average">
        <annotation>
          <documentation>-- Definition --
The number of lanes is the average value for a given part of the road network.

-- Description --
SOURCE [Euroroads].
</documentation>
        </annotation>
      </enumeration>
    </restriction>
  </simpleType>
  <element name="RoadNode" substitutionGroup="tn:TransportNode" type="tn-ro:RoadNodeType">
    <annotation>
      <documentation>-- Definition --
A point spatial object that is used to either represent connectivity between two road links or to represent a significant spatial object such as a services station or  roundabout.</documentation>
    </annotation>
  </element>
  <complexType name="RoadNodeType">
    <complexContent>
      <extension base="tn:TransportNodeType">
        <sequence>
          <element name="formOfRoadNode" nillable="true">
            <annotation>
              <documentation>-- Definition --
Description of the function of a road node in the road transport network.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:CodeType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="RoadNodePropertyType">
    <sequence minOccurs="0">
      <element ref="tn-ro:RoadNode"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="RoadName" substitutionGroup="tn:TransportProperty" type="tn-ro:RoadNameType">
    <annotation>
      <documentation>-- Definition --
Name of a road, as assigned by the responsible authority.
</documentation>
    </annotation>
  </element>
  <complexType name="RoadNameType">
    <complexContent>
      <extension base="tn:TransportPropertyType">
        <sequence>
          <element name="name" type="gn:GeographicalNamePropertyType">
            <annotation>
              <documentation>-- Definition --
Name of the road.</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="RoadNamePropertyType">
    <sequence minOccurs="0">
      <element ref="tn-ro:RoadName"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="SpeedLimit" substitutionGroup="tn:TransportProperty" type="tn-ro:SpeedLimitType">
    <annotation>
      <documentation>-- Definition --
Limit for the speed of a vehicle on a road..

-- Description --
SOURCE [Euroroads].
</documentation>
    </annotation>
  </element>
  <complexType name="SpeedLimitType">
    <complexContent>
      <extension base="tn:TransportPropertyType">
        <sequence>
          <element minOccurs="0" name="areaCondition" nillable="true">
            <annotation>
              <documentation>-- Definition --
Speed limit is dependent on environmental circumstances.

-- Description --
SOURCE [Euroroads].</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:CodeType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="direction" nillable="true">
            <annotation>
              <documentation>-- Definition --
Indicates which direction the speed limit is valid for.

-- Description --
SOURCE [Euroroads].
NOTE This attribute only applies when the property is associated with a road link or road link sequence.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:CodeType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="laneExtension" nillable="true">
            <annotation>
              <documentation>-- Definition --
Number of lanes including the start lane counted from the right hand side for which the speed limit applies.

-- Description --
SOURCE [Euroroads].
NOTE This attribute only applies when the property is associated with a road link or road link sequence.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="integer">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="speedLimitMinMaxType" type="tn-ro:SpeedLimitMinMaxValueType">
            <annotation>
              <documentation>-- Definition --
Indicates if the speed limit is maximum or minimum and if it is recommended.

-- Description --
SOURCE [Euroroads].</documentation>
            </annotation>
          </element>
          <element minOccurs="0" name="speedLimitSource" nillable="true">
            <annotation>
              <documentation>-- Definition --
Source for speed limit.

-- Description --
SOURCE [Euroroads].</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:CodeType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="speedLimitValue" type="gml:SpeedType">
            <annotation>
              <documentation>-- Definition --
Value for speed limit.

-- Description --
SOURCE [Euroroads].</documentation>
            </annotation>
          </element>
          <element minOccurs="0" name="startLane" nillable="true">
            <annotation>
              <documentation>-- Definition --
Start lane counted from the right side for which speed limit applies.

-- Description --
SOURCE [Euroroads].
NOTE This attribute only applies when the property is associated with a road link or road link sequence.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="integer">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="validityPeriod" nillable="true" type="gml:TimePeriodPropertyType">
            <annotation>
              <documentation>-- Definition --
Period during which the speed limit is valid.</documentation>
            </annotation>
          </element>
          <element minOccurs="0" name="vehicleType" nillable="true">
            <annotation>
              <documentation>-- Definition --
Vehicle type the speed limit is restricted to.

-- Description --
SOURCE Adapted from [Euroroads].
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:CodeType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="weatherCondition" nillable="true">
            <annotation>
              <documentation>-- Definition --
Weather condition the speed limit is dependent on.

-- Description --
SOURCE Adapted from [Euroroads].
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:CodeType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="SpeedLimitPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-ro:SpeedLimit"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <simpleType name="FunctionalRoadClassValueType">
    <annotation>
      <documentation>-- Definition --
Values for the functional road classification. This classification is based on the importance of the role that the road performs in the road network. 

-- Description --
SOURCE Adapted from [GDF, EuroRoadS].</documentation>
    </annotation>
    <restriction base="string">
      <enumeration value="mainRoad">
        <annotation>
          <documentation>-- Definition --
The most important roads in a given network. 

-- Description --
SOURCE [GDF], [Euroroads].</documentation>
        </annotation>
      </enumeration>
      <enumeration value="firstClass">
        <annotation>
          <documentation>-- Definition --
The second most important roads in a given network.

-- Description --
SOURCE [Euroroads].
</documentation>
        </annotation>
      </enumeration>
      <enumeration value="secondClass">
        <annotation>
          <documentation>-- Definition --
The third most important roads in a given network.

-- Description --
SOURCE [Euroroads].
</documentation>
        </annotation>
      </enumeration>
      <enumeration value="thirdClass">
        <annotation>
          <documentation>-- Definition --
The fourth most important roads in a given network.

-- Description --
SOURCE [Euroroads].
</documentation>
        </annotation>
      </enumeration>
      <enumeration value="fourthClass">
        <annotation>
          <documentation>-- Definition --
The fifth most important roads in a given network.

-- Description --
SOURCE [Euroroads].
</documentation>
        </annotation>
      </enumeration>
      <enumeration value="fifthClass">
        <annotation>
          <documentation>-- Definition --
The sixth most important roads in a given network.

-- Description --
SOURCE [Euroroads].
</documentation>
        </annotation>
      </enumeration>
      <enumeration value="sixthClass">
        <annotation>
          <documentation>-- Definition --
The seventh most important roads in a given network.

-- Description --
SOURCE [Euroroads].
</documentation>
        </annotation>
      </enumeration>
      <enumeration value="seventhClass">
        <annotation>
          <documentation>-- Definition --
The eighth most important roads in a given network.

-- Description --
SOURCE [Euroroads].
</documentation>
        </annotation>
      </enumeration>
      <enumeration value="eighthClass">
        <annotation>
          <documentation>-- Definition --
The ninth most important roads in a given network.

-- Description --
SOURCE [Euroroads].
</documentation>
        </annotation>
      </enumeration>
      <enumeration value="ninthClass">
        <annotation>
          <documentation>-- Definition --
The least important roads in a given network.

-- Description --
SOURCE [GDF]

NOTE The farthest ways in the forest road network. It has no regular maintenance. [NVDB] [Euroroads].
</documentation>
        </annotation>
      </enumeration>
    </restriction>
  </simpleType>
  <element name="RoadArea" substitutionGroup="tn:TransportArea" type="tn-ro:RoadAreaType">
    <annotation>
      <documentation>-- Definition --
Surface which extends to the limits of a road, including vehicular areas and other parts of it.

-- Description --
EAXMPLE Pedestrian areas.
</documentation>
    </annotation>
  </element>
  <complexType name="RoadAreaType">
    <complexContent>
      <extension base="tn:TransportAreaType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="RoadAreaPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-ro:RoadArea"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="NumberOfLanes" substitutionGroup="tn:TransportProperty" type="tn-ro:NumberOfLanesType">
    <annotation>
      <documentation>-- Definition --
The number of lanes of a road element.

-- Description --
SOURCE Adapated from [Euroroads].
</documentation>
    </annotation>
  </element>
  <complexType name="NumberOfLanesType">
    <complexContent>
      <extension base="tn:TransportPropertyType">
        <sequence>
          <element minOccurs="0" name="direction" nillable="true">
            <annotation>
              <documentation>-- Definition --
Indicates which direction the number of lanes is valid for.

-- Description --
SOURCE [Euroroads].
NOTE When the value for this attribute is ''both'', numberOfLanes contains the sum of the number of lanes in both directions of travel.
NOTE This attribute only applies when the property is associated with a road link or road link sequence.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:CodeType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="minMaxNumberOfLanes" nillable="true">
            <annotation>
              <documentation>-- Definition --
Indicates if the number of lanes is counted as minimum or maximum value.

-- Description --
SOURCE [Euroroads].

NOTE This attribute only applies when the value in numberOfLanes is not an exact value.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="tn-ro:MinMaxLaneValueType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="numberOfLanes" type="integer">
            <annotation>
              <documentation>-- Definition --
Number of lanes.

-- Description --
SOURCE [Euroroads].</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="NumberOfLanesPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-ro:NumberOfLanes"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="FunctionalRoadClass" substitutionGroup="tn:TransportProperty" type="tn-ro:FunctionalRoadClassType">
    <annotation>
      <documentation>-- Definition --
A classification based on the importance of the role that the road performs in the road network. 

-- Description --
SOURCE Adapted from [GDF, EuroRoadS].
</documentation>
    </annotation>
  </element>
  <complexType name="FunctionalRoadClassType">
    <complexContent>
      <extension base="tn:TransportPropertyType">
        <sequence>
          <element name="functionalClass" type="tn-ro:FunctionalRoadClassValueType">
            <annotation>
              <documentation>-- Definition --
Functional rank of the road link in the road network.

-- Description --
NOTE Where functional classification systems are used that have fewer classes/ranks than the number provided by FunctionalRoadClassValues, classes with codes 1 to n will be used, where n corresponds to the number of classes that are used in the classification system.
</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="FunctionalRoadClassPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-ro:FunctionalRoadClass"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <simpleType name="SpeedLimitMinMaxValueType">
    <annotation>
      <documentation>-- Definition --
Possible values to indicate the nature of a speed limit.</documentation>
    </annotation>
    <restriction base="string">
      <enumeration value="maximum">
        <annotation>
          <documentation>-- Definition --
Speed limit is a maximum value

-- Description --
SOURCE [Euroroads].
</documentation>
        </annotation>
      </enumeration>
      <enumeration value="minimum">
        <annotation>
          <documentation>-- Definition --
Speed limit is a minimum value

-- Description --
SOURCE [Euroroads].
</documentation>
        </annotation>
      </enumeration>
      <enumeration value="recommendedMaximum">
        <annotation>
          <documentation>-- Definition --
Speed limit is a recommended maximum value

-- Description --
SOURCE [Euroroads].
</documentation>
        </annotation>
      </enumeration>
      <enumeration value="recommendedMinimum">
        <annotation>
          <documentation>-- Definition --
Speed limit is a recommended minimum value

-- Description --
SOURCE [Euroroads].
</documentation>
        </annotation>
      </enumeration>
    </restriction>
  </simpleType>
  <element name="ERoad" substitutionGroup="tn:TransportLinkSet" type="tn-ro:ERoadType">
    <annotation>
      <documentation>-- Definition --
A collection of road link sequences and or individual road links that represents a route that is part of the international E-road network, characterized by its European route number.

-- Description --
EXAMPLE E40.
</documentation>
    </annotation>
  </element>
  <complexType name="ERoadType">
    <complexContent>
      <extension base="tn:TransportLinkSetType">
        <sequence>
          <element name="europeanRouteNumber" nillable="true">
            <annotation>
              <documentation>-- Definition --
Code, identifying the route in the international E-road network.
The code always starts with a letter ''E'', followed by a one-, two- or three-digit number.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="string">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="ERoadPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-ro:ERoad"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="RoadWidth" substitutionGroup="tn:TransportProperty" type="tn-ro:RoadWidthType">
    <annotation>
      <documentation>-- Definition --
The width of the road, measured as an average value.

-- Description --
SOURCE [Euroroads].
</documentation>
    </annotation>
  </element>
  <complexType name="RoadWidthType">
    <complexContent>
      <extension base="tn:TransportPropertyType">
        <sequence>
          <element name="measuredRoadPart" nillable="true">
            <annotation>
              <documentation>-- Definition --
Indicates to which part of a road the value for the attribute ''width'' applies.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:CodeType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="width" type="gml:MeasureType">
            <annotation>
              <documentation>-- Definition --
Road width value.</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="RoadWidthPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-ro:RoadWidth"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="RoadLink" substitutionGroup="tn:TransportLink" type="tn-ro:RoadLinkType">
    <annotation>
      <documentation>-- Definition --
A linear spatial object that describes the geometry and connectivity of a road network between two points in the network.
Road links can represent paths, bicycle roads, single carriageways, multiple carriageway roads and even fictitious trajectories across traffic squares.</documentation>
    </annotation>
  </element>
  <complexType name="RoadLinkType">
    <complexContent>
      <extension base="tn:TransportLinkType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="RoadLinkPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-ro:RoadLink"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 378;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (378, empty_clob(), 'INSPIRE', 'urn:x-inspire:specification:gmlas:WaterTransportNetwork:3.0/watertransportnetwork.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 378 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as watertransportnetwork_tn_w_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?><schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:net="urn:x-inspire:specification:gmlas:Network:3.2" xmlns:tn="urn:x-inspire:specification:gmlas:CommonTransportElements:3.0" xmlns:tn-w="urn:x-inspire:specification:gmlas:WaterTransportNetwork:3.0" elementFormDefault="qualified" targetNamespace="urn:x-inspire:specification:gmlas:WaterTransportNetwork:3.0" version="3.0">
  <annotation>
    <documentation>-- Definition --
This package defines the types that are used on the water transport subtheme.</documentation>
  </annotation>
  <import namespace="urn:x-inspire:specification:gmlas:CommonTransportElements:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/tn/3.0/CommonTransportElements.xsd"/>
  <import namespace="urn:x-inspire:specification:gmlas:Network:3.2" schemaLocation="http://inspire.ec.europa.eu/schemas/net/3.2/Network.xsd"/>
  <import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
  <!--XML Schema document created by ShapeChange-->
  <element name="PortArea" substitutionGroup="tn:TransportArea" type="tn-w:PortAreaType">
    <annotation>
      <documentation>-- Definition --
An area spatial object which is used to represent the physical limits of all the facilities which constitute the terrestrial zone of a sea or inland port.
</documentation>
    </annotation>
  </element>
  <complexType name="PortAreaType">
    <complexContent>
      <extension base="tn:TransportAreaType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="PortAreaPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-w:PortArea"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element abstract="true" name="TrafficSeparationSchemeArea" substitutionGroup="tn:TransportArea" type="tn-w:TrafficSeparationSchemeAreaType">
    <annotation>
      <documentation>-- Definition --
An area spatial object forming part of a traffic separation scheme.
</documentation>
    </annotation>
  </element>
  <complexType abstract="true" name="TrafficSeparationSchemeAreaType">
    <complexContent>
      <extension base="tn:TransportAreaType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="TrafficSeparationSchemeAreaPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-w:TrafficSeparationSchemeArea"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="Buoy" substitutionGroup="tn:TransportPoint" type="tn-w:BuoyType">
    <annotation>
      <documentation>-- Definition --
A floating object moored to the bottom in a particular (charted) place, as an aid to navigation or for other specific purposes.

-- Description --
SOURCE  [S-32 - IHO International Hydrographic Dictionary]

NOTE Navigational buoys may be classified according to: (a) their shape, appearance, or construction, such as barrel, can, cask, conical, cylindrical, dan, keg, nun, pillar, spar, spherical, or topmark buoy; (b) their colour, such as black, chequered, green, red buoy; (c) their location, such as bifurcation, fairway, junction, mid-channel, middle-ground, or turning buoy; (d) the various kinds of hazards or dangers to navigation which they mark, such as bar, isolated danger, fish trap, obstruction, spoil ground, telegraph or wreck buoy; (e) their particular purpose or use, such as anchor, anchorage, compass adjustment, dredging, farewell (or landfall), marker, quarantine, station (or watch), or warping buoy. [S-32 - IHO International Hydrographic Dictionary].
</documentation>
    </annotation>
  </element>
  <complexType name="BuoyType">
    <complexContent>
      <extension base="tn:TransportPointType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="BuoyPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-w:Buoy"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="WaterTrafficFlowDirection" substitutionGroup="tn:TrafficFlowDirection" type="tn-w:WaterTrafficFlowDirectionType">
    <annotation>
      <documentation>-- Definition --
Indicates the direction of the flow of water transport traffic in relation to the direction of the water transport link vector.
</documentation>
    </annotation>
  </element>
  <complexType name="WaterTrafficFlowDirectionType">
    <complexContent>
      <extension base="tn:TrafficFlowDirectionType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="WaterTrafficFlowDirectionPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-w:WaterTrafficFlowDirection"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="TrafficSeparationSchemeCrossing" substitutionGroup="tn-w:TrafficSeparationSchemeArea" type="tn-w:TrafficSeparationSchemeCrossingType">
    <annotation>
      <documentation>-- Definition --
A defined area where traffic lanes cross.

-- Description --
SOURCE [IHO Hydrographic Registry].
</documentation>
    </annotation>
  </element>
  <complexType name="TrafficSeparationSchemeCrossingType">
    <complexContent>
      <extension base="tn-w:TrafficSeparationSchemeAreaType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="TrafficSeparationSchemeCrossingPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-w:TrafficSeparationSchemeCrossing"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="FairwayArea" substitutionGroup="tn:TransportArea" type="tn-w:FairwayAreaType">
    <annotation>
      <documentation>-- Definition --
The main travelled part of a waterway.

-- Description --
SOURCE  [International Hydrographic Dictionary].

NOTE That part of a river, harbour and so on, where the main navigable channel for vessels of larger size lies. It is also the usual course followed by vessels entering or leaving harbours, called ''ship channel'' [IHO Hidrographic Registry].
</documentation>
    </annotation>
  </element>
  <complexType name="FairwayAreaType">
    <complexContent>
      <extension base="tn:TransportAreaType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="FairwayAreaPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-w:FairwayArea"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="WaterwayNode" substitutionGroup="tn-w:WaterNode" type="tn-w:WaterwayNodeType">
    <annotation>
      <documentation>-- Definition --
A point spatial object which is used to represent the connectivity between two different waterway links, or between a waterway link and a watercourse link, in the water transport network.
</documentation>
    </annotation>
  </element>
  <complexType name="WaterwayNodeType">
    <complexContent>
      <extension base="tn-w:WaterNodeType">
        <sequence>
          <element name="formOfWaterwayNode" nillable="true">
            <annotation>
              <documentation>-- Definition --
Description of the function of a waterway node in the water transport network.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="gml:CodeType">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="WaterwayNodePropertyType">
    <sequence minOccurs="0">
      <element ref="tn-w:WaterwayNode"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="RestrictionForWaterVehicles" substitutionGroup="tn:RestrictionForVehicles" type="tn-w:RestrictionForWaterVehiclesType">
    <annotation>
      <documentation>-- Definition --
Restriction on vehicles on a water transport element.
</documentation>
    </annotation>
  </element>
  <complexType name="RestrictionForWaterVehiclesType">
    <complexContent>
      <extension base="tn:RestrictionForVehiclesType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="RestrictionForWaterVehiclesPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-w:RestrictionForWaterVehicles"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="TrafficSeparationSchemeSeparator" substitutionGroup="tn-w:TrafficSeparationSchemeArea" type="tn-w:TrafficSeparationSchemeSeparatorType">
    <annotation>
      <documentation>-- Definition --
A zone separating the lanes in which ships are proceeding in opposite or nearly opposite directions; or separating traffic lanes designated for particular classes of ships proceeding in the same direction.

-- Description --
SOURCE [IHO Hydrographic Registry].
</documentation>
    </annotation>
  </element>
  <complexType name="TrafficSeparationSchemeSeparatorType">
    <complexContent>
      <extension base="tn-w:TrafficSeparationSchemeAreaType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="TrafficSeparationSchemeSeparatorPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-w:TrafficSeparationSchemeSeparator"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="WaterLinkSequence" substitutionGroup="tn:TransportLinkSequence" type="tn-w:WaterLinkSequenceType">
    <annotation>
      <documentation>-- Definition --
A linear spatial object, composed of an ordered collection of waterway and/or watercourse links (as necessary), which represents a continuous path in the water network without any branches.

-- Description --
NOTE The element has a defined beginning and end and every position on the water link sequence is identifiable with one single parameter such as length. It describes a element of the water network, which is a navigable path within a water body (oceans, seas, rivers, lakes, channels or canals) and could be characterized by one or more thematical identifiers and/or properties.
</documentation>
    </annotation>
  </element>
  <complexType name="WaterLinkSequenceType">
    <complexContent>
      <extension base="tn:TransportLinkSequenceType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="WaterLinkSequencePropertyType">
    <sequence minOccurs="0">
      <element ref="tn-w:WaterLinkSequence"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="PortNode" substitutionGroup="tn-w:WaterNode" type="tn-w:PortNodeType">
    <annotation>
      <documentation>-- Definition --
A point spatial object which is used to represent a sea or inland port in a simplified way, aproximately located at the bank of the waterbody where the port is placed. 

-- Description --
NOTE It is used to connect the port with the rest of the water transport network, by means of the different waterway links which arrive to / depart from it.
</documentation>
    </annotation>
  </element>
  <complexType name="PortNodeType">
    <complexContent>
      <extension base="tn-w:WaterNodeType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="PortNodePropertyType">
    <sequence minOccurs="0">
      <element ref="tn-w:PortNode"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element abstract="true" name="WaterNode" substitutionGroup="tn:TransportNode" type="tn-w:WaterNodeType">
    <annotation>
      <documentation>-- Definition --
A point spatial object which is used to represent the connectivity between two different waterway links, or between a waterway link and a watercourse link, in the water transport network.

-- Description --
NOTE It is also used to represent a significant feature in the network, such as a port.
</documentation>
    </annotation>
  </element>
  <complexType abstract="true" name="WaterNodeType">
    <complexContent>
      <extension base="tn:TransportNodeType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="WaterNodePropertyType">
    <sequence minOccurs="0">
      <element ref="tn-w:WaterNode"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <simpleType name="CEMTClassValueType">
    <annotation>
      <documentation>-- Definition --
Inland waterway classification according to CEMT (European Conference of Ministers of Transport) Resolution No.92/2.</documentation>
    </annotation>
    <restriction base="string">
      <enumeration value="I">
        <annotation>
          <documentation>-- Definition --
Inland waterway belonging to CEMT-class I, defined by the European Conference of Ministers of Transport, Resolution No.92/2 - Table 1.
</documentation>
        </annotation>
      </enumeration>
      <enumeration value="II">
        <annotation>
          <documentation>-- Definition --
Inland waterway belonging to CEMT-class II, defined by the European Conference of Ministers of Transport, Resolution No.92/2 - Table 1.
</documentation>
        </annotation>
      </enumeration>
      <enumeration value="III">
        <annotation>
          <documentation>-- Definition --
Inland waterway belonging to CEMT-class III, defined by the European Conference of Ministers of Transport, Resolution No.92/2 - Table 1.
</documentation>
        </annotation>
      </enumeration>
      <enumeration value="IV">
        <annotation>
          <documentation>-- Definition --
Inland waterway belonging to CEMT-class IV, defined by the European Conference of Ministers of Transport, Resolution No.92/2 - Table 1.
</documentation>
        </annotation>
      </enumeration>
      <enumeration value="Va">
        <annotation>
          <documentation>-- Definition --
Inland waterway belonging to CEMT-class Va, defined by the European Conference of Ministers of Transport, Resolution No.92/2 - Table 1.
</documentation>
        </annotation>
      </enumeration>
      <enumeration value="Vb">
        <annotation>
          <documentation>-- Definition --
Inland waterway belonging to CEMT-class Vb, defined by the European Conference of Ministers of Transport, Resolution No.92/2 - Table 1.
</documentation>
        </annotation>
      </enumeration>
      <enumeration value="VIa">
        <annotation>
          <documentation>-- Definition --
Inland waterway belonging to CEMT-class VIa, defined by the European Conference of Ministers of Transport, Resolution No.92/2 - Table 1.
</documentation>
        </annotation>
      </enumeration>
      <enumeration value="VIb">
        <annotation>
          <documentation>-- Definition --
Inland waterway belonging to CEMT-class VIb, defined by the European Conference of Ministers of Transport, Resolution No.92/2 - Table 1.
</documentation>
        </annotation>
      </enumeration>
      <enumeration value="VIc">
        <annotation>
          <documentation>-- Definition --
Inland waterway belonging to CEMT-class VIc, defined by the European Conference of Ministers of Transport, Resolution No.92/2 - Table 1.
</documentation>
        </annotation>
      </enumeration>
      <enumeration value="VII">
        <annotation>
          <documentation>-- Definition --
Inland waterway belonging to CEMT-class VII, defined by the European Conference of Ministers of Transport, Resolution No.92/2 - Table 1.
</documentation>
        </annotation>
      </enumeration>
    </restriction>
  </simpleType>
  <element name="CEMTClass" substitutionGroup="tn:TransportProperty" type="tn-w:CEMTClassType">
    <annotation>
      <documentation>-- Definition --
Classification of an inland waterway according to CEMT (European Conference of Ministers of Transport).
</documentation>
    </annotation>
  </element>
  <complexType name="CEMTClassType">
    <complexContent>
      <extension base="tn:TransportPropertyType">
        <sequence>
          <element name="CEMTClass" type="tn-w:CEMTClassValueType">
            <annotation>
              <documentation>-- Definition --
Value indicating the classification of an Inland waterway according to CEMT (European Conference of Ministers of Transport).</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="CEMTClassPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-w:CEMTClass"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="MarineWaterway" substitutionGroup="tn-w:Waterway" type="tn-w:MarineWaterwayType">
    <annotation>
      <documentation>-- Definition --
Waterway which is defined at sea waters.
</documentation>
    </annotation>
  </element>
  <complexType name="MarineWaterwayType">
    <complexContent>
      <extension base="tn-w:WaterwayType">
        <sequence>
          <element name="deepWaterRoute" nillable="true">
            <annotation>
              <documentation>-- Definition --
Attribute which indicates if the maritime waterway is a deep water route.

DEFINITION Deep water route: A route in a designated area within defined limits which has been accurately surveyed for clearance of sea bottom and submerged obstacles to a minimum indicated depth of water [S-32 - IHO International Hydrographic Dictionary].
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="boolean">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="MarineWaterwayPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-w:MarineWaterway"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="TrafficSeparationSchemeLane" substitutionGroup="tn-w:TrafficSeparationSchemeArea" type="tn-w:TrafficSeparationSchemeLaneType">
    <annotation>
      <documentation>-- Definition --
An area within defined limits in which one-way traffic flow is established.

-- Description --
SOURCE [IMO Ships Routeing, 6th Edition], [IHO Hydrographic Registry]. 
</documentation>
    </annotation>
  </element>
  <complexType name="TrafficSeparationSchemeLaneType">
    <complexContent>
      <extension base="tn-w:TrafficSeparationSchemeAreaType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="TrafficSeparationSchemeLanePropertyType">
    <sequence minOccurs="0">
      <element ref="tn-w:TrafficSeparationSchemeLane"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="TrafficSeparationSchemeRoundabout" substitutionGroup="tn-w:TrafficSeparationSchemeArea" type="tn-w:TrafficSeparationSchemeRoundaboutType">
    <annotation>
      <documentation>-- Definition --
A traffic separation scheme in which traffic moves in a counter-clockwise direction around a specified point or zone. 

-- Description --
SOURCE [IHO Hydrographic Registry]. 
</documentation>
    </annotation>
  </element>
  <complexType name="TrafficSeparationSchemeRoundaboutType">
    <complexContent>
      <extension base="tn-w:TrafficSeparationSchemeAreaType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="TrafficSeparationSchemeRoundaboutPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-w:TrafficSeparationSchemeRoundabout"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="WaterwayLink" substitutionGroup="tn:TransportLink" type="tn-w:WaterwayLinkType">
    <annotation>
      <documentation>-- Definition --
A linear spatial object that describes the geometry or connectivity of the water transport network between two consecutive waterway or watercourse nodes. It represents a linear section across a body of water which is used for shipping.

-- Description --
NOTE Water Transport Networks will use the '||'&'||'lt;i'||'&'||'gt;WatercourseLink'||'&'||'lt;/i'||'&'||'gt; class - provided by the INSPIRE Hydrography Data Specification - wherever possible.
</documentation>
    </annotation>
  </element>
  <complexType name="WaterwayLinkType">
    <complexContent>
      <extension base="tn:TransportLinkType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="WaterwayLinkPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-w:WaterwayLink"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="InlandWaterway" substitutionGroup="tn-w:Waterway" type="tn-w:InlandWaterwayType">
    <annotation>
      <documentation>-- Definition --
Waterway which is defined at inland continental waters.

-- Description --
EXAMPLE The inland waterways classified by the CEMT (European Conference of Ministers of Transport).
</documentation>
    </annotation>
  </element>
  <complexType name="InlandWaterwayType">
    <complexContent>
      <extension base="tn-w:WaterwayType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="InlandWaterwayPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-w:InlandWaterway"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="FerryUse" substitutionGroup="tn:TransportProperty" type="tn-w:FerryUseType">
    <annotation>
      <documentation>-- Definition --
The type of transport carried out by a ferry crossing.
</documentation>
    </annotation>
  </element>
  <complexType name="FerryUseType">
    <complexContent>
      <extension base="tn:TransportPropertyType">
        <sequence>
          <element maxOccurs="unbounded" name="ferryUse" type="gml:CodeType">
            <annotation>
              <documentation>-- Definition --
Value indicating the type of transport carried out by a ferry crossing.</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="FerryUsePropertyType">
    <sequence minOccurs="0">
      <element ref="tn-w:FerryUse"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element abstract="true" name="TrafficSeparationScheme" substitutionGroup="gml:AbstractFeature" type="tn-w:TrafficSeparationSchemeType">
    <annotation>
      <documentation>-- Definition --
A scheme which aims at reducing the risk of collision in congested and/or converging areas by separating traffic moving in opposite, or nearly opposite, directions.

-- Description --
SOURCE  [S-32 - IHO International Hydrographic Dictionary]

NOTE 1 Acronym: TSS.

NOTE 2 TSSs constitute main components of maritime routing measures for hydrographic transport.
</documentation>
    </annotation>
  </element>
  <complexType abstract="true" name="TrafficSeparationSchemeType">
    <complexContent>
      <extension base="gml:AbstractFeatureType">
        <sequence>
          <element maxOccurs="unbounded" minOccurs="0" name="markerBuoy">
            <annotation>
              <documentation>-- Definition --
A marker forming part of a traffic separation scheme.</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">tn-w:Buoy</targetElement>
              </appinfo>
            </annotation>
            <complexType>
              <complexContent>
                <extension base="gml:AbstractMemberType">
                  <sequence/>
                  <attributeGroup ref="gml:AssociationAttributeGroup"/>
                </extension>
              </complexContent>
            </complexType>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="marineWaterRoute">
            <annotation>
              <documentation>-- Definition --
The collection of marine waterways associated with a traffic separation scheme.</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">tn-w:MarineWaterway</targetElement>
              </appinfo>
            </annotation>
            <complexType>
              <complexContent>
                <extension base="gml:AbstractMemberType">
                  <sequence/>
                  <attributeGroup ref="gml:AssociationAttributeGroup"/>
                </extension>
              </complexContent>
            </complexType>
          </element>
          <element maxOccurs="unbounded" name="component">
            <annotation>
              <documentation>-- Definition --
A component of a traffic separation scheme.</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">tn-w:TrafficSeparationSchemeArea</targetElement>
              </appinfo>
            </annotation>
            <complexType>
              <complexContent>
                <extension base="gml:AbstractMemberType">
                  <sequence/>
                  <attributeGroup ref="gml:AssociationAttributeGroup"/>
                </extension>
              </complexContent>
            </complexType>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="markerBeacon">
            <annotation>
              <documentation>-- Definition --
A marker forming part of a traffic separation scheme.</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">tn-w:Beacon</targetElement>
              </appinfo>
            </annotation>
            <complexType>
              <complexContent>
                <extension base="gml:AbstractMemberType">
                  <sequence/>
                  <attributeGroup ref="gml:AssociationAttributeGroup"/>
                </extension>
              </complexContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="TrafficSeparationSchemePropertyType">
    <sequence minOccurs="0">
      <element ref="tn-w:TrafficSeparationScheme"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="ConditionOfWaterFacility" substitutionGroup="tn:ConditionOfFacility" type="tn-w:ConditionOfWaterFacilityType">
    <annotation>
      <documentation>-- Definition --
State of a water transport network element with regards to its completion and use.
</documentation>
    </annotation>
  </element>
  <complexType name="ConditionOfWaterFacilityType">
    <complexContent>
      <extension base="tn:ConditionOfFacilityType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="ConditionOfWaterFacilityPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-w:ConditionOfWaterFacility"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="Beacon" substitutionGroup="tn:TransportPoint" type="tn-w:BeaconType">
    <annotation>
      <documentation>-- Definition --
A prominent specially constructed object forming a conspicuous mark as a fixed aid to navigation, or for use in hydrographic survey.

-- Description --
SOURCE  [S-32 - IHO International Hydrographic Dictionary].</documentation>
    </annotation>
  </element>
  <complexType name="BeaconType">
    <complexContent>
      <extension base="tn:TransportPointType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="BeaconPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-w:Beacon"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="FerryCrossing" substitutionGroup="tn-w:Waterway" type="tn-w:FerryCrossingType">
    <annotation>
      <documentation>-- Definition --
A special waterway aimed at supporting the transport of passengers, vehicles or other cargo/freight across a water body, and which is normally used as a connection linking two or more nodes of a land based transport network.
</documentation>
    </annotation>
  </element>
  <complexType name="FerryCrossingType">
    <complexContent>
      <extension base="tn-w:WaterwayType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="FerryCrossingPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-w:FerryCrossing"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element abstract="true" name="Waterway" substitutionGroup="tn:TransportLinkSet" type="tn-w:WaterwayType">
    <annotation>
      <documentation>-- Definition --
A collection of water link sequences and or individual waterway and/or watercourse links (as necessary) that are characterized by one or more thematical identifiers and/or properties, which perform a navigable route within a water body (oceans, seas, rivers, lakes, channels or canals).
</documentation>
    </annotation>
  </element>
  <complexType abstract="true" name="WaterwayType">
    <complexContent>
      <extension base="tn:TransportLinkSetType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="WaterwayPropertyType">
    <sequence minOccurs="0">
      <element ref="tn-w:Waterway"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 379;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (379, empty_clob(), 'INSPIRE', 'urn:x-inspire:specification:gmlas:CommonTransportElements:3.0/commontransportelements.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 379 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as commontransportelements_tn_3_0.xsd
    -- Needed to separate this xsd into two pieces due to its size>32767.
    buf :=
'<?xml version="1.0" encoding="UTF-8"?><schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="urn:x-inspire:specification:gmlas:BaseTypes:3.2" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:gn="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" xmlns:net="urn:x-inspire:specification:gmlas:Network:3.2" xmlns:tn="urn:x-inspire:specification:gmlas:CommonTransportElements:3.0" elementFormDefault="qualified" targetNamespace="urn:x-inspire:specification:gmlas:CommonTransportElements:3.0" version="3.0.1">
  <annotation>
    <documentation>-- Definition --
This package defines the types that are common for all transport networks subthemes.</documentation>
  </annotation>
  <import namespace="urn:x-inspire:specification:gmlas:BaseTypes:3.2" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.2/BaseTypes.xsd"/>
  <import namespace="urn:x-inspire:specification:gmlas:Network:3.2" schemaLocation="http://inspire.ec.europa.eu/schemas/net/3.2/Network.xsd"/>
  <import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
  <import namespace="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/gn/3.0/GeographicalNames.xsd"/>
  <import namespace="http://www.isotc211.org/2005/gmd" schemaLocation="http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd"/>
  <!--XML Schema document created by ShapeChange-->
  <element abstract="true" name="TransportLinkSequence" substitutionGroup="net:LinkSequence" type="tn:TransportLinkSequenceType">
    <annotation>
      <documentation>-- Definition --
A linear spatial object, composed of an ordered collection of transport links, which represents a continuous path in the transport network without any branches. The element has a defined beginning and end and every position on the transport link sequence is identifiable with one single parameter such as length. It describes an element of the transport network, characterized by one or more thematical identifiers and/or properties.
</documentation>
    </annotation>
  </element>
  <complexType abstract="true" name="TransportLinkSequenceType">
    <complexContent>
      <extension base="net:LinkSequenceType">
        <sequence>
          <element minOccurs="0" name="geographicalName" nillable="true">
            <annotation>
              <documentation>-- Definition --
A geographical name that is used to identify the transport network object in the real world. It provides a ''key'' for implicitly associating different representations of the object.
</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="gn:GeographicalName"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element name="validFrom" nillable="true">
            <annotation>
              <documentation>-- Definition --
The time when the transport link sequence started to exist in the real world. </documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="validTo" nillable="true">
            <annotation>
              <documentation>-- Definition --
The time from which the transport link sequence no longer exists in the real world.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="TransportLinkSequencePropertyType">
    <sequence minOccurs="0">
      <element ref="tn:TransportLinkSequence"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="AccessRestriction" substitutionGroup="tn:TransportProperty" type="tn:AccessRestrictionType">
    <annotation>
      <documentation>-- Definition --
A restriction on the access to a transport element.</documentation>
    </annotation>
  </element>
  <complexType name="AccessRestrictionType">
    <complexContent>
      <extension base="tn:TransportPropertyType">
        <sequence>
          <element name="restriction" type="gml:CodeType">
            <annotation>
              <documentation>-- Definition --
Nature of the access restriction.</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="AccessRestrictionPropertyType">
    <sequence minOccurs="0">
      <element ref="tn:AccessRestriction"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element abstract="true" name="TransportLinkSet" substitutionGroup="net:LinkSet" type="tn:TransportLinkSetType">
    <annotation>
      <documentation>-- Definition --
A collection of transport link sequences and or individual transport links that has a specific function or significance in a transport network. 

-- Description --
NOTE
This spatial object type supports the aggregation of links to form objects with branches, loops, parallel sequences of links, gaps, etc.

EXAMPLE
A dual carriageway road, as a collection of the two link sequences that represent each carriageway. 
</documentation>
    </annotation>
  </element>
  <complexType abstract="true" name="TransportLinkSetType">
    <complexContent>
      <extension base="net:LinkSetType">
        <sequence>
          <element minOccurs="0" name="geographicalName" nillable="true">
            <annotation>
              <documentation>-- Definition --
A geographical name that is used to identify the transport network object in the real world. It provides a ''key'' for implicitly associating different representations of the object.
</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="gn:GeographicalName"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element name="validFrom" nillable="true">
            <annotation>
              <documentation>-- Definition --
The time when the transport link set started to exist in the real world. </documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="validTo" nillable="true">
            <annotation>
              <documentation>-- Definition --
The time from which the transport link set no longer exists in the real world.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="post" nillable="true" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
Marker post along a route in a transport network.</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">tn:MarkerPost</targetElement>
                <reversePropertyName xmlns="http://www.opengis.net/gml/3.2">tn:route</reversePropertyName>
              </appinfo>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="TransportLinkSetPropertyType">
    <sequence minOccurs="0">
      <element ref="tn:TransportLinkSet"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element abstract="true" name="TransportArea" substitutionGroup="net:NetworkArea" type="tn:TransportAreaType">
    <annotation>
      <documentation>-- Definition --
Surface that represents the spatial extent of an element of a transport network.</documentation>
    </annotation>
  </element>
  <complexType abstract="true" name="TransportAreaType">
    <complexContent>
      <extension base="net:NetworkAreaType">
        <sequence>
          <element minOccurs="0" name="geographicalName" nillable="true">
            <annotation>
              <documentation>-- Definition --
A geographical name that is used to identify the transport network object in the real world. It provides a ''key'' for implicitly associating different representations of the object.
</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="gn:GeographicalName"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element name="validFrom" nillable="true">
            <annotation>
              <documentation>-- Definition --
The time when the transport area started to exist in the real world. </documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="validTo" nillable="true">
            <annotation>
              <documentation>-- Definition --
The time from which the transport area no longer exists in the real world.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="TransportAreaPropertyType">
    <sequence minOccurs="0">
      <element ref="tn:TransportArea"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="RestrictionForVehicles" substitutionGroup="tn:TransportProperty" type="tn:RestrictionForVehiclesType">
    <annotation>
      <documentation>-- Definition --
Restriction on vehicles on a transport element.</documentation>
    </annotation>
  </element>
  <complexType name="RestrictionForVehiclesType">
    <complexContent>
      <extension base="tn:TransportPropertyType">
        <sequence>
          <element name="measure" type="gml:MeasureType">
            <annotation>
              <documentation>-- Definition --
The measure for the restriction .

-- Description --
SOURCE [Euroroads].
</documentation>
            </annotation>
          </element>
          <element name="restrictionType" type="gml:CodeType">
            <annotation>
              <documentation>-- Definition --
The type of restriction .

-- Description --
SOURCE [Euroroads].
</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="RestrictionForVehiclesPropertyType">
    <sequence minOccurs="0">
      <element ref="tn:RestrictionForVehicles"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element abstract="true" name="TransportProperty" substitutionGroup="net:NetworkProperty" type="tn:TransportPropertyType">
    <annotation>
      <documentation>-- Definition --
A reference to a property that falls upon the network. This property can apply to the whole of the network element it is associated with or - for linear spatial objects - be described using linear referencing.</documentation>
    </annotation>
  </element>
  <complexType abstract="true" name="TransportPropertyType">
    <complexContent>
      <extension base="net:NetworkPropertyType">
        <sequence>
          <element name="validFrom" nillable="true">
            <annotation>
              <documentation>-- Definition --
The time when the transport property started to exist in the real world. </documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="validTo" nillable="true">
            <annotation>
              <documentation>-- Definition --
The time from which the transport property no longer exists in the real world.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="TransportPropertyPropertyType">
    <sequence minOccurs="0">
      <element ref="tn:TransportProperty"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <complexType name="TransportObjectPropertyType">
    <choice minOccurs="0">
      <element ref="tn:TransportLinkSequence"/>
      <element ref="tn:TransportLink"/>
      <element ref="tn:TransportLinkSet"/>
      <element ref="tn:TransportArea"/>
      <element ref="tn:TransportPoint"/>
      <element ref="tn:TransportNode"/>
    </choice>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="TransportNetwork" substitutionGroup="net:Network" type="tn:TransportNetworkType">
    <annotation>
      <documentation>-- Definition --
Collection of network elements that belong to a single mode of transport.

-- Description --
NOTE Road, rail, water and air transport are always considered separate transport modes. Even within these four categories, multiple modes of transport can be defined, based on infrastructure, vehicle types, propulsion system, operation and/or other defining characteristics.

EXAMPLE All road transport can be considered one mode of transport for some applications. For other applications, it might be necessary to distinguish between different public road transport networks. Within water transport, marine and inland water transport can be considered to be separate modes of transport for some applications, as they use different types of ships.
</documentation>
    </annotation>
  </element>
  <complexType name="TransportNetworkType">
    <complexContent>
      <extension base="net:NetworkType">
        <sequence>
          <element name="inspireId" type="base:IdentifierPropertyType">
            <annotation>
              <documentation>-- Definition --
External object identifier of the spatial object.
</documentation>
            </annotation>
          </element>
          <element name="typeOfTransport" type="tn:TransportTypeValueType">
            <annotation>
              <documentation>-- Definition --
Type of transport network, based on the type of infrastructure the network uses.</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="TransportNetworkPropertyType">
    <sequence minOccurs="0">
      <element ref="tn:TransportNetwork"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="OwnerAuthority" substitutionGroup="tn:TransportProperty" type="tn:OwnerAuthorityType">
    <annotation>
      <documentation>-- Definition --
The authority owning the transport element.</documentation>
    </annotation>
  </element>
  <complexType name="OwnerAuthorityType">
    <complexContent>
      <extension base="tn:TransportPropertyType">
        <sequence>
          <element name="authority">
            <annotation>
              <documentation>-- Definition --
Identification of the owning authority.</documentation>
            </annotation>
            <complexType>
              <complexContent>
                <extension base="gml:AbstractMetadataPropertyType">
                  <sequence>
                    <element ref="gmd:CI_Citation"/>
                  </sequence>
                </extension>
              </complexContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>';
            
        
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    
    pos := pos + amt;
    buf :=        
'  <complexType name="OwnerAuthorityPropertyType">
    <sequence minOccurs="0">
      <element ref="tn:OwnerAuthority"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="ConditionOfFacility" substitutionGroup="tn:TransportProperty" type="tn:ConditionOfFacilityType">
    <annotation>
      <documentation>-- Definition --
State of a transport network element with regards to its completion and use.</documentation>
    </annotation>
  </element>
  <complexType name="ConditionOfFacilityType">
    <complexContent>
      <extension base="tn:TransportPropertyType">
        <sequence>
          <element name="currentStatus" type="gml:CodeType">
            <annotation>
              <documentation>-- Definition --
Current status value of a transport network element with regards to its completion and use.</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="ConditionOfFacilityPropertyType">
    <sequence minOccurs="0">
      <element ref="tn:ConditionOfFacility"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="TrafficFlowDirection" substitutionGroup="tn:TransportProperty" type="tn:TrafficFlowDirectionType">
    <annotation>
      <documentation>-- Definition --
Indicates the direction of the flow of traffic in relation to the direction of the transport link vector.
</documentation>
    </annotation>
  </element>
  <complexType name="TrafficFlowDirectionType">
    <complexContent>
      <extension base="tn:TransportPropertyType">
        <sequence>
          <element name="direction" type="gml:CodeType">
            <annotation>
              <documentation>-- Definition --
Indicates the direction of the flow of traffic.</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="TrafficFlowDirectionPropertyType">
    <sequence minOccurs="0">
      <element ref="tn:TrafficFlowDirection"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element abstract="true" name="TransportLink" substitutionGroup="net:Link" type="tn:TransportLinkType">
    <annotation>
      <documentation>-- Definition --
A linear spatial object that describes the geometry and connectivity of a transport network between two points in the network.</documentation>
    </annotation>
  </element>
  <complexType abstract="true" name="TransportLinkType">
    <complexContent>
      <extension base="net:LinkType">
        <sequence>
          <element minOccurs="0" name="geographicalName" nillable="true">
            <annotation>
              <documentation>-- Definition --
A geographical name that is used to identify the transport network object in the real world. It provides a ''key'' for implicitly associating different representations of the object.
</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="gn:GeographicalName"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element name="validFrom" nillable="true">
            <annotation>
              <documentation>-- Definition --
The time when the transport link started to exist in the real world. </documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="validTo" nillable="true">
            <annotation>
              <documentation>-- Definition --
The time from which the transport link no longer exists in the real world.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="TransportLinkPropertyType">
    <sequence minOccurs="0">
      <element ref="tn:TransportLink"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="MaintenanceAuthority" substitutionGroup="tn:TransportProperty" type="tn:MaintenanceAuthorityType">
    <annotation>
      <documentation>-- Definition --
The authority responsible for maintenance of the transport element.</documentation>
    </annotation>
  </element>
  <complexType name="MaintenanceAuthorityType">
    <complexContent>
      <extension base="tn:TransportPropertyType">
        <sequence>
          <element name="authority">
            <annotation>
              <documentation>-- Definition --
Identification of the maintenance authority.</documentation>
            </annotation>
            <complexType>
              <complexContent>
                <extension base="gml:AbstractMetadataPropertyType">
                  <sequence>
                    <element ref="gmd:CI_Citation"/>
                  </sequence>
                </extension>
              </complexContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="MaintenanceAuthorityPropertyType">
    <sequence minOccurs="0">
      <element ref="tn:MaintenanceAuthority"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element abstract="true" name="TransportPoint" substitutionGroup="net:NetworkElement" type="tn:TransportPointType">
    <annotation>
      <documentation>-- Definition --
A point spatial object - which is not a node - that represents the position of an element of a transport network.</documentation>
    </annotation>
  </element>
  <complexType abstract="true" name="TransportPointType">
    <complexContent>
      <extension base="net:NetworkElementType">
        <sequence>
          <element minOccurs="0" name="geographicalName" nillable="true">
            <annotation>
              <documentation>-- Definition --
A geographical name that is used to identify the transport network object in the real world. It provides a ''key'' for implicitly associating different representations of the object.
</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="gn:GeographicalName"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element name="geometry" type="gml:PointPropertyType">
            <annotation>
              <documentation>-- Definition --
The location of the transport point.</documentation>
            </annotation>
          </element>
          <element name="validFrom" nillable="true">
            <annotation>
              <documentation>-- Definition --
The time when the transport point started to exist in the real world. </documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="validTo" nillable="true">
            <annotation>
              <documentation>-- Definition --
The time from which the transport point no longer exists in the real world.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="TransportPointPropertyType">
    <sequence minOccurs="0">
      <element ref="tn:TransportPoint"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="MarkerPost" substitutionGroup="tn:TransportPoint" type="tn:MarkerPostType">
    <annotation>
      <documentation>-- Definition --
Reference marker placed along a route in a transport network, mostly at regular intervals, indicating the distance from the beginning of the route, or some other reference point, to the point where the marker is located.

-- Description --
EXAMPLE Examples of routes along which marker posts can be found are roads, railway lines and navigable waterways.
</documentation>
    </annotation>
  </element>
  <complexType name="MarkerPostType">
    <complexContent>
      <extension base="tn:TransportPointType">
        <sequence>
          <element name="location" type="gml:LengthType">
            <annotation>
              <documentation>-- Definition --
Distance from the beginning of the route, or some other reference point, to the point where a marker post is located.</documentation>
            </annotation>
          </element>
          <element name="route" nillable="true" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
Route in a transport network along which the marker post is placed.</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">tn:TransportLinkSet</targetElement>
                <reversePropertyName xmlns="http://www.opengis.net/gml/3.2">tn:post</reversePropertyName>
              </appinfo>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="MarkerPostPropertyType">
    <sequence minOccurs="0">
      <element ref="tn:MarkerPost"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="VerticalPosition" substitutionGroup="tn:TransportProperty" type="tn:VerticalPositionType">
    <annotation>
      <documentation>-- Definition --
Vertical level relative to other transport network elements.</documentation>
    </annotation>
  </element>
  <complexType name="VerticalPositionType">
    <complexContent>
      <extension base="tn:TransportPropertyType">
        <sequence>
          <element name="verticalPosition" type="base:VerticalPositionValueType">
            <annotation>
              <documentation>-- Definition --
Relative vertical position of the transport element.</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="VerticalPositionPropertyType">
    <sequence minOccurs="0">
      <element ref="tn:VerticalPosition"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element abstract="true" name="TransportNode" substitutionGroup="net:Node" type="tn:TransportNodeType">
    <annotation>
      <documentation>-- Definition --
A point spatial object which is used for connectivity.

-- Description --
Nodes are found at either end of the TransportLink.
</documentation>
    </annotation>
  </element>
  <complexType abstract="true" name="TransportNodeType">
    <complexContent>
      <extension base="net:NodeType">
        <sequence>
          <element minOccurs="0" name="geographicalName" nillable="true">
            <annotation>
              <documentation>-- Definition --
A geographical name that is used to identify the transport network object in the real world. It provides a ''key'' for implicitly associating different representations of the object.
</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="gn:GeographicalName"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element name="validFrom" nillable="true">
            <annotation>
              <documentation>-- Definition --
The time when the transport node started to exist in the real world. </documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="validTo" nillable="true">
            <annotation>
              <documentation>-- Definition --
The time from which the transport node no longer exists in the real world.</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="TransportNodePropertyType">
    <sequence minOccurs="0">
      <element ref="tn:TransportNode"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <simpleType name="TransportTypeValueType">
    <annotation>
      <documentation>-- Definition --
Possible types on transport networks.</documentation>
    </annotation>
    <restriction base="string">
      <enumeration value="air">
        <annotation>
          <documentation>-- Definition --
The transport network consists of transport by air.</documentation>
        </annotation>
      </enumeration>
      <enumeration value="cable">
        <annotation>
          <documentation>-- Definition --
The transport network consists of transport by cable.
</documentation>
        </annotation>
      </enumeration>
      <enumeration value="rail">
        <annotation>
          <documentation>-- Definition --
The transport network consists of transport by rail.
</documentation>
        </annotation>
      </enumeration>
      <enumeration value="road">
        <annotation>
          <documentation>-- Definition --
The transport network consists of transport by road.
</documentation>
        </annotation>
      </enumeration>
      <enumeration value="water">
        <annotation>
          <documentation>-- Definition --
The transport network consists of transport by water.
</documentation>
        </annotation>
      </enumeration>
    </restriction>
  </simpleType>
</schema>';    
    
    amt := length(buf);

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 380;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (380, empty_clob(), 'INSPIRE', 'urn:x-inspire:specification:gmlas:UtilityAndGovernmentalServices:0.0/utilityandgovernmentalservices.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 380 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as utilityandgovernmentalservices_ugs_0_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?><schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:hy-p="urn:x-inspire:specification:gmlas:HydroPhysicalWaters:3.0" xmlns:ugs="urn:x-inspire:specification:gmlas:UtilityAndGovernmentalServices:0.0" elementFormDefault="qualified" targetNamespace="urn:x-inspire:specification:gmlas:UtilityAndGovernmentalServices:0.0" version="0.0">
  <import namespace="urn:x-inspire:specification:gmlas:HydroPhysicalWaters:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/hy-p/3.0/HydroPhysicalWaters.xsd"/>
  <import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
  <!--XML Schema document created by ShapeChange-->
  <element name="Pipe" substitutionGroup="hy-p:ManMadeObject" type="ugs:PipeType">
    <annotation>
      <documentation>-- Definition --
A tube for the conveyance of solids, liquids or gases.

-- Description --
NOTE Regarded as a candidate spatial object in Annex III theme ''Utility and governmental services'' due to its role in water supply, which is mentioned in the definition 2007/2/EC Ann III. 6.</documentation>
    </annotation>
  </element>
  <complexType name="PipeType">
    <complexContent>
      <extension base="hy-p:ManMadeObjectType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="PipePropertyType">
    <sequence minOccurs="0">
      <element ref="ugs:Pipe"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="PumpingStation" substitutionGroup="hy-p:ManMadeObject" type="ugs:PumpingStationType">
    <annotation>
      <documentation>-- Definition --
A facility to move solids, liquids or gases by means of pressure or suction.

-- Description --
SOURCE [EuroRegionalMap].

NOTE Regarded as a candidate spatial object in Annex III theme ''Utility and governmental services'' due to its role in water supply/waste management/etc., which are mentioned in the definition 2007/2/EC Ann III. 6.</documentation>
    </annotation>
  </element>
  <complexType name="PumpingStationType">
    <complexContent>
      <extension base="hy-p:ManMadeObjectType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="PumpingStationPropertyType">
    <sequence minOccurs="0">
      <element ref="ugs:PumpingStation"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 381;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (381, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/us-emf/3.0/environmentalmanagementfacilities.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 381 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as environmentalmanagementfacilities_us_emf_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:act-core="http://inspire.ec.europa.eu/schemas/act-core/3.0" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:null="http://inspire.ec.europa.eu/schemas/us-emf/3.0" xmlns:sc="http://www.interactive-instruments.de/ShapeChange/AppInfo" targetNamespace="http://inspire.ec.europa.eu/schemas/us-emf/3.0" elementFormDefault="qualified" version="3.0">
	<import namespace="http://inspire.ec.europa.eu/schemas/act-core/3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/act-core/3.0/ActivityComplex_Core.xsd"/>
	<import namespace="http://www.interactive-instruments.de/ShapeChange/AppInfo" schemaLocation="http://portele.de/ShapeChangeAppinfo.xsd"/>
	<import namespace="http://www.isotc211.org/2005/gmd" schemaLocation="http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="EnvironmentalManagementFacility" substitutionGroup="act-core:ActivityComplex">
		<annotation>
			<documentation>-- Name --
environmental management facility

-- Definition --
A physical structure designed, built or installed to serve specific functions in relation to environmental material flows, such as waste or waste water flows, or a delimitable area of land or water used to serve such functions.

-- Description --
EXAMPLE In the context of waste management the "specific function" may be a waste recovery or disposal operation. Typically, waste management sites and waste management installations (such as incineration plants, landfills or storages) get distinguished. Multiple waste management installations may be found at the same site. Waste management installations can be a part of other waste management installations.

The functions considered for the Environmental Facilities Theme fall mainly under the NACE rev. 2 category E "Water supply; Sewerage; Waste management and remediation activities".</documentation>
		</annotation>
	</element>
	<complexType name="EnvironmentalManagementFacilityType">
		<complexContent>
			<extension base="act-core:ActivityComplexType">
				<sequence>
					<element name="type" type="gml:ReferenceType" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
type

-- Definition --
The type of facility, such as installation or site.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="extensibility">narrower</taggedValue>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">technicalGuidance</taggedValue>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="vocabulary">http://inspire.ec.europa.eu/codeList/EnvironmentalFacilityType</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="serviceHours" type="gmd:PT_FreeText_PropertyType" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
service hours

-- Definition --
Service hours of the facility.</documentation>
						</annotation>
					</element>
					<element name="facilityDescription" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
facility description

-- Definition --
Additional information on an Environmental Management Facilities, including its address, a contact details, related parties and a free text description.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="act-core:ActivityComplexDescription"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="physicalCapacity" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
physical capacity

-- Definition --
A quantification of an actual or potential ability to perform an activity, that typically does not change, does not change often, or does not change to a significant degree.

-- Description --
NOTE  Capacity could refer depending of the thematic scope to different concepts included on the legislation as '||'&'||'amp;ldquo;emission limits'||'&'||'amp;rdquo;, '||'&'||'amp;ldquo;capacity incineration'||'&'||'amp;rdquo;, '||'&'||'amp;ldquo;nominal capacity'||'&'||'amp;rdquo;, '||'&'||'amp;ldquo;objective estimation data'||'&'||'amp;rdquo;, '||'&'||'amp;ldquo;rate of desulphurization'||'&'||'amp;rdquo; or '||'&'||'amp;ldquo;recycling rate'||'&'||'amp;rdquo;.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="act-core:Capacity"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="permission" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
permission

-- Definition --
Official Decision (formal consent) granting authorization to operate all or part of an Environmental Management Facility , subject to certain conditions which guarantee that the installation or parts of installations on the same site operated by the same operator complies with the requirements fixed by the law or standards. A permit may cover one or more functions and fix parameters of capacity;

The term may be extended to other kind of certificates or documents of special relevance depending of the scope (e.g. ISO, EMAS, National Quality Standards, etc).

-- Description --
NOTE This terms is referred in several legislative acts as '||'&'||'amp;ldquo;permit'||'&'||'amp;rdquo; , '||'&'||'amp;ldquo;authorization'||'&'||'amp;rdquo;, '||'&'||'amp;ldquo;development consent'||'&'||'amp;rdquo; or '||'&'||'amp;ldquo;exploration permit'||'&'||'amp;rdquo; among others.

EXAMPLE 1 '||'&'||'amp;ldquo;'||'&'||'amp;hellip;a [written] decision by which the competent authority grants permission to operate all or part of an installation'||'&'||'amp;rdquo; ;
EXAMPLE 2 '||'&'||'amp;ldquo;.. the decision of the competent authority or authorities which entitles the developer</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="act-core:Permission"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="status" type="gml:ReferenceType" nillable="true">
						<annotation>
							<documentation>-- Name --
status

-- Definition --
The status of the Environmental Management Facility, such as operational or decommissioned.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">IR</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="parentFacility" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
parent facility

-- Definition --
A parent facility, i.e., a facility to which this facility belongs.

-- Description --
A facility may belong to multiple other facilities.</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="EnvironmentalManagementFacilityPropertyType">
		<sequence minOccurs="0"/>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
</schema>'; 
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 382;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (382, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/us-govserv/3.0/governmentalservices.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 382 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as governmentalservices_us_govserv_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:act-core="http://inspire.ec.europa.eu/schemas/act-core/3.0" xmlns:ad="urn:x-inspire:specification:gmlas:Addresses:3.0" xmlns:au="urn:x-inspire:specification:gmlas:AdministrativeUnits:3.0" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:base2="http://inspire.ec.europa.eu/schemas/base2/1.0" xmlns:bu-core2d="http://inspire.ec.europa.eu/schemas/bu-core2d/3.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:gn="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" xmlns:net="urn:x-inspire:specification:gmlas:Network:3.2" xmlns:sc="http://www.interactive-instruments.de/ShapeChange/AppInfo" xmlns:us-govserv="http://inspire.ec.europa.eu/schemas/us-govserv/3.0" xmlns:us-net-common="http://inspire.ec.europa.eu/schemas/us-net-common/3.0" targetNamespace="http://inspire.ec.europa.eu/schemas/us-govserv/3.0" elementFormDefault="qualified" version="3.0">
	<import namespace="http://inspire.ec.europa.eu/schemas/bu-core2d/3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/bu-core2d/3.0/BuildingsCore2D.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/act-core/3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/act-core/3.0/ActivityComplex_Core.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/base/3.3" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/base2/1.0" schemaLocation="http://inspire.ec.europa.eu/schemas/base2/1.0/BaseTypes2.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/us-net-common/3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/us-net-common/3.0/UtilityNetworksCommon.xsd"/>
	<import namespace="http://www.interactive-instruments.de/ShapeChange/AppInfo" schemaLocation="http://portele.de/ShapeChangeAppinfo.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<import namespace="urn:x-inspire:specification:gmlas:Addresses:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/ad/3.0/Addresses.xsd"/>
	<import namespace="urn:x-inspire:specification:gmlas:AdministrativeUnits:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/au/3.0/AdministrativeUnits.xsd"/>
	<import namespace="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/gn/3.0/GeographicalNames.xsd"/>
	<import namespace="urn:x-inspire:specification:gmlas:Network:3.2" schemaLocation="http://inspire.ec.europa.eu/schemas/net/3.2/Network.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="GovernmentalService" type="us-govserv:GovernmentalServiceType" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
governmental service

-- Definition --
Administrative and social governmental services such as public administrations, civil protection sites, schools and hospitals provided by Public Administrative Bodies or by private institutions as far as they are covered by the scope of the INSPIRE directive. This scope is mapped to the values of the corresponding code list serviceType Value.

-- Description --
The accordant sites are commonly presented in governmental and municipal portals and map systems as "point of interest"-data, and may be point-based locations of a variety of categories of municipal and governmental services and social infrastructure. The spatial object type itself is generic in terms of the modelling approach, that the concrete type of a GovernmentalService is determined by the value of the attribute serviceType.</documentation>
		</annotation>
	</element>
	<complexType name="GovernmentalServiceType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="areaOfResponsibility" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
area of responsibility

-- Definition --
The spatial responsibility of a service instance.

-- Description --
EXAMPLE 1: An administration is responsible for a municipality;
EXEMPLE 2: A specialized hospital is responsible for a region.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="us-govserv:AreaOfResponsibilityType"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="beginLifespanVersion" nillable="true">
						<annotation>
							<documentation>-- Name --
begin lifespan version

-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.

-- Description --
Related to the life-cycle of the spatial object in the data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="endLifespanVersion" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
end lifespan version

-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.

-- Description --
Related to the life-cycle of the spatial object in the data set.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="inspireId" type="base:IdentifierPropertyType">
						<annotation>
							<documentation>-- Name --
INSPIRE identifier

-- Definition --
External object identifier of the governmental service.

-- Description --
NOTE: An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object.
The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.</documentation>
						</annotation>
					</element>
					<element name="pointOfContact" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
point of contact

-- Definition --
Contains necessary information to get access to a service and/or initial information regarding a service.

-- Description --
In some cases this information will coincide with the contact information of the service authority, owner or operator (i.e. specific position or role of the responsible party, described in the relatedParty attribute of the GovernmentalServiceExtended in the extended profile).</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="base2:Contact"/>
							</sequence>
							<attribute name="nilReason" type="gml:NilReasonType"/>
						</complexType>
					</element>
					<element name="serviceLocation" type="us-govserv:ServiceLocationTypePropertyType">
						<annotation>
							<documentation>-- Name --
service location

-- Definition --
Location where the service is offered.</documentation>
						</annotation>
					</element>
					<element name="serviceType" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Name --
service type value

-- Definition --
Type of an administrative and governmental service.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="GovernmentalServicePropertyType">
		<sequence minOccurs="0">
			<element ref="us-govserv:GovernmentalService"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="AreaOfResponsibilityType" type="us-govserv:AreaOfResponsibilityTypeType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
area of responsibility type

-- Definition --
Set of types for the description of spatial responsibility.</documentation>
		</annotation>
	</element>
	<complexType name="AreaOfResponsibilityTypeType">
		<choice>
			<element name="areaOfResponsibilityByAdministrativeUnit" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Name --
area of responsibility by administrative unit

-- Definition --
Administrative unit describing the geographic extent of the responsibility of a service.</documentation>
				</annotation>
				<complexType>
					<complexContent>
						<extension base="gml:AbstractMemberType">
							<sequence minOccurs="0">
								<element ref="au:AdministrativeUnit"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
						</extension>
					</complexContent>
				</complexType>
			</element>
			<element name="areaOfResponsibilityByNamedPlace" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Name --
area of responsibility by named place

-- Definition --
Geographical object describing the geographic extent of the responsibility of a service.</documentation>
				</annotation>
				<complexType>
					<complexContent>
						<extension base="gml:AbstractMemberType">
							<sequence minOccurs="0">
								<element ref="gn:NamedPlace"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
						</extension>
					</complexContent>
				</complexType>
			</element>
			<element name="areaOfResponsibilityByNetwork" type="net:NetworkReferencePropertyType" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Name --
area of responsibility by network

-- Definition --
Part of a network describing the geographic extent of the competence of a service.</documentation>
				</annotation>
			</element>
			<element name="areaOfResponsibilityByPolygon" type="gml:MultiSurfacePropertyType">
				<annotation>
					<documentation>-- Name --
area of responsibility by polygon

-- Definition --
Polygon describing the geographic extent of the responsibility of a service.</documentation>
				</annotation>
			</element>
		</choice>
	</complexType>
	<complexType name="AreaOfResponsibilityTypePropertyType">
		<sequence>
			<element ref="us-govserv:AreaOfResponsibilityType"/>
		</sequence>
	</complexType>
	<element name="ServiceLocationType" type="us-govserv:ServiceLocationTypeType" substitutionGroup="gml:AbstractObject">
		<annotation>
			<documentation>-- Name --
service location type

-- Definition --
Set of types of references to locate a service.</documentation>
		</annotation>
	</element>
	<complexType name="ServiceLocationTypeType">
		<choice>
			<element name="serviceLocationByAddress">
				<annotation>
					<documentation>-- Name --
service location by address

-- Definition --
Location of the service by referring to an address.</documentation>
				</annotation>
				<complexType>
					<complexContent>
						<extension base="gml:AbstractMemberType">
							<sequence minOccurs="0">
								<element ref="ad:Address"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
						</extension>
					</complexContent>
				</complexType>
			</element>
			<element name="serviceLocationByBuilding" maxOccurs="unbounded">
				<annotation>
					<documentation>-- Name --
service location by building

-- Definition --
Location of the service by referring to a building.</documentation>
				</annotation>
				<complexType>
					<complexContent>
						<extension base="gml:AbstractMemberType">
							<sequence minOccurs="0">
								<element ref="bu-core2d:Building"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
						</extension>
					</complexContent>
				</complexType>
			</element>
			<element name="serviceLocationByActivityComplex">
				<annotation>
					<documentation>-- Name --
service location by activity complex

-- Definition --
Location of the service by referring to an activity complex.</documentation>
				</annotation>
				<complexType>
					<complexContent>
						<extension base="gml:AbstractMemberType">
							<sequence minOccurs="0">
								<element ref="act-core:ActivityComplex"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
						</extension>
					</complexContent>
				</complexType>
			</element>
			<element name="serviceLocationByGeometry" type="gml:GeometryPropertyType">
				<annotation>
					<documentation>-- Name --
service location by geometry

-- Definition --
Location of the service by referring to a geometry.</documentation>
				</annotation>
			</element>
			<element name="serviceLocationByUtilityNode">
				<annotation>
					<documentation>-- Name --
location service by utility node

-- Definition --
Location of the service by referring to a node related to a utility network (water, telecommunication, etc.), e.g. hydrant or emergency call point.</documentation>
				</annotation>
				<complexType>
					<complexContent>
						<extension base="gml:AbstractMemberType">
							<sequence minOccurs="0">
								<element ref="us-net-common:UtilityNode"/>
							</sequence>
							<attributeGroup ref="gml:AssociationAttributeGroup"/>
						</extension>
					</complexContent>
				</complexType>
			</element>
		</choice>
	</complexType>
	<complexType name="ServiceLocationTypePropertyType">
		<sequence>
			<element ref="us-govserv:ServiceLocationType"/>
		</sequence>
	</complexType>
</schema>'; 
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 383;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (383, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/us-net-common/3.0/utilitynetworkscommon.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 383 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as utilitynetworkscommon_us_net_common_3_0.xsd
    -- Needed to separate this xsd into two pieces due to its size>32767.
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:act-core="http://inspire.ec.europa.eu/schemas/act-core/3.0" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:base2="http://inspire.ec.europa.eu/schemas/base2/1.0" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:net="urn:x-inspire:specification:gmlas:Network:3.2" xmlns:sc="http://www.interactive-instruments.de/ShapeChange/AppInfo" xmlns:us-govserv="http://inspire.ec.europa.eu/schemas/us-govserv/3.0" xmlns:us-net-common="http://inspire.ec.europa.eu/schemas/us-net-common/3.0" targetNamespace="http://inspire.ec.europa.eu/schemas/us-net-common/3.0" elementFormDefault="qualified" version="3.0">
	<annotation>
		<documentation>-- Name --
common utility network elements

-- Definition --
Common Utility Network Elements</documentation>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/act-core/3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/act-core/3.0/ActivityComplex_Core.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/base/3.3" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/base2/1.0" schemaLocation="http://inspire.ec.europa.eu/schemas/base2/1.0/BaseTypes2.xsd"/>
	<import namespace="http://inspire.ec.europa.eu/schemas/us-govserv/3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/us-govserv/3.0/GovernmentalServices.xsd"/>
	<import namespace="http://www.interactive-instruments.de/ShapeChange/AppInfo" schemaLocation="http://portele.de/ShapeChangeAppinfo.xsd"/>
	<import namespace="http://www.isotc211.org/2005/gmd" schemaLocation="http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<import namespace="urn:x-inspire:specification:gmlas:Network:3.2" schemaLocation="http://inspire.ec.europa.eu/schemas/net/3.2/Network.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="Pipe" type="us-net-common:PipeType" substitutionGroup="us-net-common:UtilityLinkSet">
		<annotation>
			<documentation>-- Name --
pipe

-- Definition --
A utility link or link sequence for the conveyance of solids, liquids, chemicals or gases from one location to another.

A pipe can also be used as an object to encase several cables (a bundle of cables) or other (smaller) pipes.</documentation>
		</annotation>
	</element>
	<complexType name="PipeType">
		<complexContent>
			<extension base="us-net-common:UtilityLinkSetType">
				<sequence>
					<element name="pipeDiameter" nillable="true">
						<annotation>
							<documentation>-- Name --
pipe diameter

-- Definition --
Pipe outer diameter.

-- Description --
For convex shaped objects (e.g. a circle) the diameter is defined to be the largest distance that can be formed between two opposite parallel lines tangent to its boundery.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="gml:MeasureType">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="pressure" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
pressure

-- Definition --
The maximum allowable operating pressure at which a product is conveyed through a pipe.

-- Description --
The unit of measure for pressure is commonly expressed in "bar".</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="gml:MeasureType">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="cables" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
cables

-- Definition --
A pipe may contain one or more cables.</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">us-net-common:Cable</targetElement>
							</appinfo>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence/>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="pipes" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
pipes

-- Definition --
A pipe may contain one or more pipes.</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">us-net-common:Pipe</targetElement>
							</appinfo>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence/>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="PipePropertyType">
		<sequence minOccurs="0">
			<element ref="us-net-common:Pipe"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="Tower" type="us-net-common:TowerType" substitutionGroup="us-net-common:UtilityNodeContainer">
		<annotation>
			<documentation>-- Name --
tower

-- Definition --
Simple tower object which may carry utility objects belonging to either single or multiple utility networks.

-- Description --
Towers represent node objects that support reservoirs, cables or antennas.</documentation>
		</annotation>
	</element>
	<complexType name="TowerType">
		<complexContent>
			<extension base="us-net-common:UtilityNodeContainerType">
				<sequence>
					<element name="towerHeight" nillable="true">
						<annotation>
							<documentation>-- Name --
tower height

-- Definition --
The height of the tower.

-- Description --
The height is the vertical extend measuring accross the object - in this case, the tower - at right angles to the lenght.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="gml:LengthType">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="TowerPropertyType">
		<sequence minOccurs="0">
			<element ref="us-net-common:Tower"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="Cable" type="us-net-common:CableType" abstract="true" substitutionGroup="us-net-common:UtilityLinkSet">
		<annotation>
			<documentation>-- Name --
cable

-- Definition --
A utility link or link sequence used to convey electricity or data from one location to another.</documentation>
		</annotation>
	</element>
	<complexType name="CableType" abstract="true">
		<complexContent>
			<extension base="us-net-common:UtilityLinkSetType">
				<sequence/>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="CablePropertyType">
		<sequence minOccurs="0">
			<element ref="us-net-common:Cable"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="UtilityLinkSequence" type="us-net-common:UtilityLinkSequenceType" substitutionGroup="net:LinkSequence">
		<annotation>
			<documentation>-- name --
utility Link Sequence
-- description --
A linear spatial object, composed of an ordered collection of utility links, which represents a continuous path in the utility network without any branches. The element has a defined beginning and end and every position on the utility link sequence is identifiable with one single parameter.</documentation>
		</annotation>
	</element>
	<complexType name="UtilityLinkSequenceType">
		<complexContent>
			<extension base="net:LinkSequenceType">
				<sequence>
					<element name="currentStatus" type="gml:ReferenceType" nillable="true">
						<annotation>
							<documentation>-- Name --
current status

-- Definition --
The status of an utility object with regards to its completion and use.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="validFrom" nillable="true">
						<annotation>
							<documentation>-- Name --
valid from

-- Definition --
The time when the utility network element started to exist in the real world.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="validTo" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
valid to

-- Definition --
The time from which the utility network element no longer exists in the real world.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="verticalPosition" nillable="true">
						<annotation>
							<documentation>-- Name --
vertical position

-- Definition --
Vertical position of the utility object relative to ground.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="base:VerticalPositionValueType">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="utilityFacilityReference" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
utility facility reference

-- Definition --
Reference to a facility activity complex that is linked (related) to this utility network element.

-- Description --
This reference can be used to link a utility facility - having a more complex geometry - to a utility network element.</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">act-core:ActivityComplex</targetElement>
							</appinfo>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence/>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="governmentalServiceReference" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
governmental service reference

-- Definition --
Reference to a governmental service object that is linked (related) to this utility network element.

-- Description --
This reference can be used to link a governmental service object to a utility network element.</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">us-govserv:GovernmentalService</targetElement>
							</appinfo>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence/>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="UtilityLinkSequencePropertyType">
		<sequence minOccurs="0">
			<element ref="us-net-common:UtilityLinkSequence"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="UtilityNode" type="us-net-common:UtilityNodeType" abstract="true" substitutionGroup="net:Node">
		<annotation>
			<documentation>-- Name --
utility node

-- Definition --
A point spatial object which is used for connectivity.

-- Description --
Nodes are found at both ends of the UtilityLink.</documentation>
		</annotation>
	</element>
	<complexType name="UtilityNodeType" abstract="true">
		<complexContent>
			<extension base="net:NodeType">
				<sequence>
					<element name="currentStatus" type="gml:ReferenceType" nillable="true">
						<annotation>
							<documentation>-- Name --
current status

-- Definition --
The status of an utility object with regards to its completion and use.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="validFrom" nillable="true">
						<annotation>
							<documentation>-- Name --
valid from

-- Definition --
The time when the utility network element started to exist in the real world.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="validTo" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
valid to

-- Definition --
The time from which the utility network element no longer exists in the real world.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="verticalPosition" nillable="true">
						<annotation>
							<documentation>-- Name --
vertical position

-- Definition --
Vertical position of the utility object relative to ground.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="base:VerticalPositionValueType">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="utilityFacilityReference" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
utility facility reference

-- Definition --
Reference to a facility activity complex that is linked (related) to this utility network element.

-- Description --
This reference can be used to link a utility facility - having a more complex geometry - to a utility network element.</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">act-core:ActivityComplex</targetElement>
							</appinfo>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence/>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="governmentalServiceReference" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
governmental service reference

-- Definition --
Reference to a governmental service object that is linked (related) to this utility network element.

-- Description --
This reference can be used to link a governmental service object to a utility network element.</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">us-govserv:GovernmentalService</targetElement>
							</appinfo>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence/>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="UtilityNodePropertyType">
		<sequence minOccurs="0">
			<element ref="us-net-common:UtilityNode"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="Duct" type="us-net-common:DuctType" substitutionGroup="us-net-common:UtilityLinkSet">
		<annotation>
			<documentation>-- Name --
duct

-- Definition --
A utility link or link sequence used to protect and guide cable and pipes via an encasing construction.

-- Description --
A Duct (or Conduit, or Duct-bank, or Wireway) is a linear object which belongs to the structural network. It is the outermost casing. A Duct may contain Pipe(s), Cable(s) or other Duct(s). 
Duct is a concrete feature class that contains information about the position and characteristics of ducts as seen from a manhole, vault, or a cross section of a trench and duct.</documentation>
		</annotation>
	</element>
	<complexType name="DuctType">
		<complexContent>
			<extension base="us-net-common:UtilityLinkSetType">
				<sequence>
					<element name="ductWidth" nillable="true">
						<annotation>
							<documentation>-- Name --
duct width

-- Definition --
The width of the duct.

-- Description --
The measurement of the object - in this case, the duct - from side to side.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="gml:LengthType">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="ducts" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
ducts

-- Definition --
A single duct or set of ducts that constitute the inner-duct.</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">us-net-common:Duct</targetElement>
							</appinfo>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence/>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="cables" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
cables

-- Definition --
A duct may contain one or more cables.</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">us-net-common:Cable</targetElement>
							</appinfo>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence/>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="pipes" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
pipes

-- Definition --
The set of pipes that constitute the duct bank.</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">us-net-common:Pipe</targetElement>
							</appinfo>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence/>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="DuctPropertyType">
		<sequence minOccurs="0">
			<element ref="us-net-common:Duct"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="Appurtenance" type="us-net-common:AppurtenanceType" substitutionGroup="us-net-common:UtilityNode">
		<annotation>
			<documentation>-- Name --
appurtenance

-- Definition --
An appurtenance is a node object that is described by its type (via the attribute "appurtenanceType").

-- Description --
The "appurtenanceType" attribute uses the "AppurtenanceTypeValue" codelist for its values. But this is an empty codelist that needs to be extended by a concrete codelist of appurtenance types for each utility network type. 
So e.g. for the electricity network, the "ElectricityAppurtenanceTypeValue" codelist should be used.</documentation>
		</annotation>
	</element>
	<complexType name="AppurtenanceType">
		<complexContent>
			<extension base="us-net-common:UtilityNodeType">
				<sequence>
					<element name="appurtenanceType" type="gml:ReferenceType" nillable="true">
						<annotation>
							<documentation>-- Name --
appurtenance type value

-- Definition --

Type of appurtenance

-- Description --
The "AppurtenanceTypeValue" codelist is an abstract codelist that can be replaced by the various appurtenance type value codelists for each utility network.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="specificAppurtenanceType" type="gml:ReferenceType" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
specific appurtenance type

-- Definition --
Type of appurtenance according to a domain-specific classification.</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="AppurtenancePropertyType">
		<sequence minOccurs="0">
			<element ref="us-net-common:Appurtenance"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="UtilityNetwork" type="us-net-common:UtilityNetworkType" substitutionGroup="net:Network">
		<annotation>
			<documentation>-- Name --
utility network

-- Definition --
Collection of network elements that belong to a single type of utility network.

-- Description --
In the real world, objects are connected to each other: an optical cable is connected to a multiplexer that in turn is connected to copper cables connecting into our homes to provide cable TV, telephony and internet access. Using GIS to support network utility management typically involves many types of features that may have connectivity to each other. Topology in GIS is generally defined as the spatial relationship between connecting or adjacent features, and is an essential prerequisite for many spatial operations such as network analysis. Utility networks can be described as NaN (Node-Arc-Node) network using two basic geometric types: points (aka '||'&'||'lt;i'||'&'||'gt;nodes'||'&'||'lt;/i'||'&'||'gt;) and polylines (aka '||'&'||'lt;i'||'&'||'gt;arcs'||'&'||'lt;/i'||'&'||'gt;). NaN topologies can be directed or un-directed, depending on specific type of network (i.e. water networks are directed, while telecommunications networks are not). Such topology structure provides an automated way to handle digitising and editing errors, and enable advanced spatial analyses such as adjacency, connectivity and containment. Infrastructure networks rely on Generic network model developed during Annex I.

Note: 
Via the attribute "utilityNetworkType", that uses the "UtilityNetworkTypeValue" codelist, the type of utility network can be defined. E.g. by selecting the "sewer" value, the utility network becomes a "sewer utility network".
Using the "crossTheme" value, a utility network can be created that contains e.g. ducts, which can contain pipes and cables from various utility network types.</documentation>
		</annotation>
	</element>
	<complexType name="UtilityNetworkType">
		<complexContent>
			<extension base="net:NetworkType">
				<sequence>
					<element name="utilityNetworkType" type="gml:ReferenceType">
						<annotation>
							<documentation>-- Name --
utility network type

-- Definition --
The type of utility network or the utilily network theme.

-- Description --
Uses the codelist "UtilityNetworkTypeValue" to describe the possible utility networks. This also contains the "crossTheme" value to be used for utility networks that can contain cables or pipes from various themes, typically used by utility network providers that provide ducts.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>';
            
        
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    
    pos := pos + amt;
    buf :=        
'					<element name="authorityRole" type="gml:ReferenceType" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
authority role

-- Definition --
Parties authorized to manage a utility network, such as maintainers, operators or owners.</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">base2:RelatedParty</targetElement>
							</appinfo>
						</annotation>
					</element>
					<element name="utilityFacilityReference" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
utility facility reference

-- Definition --
Reference to a facility activity complex that is linked to (e.g. part of) this utility network.

-- Description --
This reference can be used to link utility facilities - having a more complex geometry - to a utility network.</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">act-core:ActivityComplex</targetElement>
							</appinfo>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence/>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="disclaimer" type="gmd:PT_FreeText_PropertyType" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
disclaimer

-- Definition --
Legal text describing confidentiality clauses applying to the utility network information.</documentation>
						</annotation>
					</element>
					<element name="networks" type="gml:ReferenceType" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
networks

-- Definition --
A single sub-network that can be considered as part of a higher-order utility network.</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">us-net-common:UtilityNetwork</targetElement>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="UtilityNetworkPropertyType">
		<sequence minOccurs="0">
			<element ref="us-net-common:UtilityNetwork"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="Cabinet" type="us-net-common:CabinetType" substitutionGroup="us-net-common:UtilityNodeContainer">
		<annotation>
			<documentation>-- Name --
cabinet

-- Definition --
Simple cabinet object which may carry utility objects belonging to either single or multiple utility networks.

-- Description --
Cabinets represent mountable node objects that can contain smaller utility devices and cables.</documentation>
		</annotation>
	</element>
	<complexType name="CabinetType">
		<complexContent>
			<extension base="us-net-common:UtilityNodeContainerType">
				<sequence/>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="CabinetPropertyType">
		<sequence minOccurs="0">
			<element ref="us-net-common:Cabinet"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="UtilityLink" type="us-net-common:UtilityLinkType" substitutionGroup="net:Link">
		<annotation>
			<documentation>-- name --

utility Link

-- definition --

A linear spatial object that describes the geometry and connectivity of a utility network between two points in the network.</documentation>
		</annotation>
	</element>
	<complexType name="UtilityLinkType">
		<complexContent>
			<extension base="net:LinkType">
				<sequence>
					<element name="currentStatus" type="gml:ReferenceType" nillable="true">
						<annotation>
							<documentation>-- Name --
current status

-- Definition --
The status of an utility object with regards to its completion and use.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="validFrom" nillable="true">
						<annotation>
							<documentation>-- Name --
valid from

-- Definition --
The time when the utility network element started to exist in the real world.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="validTo" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
valid to

-- Definition --
The time from which the utility network element no longer exists in the real world.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="verticalPosition" nillable="true">
						<annotation>
							<documentation>-- Name --
vertical position

-- Definition --
Vertical position of the utility object relative to ground.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="base:VerticalPositionValueType">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="utilityFacilityReference" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
utility facility reference

-- Definition --
Reference to a facility activity complex that is linked (related) to this utility network element.

-- Description --
This reference can be used to link a utility facility - having a more complex geometry - to a utility network element.</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">act-core:ActivityComplex</targetElement>
							</appinfo>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence/>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="governmentalServiceReference" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
governmental service reference

-- Definition --
Reference to a governmental service object that is linked (related) to this utility network element.

-- Description --
This reference can be used to link a governmental service object to a utility network element.</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">us-govserv:GovernmentalService</targetElement>
							</appinfo>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence/>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="UtilityLinkPropertyType">
		<sequence minOccurs="0">
			<element ref="us-net-common:UtilityLink"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<complexType name="UtilityNetworkElementPropertyType">
		<choice minOccurs="0">
			<element ref="us-net-common:UtilityLink"/>
			<element ref="us-net-common:UtilityLinkSequence"/>
			<element ref="us-net-common:UtilityLinkSet"/>
			<element ref="us-net-common:UtilityNode"/>
			<element ref="us-net-common:UtilityNodeContainer"/>
		</choice>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="UtilityLinkSet" type="us-net-common:UtilityLinkSetType" abstract="true" substitutionGroup="net:LinkSet">
		<annotation>
			<documentation>-- Name --
utility linkset

-- Definition --
'||'&'||'lt;font color="#1a1a1a"'||'&'||'gt;An abstract utility network class which groups common properties of Cable, Pipe and Duct featureTypes.'||'&'||'lt;/font'||'&'||'gt;

-- Description --
'||'&'||'lt;font color="#1a1a1a"'||'&'||'gt;This class also extends the LinkSet featureType, which allows Cable, Pipe and Duct classes to use either the (more complex) LinkSequence or (more simple) Link class.'||'&'||'lt;/font'||'&'||'gt;</documentation>
		</annotation>
	</element>
	<complexType name="UtilityLinkSetType" abstract="true">
		<complexContent>
			<extension base="net:LinkSetType">
				<sequence>
					<element name="currentStatus" type="gml:ReferenceType" nillable="true">
						<annotation>
							<documentation>-- Name --
current status

-- Definition --
The status of an utility object with regards to its completion and use.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="validFrom" nillable="true">
						<annotation>
							<documentation>-- Name --
valid from

-- Definition --
The time when the utility network element started to exist in the real world.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="validTo" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
valid to

-- Definition --
The time from which the utility network element no longer exists in the real world.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="verticalPosition" nillable="true">
						<annotation>
							<documentation>-- Name --
vertical position

-- Definition --
Vertical position of the utility object relative to ground.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="base:VerticalPositionValueType">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="utilityFacilityReference" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
utility facility reference

-- Definition --
Reference to a facility activity complex that is linked (related) to this utility network element.

-- Description --
This reference can be used to link a utility facility - having a more complex geometry - to a utility network element.</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">act-core:ActivityComplex</targetElement>
							</appinfo>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence/>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="governmentalServiceReference" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
governmental service reference

-- Definition --
Reference to a governmental service object that is linked (related) to this utility network element.

-- Description --
This reference can be used to link a governmental service object to a utility network element.</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">us-govserv:GovernmentalService</targetElement>
							</appinfo>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence/>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="utilityDeliveryType" type="gml:ReferenceType" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
utility delivery type

-- Definition --
Kind of utility delivery network e.g. transport, distribution, collection ...</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="warningType" type="gml:ReferenceType" nillable="true">
						<annotation>
							<documentation>-- Name --
warning type

-- Definition --
Kind of overground visible warning mechanism used to indicate an underground utility network element.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="UtilityLinkSetPropertyType">
		<sequence minOccurs="0">
			<element ref="us-net-common:UtilityLinkSet"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="UtilityNodeContainer" type="us-net-common:UtilityNodeContainerType" abstract="true" substitutionGroup="gml:AbstractFeature">
		<annotation>
			<documentation>-- Name --
utility node container

-- Definition --
A point spatial object which is used for connectivity, and also may contain other spatial objects (not neccessarily belonging to the same utility network).

-- Description --
Nodes are found at either end of the UtilityLink.</documentation>
		</annotation>
	</element>
	<complexType name="UtilityNodeContainerType" abstract="true">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="currentStatus" type="gml:ReferenceType" nillable="true">
						<annotation>
							<documentation>-- Name --
current status

-- Definition --
The status of an utility object with regards to its completion and use.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
					<element name="validFrom" nillable="true">
						<annotation>
							<documentation>-- Name --
valid from

-- Definition --
The time when the utility network element started to exist in the real world.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="validTo" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
valid to

-- Definition --
The time from which the utility network element no longer exists in the real world.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="dateTime">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="verticalPosition" nillable="true">
						<annotation>
							<documentation>-- Name --
vertical position

-- Definition --
Vertical position of the utility object relative to ground.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="base:VerticalPositionValueType">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="utilityFacilityReference" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
utility facility reference

-- Definition --
Reference to a facility activity complex that is linked (related) to this utility network element.

-- Description --
This reference can be used to link a utility facility - having a more complex geometry - to a utility network element.</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">act-core:ActivityComplex</targetElement>
							</appinfo>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence/>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="governmentalServiceReference" nillable="true" minOccurs="0">
						<annotation>
							<documentation>-- Name --
governmental service reference

-- Definition --
Reference to a governmental service object that is linked (related) to this utility network element.

-- Description --
This reference can be used to link a governmental service object to a utility network element.</documentation>
							<appinfo>
								<targetElement xmlns="http://www.opengis.net/gml/3.2">us-govserv:GovernmentalService</targetElement>
							</appinfo>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence/>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
					<element name="geometry" type="gml:PointPropertyType">
						<annotation>
							<documentation>-- Name --
geometry

-- Definition --
Location of the utility node container.</documentation>
						</annotation>
					</element>
					<element name="inspireId" type="base:IdentifierPropertyType" minOccurs="0">
						<annotation>
							<documentation>-- Definition --
External object identifier of the spatial object.</documentation>
						</annotation>
					</element>
					<element name="nodes" nillable="true" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
nodes

-- Definition --
Contained utility nodes.</documentation>
						</annotation>
						<complexType>
							<complexContent>
								<extension base="gml:AbstractMemberType">
									<sequence minOccurs="0">
										<element ref="us-net-common:UtilityNode"/>
									</sequence>
									<attributeGroup ref="gml:AssociationAttributeGroup"/>
								</extension>
							</complexContent>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="UtilityNodeContainerPropertyType">
		<sequence minOccurs="0">
			<element ref="us-net-common:UtilityNodeContainer"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="Pole" type="us-net-common:PoleType" substitutionGroup="us-net-common:UtilityNodeContainer">
		<annotation>
			<documentation>-- Name --
pole

-- Definition --
Simple pole (mast) object which may carry utility objects belonging to either single or multiple utility networks.

-- Description --
Poles represent node objects that can support utility devices and cables.</documentation>
		</annotation>
	</element>
	<complexType name="PoleType">
		<complexContent>
			<extension base="us-net-common:UtilityNodeContainerType">
				<sequence>
					<element name="poleHeight" nillable="true">
						<annotation>
							<documentation>-- Name --
pole height

-- Definition --
The height of the pole.

-- Description --
The height is the vertical extend measuring accross the object - in this case, the pole - at right angles to the lenght.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="gml:LengthType">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="PolePropertyType">
		<sequence minOccurs="0">
			<element ref="us-net-common:Pole"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
	<element name="Manhole" type="us-net-common:ManholeType" substitutionGroup="us-net-common:UtilityNodeContainer">
		<annotation>
			<documentation>-- Name --
manhole

-- Definition --
Simple container object which may contain either single or multiple utility networks objects.

-- Description --
Manholes perform following functions:
'||'&'||'lt;ul'||'&'||'gt;
	'||'&'||'lt;li'||'&'||'gt;Provide drainage for the conduit system so that freezing water does not damage the conduit or wires. '||'&'||'lt;/li'||'&'||'gt;
	'||'&'||'lt;li'||'&'||'gt;Provide a location for bending the conduit run without damaging the wires. '||'&'||'lt;/li'||'&'||'gt;
	'||'&'||'lt;li'||'&'||'gt;Provide a junction for conduits coming from different directions. '||'&'||'lt;/li'||'&'||'gt;
	'||'&'||'lt;li'||'&'||'gt;Provide access to the system for maintenance. '||'&'||'lt;/li'||'&'||'gt;
'||'&'||'lt;/ul'||'&'||'gt;</documentation>
		</annotation>
	</element>
	<complexType name="ManholeType">
		<complexContent>
			<extension base="us-net-common:UtilityNodeContainerType">
				<sequence/>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="ManholePropertyType">
		<sequence minOccurs="0">
			<element ref="us-net-common:Manhole"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
</schema>';    
    
    amt := length(buf);

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 384;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (384, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/us-net-el/3.0/electricitynetwork.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 384 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as electricitynetwork_us_net_el_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:us-net-common="http://inspire.ec.europa.eu/schemas/us-net-common/3.0" xmlns:us-net-el="http://inspire.ec.europa.eu/schemas/us-net-el/3.0" targetNamespace="http://inspire.ec.europa.eu/schemas/us-net-el/3.0" elementFormDefault="qualified" version="3.0">
	<annotation>
		<documentation>-- Name --
electricity utility network 

-- Definition --
Electricity network sub-domain.</documentation>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/us-net-common/3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/us-net-common/3.0/UtilityNetworksCommon.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="ElectricityCable" type="us-net-el:ElectricityCableType" substitutionGroup="us-net-common:Cable">
		<annotation>
			<documentation>-- Name --
electricity cable

-- Definition --
A utility link or link sequence used to convey electricity from one location to another.</documentation>
		</annotation>
	</element>
	<complexType name="ElectricityCableType">
		<complexContent>
			<extension base="us-net-common:CableType">
				<sequence>
					<element name="operatingVoltage" nillable="true">
						<annotation>
							<documentation>-- Name --
operating voltage

-- Definition --
The utilization or operating voltage by the equipment using the electricity.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="gml:MeasureType">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
					<element name="nominalVoltage" nillable="true">
						<annotation>
							<documentation>-- Name --
nominal voltage

-- Definition --
The nominal system voltage at the point of supply.</documentation>
						</annotation>
						<complexType>
							<simpleContent>
								<extension base="gml:MeasureType">
									<attribute name="nilReason" type="gml:NilReasonType"/>
								</extension>
							</simpleContent>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="ElectricityCablePropertyType">
		<sequence minOccurs="0">
			<element ref="us-net-el:ElectricityCable"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 385;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (385, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/us-net-ogc/3.0/oilgaschemicalsnetwork.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 385 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as oilgaschemicalsnetwork_us_net_ogc_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:sc="http://www.interactive-instruments.de/ShapeChange/AppInfo" xmlns:us-net-common="http://inspire.ec.europa.eu/schemas/us-net-common/3.0" xmlns:us-net-ogc="http://inspire.ec.europa.eu/schemas/us-net-ogc/3.0" targetNamespace="http://inspire.ec.europa.eu/schemas/us-net-ogc/3.0" elementFormDefault="qualified" version="3.0">
	<annotation>
		<documentation>-- Name --
oil, gas '||'&'||'amp; chemicals utility network

-- Definition --
Oil, gas '||'&'||'amp; chemicals network sub-domain.</documentation>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/us-net-common/3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/us-net-common/3.0/UtilityNetworksCommon.xsd"/>
	<import namespace="http://www.interactive-instruments.de/ShapeChange/AppInfo" schemaLocation="http://portele.de/ShapeChangeAppinfo.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="OilGasChemicalsPipe" type="us-net-ogc:OilGasChemicalsPipeType" substitutionGroup="us-net-common:Pipe">
		<annotation>
			<documentation>-- Name --
oil, gas and chemicals pipe

-- Definition --
A pipe used to convey oil, gas or chemicals from one location to another.</documentation>
		</annotation>
	</element>
	<complexType name="OilGasChemicalsPipeType">
		<complexContent>
			<extension base="us-net-common:PipeType">
				<sequence>
					<element name="oilGasChemicalsProductType" type="gml:ReferenceType" nillable="true" maxOccurs="unbounded">
						<annotation>
							<documentation>-- Name --
oil, gas and chemicals product type

-- Definition --
The type of oil, gas or chemicals product that is conveyed through the oil, gas, chemicals pipe.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="OilGasChemicalsPipePropertyType">
		<sequence minOccurs="0">
			<element ref="us-net-ogc:OilGasChemicalsPipe"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 386;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (386, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/us-net-sw/3.0/sewernetwork.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 386 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as sewernetwork_us_net_sw_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:sc="http://www.interactive-instruments.de/ShapeChange/AppInfo" xmlns:us-net-common="http://inspire.ec.europa.eu/schemas/us-net-common/3.0" xmlns:us-net-sw="http://inspire.ec.europa.eu/schemas/us-net-sw/3.0" targetNamespace="http://inspire.ec.europa.eu/schemas/us-net-sw/3.0" elementFormDefault="qualified" version="3.0">
	<annotation>
		<documentation>-- Name --
sewer utility network

-- Definition --
Sewer network sub-domain.</documentation>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/us-net-common/3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/us-net-common/3.0/UtilityNetworksCommon.xsd"/>
	<import namespace="http://www.interactive-instruments.de/ShapeChange/AppInfo" schemaLocation="http://portele.de/ShapeChangeAppinfo.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="SewerPipe" type="us-net-sw:SewerPipeType" substitutionGroup="us-net-common:Pipe">
		<annotation>
			<documentation>-- Name --
sewer pipe

-- Definition --
A sewer pipe used to convey wastewater (sewer) from one location to another.</documentation>
		</annotation>
	</element>
	<complexType name="SewerPipeType">
		<complexContent>
			<extension base="us-net-common:PipeType">
				<sequence>
					<element name="sewerWaterType" type="gml:ReferenceType" nillable="true">
						<annotation>
							<documentation>-- Name --
sewer water type

-- Definition --
Type of sewer water.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="SewerPipePropertyType">
		<sequence minOccurs="0">
			<element ref="us-net-sw:SewerPipe"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
</schema>'; 
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 387;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (387, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/us-net-tc/3.0/telecommunicationsnetwork.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 387 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as telecommunicationsnetwork_us_net_tc_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:sc="http://www.interactive-instruments.de/ShapeChange/AppInfo" xmlns:us-net-common="http://inspire.ec.europa.eu/schemas/us-net-common/3.0" xmlns:us-net-tc="http://inspire.ec.europa.eu/schemas/us-net-tc/3.0" targetNamespace="http://inspire.ec.europa.eu/schemas/us-net-tc/3.0" elementFormDefault="qualified" version="3.0">
	<annotation>
		<documentation>-- Name --
telecommunications utility network

-- Definition --
Telecommunications network sub-domain.</documentation>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/us-net-common/3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/us-net-common/3.0/UtilityNetworksCommon.xsd"/>
	<import namespace="http://www.interactive-instruments.de/ShapeChange/AppInfo" schemaLocation="http://portele.de/ShapeChangeAppinfo.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="TelecommunicationsCable" type="us-net-tc:TelecommunicationsCableType" substitutionGroup="us-net-common:Cable">
		<annotation>
			<documentation>-- Name --
telecommunications cable

-- Definition --
A utility link or link sequence used to convey data signals (PSTN, radio or computer) from one location to another.</documentation>
		</annotation>
	</element>
	<complexType name="TelecommunicationsCableType">
		<complexContent>
			<extension base="us-net-common:CableType">
				<sequence>
					<element name="telecommunicationsCableMaterialType" type="gml:ReferenceType" nillable="true">
						<annotation>
							<documentation>-- Name --
telecommunications cable material type

-- Definition --
Type of cable material.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">technicalGuidance</taggedValue>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="TelecommunicationsCablePropertyType">
		<sequence minOccurs="0">
			<element ref="us-net-tc:TelecommunicationsCable"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
</schema>'; 
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 388;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (388, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/us-net-th/3.0/thermalnetwork.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 388 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as thermalnetwork_us_net_th_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:sc="http://www.interactive-instruments.de/ShapeChange/AppInfo" xmlns:us-net-common="http://inspire.ec.europa.eu/schemas/us-net-common/3.0" xmlns:us-net-th="http://inspire.ec.europa.eu/schemas/us-net-th/3.0" targetNamespace="http://inspire.ec.europa.eu/schemas/us-net-th/3.0" elementFormDefault="qualified" version="3.0">
	<annotation>
		<documentation>-- Name --
thermal utility network

-- Definition --
Thermal network sub-domain.</documentation>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/us-net-common/3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/us-net-common/3.0/UtilityNetworksCommon.xsd"/>
	<import namespace="http://www.interactive-instruments.de/ShapeChange/AppInfo" schemaLocation="http://portele.de/ShapeChangeAppinfo.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="ThermalPipe" type="us-net-th:ThermalPipeType" substitutionGroup="us-net-common:Pipe">
		<annotation>
			<documentation>-- Name --
thermal pipe

-- Definition --
A pipe used to disseminate heating or cooling from one location to another.</documentation>
		</annotation>
	</element>
	<complexType name="ThermalPipeType">
		<complexContent>
			<extension base="us-net-common:PipeType">
				<sequence>
					<element name="thermalProductType" nillable="true">
						<annotation>
							<documentation>-- Name --
thermal product type

-- Definition --
The type of thermal product that is conveyed through the thermal pipe.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">technicalGuidance</taggedValue>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="ThermalPipePropertyType">
		<sequence minOccurs="0">
			<element ref="us-net-th:ThermalPipe"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 389;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (389, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/us-net-wa/3.0/waternetwork.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 389 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as waternetwork_us_net_wa_3_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2014 sp1 (x64) (http://www.altova.com) (European Commission DG JRC - IES) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:sc="http://www.interactive-instruments.de/ShapeChange/AppInfo" xmlns:us-net-common="http://inspire.ec.europa.eu/schemas/us-net-common/3.0" xmlns:us-net-wa="http://inspire.ec.europa.eu/schemas/us-net-wa/3.0" targetNamespace="http://inspire.ec.europa.eu/schemas/us-net-wa/3.0" elementFormDefault="qualified" version="3.0">
	<annotation>
		<documentation>-- Name --
water utility network

-- Definition --
Water network sub-domain.</documentation>
	</annotation>
	<import namespace="http://inspire.ec.europa.eu/schemas/us-net-common/3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/us-net-common/3.0/UtilityNetworksCommon.xsd"/>
	<import namespace="http://www.interactive-instruments.de/ShapeChange/AppInfo" schemaLocation="http://portele.de/ShapeChangeAppinfo.xsd"/>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<!--XML Schema document created by ShapeChange-->
	<element name="WaterPipe" type="us-net-wa:WaterPipeType" substitutionGroup="us-net-common:Pipe">
		<annotation>
			<documentation>-- Name --
water pipe

-- Definition --
A water pipe used to convey water from one location to another.</documentation>
		</annotation>
	</element>
	<complexType name="WaterPipeType">
		<complexContent>
			<extension base="us-net-common:PipeType">
				<sequence>
					<element name="waterType" type="gml:ReferenceType" nillable="true">
						<annotation>
							<documentation>-- Name --
water type

-- Definition --
Type of water.</documentation>
							<appinfo>
								<taggedValue xmlns="http://www.interactive-instruments.de/ShapeChange/AppInfo" tag="obligation">implementingRule</taggedValue>
							</appinfo>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="WaterPipePropertyType">
		<sequence minOccurs="0">
			<element ref="us-net-wa:WaterPipe"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</complexType>
</schema>'; 
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 390;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (390, empty_clob(), 'INSPIRE', 'urn:x-inspire:specification:gmlas:WaterFrameworkDirective:0.0/waterframeworkdirective.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 390 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as waterframeworkdirective_wfd_0_0.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?><schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:base="urn:x-inspire:specification:gmlas:BaseTypes:3.2" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:gn="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" xmlns:hy="urn:x-inspire:specification:gmlas:HydroBase:3.0" xmlns:wfd="urn:x-inspire:specification:gmlas:WaterFrameworkDirective:0.0" elementFormDefault="qualified" targetNamespace="urn:x-inspire:specification:gmlas:WaterFrameworkDirective:0.0" version="0.0">
  <annotation>
    <documentation>-- Definition --
The ''Water Framework Directive'' application schema contains spatial objects associated with reporting under European Directive 2000/60/EC "establishing a framework for Community action in the field of water policy".</documentation>
  </annotation>
  <import namespace="urn:x-inspire:specification:gmlas:HydroBase:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/hy/3.0/HydroBase.xsd"/>
  <import namespace="urn:x-inspire:specification:gmlas:BaseTypes:3.2" schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.2/BaseTypes.xsd"/>
  <import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
  <import namespace="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" schemaLocation="http://inspire.ec.europa.eu/schemas/gn/3.0/GeographicalNames.xsd"/>
  <!--XML Schema document created by ShapeChange-->
  <element name="WFDGroundWaterBody" substitutionGroup="wfd:WFDWaterBody" type="wfd:WFDGroundWaterBodyType">
    <annotation>
      <documentation>-- Definition --
A distinct volume of groundwater within an aquifer or aquifers.

-- Description --
SOURCE [2000/60/EC Art. 2(12)].

NOTE All WFD spatial object types are regarded as candidate spatial objects in Annex III theme ''Area management/restriction/regulation zones and reporting units'' due to their primary function for reporting under Directive 2000/60/EC.</documentation>
    </annotation>
  </element>
  <complexType name="WFDGroundWaterBodyType">
    <complexContent>
      <extension base="wfd:WFDWaterBodyType">
        <sequence>
          <element name="geometry" nillable="true" type="gml:GeometricPrimitivePropertyType">
            <annotation>
              <documentation>-- Definition --
The geometry of the WFD groundwater body.</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="WFDGroundWaterBodyPropertyType">
    <sequence minOccurs="0">
      <element ref="wfd:WFDGroundWaterBody"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element abstract="true" name="WFDWaterBody" substitutionGroup="gml:AbstractFeature" type="wfd:WFDWaterBodyType">
    <annotation>
      <documentation>-- Definition --
Abstract class representing a WFD body of surface water or body of groundwater.

-- Description --
NOTE All WFD spatial object types are regarded as candidate spatial objects in Annex III theme ''Area management/restriction/regulation zones and reporting units'' due to their primary function for reporting under Directive 2000/60/EC.
</documentation>
    </annotation>
  </element>
  <complexType abstract="true" name="WFDWaterBodyType">
    <complexContent>
      <extension base="gml:AbstractFeatureType">
        <sequence>
          <element maxOccurs="unbounded" minOccurs="0" name="geographicalName" nillable="true">
            <annotation>
              <documentation>-- Definition --
A geographical name that is used to identify a hydrographic object in the real world. It provides a ''key'' for implicitly associating different representations of the object.

-- Description --
EXAMPLE A standing water in a mapping view may share the same geographical name as a WFD lake in a reporting view, implying they are both representations of the same real world object.</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="gn:GeographicalName"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="hydroId" nillable="true">
            <annotation>
              <documentation>-- Definition --
An identifier that is used to identify a hydrographic object in the real world. It provides a ''key'' for implicitly associating different representations of the object.

-- Description --
NOTE 1 The identifier may be a national hydrological identification code.

NOTE 2 More than one identifier may be required, for instance a watercourse may be assigned different identifying codes under national and European schemes.

EXAMPLE A lock in a mapping view may share the same identifier as a hydro node in a network view, implying they are both representations of the same real world object.</documentation>
            </annotation>
            <complexType>
              <sequence>
                <element ref="hy:HydroIdentifier"/>
              </sequence>
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </complexType>
          </element>
          <element maxOccurs="unbounded" minOccurs="0" name="relatedHydroObject" type="gml:ReferenceType">
            <annotation>
              <documentation>-- Definition --
A related hydrographic object representing the same real-world entity.</documentation>
              <appinfo>
                <targetElement xmlns="http://www.opengis.net/gml/3.2">hy:HydroObject</targetElement>
              </appinfo>
            </annotation>
          </element>
          <element name="beginLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was inserted or changed in the spatial data set.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element minOccurs="0" name="endLifespanVersion" nillable="true">
            <annotation>
              <documentation>-- Definition --
Date and time at which this version of the spatial object was superseded or retired in the spatial data set.
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="dateTime">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="inspireId" type="base:IdentifierPropertyType">
            <annotation>
              <documentation>-- Definition --
External object identifier of the spatial object.

-- Description --
NOTE An external object identifier is a unique object identifier published by the responsible body, which may be used by external applications to reference the spatial object. The identifier is an identifier of the spatial object, not an identifier of the real-world phenomenon.
</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="WFDWaterBodyPropertyType">
    <sequence minOccurs="0">
      <element ref="wfd:WFDWaterBody"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="WFDTransitionalWater" substitutionGroup="wfd:WFDSurfaceWaterBody" type="wfd:WFDTransitionalWaterType">
    <annotation>
      <documentation>-- Definition --
Bodies of surface water in the vicinity of river mouths which are partly saline in character as a result of their proximity to coastal waters but which are substantially influenced by freshwater flows.

-- Description --
SOURCE [2000/60/EC Art. 2(6)].

NOTE All WFD spatial object types are regarded as candidate spatial objects in Annex III theme ''Area management/restriction/regulation zones and reporting units'' due to their primary function for reporting under Directive 2000/60/EC.</documentation>
    </annotation>
  </element>
  <complexType name="WFDTransitionalWaterType">
    <complexContent>
      <extension base="wfd:WFDSurfaceWaterBodyType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="WFDTransitionalWaterPropertyType">
    <sequence minOccurs="0">
      <element ref="wfd:WFDTransitionalWater"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="WFDLake" substitutionGroup="wfd:WFDRiverOrLake" type="wfd:WFDLakeType">
    <annotation>
      <documentation>-- Definition --
A body of standing inland surface water.

-- Description --
SOURCE [2000/60/EC Art. 2(5)].

NOTE All WFD spatial object types are regarded as candidate spatial objects in Annex III theme ''Area management/restriction/regulation zones and reporting units'' due to their primary function for reporting under Directive 2000/60/EC.</documentation>
    </annotation>
  </element>
  <complexType name="WFDLakeType">
    <complexContent>
      <extension base="wfd:WFDRiverOrLakeType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="WFDLakePropertyType">
    <sequence minOccurs="0">
      <element ref="wfd:WFDLake"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="WFDCoastalWater" substitutionGroup="wfd:WFDSurfaceWaterBody" type="wfd:WFDCoastalWaterType">
    <annotation>
      <documentation>-- Definition --
Surface water on the landward side of a line, every point of which is at a distance of one nautical mile on the seaward side from the nearest point of the baseline from which the breadth of territorial waters is measured, extending where appropriate up to the outer limit of transitional waters.

-- Description --
SOURCE [2000/60/EC Art. 2(7)].

NOTE All WFD spatial object types are regarded as candidate spatial objects in Annex III theme ''Area management/restriction/regulation zones and reporting units'' due to their primary function for reporting under Directive 2000/60/EC.</documentation>
    </annotation>
  </element>
  <complexType name="WFDCoastalWaterType">
    <complexContent>
      <extension base="wfd:WFDSurfaceWaterBodyType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="WFDCoastalWaterPropertyType">
    <sequence minOccurs="0">
      <element ref="wfd:WFDCoastalWater"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element abstract="true" name="WFDRiverOrLake" substitutionGroup="wfd:WFDSurfaceWaterBody" type="wfd:WFDRiverOrLakeType">
    <annotation>
      <documentation>-- Definition --
Abstract class containing common attributes for a WFD river or lake.

-- Description --
NOTE All WFD spatial object types are regarded as candidate spatial objects in Annex III theme ''Area management/restriction/regulation zones and reporting units'' due to their primary function for reporting under Directive 2000/60/EC.</documentation>
    </annotation>
  </element>
  <complexType abstract="true" name="WFDRiverOrLakeType">
    <complexContent>
      <extension base="wfd:WFDSurfaceWaterBodyType">
        <sequence>
          <element name="large" nillable="true">
            <annotation>
              <documentation>-- Definition --
Rivers with a catchment area '||'&'||'gt; 50,000 km'||'&'||'lt;sup'||'&'||'gt;2'||'&'||'lt;/sup'||'&'||'gt;; or rivers and main tributaries that have a catchment area between 5,000 km'||'&'||'lt;sup'||'&'||'gt;2'||'&'||'lt;/sup'||'&'||'gt; and 50,000 km'||'&'||'lt;sup'||'&'||'gt;2'||'&'||'lt;/sup'||'&'||'gt;.

Lakes that have a surface area '||'&'||'gt; 500 km'||'&'||'lt;sup'||'&'||'gt;2'||'&'||'lt;/sup'||'&'||'gt;.

-- Description --
SOURCE [WISE GIS Guidance].
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="boolean">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
          <element name="main" nillable="true">
            <annotation>
              <documentation>-- Definition --
Rivers that have a catchment area '||'&'||'gt; 500 km'||'&'||'lt;sup'||'&'||'gt;2'||'&'||'lt;/sup'||'&'||'gt;.

Lakes that have a surface area '||'&'||'gt; 10 km'||'&'||'lt;sup'||'&'||'gt;2'||'&'||'lt;/sup'||'&'||'gt;.

-- Description --
SOURCE [WISE GIS Guidance].
</documentation>
            </annotation>
            <complexType>
              <simpleContent>
                <extension base="boolean">
                  <attribute name="nilReason" type="gml:NilReasonType"/>
                </extension>
              </simpleContent>
            </complexType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="WFDRiverOrLakePropertyType">
    <sequence minOccurs="0">
      <element ref="wfd:WFDRiverOrLake"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element abstract="true" name="WFDSurfaceWaterBody" substitutionGroup="wfd:WFDWaterBody" type="wfd:WFDSurfaceWaterBodyType">
    <annotation>
      <documentation>-- Definition --
A discrete and significant element of surface water.

-- Description --
SOURCE [Based on 2000/60/EC Art. 2(10)].

EXAMPLE A lake, a reservoir, a stream, river or canal, part of a stream, river or canal, a transitional water or a stretch of coastal water.

NOTE 1 The surface water bodies shall be identified as falling within either one of the following surface water categories - rivers, lakes, transitional waters or coastal waters - or as artificial surface water bodies or heavily modified surface water bodies. [2000/60/EC Ann. II 1.1(ii)]

NOTE 2 All WFD spatial object types are regarded as candidate spatial objects in Annex III theme ''Area management/restriction/regulation zones and reporting units'' due to their primary function for reporting under Directive 2000/60/EC.</documentation>
    </annotation>
  </element>
  <complexType abstract="true" name="WFDSurfaceWaterBodyType">
    <complexContent>
      <extension base="wfd:WFDWaterBodyType">
        <sequence>
          <element name="artificial" type="boolean">
            <annotation>
              <documentation>-- Definition --
''Artificial water body'' means a body of surface water created by human activity.

-- Description --
SOURCE [2000/60/EC Art. 2(8)].</documentation>
            </annotation>
          </element>
          <element minOccurs="0" name="geometry" type="gml:GeometricPrimitivePropertyType">
            <annotation>
              <documentation>-- Definition --
The geometry of the WFD surface water body:
- a surface for a WFD coastal water;
- a surface for a WFD transitional water;
- a curve for a WFD river;
- a surface for a WFD lake.

-- Description --
NOTE A ''representative point'' may be supplied instead of the geometry.</documentation>
            </annotation>
          </element>
          <element minOccurs="0" name="heavilyModified" type="boolean">
            <annotation>
              <documentation>-- Definition --
''Heavily modified water body'' means a body of surface water which as a result of physical alterations by human activity is substantially changed in character, as designated by the Member State in accordance with the provisions of WFD Annex II.

-- Description --
SOURCE [2000/60/EC Art. 2(9)].</documentation>
            </annotation>
          </element>
          <element name="representativePoint" nillable="true" type="gml:PointPropertyType">
            <annotation>
              <documentation>-- Definition --
Representative point of the WFD water body.</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="WFDSurfaceWaterBodyPropertyType">
    <sequence minOccurs="0">
      <element ref="wfd:WFDSurfaceWaterBody"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
  <element name="WFDRiver" substitutionGroup="wfd:WFDRiverOrLake" type="wfd:WFDRiverType">
    <annotation>
      <documentation>-- Definition --
A body of inland water flowing for the most part on the surface of the land but which may flow underground for part of its course.

-- Description --
SOURCE [2000/60/EC Art. 2(4)].

NOTE All WFD spatial object types are regarded as candidate spatial objects in Annex III theme ''Area management/restriction/regulation zones and reporting units'' due to their primary function for reporting under Directive 2000/60/EC.</documentation>
    </annotation>
  </element>
  <complexType name="WFDRiverType">
    <complexContent>
      <extension base="wfd:WFDRiverOrLakeType">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="WFDRiverPropertyType">
    <sequence minOccurs="0">
      <element ref="wfd:WFDRiver"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
    <attributeGroup ref="gml:OwnershipAttributeGroup"/>
  </complexType>
</schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    DELETE FROM MDSYS.SDO_XSD_TABLE WHERE XSD_ID = 391;
    INSERT INTO MDSYS.SDO_XSD_TABLE(XSD_ID, XSD_DOC, XSD_NAME, XSD_URL) 
        VALUES (391, empty_clob(), 'INSPIRE', 'http://inspire.ec.europa.eu/schemas/common/1.0/enum_eng_enums.xsd')
        RETURNING XSD_DOC into schemaclob;

    SELECT XSD_DOC into schemaclob from MDSYS.SDO_XSD_TABLE
        WHERE XSD_ID = 391 FOR UPDATE;

    DBMS_LOB.OPEN(schemaclob, DBMS_LOB.LOB_READWRITE);

    -- Same as enum_eng_enums.xsd
    buf :=
'<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://inspire.ec.europa.eu/schemas/common/1.0" targetNamespace="http://inspire.ec.europa.eu/schemas/common/1.0" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0.1">
	<xs:complexType name="inspireTheme_eng">
		<xs:complexContent>
			<xs:restriction base="inspireTheme">
				<xs:sequence>
					<xs:element name="OriginatingControlledVocabulary" type="originatingControlledVocabularyGemetInspireThemes" minOccurs="1"/>
					<xs:element name="KeywordValue">
						<xs:simpleType>
							<xs:restriction base="keywordValue">
								<xs:enumeration value="Addresses"/>
								<xs:enumeration value="Administrative units"/>
								<xs:enumeration value="Agricultural and aquaculture facilities"/>
								<xs:enumeration value="Area management/restriction/regulation zones and reporting units"/>
								<xs:enumeration value="Atmospheric conditions"/>
								<xs:enumeration value="Bio-geographical regions"/>
								<xs:enumeration value="Buildings"/>
								<xs:enumeration value="Cadastral parcels"/>
								<xs:enumeration value="Coordinate reference systems"/>
								<xs:enumeration value="Elevation"/>
								<xs:enumeration value="Energy resources"/>
								<xs:enumeration value="Environmental monitoring facilities"/>
								<xs:enumeration value="Geographical grid systems"/>
								<xs:enumeration value="Geographical names"/>
								<xs:enumeration value="Geology"/>
								<xs:enumeration value="Habitats and biotopes"/>
								<xs:enumeration value="Human health and safety"/>
								<xs:enumeration value="Hydrography"/>
								<xs:enumeration value="Land cover"/>
								<xs:enumeration value="Land use"/>
								<xs:enumeration value="Meteorological geographical features"/>
								<xs:enumeration value="Mineral resources"/>
								<xs:enumeration value="Natural risk zones"/>
								<xs:enumeration value="Oceanographic geographical features"/>
								<xs:enumeration value="Orthoimagery"/>
								<xs:enumeration value="Population distribution - demography"/>
								<xs:enumeration value="Production and industrial facilities"/>
								<xs:enumeration value="Protected sites"/>
								<xs:enumeration value="Sea regions"/>
								<xs:enumeration value="Soil"/>
								<xs:enumeration value="Species distribution"/>
								<xs:enumeration value="Statistical units"/>
								<xs:enumeration value="Transport networks"/>
								<xs:enumeration value="Utility and governmental services"/>
							</xs:restriction>
						</xs:simpleType>
					</xs:element>
				</xs:sequence>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="resLocGEMETInspireThemes_eng">
		<xs:complexContent>
			<xs:restriction base="resourceLocatorType">
				<xs:sequence>
					<xs:element name="URL">
						<xs:simpleType>
							<xs:restriction base="xs:anyURI">
								<xs:enumeration value="http://www.eionet.europa.eu/gemet/inspire_themes?langcode=en"/>
							</xs:restriction>
						</xs:simpleType>
					</xs:element>
					<xs:element name="MediaType">
						<xs:simpleType>
							<xs:restriction base="mediaType">
								<xs:enumeration value="text/html"/>
							</xs:restriction>
						</xs:simpleType>
					</xs:element>
				</xs:sequence>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="citationGEMETInspireThemes_eng">
		<xs:complexContent>
			<xs:restriction base="citation">
				<xs:sequence>
					<xs:element name="Title">
						<xs:simpleType>
							<xs:restriction base="notEmptyString">
								<xs:enumeration value="GEMET - INSPIRE themes"/>
							</xs:restriction>
						</xs:simpleType>
					</xs:element>
					<xs:choice>
						<xs:element name="DateOfPublication">
							<xs:simpleType>
								<xs:restriction base="iso8601Date">
									<xs:enumeration value="2008-06-01"/>
								</xs:restriction>
							</xs:simpleType>
						</xs:element>
					</xs:choice>
					<xs:element name="URI" minOccurs="0" maxOccurs="0"/>
					<xs:element name="ResourceLocator" type="resLocGEMETInspireThemes_eng" minOccurs="1" maxOccurs="1"/>
				</xs:sequence>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<!--Interoperability-->
	<xs:complexType name="resLocInspireInteroperabilityRegulation_eng">
		<xs:complexContent>
			<xs:restriction base="resourceLocatorType">
				<xs:sequence>
					<xs:element name="URL">
						<xs:simpleType>
							<xs:restriction base="xs:anyURI">
								<xs:enumeration value="http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2010:323:0011:0102:EN:PDF"/>
							</xs:restriction>
						</xs:simpleType>
					</xs:element>
					<xs:element name="MediaType">
						<xs:simpleType>
							<xs:restriction base="mediaType">
								<xs:enumeration value="application/pdf"/>
							</xs:restriction>
						</xs:simpleType>
					</xs:element>
				</xs:sequence>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="citationInspireInteroperabilityRegulation_eng">
		<xs:complexContent>
			<xs:restriction base="citationConformity">
				<xs:sequence>
					<xs:element name="Title">
						<xs:simpleType>
							<xs:restriction base="notEmptyString">
								<xs:enumeration value="COMMISSION REGULATION (EU) No 1089/2010 of 23 November 2010 implementing Directive 2007/2/EC of the European Parliament and of the Council as regards interoperability of spatial data sets and services"/>
							</xs:restriction>
						</xs:simpleType>
					</xs:element>
					<xs:choice>
						<xs:element name="DateOfPublication">
							<xs:simpleType>
								<xs:restriction base="iso8601Date">
									<xs:enumeration value="2010-12-08"/>
								</xs:restriction>
							</xs:simpleType>
						</xs:element>
					</xs:choice>
					<xs:element name="URI" minOccurs="1" maxOccurs="1">
						<xs:simpleType>
							<xs:restriction base="xs:anyURI">
								<xs:enumeration value="OJ:L:2010:323:0011:0102:EN:PDF"/>
							</xs:restriction>
						</xs:simpleType>
					</xs:element>
					<xs:element name="ResourceLocator" type="resLocInspireInteroperabilityRegulation_eng" minOccurs="1" maxOccurs="1"/>
				</xs:sequence>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
</xs:schema>';
    
    
    amt := length(buf);
    pos := 1;

    DBMS_LOB.WRITE(schemaclob, amt, pos, buf);
    DBMS_LOB.CLOSE(schemaclob);




    COMMIT; 
    
END;
/
SHOW ERRORS;

    
@?/rdbms/admin/sqlsessend.sql

OHA YOOOO