<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSPY v2004 rel. 4 U (http://www.xmlspy.com) by Ian Harrison (private) -->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<xsd:include schemaLocation="C:\tmp\pattern.xsd"/>
	<xsd:element name="hypothesis">
		<xsd:annotation>
			<xsd:documentation>A hypothesis element can have 4 attributes. id is a unique id within the document, but is not a uuid for now. If we use this it'll be for convenience to store an object id from a particular application, but this will have no meaning to other applications. The uri is a pointer to the hypothesis, if it network accessible.The label attribute is just a pretty string given to the hypothesis, e.g. by a user. The class attribute will be used to record the class that this hypothesis is an instance of (if there is a hypothesis class hierarchy). For now the class attribute is just a string.
	   </xsd:documentation>
			<xsd:documentation>A hypothesis must contain 1 (and only 1) pattern element, and can also contain 0 or more belief elements.
	   </xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref="matchProperties" minOccurs="0"/>
				<xsd:element ref="pattern"/>
				<xsd:element ref="belief" minOccurs="0" maxOccurs="unbounded"/>
			</xsd:sequence>
			<xsd:attribute name="uri" type="xsd:anyURI"/>
			<xsd:attribute name="id" type="xsd:string" use="required"/>
			<xsd:attribute name="label" type="xsd:string"/>
			<xsd:attribute name="class" type="xsd:string"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="method" type="xsd:string">
		<xsd:annotation>
			<xsd:documentation>The method element is a string description of the method used to calculate the belief.
	   </xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="result" type="xsd:string">
		<xsd:annotation>
			<xsd:documentation>The result element is a string description of the actual belief value, using the associated belief calculation method.
	   </xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="belief">
		<xsd:annotation>
			<xsd:documentation>The belief element is designed to hold information about belief in an object. A belief element can contain 1 and only 1 method/result pair.
	   </xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:all>
				<xsd:element ref="method"/>
				<xsd:element ref="result"/>
			</xsd:all>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="exhibit">
		<xsd:annotation>
			<xsd:documentation>The exhibit element describes a piece of evidence used to support the hypothesis. It is most likely used as a child element of the value element of a node.
	   </xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref="assertion"/>
				<xsd:element ref="source"/>
				<xsd:element ref="belief" minOccurs="0"/>
			</xsd:sequence>
			<xsd:attribute name="id" type="xsd:string" use="required"/>
			<xsd:attribute name="uri" type="xsd:anyURI"/>
			<xsd:attribute name="timestamp" type="xsd:dateTime"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="assertion">
		<xsd:annotation>
			<xsd:documentation>The assertion element describes a fact where the negation element says whether it is a (not (relation arg1 arg2 ...argn)) style assertion. The second child element is the name of the relation and the rest of the child elements are the relation arguments in order.
	   </xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref="negation" minOccurs="0"/>
				<xsd:element ref="relationName"/>
				<xsd:element ref="relationArgument" maxOccurs="unbounded"/>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="negation" type="xsd:boolean">
		<xsd:annotation>
			<xsd:documentation>Whether the assertion is negated.
	   </xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="relationName" type="xsd:string">
		<xsd:annotation>
			<xsd:documentation>The name of the relation.
	   </xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="relationArgument" type="xsd:string">
		<xsd:annotation>
			<xsd:documentation>The relation argument.
	   </xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="source">
		<xsd:annotation>
			<xsd:documentation>The source element describes the source of a piece of evidence.
	   </xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:attribute name="id" type="xsd:string" use="required"/>
			<xsd:attribute name="uri" type="xsd:anyURI"/>
			<xsd:attribute name="reliability" type="xsd:string"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="hypothesisBag">
		<xsd:annotation>
			<xsd:documentation>HypothesisBag is the root of the schema and can conatin 0 or more hypothesis -- i.e. it's a bag for holding all hypothesis.
	   </xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref="hypothesis" minOccurs="0" maxOccurs="unbounded"/>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="listOfIntegers" type="listOfIntegersType">
		<xsd:annotation>
			<xsd:documentation>list of integers separated by whitespace. </xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:simpleType name="listOfIntegersType">
		<xsd:list itemType="xsd:integer"/>
	</xsd:simpleType>
	<xsd:element name="listOfStrings" type="listOfStringsType">
		<xsd:annotation>
			<xsd:documentation>list of delimited strings, separated by whitespace. </xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:simpleType name="listOfStringsType">
		<xsd:list itemType="xsd:string"/>
	</xsd:simpleType>
	<xsd:element name="matchProperties">
		<xsd:annotation>
			<xsd:documentation>Properties of a match</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:attribute name="tool" type="xsd:string"/>
			<xsd:attribute name="datasource" type="xsd:string" use="required"/>
			<xsd:attribute name="timestamp" type="xsd:dateTime" use="required"/>
		</xsd:complexType>
	</xsd:element>
</xsd:schema>
