<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:gmi="http://www.isotc211.org/2005/gmi" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:bag="http://www.opennavsurf.org/schema/bag" targetNamespace="http://www.opennavsurf.org/schema/bag" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<!-- ================================= Annotation ================================ -->
	<xs:annotation>
		<xs:documentation>This file contains the BAG extensions to the ISO19115 schema</xs:documentation>
	</xs:annotation>
	<!-- ================================== Imports ================================== -->
	<xs:import namespace="http://www.isotc211.org/2005/gmi" schemaLocation="../gmi/gmi.xsd"/>
	<xs:import namespace="http://www.isotc211.org/2005/gmd" schemaLocation="../gmd/gmd.xsd"/>
	<xs:import namespace="http://www.isotc211.org/2005/gco" schemaLocation="../gco/gco.xsd"/>
	<!-- ########################################################################### -->
	<!-- ########################################################################### -->
    <!-- ================================== Classes ================================= -->
	<xs:complexType name="BAG_DataIdentification_Type">
		<xs:complexContent>
			<xs:extension base="gmd:MD_DataIdentification_Type">
				<xs:sequence>
					<xs:element name="verticalUncertaintyType" type="bag:BAG_VertUncertCode_PropertyType" minOccurs="1"/>
					<xs:element name="depthCorrectionType" type="bag:BAG_DepthCorrectCode_PropertyType" minOccurs="0"/>
					<xs:element name="elevationSolutionGroupType" type="bag:BAG_OptGroupCode_PropertyType" minOccurs="0"/>
					<xs:element name="nodeGroupType" type="bag:BAG_OptGroupCode_PropertyType" minOccurs="0"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<!-- ........................................................................ -->
	<xs:element name="BAG_DataIdentification" type="bag:BAG_DataIdentification_Type" substitutionGroup="gmd:MD_DataIdentification"/>
	<!-- ........................................................................ -->
	<xs:complexType name="BAG_DataIdentification_PropertyType">
		<xs:sequence>
			<xs:element ref="bag:BAG_DataIdentification"/>
		</xs:sequence>
		<xs:attributeGroup ref="gco:ObjectReference"/>
		<xs:attribute ref="gco:nilReason"/>
	</xs:complexType>
	<!-- =========================================================================== -->
	<xs:complexType name="BAG_ProcessStep_Type">
		<xs:complexContent>
			<xs:extension base="gmd:LI_ProcessStep_Type">
				<xs:sequence>
					<xs:element name="trackingId" type="gco:CharacterString_PropertyType" minOccurs="1"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<!-- ........................................................................ -->
	<xs:element name="BAG_ProcessStep" type="bag:BAG_ProcessStep_Type" substitutionGroup="gmd:LI_ProcessStep"/>
	<!-- ........................................................................ -->
	<xs:complexType name="BAG_ProcessStep_PropertyType">
		<xs:choice>
			<xs:element ref="bag:BAG_ProcessStep"/>
		</xs:choice>
	</xs:complexType>
	<!-- =========================================================================== -->
	<!-- ........................................................................ -->
	<xs:element name="BAG_VertUncertCode" type="gco:CodeListValue_Type" substitutionGroup="gco:CharacterString"/>
	<!-- ........................................................................ -->
	<xs:complexType name="BAG_VertUncertCode_PropertyType">
		<xs:sequence minOccurs="0">
			<xs:element ref="bag:BAG_VertUncertCode"/>
		</xs:sequence>
		<xs:attribute ref="gco:nilReason"/>
	</xs:complexType>
	<!-- =========================================================================== -->
	<!-- ........................................................................ -->
	<xs:element name="BAG_DepthCorrectCode" type="gco:CodeListValue_Type" substitutionGroup="gco:CharacterString"/>
	<!-- ........................................................................ -->
	<xs:complexType name="BAG_DepthCorrectCode_PropertyType">
		<xs:sequence minOccurs="0">
			<xs:element ref="bag:BAG_DepthCorrectCode"/>
		</xs:sequence>
		<xs:attribute ref="gco:nilReason"/>
	</xs:complexType>
	<!-- =========================================================================== -->
	<!-- ........................................................................ -->
	<xs:element name="BAG_OptGroupCode" type="gco:CodeListValue_Type" substitutionGroup="gco:CharacterString"/>
	<!-- ........................................................................ -->
	<xs:complexType name="BAG_OptGroupCode_PropertyType">
		<xs:sequence minOccurs="0">
			<xs:element ref="bag:BAG_OptGroupCode"/>
		</xs:sequence>
		<xs:attribute ref="gco:nilReason"/>
	</xs:complexType>
	<!-- =========================================================================== -->
</xs:schema>
