<?xml version="1.0"?>
<!-- edited with XMLSPY v2004 rel. 2 U (http://www.xmlspy.com) by Markus Doering (BGBM) -->
<!-- $Id:  $ -->
<!-- DiGIR protocol schema version 2.0 based on the DiGIR and BioCASE protocols -->
<xsd:schema targetNamespace="http://www.tdwg.org/schemas/protocol/2.0" xmlns="http://www.tdwg.org/schemas/protocol/2.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="2.0">
	<!--=============================================-->
	<!-- SIMPLE TYPE DEFINITIONS-->
	<!--=============================================-->
	<xsd:simpleType name="allNNI">
		<xsd:annotation>
			<xsd:documentation>Taken from w3c schema for maxOccurs at: http://www.w3.org/2001/XMLSchema.xsd</xsd:documentation>
		</xsd:annotation>
		<xsd:union memberTypes="xsd:nonNegativeInteger">
			<xsd:simpleType>
				<xsd:restriction base="xsd:NMTOKEN">
					<xsd:enumeration value="unbounded"/>
				</xsd:restriction>
			</xsd:simpleType>
		</xsd:union>
	</xsd:simpleType>
	<xsd:simpleType name="emailType">
		<xsd:annotation>
			<xsd:documentation>A simpleType to represent an email address.</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:pattern value="([a-zA-Z0-9_\-\.\+]+)@([a-zA-Z0-9\-\.]+)"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="pathType">
		<xsd:annotation>
			<xsd:documentation>A simpleType to represent an xpath-type used for querying.</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:pattern value="(/[a-zA-Z0-9_\-]+)+(/@[a-zA-Z0-9_\-]+)?"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="pathQualifiedType">
		<xsd:annotation>
			<xsd:documentation>A simpleType to represent an xpath-type used for querying.</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:pattern value="([a-zA-Z0-9_\-]+:)?(/[a-zA-Z0-9_\-]+)+(/@[a-zA-Z0-9_\-]+)?"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="urlType">
		<xsd:annotation>
			<xsd:documentation>A simpleType to represent a URL that does a pattern match to verify a full URL without whitespace.</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:pattern value="http://[^ ]*[^., \n\t>&quot;]"/>
		</xsd:restriction>
	</xsd:simpleType>
	<!--  =============================================-->
	<!--REQUEST DEFINITION-->
	<!--  =============================================-->
	<xsd:element name="request">
		<xsd:annotation>
			<xsd:documentation>Request message format.  Must always contain and header and may or maynot contain a payload, based on the type of request being made.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="header" type="header"/>
				<xsd:sequence>
					<xsd:element name="ping">
						<xsd:annotation>
							<xsd:documentation>See if a resource is online.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="capabilities">
						<xsd:annotation>
							<xsd:documentation>Request technical details about a resource/provider.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="metadata">
						<xsd:annotation>
							<xsd:documentation>Request human readable metadata about a resource or provider.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="inventory">
						<xsd:annotation>
							<xsd:documentation>A BioCASE scan. List of distinct value (pairs)</xsd:documentation>
						</xsd:annotation>
						<xsd:complexType>
							<xsd:sequence>
								<xsd:element name="concepts">
									<xsd:complexType>
										<xsd:sequence>
											<xsd:element name="concept" type="conceptType" maxOccurs="unbounded">
												<xsd:annotation>
													<xsd:documentation>Multiple concepts allowed to return a list of distinct combinations of values. SELECT DISTINCT A, B FROM ...</xsd:documentation>
												</xsd:annotation>
											</xsd:element>
										</xsd:sequence>
									</xsd:complexType>
								</xsd:element>
								<xsd:element name="filter" type="filterType" minOccurs="0"/>
							</xsd:sequence>
							<xsd:attribute name="count" type="xsd:boolean" use="optional"/>
						</xsd:complexType>
					</xsd:element>
					<xsd:element name="search">
						<xsd:complexType>
							<xsd:sequence>
								<xsd:choice>
									<xsd:annotation>
										<xsd:documentation>A choice between the different subtypes of a search.</xsd:documentation>
									</xsd:annotation>
									<xsd:element name="fullDocument">
										<xsd:complexType>
											<xsd:sequence minOccurs="0">
												<xsd:element name="recordDefinition" type="pathType" minOccurs="0" maxOccurs="unbounded">
													<xsd:annotation>
														<xsd:documentation>Define a list of concepts to be treated as the base of a record. Use this concept if its repeatable or the closest repeatable parental element.</xsd:documentation>
													</xsd:annotation>
												</xsd:element>
											</xsd:sequence>
											<xsd:attribute name="schema" type="xsd:anyURI" use="required"/>
										</xsd:complexType>
									</xsd:element>
									<xsd:element name="partialDocument">
										<xsd:complexType>
											<xsd:sequence>
												<xsd:element name="recordDefinition" type="pathType" minOccurs="0" maxOccurs="unbounded">
													<xsd:annotation>
														<xsd:documentation>Define a list of concepts to be treated as the base of a record. Use this concept if its repeatable or the closest repeatable parental element.</xsd:documentation>
													</xsd:annotation>
												</xsd:element>
												<xsd:element name="concept" type="conceptType" maxOccurs="unbounded"/>
											</xsd:sequence>
											<xsd:attribute name="schema" type="xsd:anyURI" use="required"/>
										</xsd:complexType>
									</xsd:element>
									<xsd:element name="customDocument" type="responseStructureType">
										<xsd:annotation>
											<xsd:documentation>Define your own structur how the data should be returned refering to known concepts of another schema.</xsd:documentation>
										</xsd:annotation>
									</xsd:element>
								</xsd:choice>
								<xsd:element name="filter" type="filterType" minOccurs="0"/>
							</xsd:sequence>
							<xsd:attribute name="start" type="xsd:nonNegativeInteger" use="optional" default="0"/>
							<xsd:attribute name="limit" type="xsd:positiveInteger" use="optional"/>
							<xsd:attribute name="count" type="xsd:boolean" use="optional"/>
						</xsd:complexType>
					</xsd:element>
				</xsd:sequence>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
	<xsd:complexType name="header">
		<xsd:annotation>
			<xsd:documentation>Inline request header used in request and response documents.</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="software" minOccurs="0" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation>Version and name of the software involed in editing the protocol document. E.g provider software, portal, proxy, ...</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:sequence minOccurs="0">
						<xsd:element name="component" minOccurs="0" maxOccurs="unbounded">
							<xsd:annotation>
								<xsd:documentation>Name and version of the software component being used by the software.</xsd:documentation>
							</xsd:annotation>
							<xsd:complexType>
								<xsd:attribute name="name" type="xsd:string" use="required"/>
								<xsd:attribute name="version" type="xsd:string" use="optional"/>
							</xsd:complexType>
						</xsd:element>
					</xsd:sequence>
					<xsd:attribute name="name" type="xsd:string" use="required"/>
					<xsd:attribute name="version" type="xsd:string" use="optional"/>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="source" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation>The source of the request or response.  Repeatable to trace back all servers of the cascading request. For search requests, it starts with the original requestor, the client.  For all other requests and for responses, its the accessPoint of the host machine. Holds the IP of the source with the timestamp as an attribute in ISO format. The attribute-flag "original" can be used to indicate the first, original source in case the sequence is not reliable enough.</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:simpleContent>
						<xsd:extension base="xsd:string">
							<xsd:attribute name="sendtime" type="xsd:dateTime" use="required"/>
						</xsd:extension>
					</xsd:simpleContent>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="destination" type="xsd:string" minOccurs="0" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation>The destination of the request or response.  This will be the potentially multiple provider accesspoint(s) for requests and the single client for responses.  Holds the IP of the destination.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="compression" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Information about the used content compression method. This will allow to compress the "content" part of a response but leave the protocol envelope readable. software without decompression routines can still pass the data on and read its desitnation and source.</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:attribute name="name" use="required">
						<xsd:simpleType>
							<xsd:restriction base="xsd:string">
								<xsd:enumeration value="zip"/>
								<xsd:enumeration value="gzip"/>
								<xsd:enumeration value="bzip"/>
							</xsd:restriction>
						</xsd:simpleType>
					</xsd:attribute>
				</xsd:complexType>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="conceptType">
		<xsd:attribute name="path" type="pathQualifiedType" use="required"/>
	</xsd:complexType>
	<xsd:complexType name="attributeType">
		<xsd:complexContent>
			<xsd:extension base="conceptType">
				<xsd:attribute name="name" type="xsd:string" use="required"/>
				<xsd:attribute name="datatype" use="optional" default="string">
					<xsd:simpleType>
						<xsd:restriction base="xsd:string">
							<xsd:enumeration value="string"/>
							<xsd:enumeration value="boolean"/>
							<xsd:enumeration value="float"/>
							<xsd:enumeration value="double"/>
							<xsd:enumeration value="decimal"/>
							<xsd:enumeration value="dateTime"/>
							<xsd:enumeration value="duration"/>
							<xsd:enumeration value="hexBinary"/>
							<xsd:enumeration value="base64Binary"/>
							<xsd:enumeration value="anyURI"/>
							<xsd:enumeration value="ID"/>
							<xsd:enumeration value="IDREF"/>
							<xsd:enumeration value="ENTITY"/>
							<xsd:enumeration value="NOTATION"/>
							<xsd:enumeration value="normalizedString"/>
							<xsd:enumeration value="token"/>
							<xsd:enumeration value="language"/>
							<xsd:enumeration value="IDREFS"/>
							<xsd:enumeration value="ENTITIES"/>
							<xsd:enumeration value="NMTOKEN"/>
							<xsd:enumeration value="NMTOKENS"/>
							<xsd:enumeration value="Name"/>
							<xsd:enumeration value="QName"/>
							<xsd:enumeration value="NCName"/>
							<xsd:enumeration value="integer"/>
							<xsd:enumeration value="nonNegativeInteger"/>
							<xsd:enumeration value="positiveInteger"/>
							<xsd:enumeration value="nonPositiveInteger"/>
							<xsd:enumeration value="negativeInteger"/>
							<xsd:enumeration value="byte"/>
							<xsd:enumeration value="int"/>
							<xsd:enumeration value="long"/>
							<xsd:enumeration value="short"/>
							<xsd:enumeration value="unsignedByte"/>
							<xsd:enumeration value="unsignedInt"/>
							<xsd:enumeration value="unsignedLong"/>
							<xsd:enumeration value="unsignedShort"/>
							<xsd:enumeration value="date"/>
							<xsd:enumeration value="time"/>
							<xsd:enumeration value="gYearMonth"/>
							<xsd:enumeration value="gYear"/>
							<xsd:enumeration value="gMonthDay"/>
							<xsd:enumeration value="gDay"/>
							<xsd:enumeration value="gMonth"/>
						</xsd:restriction>
					</xsd:simpleType>
				</xsd:attribute>
				<xsd:attribute name="min" type="xsd:nonNegativeInteger" use="optional" default="0"/>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="elementType">
		<xsd:complexContent>
			<xsd:extension base="attributeType">
				<xsd:sequence>
					<xsd:element name="attributes" minOccurs="0">
						<xsd:complexType>
							<xsd:sequence>
								<xsd:element name="attribute" type="attributeType" maxOccurs="unbounded"/>
							</xsd:sequence>
						</xsd:complexType>
					</xsd:element>
					<xsd:element name="children" minOccurs="0">
						<xsd:complexType>
							<xsd:sequence>
								<xsd:element name="element" type="elementType" maxOccurs="unbounded"/>
							</xsd:sequence>
						</xsd:complexType>
					</xsd:element>
				</xsd:sequence>
				<xsd:attribute name="max" type="allNNI" use="required"/>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="responseStructureType">
		<xsd:sequence>
			<xsd:element name="recordDefinition" type="pathType" minOccurs="0" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation>Define a list of concepts to be treated as the base of a record. Use this concept if its repeatable or the closest repeatable parental element.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="structure">
				<xsd:annotation>
					<xsd:documentation>Define a custom structure for the returned content starting with a root element.</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:choice>
						<xsd:element name="element" type="elementType"/>
						<xsd:element name="externalStructureDefinition">
							<xsd:complexType>
								<xsd:attribute name="url" type="xsd:anyURI" use="required"/>
							</xsd:complexType>
						</xsd:element>
					</xsd:choice>
				</xsd:complexType>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	<!--=============================================-->
	<!-- OPERATOR TYPE DEFINITIONS-->
	<!--=============================================-->
	<xsd:complexType name="filterType">
		<xsd:choice>
			<xsd:element ref="COP"/>
			<xsd:element ref="LOP"/>
		</xsd:choice>
		<xsd:attribute name="ignoreUnknownConcepts" type="xsd:boolean" use="optional" default="false"/>
	</xsd:complexType>
	<!--COMPARATIVE OPERATORS-->
	<xsd:element name="COP" abstract="true">
		<xsd:annotation>
			<xsd:documentation>An abstract element provided as a base to group all comparitive operator elements.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="unaryCOP" abstract="true" substitutionGroup="COP"/>
	<xsd:element name="simpleCOP" abstract="true" substitutionGroup="COP"/>
	<xsd:element name="multiCOP" abstract="true" substitutionGroup="COP"/>
	<xsd:complexType name="unaryCOPType">
		<xsd:complexContent>
			<xsd:extension base="conceptType"/>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="simpleCOPType">
		<xsd:complexContent>
			<xsd:extension base="conceptType"/>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="multiCOPType">
		<xsd:complexContent>
			<xsd:extension base="conceptType"/>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:element name="equals" type="simpleCOPType" substitutionGroup="simpleCOP">
		<xsd:annotation>
			<xsd:documentation>The equals (=) comparator element.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="lessThan" type="simpleCOPType" substitutionGroup="simpleCOP">
		<xsd:annotation>
			<xsd:documentation>The less than (&lt;) comparator element.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="lessThanOrEquals" type="simpleCOPType" substitutionGroup="simpleCOP">
		<xsd:annotation>
			<xsd:documentation>The less than or equals (&lt;=) comparator element.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="greaterThan" type="simpleCOPType" substitutionGroup="simpleCOP">
		<xsd:annotation>
			<xsd:documentation>The greater than (>) comparator element.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="greaterThanOrEquals" type="simpleCOPType" substitutionGroup="simpleCOP">
		<xsd:annotation>
			<xsd:documentation>The greater than or equals (>=) comparator element.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="isNull" type="unaryCOPType" substitutionGroup="unaryCOP">
		<xsd:annotation>
			<xsd:documentation>compares if concept(xpath) is null. use equal element to compare for empty strings ''.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="like" type="simpleCOPType" substitutionGroup="simpleCOP">
		<xsd:annotation>
			<xsd:documentation>The like (LIKE) comparator element.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="in" type="multiCOPType" substitutionGroup="multiCOP">
		<xsd:annotation>
			<xsd:documentation>The in (IN) comparator element.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<!--LOGICAL OPERATORS-->
	<xsd:element name="LOP" abstract="true">
		<xsd:annotation>
			<xsd:documentation>A logical operator clause.  This is an abstract element to be substituted by concrete logical operator elements.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="unaryLOP" abstract="true" substitutionGroup="LOP"/>
	<xsd:element name="multiLOP" abstract="true" substitutionGroup="LOP"/>
	<xsd:complexType name="unaryLOPType">
		<xsd:choice>
			<xsd:element ref="COP"/>
			<xsd:element ref="LOP"/>
		</xsd:choice>
	</xsd:complexType>
	<xsd:complexType name="multiLOPType">
		<xsd:choice minOccurs="2" maxOccurs="unbounded">
			<xsd:element ref="COP"/>
			<xsd:element ref="LOP"/>
		</xsd:choice>
	</xsd:complexType>
	<xsd:element name="not" substitutionGroup="unaryLOP">
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="unaryLOPType"/>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="and" type="multiLOPType" substitutionGroup="multiLOP"/>
	<xsd:element name="or" type="multiLOPType" substitutionGroup="multiLOP">
		<xsd:annotation>
			<xsd:documentation>The or logical operator.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<!--=============================================-->
	<!--RESPONSE TYPE DEFINITIONS-->
	<!--=============================================-->
	<xsd:element name="response">
		<xsd:annotation>
			<xsd:documentation>Response message format.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="header" type="header"/>
				<xsd:element name="content">
					<xsd:annotation>
						<xsd:documentation>The content of the response as requested.  We use xsd:any as one choice because the content will be some XML that we do not know yet or that we will not know. Optionally (for all search and scan requests) the "recordCount" attribute should be set. It counts all records delivered in the XML document, while totalMatchedRecords refers to the records in the database that matched the request. If a DB record could not be converted to a valid XML "record", it might have been dropped completely and shows up in the attribute "recordDropped".</xsd:documentation>
					</xsd:annotation>
					<xsd:complexType>
						<xsd:choice>
							<xsd:element ref="ping"/>
							<xsd:element ref="capabilities"/>
							<xsd:element ref="metadata"/>
							<xsd:element ref="inventory"/>
							<xsd:any maxOccurs="unbounded"/>
						</xsd:choice>
						<xsd:attribute name="recordStart" type="xsd:integer" use="optional"/>
						<xsd:attribute name="recordCount" type="xsd:integer" use="optional"/>
						<xsd:attribute name="recordDropped" type="xsd:integer" use="optional"/>
						<xsd:attribute name="totalMatchedRecords" type="xsd:integer" use="optional"/>
					</xsd:complexType>
				</xsd:element>
				<xsd:element name="diagnostics" minOccurs="0">
					<xsd:annotation>
						<xsd:documentation>The diagnostics element can contain many diagnostic pieces of information.  Should the possible diagnostic codes/messages be defined more granularly in a seperate XML Schema?</xsd:documentation>
					</xsd:annotation>
					<xsd:complexType>
						<xsd:sequence>
							<xsd:element name="diagnostic" type="diagnostic" maxOccurs="unbounded"/>
						</xsd:sequence>
					</xsd:complexType>
				</xsd:element>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
	<xsd:complexType name="diagnostic">
		<xsd:simpleContent>
			<xsd:extension base="xsd:string">
				<xsd:attribute name="code" type="xsd:string"/>
				<xsd:attribute name="severity" default="info">
					<xsd:simpleType>
						<xsd:restriction base="xsd:string">
							<xsd:enumeration value="debug"/>
							<xsd:enumeration value="info"/>
							<xsd:enumeration value="warn"/>
							<xsd:enumeration value="error"/>
							<xsd:enumeration value="fatal"/>
						</xsd:restriction>
					</xsd:simpleType>
				</xsd:attribute>
			</xsd:extension>
		</xsd:simpleContent>
	</xsd:complexType>
	<xsd:element name="ping" type="pingResponseType"/>
	<xsd:complexType name="pingResponseType">
		<xsd:attribute name="status" type="xsd:string" use="optional" default="OK"/>
	</xsd:complexType>
	<xsd:element name="capabilities" type="capabilitiesResponseType">
		<xsd:annotation>
			<xsd:documentation>Information about supported featrures, methods and configurations parameters of a software (provider/resource/portal?)</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:complexType name="capabilitiesResponseType">
		<xsd:sequence>
			<xsd:element name="configurations">
				<xsd:annotation>
					<xsd:documentation>Information about the provider configuration for a resource.</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="minQueryTermLength" type="xsd:integer" minOccurs="0"/>
						<xsd:element name="maxSearchResponseRecords" type="xsd:integer" minOccurs="0"/>
						<xsd:element name="maxInventoryResponseRecords" type="xsd:integer" minOccurs="0"/>
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="protocols">
				<xsd:annotation>
					<xsd:documentation>Information about the supported protocols this service understands.</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="protocol">
							<xsd:complexType>
								<xsd:attribute name="schema" type="xsd:anyURI" use="required"/>
							</xsd:complexType>
						</xsd:element>
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="filter">
				<xsd:annotation>
					<xsd:documentation>Information about the supported filter operators of this service.</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="comparative">
							<xsd:complexType>
								<xsd:sequence>
									<xsd:element name="operator" type="operatorType" minOccurs="0" maxOccurs="unbounded"/>
								</xsd:sequence>
							</xsd:complexType>
						</xsd:element>
						<xsd:element name="logical">
							<xsd:complexType>
								<xsd:sequence>
									<xsd:element name="operator" type="operatorType" minOccurs="0" maxOccurs="unbounded"/>
								</xsd:sequence>
							</xsd:complexType>
						</xsd:element>
						<xsd:element name="function">
							<xsd:complexType>
								<xsd:sequence>
									<xsd:element name="operator" type="operatorType" minOccurs="0" maxOccurs="unbounded"/>
								</xsd:sequence>
							</xsd:complexType>
						</xsd:element>
						<xsd:element name="spatial">
							<xsd:complexType>
								<xsd:sequence>
									<xsd:element name="operator" type="operatorType" minOccurs="0" maxOccurs="unbounded"/>
								</xsd:sequence>
							</xsd:complexType>
						</xsd:element>
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="requestTypes">
				<xsd:annotation>
					<xsd:documentation>Information about the supported request types of this service.</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="ping" minOccurs="0">
							<xsd:complexType/>
						</xsd:element>
						<xsd:element name="capabilities" minOccurs="0">
							<xsd:complexType/>
						</xsd:element>
						<xsd:element name="metadata" minOccurs="0">
							<xsd:complexType/>
						</xsd:element>
						<xsd:element name="inventory" minOccurs="0">
							<xsd:complexType/>
						</xsd:element>
						<xsd:element name="fullSearch" minOccurs="0">
							<xsd:complexType/>
						</xsd:element>
						<xsd:element name="partialSearch" minOccurs="0">
							<xsd:complexType/>
						</xsd:element>
						<xsd:element name="customSearch" minOccurs="0">
							<xsd:complexType/>
						</xsd:element>
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="compression">
				<xsd:annotation>
					<xsd:documentation>Information about the supported content compression methods. This will allow to compress the "content" part of a response but leave the protocol envelope readable. software without decompression routines can still pass the data on and read its desitnation and source.</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="method" minOccurs="0" maxOccurs="unbounded">
							<xsd:complexType>
								<xsd:attribute name="name" use="required">
									<xsd:simpleType>
										<xsd:restriction base="xsd:string">
											<xsd:enumeration value="zip"/>
											<xsd:enumeration value="gzip"/>
											<xsd:enumeration value="bzip"/>
										</xsd:restriction>
									</xsd:simpleType>
								</xsd:attribute>
							</xsd:complexType>
						</xsd:element>
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="conceptualSchemas">
				<xsd:annotation>
					<xsd:documentation>information about the supported and mapped conceptual schemas.</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="schema" minOccurs="0" maxOccurs="unbounded">
							<xsd:annotation>
								<xsd:documentation>holds the namespace of a supported schema.</xsd:documentation>
							</xsd:annotation>
							<xsd:complexType>
								<xsd:sequence minOccurs="0">
									<xsd:element name="concept" maxOccurs="unbounded">
										<xsd:annotation>
											<xsd:documentation>Each mapped/configured concept of a schema of this resource is listed here as a single concept returning a boolean flag if it is searchable.</xsd:documentation>
										</xsd:annotation>
										<xsd:complexType>
											<xsd:attribute name="searchable" type="xsd:boolean" use="required"/>
											<xsd:attribute name="path" type="pathType" use="required"/>
										</xsd:complexType>
									</xsd:element>
								</xsd:sequence>
								<xsd:attribute name="namespace" type="xsd:anyURI" use="required"/>
							</xsd:complexType>
						</xsd:element>
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="security" type="xsd:anyType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>what security related capabilities does the provider have? encryption, access restriction, etc.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="operatorType">
		<xsd:attribute name="name" type="xsd:string" use="required"/>
		<xsd:attribute name="type" type="xsd:string" use="required"/>
	</xsd:complexType>
	<xsd:element name="metadata" type="metadataResponseType"/>
	<xsd:complexType name="metadataResponseType">
		<xsd:sequence>
			<xsd:element name="provider">
				<xsd:complexType mixed="true">
					<xsd:sequence minOccurs="0">
						<xsd:element name="name" type="xsd:string"/>
						<xsd:element name="code" type="xsd:string" minOccurs="0"/>
						<xsd:element name="contact">
							<xsd:complexType>
								<xsd:complexContent>
									<xsd:extension base="contactType">
										<xsd:attribute name="type" use="required">
											<xsd:simpleType>
												<xsd:restriction base="xsd:string">
													<xsd:enumeration value="technical"/>
													<xsd:enumeration value="administrative"/>
													<xsd:enumeration value="other"/>
												</xsd:restriction>
											</xsd:simpleType>
										</xsd:attribute>
									</xsd:extension>
								</xsd:complexContent>
							</xsd:complexType>
						</xsd:element>
						<xsd:element name="abstract" type="xsd:string"/>
						<xsd:element name="relatedInformation" type="xsd:anyURI" minOccurs="0" maxOccurs="unbounded"/>
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="resources" minOccurs="0">
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="resource" maxOccurs="unbounded">
							<xsd:complexType mixed="true">
								<xsd:sequence>
									<xsd:element name="accessPoint" type="xsd:anyURI"/>
									<xsd:element name="name" type="xsd:string"/>
									<xsd:element name="code" type="xsd:string" minOccurs="0">
										<xsd:annotation>
											<xsd:documentation>or acronym ?</xsd:documentation>
										</xsd:annotation>
									</xsd:element>
									<xsd:element name="citation" type="xsd:string" minOccurs="0"/>
									<xsd:element name="IPR" type="xsd:string" minOccurs="0">
										<xsd:annotation>
											<xsd:documentation>another more general name for all rights related things?</xsd:documentation>
										</xsd:annotation>
									</xsd:element>
									<xsd:element name="contact">
										<xsd:complexType>
											<xsd:complexContent>
												<xsd:extension base="contactType">
													<xsd:attribute name="type" use="required">
														<xsd:simpleType>
															<xsd:restriction base="xsd:string">
																<xsd:enumeration value="technical"/>
																<xsd:enumeration value="administrative"/>
																<xsd:enumeration value="other"/>
															</xsd:restriction>
														</xsd:simpleType>
													</xsd:attribute>
												</xsd:extension>
											</xsd:complexContent>
										</xsd:complexType>
									</xsd:element>
									<xsd:element name="abstract" type="xsd:string"/>
									<xsd:element name="keywords" type="xsd:string" minOccurs="0"/>
									<xsd:element name="dateLastUpdated" type="xsd:dateTime"/>
									<xsd:element name="relatedInformation" type="xsd:anyURI" minOccurs="0" maxOccurs="unbounded"/>
								</xsd:sequence>
							</xsd:complexType>
						</xsd:element>
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="contactType" mixed="true">
		<xsd:sequence>
			<xsd:element name="emailAddress" type="xsd:string" minOccurs="0"/>
			<xsd:element name="name" type="xsd:string"/>
			<xsd:element name="phone" type="xsd:string" minOccurs="0"/>
			<xsd:element name="title" type="xsd:string" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:element name="inventory" type="inventoryResponseType">
		<xsd:annotation>
			<xsd:documentation>The inventory result for an inventory response.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:complexType name="inventoryResponseType">
		<xsd:sequence>
			<xsd:element name="concepts">
				<xsd:annotation>
					<xsd:documentation>Envelope to list all concepts that have been used for the inventory response. Uses xml ID to reference them from the value element within a record.</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="concept" maxOccurs="unbounded">
							<xsd:annotation>
								<xsd:documentation>header row giving the concept for each value of the sequence within record below.</xsd:documentation>
							</xsd:annotation>
							<xsd:complexType>
								<xsd:simpleContent>
									<xsd:extension base="pathQualifiedType">
										<xsd:attribute name="id" type="xsd:ID" use="optional"/>
									</xsd:extension>
								</xsd:simpleContent>
							</xsd:complexType>
						</xsd:element>
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="record" minOccurs="0" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation>A distinct combination of values for all "inventoried" concepts. The optional attribute "count" is used to count the number of occurences for this distinct combination and will only be  set if the count flag was used when requesting an inventory.</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="value" maxOccurs="unbounded">
							<xsd:annotation>
								<xsd:documentation>A single value for a single concept. The sequence of the values should correspond to the one given in the concept header row above. In case this cannot be guaranteed, the xml IDREF mechanism can be used to refer to a specific concept.</xsd:documentation>
							</xsd:annotation>
							<xsd:complexType>
								<xsd:simpleContent>
									<xsd:extension base="xsd:string">
										<xsd:attribute name="concept" type="xsd:IDREF" use="optional"/>
									</xsd:extension>
								</xsd:simpleContent>
							</xsd:complexType>
						</xsd:element>
					</xsd:sequence>
					<xsd:attribute name="count" type="xsd:positiveInteger" use="optional"/>
				</xsd:complexType>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>
</xsd:schema>
