<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2005 U (http://www.xmlspy.com) by Paul Groth (IAM-ECS) -->
<xs:schema xmlns:ps="http://www.pasoa.org/schemas/version02/PStruct.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.pasoa.org/schemas/version02/PStruct.xsd" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:annotation>
		<xs:documentation>
            The P-Structure
            Author: Paul Groth
            Last Modified: 15 June 2003
        </xs:documentation>
	</xs:annotation>
	<xs:element name="pstruct" type="ps:PStructure">
		<xs:annotation>
			<xs:documentation>
                 (Root Element Start Here) An instance of the p-structure. Each instance of the p-structure contains a set of message exchangess.
             </xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:complexType name="PStructure">
		<xs:sequence>
			<xs:element name="messageExchangeRecord" type="ps:MessageExchangeRecord" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>
                          A message exchange  record describes the client and service view of a particular message exchange  including the state of each actor with in the context of the exchange.
                     </xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="MessageExchangeRecord">
		<xs:sequence>
			<xs:element name="serviceId" type="ps:Identity">
				<xs:annotation>
					<xs:documentation>
                         Identifies a service in an message exchange . A serviceId is of type of Identity. The contents of Identity implementation specific.
                     </xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="messageSink" type="ps:MessageSink">
				<xs:annotation>
					<xs:documentation>
                       The sink of the message within the service.
                   </xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="clientId" type="ps:Identity">
				<xs:annotation>
					<xs:documentation>
                       Identifies the client in an message exchange .
                   </xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="messageSource" type="ps:MessageSource">
				<xs:annotation>
					<xs:documentation>
                        The source of the message within the client.
                    </xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="messageExchangeId" type="xs:anyURI">
				<xs:annotation>
					<xs:documentation>
                        A URI that uniquely identifies this message exchange .
                    </xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="client" type="ps:View" minOccurs="0">
				<xs:annotation>
					<xs:documentation>
                       The client's view of the message exchange .
                    </xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="service" type="ps:View" minOccurs="0">
				<xs:annotation>
					<xs:documentation>
                       The service's view of the message exchange .
                   </xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="Identity">
		<xs:sequence>
			<xs:any namespace="##any" processContents="lax" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="View">
		<xs:sequence>
			<xs:element name="messageExchangePAssertion" type="ps:MessageExchangePAssertion" minOccurs="0">
				<xs:annotation>
					<xs:documentation>
                        Assertion about the MessageExchange 
                    </xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="actorStatePAssertion" type="ps:ActorStatePAssertion" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>
                        Information supplied by an actor about its state in the context of this MessageExchange . Examples include the script that was used in running a service or the time when an invocation was sent/received.
                    </xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="relationship" type="ps:Relationship" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>
                        Describes a relationship between a p-assertion or another p-assertion. This can be seen as a triple: subject identifier, relation, object identifier.
                    </xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="Link">
		<xs:sequence>
			<xs:element name="provenanceStoreRef" type="ps:Identity">
				<xs:annotation>
					<xs:documentation>
                        The actual link to the PS.
                    </xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="Relationship">
		<xs:sequence>
			<xs:element name="subjectId">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="localPAssertionId" type="ps:LocalPAssertionId"/>
						<xs:element name="dataId" type="xs:anyType" minOccurs="0"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="relation" type="xs:anyURI">
				<xs:annotation>
					<xs:documentation>
                        A URL pointing to the relation. A relation could denote that an interaction is a response or request to this interaction.
                    </xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="objectId" type="ps:GlobalPAssertionId"/>
			<xs:element name="link" type="ps:Link" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="GlobalPAssertionId">
		<xs:sequence>
			<xs:element name="messageExchangeId" type="xs:anyURI"/>
			<xs:element name="clientId" type="ps:Identity"/>
			<xs:element name="serviceId" type="ps:Identity"/>
			<xs:element name="messageSource" type="ps:MessageSource"/>
			<xs:element name="messageSink" type="ps:MessageSink"/>
			<xs:element name="viewName">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="client"/>
						<xs:enumeration value="service"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="LocalPAssertionId" type="ps:LocalPAssertionId"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="PStructureDataId">
		<xs:complexContent>
			<xs:extension base="ps:GlobalPAssertionId">
				<xs:sequence>
					<xs:any namespace="##any" processContents="lax"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="MessageExchangePAssertion">
		<xs:sequence>
			<xs:element name="localPAssertionId" type="ps:LocalPAssertionId"/>
			<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="ActorStatePAssertion">
		<xs:sequence>
			<xs:element name="localPAssertionId" type="ps:LocalPAssertionId"/>
			<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:simpleType name="LocalPAssertionId">
		<xs:union memberTypes="xs:long xs:string xs:anyURI"/>
	</xs:simpleType>
	<xs:complexType name="MessageSink">
		<xs:sequence>
			<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="MessageSource">
		<xs:sequence>
			<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
</xs:schema>

