<?xml version="1.0" encoding="utf-8" ?>
<xs:schema
    targetNamespace="http://tempuri.org/XMLSchema.xsd"
    elementFormDefault="qualified"
    xmlns="http://tempuri.org/XMLSchema.xsd"
    xmlns:mstns="http://tempuri.org/XMLSchema.xsd"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    version="1.0 Technical Preview"
	xml:lang="en">

	<!--PPHML (Paraphrase Markup Language)-->
	<xs:annotation>
		<xs:documentation source="http://www.pphml.org/schema/doc/pphml-v1-0-tp.html" />
	</xs:annotation>

	<!--Paraphrase-->
	<xs:element name="paraphrase">
		<xs:annotation>
			<xs:documentation source="http://www.pphml.org/schema/doc/pphml-v1-0-tp.html#paraphrase" />
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:group ref="mstns:pphClauseSet" minOccurs="0" />
				<xs:group ref="mstns:pphSituation" maxOccurs="unbounded" />
			</xs:sequence>
		</xs:complexType>
	</xs:element>

	<!--Situation-->
	<xs:group name="pphSituation">
		<xs:sequence>
			<xs:element name="situation">
				<xs:annotation>
					<xs:documentation source="http://www.pphml.org/schema/doc/pphml-v1-0-tp.html#situation" />
				</xs:annotation>
				<xs:complexType>
					<xs:sequence>
						<xs:group ref="mstns:pphClauseSet" minOccurs="0" />
						<xs:choice>
							<xs:sequence>
								<xs:group ref="mstns:pphStatement" maxOccurs="unbounded" />
								<xs:group ref="mstns:pphProbability" minOccurs="0" maxOccurs="unbounded" />
								<xs:group ref="mstns:pphBoost" minOccurs="0" maxOccurs="unbounded" />
							</xs:sequence>
							<xs:sequence>
								<xs:group ref="mstns:pphProbability" maxOccurs="unbounded" />
								<xs:group ref="mstns:pphBoost" minOccurs="0" maxOccurs="unbounded" />
							</xs:sequence>
							<xs:group ref="mstns:pphBoost" maxOccurs="unbounded" />
						</xs:choice>
					</xs:sequence>
					<xs:attribute name="timestamp" type="xs:dateTime" />
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:group>

	<!--Statement-->
	<xs:group name="pphStatement">
		<xs:sequence>
			<xs:element name="statement">
				<xs:annotation>
					<xs:documentation source="http://www.pphml.org/schema/doc/pphml-v1-0-tp.html#statement" />
				</xs:annotation>
				<xs:complexType>
					<xs:choice>
						<xs:sequence>
							<xs:group ref="mstns:pphClauseSet" />
							<xs:group ref="mstns:pphContextSet" minOccurs="0" />
							<xs:group ref="mstns:pphData" minOccurs="0" maxOccurs="unbounded" />
						</xs:sequence>
						<xs:sequence>
							<xs:group ref="mstns:pphContextSet" />
							<xs:group ref="mstns:pphData" minOccurs="0" maxOccurs="unbounded" />
						</xs:sequence>
					</xs:choice>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:group>

	<!--Probability-->
	<xs:group name="pphProbability">
		<xs:sequence>
			<xs:element name="probability">
				<xs:annotation>
					<xs:documentation source="http://www.pphml.org/schema/doc/pphml-v1-0-tp.html#probability" />
				</xs:annotation>
				<xs:complexType>
					<xs:sequence>
						<xs:element name="chance" minOccurs="2" maxOccurs="unbounded">
							<xs:complexType>
								<xs:choice>
									<xs:sequence>
										<xs:group ref="mstns:pphClauseSet" />
										<xs:group ref="mstns:pphContextSet" minOccurs="0" />
										<xs:group ref="mstns:pphData" minOccurs="0" maxOccurs="unbounded" />
									</xs:sequence>
									<xs:sequence>
										<xs:group ref="mstns:pphContextSet" />
										<xs:group ref="mstns:pphData" minOccurs="0" maxOccurs="unbounded" />
									</xs:sequence>
								</xs:choice>
								<xs:attribute name="odds" type="xs:decimal" />
							</xs:complexType>
						</xs:element>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:group>

	<!--Boost-->
	<xs:group name="pphBoost">
		<xs:sequence>
			<xs:element name="boost">
				<xs:annotation>
					<xs:documentation source="http://www.pphml.org/schema/doc/pphml-v1-0-tp.html#boost" />
				</xs:annotation>
				<xs:complexType>
					<xs:sequence>
						<xs:group ref="mstns:pphClauseSet" />
						<xs:group ref="mstns:pphData" minOccurs="0" maxOccurs="unbounded" />
					</xs:sequence>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:group>

	<!--Clauses-->
	<xs:group name="pphClauseSet">
		<xs:annotation>
			<xs:documentation source="http://www.pphml.org/schema/doc/pphml-v1-0-tp.html#clauses" />
		</xs:annotation>
		<xs:choice>
			<xs:sequence>
				<xs:group ref="mstns:pphClauseSUBJECT" />
				<xs:group ref="mstns:pphClausePREDICATE" minOccurs="0" />
				<xs:group ref="mstns:pphClauseWHAT" minOccurs="0" />
				<xs:group ref="mstns:pphClauseWHERE" minOccurs="0" />
				<xs:group ref="mstns:pphClauseHOW" minOccurs="0" />
			</xs:sequence>
			<xs:sequence>
				<xs:group ref="mstns:pphClausePREDICATE" />
				<xs:group ref="mstns:pphClauseWHAT" minOccurs="0" />
				<xs:group ref="mstns:pphClauseWHERE" minOccurs="0" />
				<xs:group ref="mstns:pphClauseHOW" minOccurs="0" />
			</xs:sequence>
			<xs:sequence>
				<xs:group ref="mstns:pphClauseWHAT" />
				<xs:group ref="mstns:pphClauseWHERE" minOccurs="0" />
				<xs:group ref="mstns:pphClauseHOW" minOccurs="0" />
			</xs:sequence>
			<xs:sequence>
				<xs:group ref="mstns:pphClauseWHERE" />
				<xs:group ref="mstns:pphClauseHOW" minOccurs="0" />
			</xs:sequence>
			<xs:group ref="mstns:pphClauseHOW" />
		</xs:choice>
	</xs:group>

	<xs:group name="pphClauseSUBJECT">
		<xs:sequence>
			<xs:element name="subject">
				<xs:annotation>
					<xs:documentation source="http://www.pphml.org/schema/doc/pphml-v1-0-tp.html#subject" />
				</xs:annotation>
				<xs:complexType>
					<xs:sequence>
						<xs:group ref="mstns:pphEMAIL" minOccurs="0" />
						<xs:group ref="mstns:pphNAME" minOccurs="0" />
						<xs:group ref="mstns:pphSOURCE" minOccurs="0" maxOccurs="unbounded" />
					</xs:sequence>
					<xs:attributeGroup ref="mstns:pphReferenceSUBJECT" />
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:group>

	<xs:group name="pphClausePREDICATE">
		<xs:sequence>
			<xs:element name="predicate">
				<xs:annotation>
					<xs:documentation source="http://www.pphml.org/schema/doc/pphml-v1-0-tp.html#predicate" />
				</xs:annotation>
				<xs:complexType>
					<xs:sequence>
						<xs:group ref="mstns:pphNAME" minOccurs="0" />
						<xs:group ref="mstns:pphSOURCE" minOccurs="0" maxOccurs="unbounded" />
					</xs:sequence>
					<xs:attributeGroup ref="pphReferencePREDICATE" />
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:group>

	<xs:group name="pphClauseWHAT">
		<xs:sequence>
			<xs:element name="what">
				<xs:annotation>
					<xs:documentation source="http://www.pphml.org/schema/doc/pphml-v1-0-tp.html#what" />
				</xs:annotation>
				<xs:complexType>
					<xs:sequence>
						<xs:group ref="mstns:pphNAME" minOccurs="0" />
						<xs:group ref="mstns:pphSOURCE" minOccurs="0" maxOccurs="unbounded" />
					</xs:sequence>
					<xs:attributeGroup ref="pphReferenceWHAT" />
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:group>

	<xs:group name="pphClauseWHERE">
		<xs:sequence>
			<xs:element name="where">
				<xs:annotation>
					<xs:documentation source="http://www.pphml.org/schema/doc/pphml-v1-0-tp.html#where" />
				</xs:annotation>
				<xs:complexType>
					<xs:sequence>
						<xs:group ref="mstns:pphEMAIL" minOccurs="0" />
						<xs:group ref="mstns:pphNAME" minOccurs="0" />
						<xs:group ref="mstns:pphSOURCE" minOccurs="0" maxOccurs="unbounded" />
					</xs:sequence>
					<xs:attributeGroup ref="pphReferenceWHERE" />
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:group>

	<xs:group name="pphClauseHOW">
		<xs:sequence>
			<xs:element name="how">
				<xs:annotation>
					<xs:documentation source="http://www.pphml.org/schema/doc/pphml-v1-0-tp.html#how" />
				</xs:annotation>
				<xs:complexType>
					<xs:sequence>
						<xs:group ref="mstns:pphNAME" minOccurs="0" />
						<xs:group ref="mstns:pphSOURCE" minOccurs="0" maxOccurs="unbounded" />
					</xs:sequence>
					<xs:attributeGroup ref="pphReferenceHOW" />
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:group>

	<!--Contexts-->
	<xs:group name="pphContextSet">
		<xs:choice>
			<xs:sequence>
				<xs:group ref="mstns:pphContextEARLIER" />
				<xs:group ref="mstns:pphContextBEFORE" minOccurs="0" />
				<xs:group ref="mstns:pphContextAFTER" minOccurs="0" />
				<xs:group ref="mstns:pphContextLATER" minOccurs="0" />
			</xs:sequence>
			<xs:sequence>
				<xs:group ref="mstns:pphContextBEFORE" />
				<xs:group ref="mstns:pphContextAFTER" minOccurs="0" />
				<xs:group ref="mstns:pphContextLATER" minOccurs="0" />
			</xs:sequence>
			<xs:sequence>
				<xs:group ref="mstns:pphContextAFTER" />
				<xs:group ref="mstns:pphContextLATER" minOccurs="0" />
			</xs:sequence>
			<xs:group ref="mstns:pphContextLATER" />
		</xs:choice>
	</xs:group>

	<xs:group name="pphContextEARLIER">
		<xs:sequence>
			<xs:element name="earlier">
				<xs:annotation>
					<xs:documentation source="http://www.pphml.org/schema/doc/pphml-v1-0-tp.html#earlier" />
				</xs:annotation>
				<xs:complexType>
					<xs:group ref="mstns:pphClauseSet" />
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:group>

	<xs:group name="pphContextBEFORE">
		<xs:sequence>
			<xs:element name="before">
				<xs:annotation>
					<xs:documentation source="http://www.pphml.org/schema/doc/pphml-v1-0-tp.html#before" />
				</xs:annotation>
				<xs:complexType>
					<xs:group ref="mstns:pphClauseSet" />
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:group>

	<xs:group name="pphContextAFTER">
		<xs:sequence>
			<xs:element name="after">
				<xs:annotation>
					<xs:documentation source="http://www.pphml.org/schema/doc/pphml-v1-0-tp.html#after" />
				</xs:annotation>
				<xs:complexType>
					<xs:group ref="mstns:pphClauseSet" />
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:group>

	<xs:group name="pphContextLATER">
		<xs:sequence>
			<xs:element name="later">
				<xs:annotation>
					<xs:documentation source="http://www.pphml.org/schema/doc/pphml-v1-0-tp.html#later" />
				</xs:annotation>
				<xs:complexType>
					<xs:group ref="mstns:pphClauseSet" />
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:group>

	<!--Data-->
	<xs:group name="pphData">
		<xs:sequence>
			<xs:element name="data">
				<xs:annotation>
					<xs:documentation source="http://www.pphml.org/schema/doc/pphml-v1-0-tp.html#data" />
				</xs:annotation>
				<xs:complexType mixed="true">
					<xs:sequence>
						<xs:any namespace="##any" processContents="skip" minOccurs="0" maxOccurs="unbounded" />
					</xs:sequence>
					<xs:attributeGroup ref="pphReferenceDATA" />
          <xs:attribute name="guid" type="pphGUID" />
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:group>

	<!--E-mail-->
	<xs:group name="pphEMAIL">
		<xs:sequence>
			<xs:element name="e-mail" type="xs:string">
				<xs:annotation>
					<xs:documentation source="http://www.pphml.org/schema/doc/pphml-v1-0-tp.html#e-mail" />
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:group>

	<!--Name-->
	<xs:group name="pphNAME">
		<xs:sequence>
			<xs:element name="name" type="xs:string">
				<xs:annotation>
					<xs:documentation source="http://www.pphml.org/schema/doc/pphml-v1-0-tp.html#name" />
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:group>

  <!--GUID-->
  <xs:simpleType name="pphGUID">
    <xs:restriction base="xs:string">
      <xs:pattern value="[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}" />
    </xs:restriction>
  </xs:simpleType>

  <!--Source-->
	<xs:group name="pphSOURCE">
		<xs:sequence>
			<xs:element name="source">
				<xs:annotation>
					<xs:documentation source="http://www.pphml.org/schema/doc/pphml-v1-0-tp.html#source" />
				</xs:annotation>
				<xs:complexType>
					<xs:sequence>
						<xs:element name="attribute" minOccurs="0" maxOccurs="unbounded">
							<xs:complexType mixed="true">
								<xs:sequence>
									<xs:any namespace="##any" processContents="skip" minOccurs="0" maxOccurs="unbounded" />
								</xs:sequence>
								<xs:attributeGroup ref="mstns:pphATTRIBUTE" />
							</xs:complexType>
						</xs:element>
					</xs:sequence>
					<xs:attributeGroup ref="mstns:pphReferenceSOURCE" />
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:group>

	<!--SUBJECT references (entities)-->
	<xs:attributeGroup name="pphReferenceSUBJECT">
		<xs:attribute name="ref" use="required">
			<xs:annotation>
				<xs:documentation source="http://www.pphml.org/schema/doc/pphml-v1-0-tp.html#entities" />
			</xs:annotation>
			<xs:simpleType>
				<xs:union>
					<xs:simpleType>
						<xs:restriction base="xs:anyURI">
							<xs:enumeration value="pphml://entity/unknown" />
						</xs:restriction>
					</xs:simpleType>
					<xs:simpleType>
						<xs:restriction base="xs:anyURI">
							<xs:enumeration value="pphml://entity/person" />
							<xs:enumeration value="pphml://entity/person/female" />
							<xs:enumeration value="pphml://entity/person/male" />
							<xs:enumeration value="pphml://entity/person/[\p{L}|\p{N}|\p{Pd}]+" />
						</xs:restriction>
					</xs:simpleType>
					<xs:simpleType>
						<xs:restriction base="xs:anyURI">
							<xs:enumeration value="pphml://entity/entertainment" />
							<xs:enumeration value="pphml://entity/entertainment/pub" />
							<xs:enumeration value="pphml://entity/entertainment/restaurant" />
							<xs:enumeration value="pphml://entity/entertainment/[\p{L}|\p{N}|\p{Pd}]+" />
						</xs:restriction>
					</xs:simpleType>
					<xs:simpleType>
						<xs:restriction base="xs:anyURI">
							<xs:enumeration value="pphml://entity/animal" />
							<xs:enumeration value="pphml://entity/animal/pet" />
							<xs:enumeration value="pphml://entity/animal/[\p{L}|\p{N}|\p{Pd}]+" />
						</xs:restriction>
					</xs:simpleType>
					<xs:simpleType>
						<xs:restriction base="xs:anyURI">
							<xs:pattern value="pphml://entity/[\p{L}|\p{N}|\p{Pd}]+" />
							<xs:pattern value="pphml://entity/[\p{L}|\p{N}|\p{Pd}]+/[\p{L}|\p{N}|\p{Pd}]+" />
						</xs:restriction>
					</xs:simpleType>
				</xs:union>
			</xs:simpleType>
		</xs:attribute>
	</xs:attributeGroup>

	<!--PREDICATE references (actions)-->
	<xs:attributeGroup name="pphReferencePREDICATE">
		<xs:attribute name="ref" use="required">
			<xs:annotation>
				<xs:documentation source="http://www.pphml.org/schema/doc/pphml-v1-0-tp.html#actions" />
			</xs:annotation>
			<xs:simpleType>
				<xs:union>
					<xs:simpleType>
						<xs:restriction base="xs:anyURI">
							<xs:enumeration value="pphml://action/unknown" />
						</xs:restriction>
					</xs:simpleType>
					<xs:simpleType>
						<xs:restriction base="xs:anyURI">
							<xs:enumeration value="pphml://action/generic" />
							<xs:enumeration value="pphml://action/generic/accept" />
							<xs:enumeration value="pphml://action/generic/allow" />
							<xs:enumeration value="pphml://action/generic/arrive" />
							<xs:enumeration value="pphml://action/generic/avoid" />
							<xs:enumeration value="pphml://action/generic/begin" />
							<xs:enumeration value="pphml://action/generic/buy" />
							<xs:enumeration value="pphml://action/generic/call" />
							<xs:enumeration value="pphml://action/generic/cancel" />
							<xs:enumeration value="pphml://action/generic/dance" />
							<xs:enumeration value="pphml://action/generic/drink" />
							<xs:enumeration value="pphml://action/generic/eat" />
							<xs:enumeration value="pphml://action/generic/enter" />
							<xs:enumeration value="pphml://action/generic/finish" />
							<xs:enumeration value="pphml://action/generic/fly" />
							<xs:enumeration value="pphml://action/generic/give" />
							<xs:enumeration value="pphml://action/generic/go" />
							<xs:enumeration value="pphml://action/generic/leave" />
							<xs:enumeration value="pphml://action/generic/listen" />
							<xs:enumeration value="pphml://action/generic/live" />
							<xs:enumeration value="pphml://action/generic/need" />
							<xs:enumeration value="pphml://action/generic/is" />
							<xs:enumeration value="pphml://action/generic/pass" />
							<xs:enumeration value="pphml://action/generic/pay" />
							<xs:enumeration value="pphml://action/generic/play" />
							<xs:enumeration value="pphml://action/generic/read" />
							<xs:enumeration value="pphml://action/generic/receive" />
							<xs:enumeration value="pphml://action/generic/run" />
							<xs:enumeration value="pphml://action/generic/sell" />
							<xs:enumeration value="pphml://action/generic/set" />
							<xs:enumeration value="pphml://action/generic/sit" />
							<xs:enumeration value="pphml://action/generic/shopping" />
							<xs:enumeration value="pphml://action/generic/sleep" />
							<xs:enumeration value="pphml://action/generic/stand" />
							<xs:enumeration value="pphml://action/generic/start" />
							<xs:enumeration value="pphml://action/generic/stop" />
							<xs:enumeration value="pphml://action/generic/study" />
							<xs:enumeration value="pphml://action/generic/succeed" />
							<xs:enumeration value="pphml://action/generic/swim" />
							<xs:enumeration value="pphml://action/generic/take" />
							<xs:enumeration value="pphml://action/generic/talk" />
							<xs:enumeration value="pphml://action/generic/tank-up" />
							<xs:enumeration value="pphml://action/generic/travel" />
							<xs:enumeration value="pphml://action/generic/try" />
							<xs:enumeration value="pphml://action/generic/wait" />
							<xs:enumeration value="pphml://action/generic/wake-up" />
							<xs:enumeration value="pphml://action/generic/work" />
							<xs:enumeration value="pphml://action/generic/write" />
							<xs:enumeration value="pphml://action/generic/[\p{L}|\p{N}|\p{Pd}]+" />
						</xs:restriction>
					</xs:simpleType>
					<xs:simpleType>
						<xs:restriction base="xs:anyURI">
							<xs:enumeration value="pphml://action/moving" />
							<xs:enumeration value="pphml://action/moving/drive" />
							<xs:enumeration value="pphml://action/moving/[\p{L}|\p{N}|\p{Pd}]+" />
						</xs:restriction>
					</xs:simpleType>
					<xs:simpleType>
						<xs:restriction base="xs:anyURI">
							<xs:pattern value="pphml://action/[\p{L}|\p{N}|\p{Pd}]+" />
							<xs:pattern value="pphml://action/[\p{L}|\p{N}|\p{Pd}]+/[\p{L}|\p{N}|\p{Pd}]+" />
						</xs:restriction>
					</xs:simpleType>
				</xs:union>
			</xs:simpleType>
		</xs:attribute>
	</xs:attributeGroup>

	<!--WHAT references (objects)-->
	<xs:attributeGroup name="pphReferenceWHAT">
		<xs:attribute name="ref" use="required">
			<xs:annotation>
				<xs:documentation source="http://www.pphml.org/schema/doc/pphml-v1-0-tp.html#objects" />
			</xs:annotation>
			<xs:simpleType>
				<xs:union>
					<xs:simpleType>
						<xs:restriction base="xs:anyURI">
							<xs:enumeration value="pphml://object/unknown" />
						</xs:restriction>
					</xs:simpleType>
					<xs:simpleType>
						<xs:restriction base="xs:anyURI">
							<xs:enumeration value="pphml://object/list" />
							<xs:enumeration value="pphml://object/list/shopping" />
							<xs:enumeration value="pphml://object/list/to-do" />
							<xs:enumeration value="pphml://object/list/[\p{L}|\p{N}|\p{Pd}]+" />
						</xs:restriction>
					</xs:simpleType>
					<xs:simpleType>
						<xs:restriction base="xs:anyURI">
							<xs:enumeration value="pphml://object/vehicle" />
							<xs:enumeration value="pphml://object/vehicle/car" />
							<xs:enumeration value="pphml://object/vehicle/[\p{L}|\p{N}|\p{Pd}]+" />
						</xs:restriction>
					</xs:simpleType>
					<xs:simpleType>
						<xs:restriction base="xs:anyURI">
							<xs:pattern value="pphml://object/[\p{L}|\p{N}|\p{Pd}]+" />
							<xs:pattern value="pphml://object/[\p{L}|\p{N}|\p{Pd}]+/[\p{L}|\p{N}|\p{Pd}]+" />
						</xs:restriction>
					</xs:simpleType>
				</xs:union>
			</xs:simpleType>
		</xs:attribute>
	</xs:attributeGroup>

	<!--WHERE references (places)-->
	<xs:attributeGroup name="pphReferenceWHERE">
		<xs:attribute name="ref" use="required">
			<xs:annotation>
				<xs:documentation source="http://www.pphml.org/schema/doc/pphml-v1-0-tp.html#places" />
			</xs:annotation>
			<xs:simpleType>
				<xs:union>
					<xs:simpleType>
						<xs:restriction base="xs:anyURI">
							<xs:enumeration value="pphml://place/unknown" />
						</xs:restriction>
					</xs:simpleType>
					<xs:simpleType>
						<xs:restriction base="xs:anyURI">
							<xs:enumeration value="pphml://place/regular" />
							<xs:enumeration value="pphml://place/regular/home" />
							<xs:enumeration value="pphml://place/regular/school" />
							<xs:enumeration value="pphml://place/regular/shop" />
							<xs:enumeration value="pphml://place/regular/[\p{L}|\p{N}|\p{Pd}]+" />
						</xs:restriction>
					</xs:simpleType>
					<xs:simpleType>
						<xs:restriction base="xs:anyURI">
							<xs:enumeration value="pphml://place/entertainment" />
							<xs:enumeration value="pphml://place/entertainment/pub" />
							<xs:enumeration value="pphml://place/entertainment/restaurant" />
							<xs:enumeration value="pphml://place/entertainment/[\p{L}|\p{N}|\p{Pd}]+" />
						</xs:restriction>
					</xs:simpleType>
					<xs:simpleType>
						<xs:restriction base="xs:anyURI">
							<xs:pattern value="pphml://place/[\p{L}|\p{N}|\p{Pd}]+" />
							<xs:pattern value="pphml://place/[\p{L}|\p{N}|\p{Pd}]+/[\p{L}|\p{N}|\p{Pd}]+" />
						</xs:restriction>
					</xs:simpleType>
				</xs:union>
			</xs:simpleType>
		</xs:attribute>
	</xs:attributeGroup>

	<!--HOW references (adverbs)-->
	<xs:attributeGroup name="pphReferenceHOW">
		<xs:attribute name="ref" use="required">
			<xs:annotation>
				<xs:documentation source="http://www.pphml.org/schema/doc/pphml-v1-0-tp.html#adverbs" />
			</xs:annotation>
			<xs:simpleType>
				<xs:union>
					<xs:simpleType>
						<xs:restriction base="xs:anyURI">
							<xs:enumeration value="pphml://adverb/unknown" />
						</xs:restriction>
					</xs:simpleType>
					<xs:simpleType>
						<xs:restriction base="xs:anyURI">
							<xs:enumeration value="pphml://adverb/vehicle" />
							<xs:enumeration value="pphml://adverb/vehicle/car" />
							<xs:enumeration value="pphml://adverb/vehicle/[\p{L}|\p{N}|\p{Pd}]+" />
						</xs:restriction>
					</xs:simpleType>
					<xs:simpleType>
						<xs:restriction base="xs:anyURI">
							<xs:pattern value="pphml://adverb/[\p{L}|\p{N}|\p{Pd}]+" />
							<xs:pattern value="pphml://adverb/[\p{L}|\p{N}|\p{Pd}]+/[\p{L}|\p{N}|\p{Pd}]+" />
						</xs:restriction>
					</xs:simpleType>
				</xs:union>
			</xs:simpleType>
		</xs:attribute>
	</xs:attributeGroup>

	<!--Source references-->
	<xs:attributeGroup name="pphReferenceSOURCE">
		<xs:attribute name="ref" use="required">
			<xs:annotation>
				<xs:documentation source="http://www.pphml.org/schema/doc/pphml-v1-0-tp.html#source-types" />
			</xs:annotation>
			<xs:simpleType>
				<xs:union>
					<xs:simpleType>
						<xs:restriction base="xs:anyURI">
							<xs:enumeration value="pphml://source/portable/gsm" />
							<xs:enumeration value="pphml://source/portable/wi-fi" />
							<xs:enumeration value="pphml://source/portable/zigbee" />
							<xs:enumeration value="pphml://source/portable/bluetooth" />
							<xs:enumeration value="pphml://source/portable/gps" />
							<xs:enumeration value="pphml://source/portable/compass" />
							<xs:enumeration value="pphml://source/portable/accelerometer" />
							<xs:enumeration value="pphml://source/portable/orientation" />
							<xs:enumeration value="pphml://source/portable/pressure" />
							<xs:enumeration value="pphml://source/portable/temperature" />
							<xs:enumeration value="pphml://source/portable/camera" />
							<xs:enumeration value="pphml://source/portable/microphone" />
							<xs:enumeration value="pphml://source/portable/keypad" />
							<xs:enumeration value="pphml://source/portable/usb" />
							<xs:enumeration value="pphml://source/portable/system-clock" />
							<xs:enumeration value="pphml://source/portable/power-management" />
							<xs:pattern value="pphml://source/portable/[\p{L}|\p{N}|\p{Pd}]+" />
						</xs:restriction>
					</xs:simpleType>
					<xs:simpleType>
						<xs:restriction base="xs:anyURI">
							<xs:enumeration value="pphml://source/social-network/library" />
							<xs:pattern value="pphml://source/social-network/[\p{L}|\p{N}|\p{Pd}]+" />
						</xs:restriction>
					</xs:simpleType>
				</xs:union>
			</xs:simpleType>
		</xs:attribute>
	</xs:attributeGroup>

	<!--Data references-->
	<xs:attributeGroup name="pphReferenceDATA">
		<xs:attribute name="ref" use="required">
			<xs:annotation>
				<xs:documentation source="http://www.pphml.org/schema/doc/pphml-v1-0-tp.html#data-types" />
			</xs:annotation>
			<xs:simpleType>
				<xs:union>
					<xs:simpleType>
						<xs:restriction base="xs:anyURI">
							<xs:enumeration value="pphml://data/undefined" />
						</xs:restriction>
					</xs:simpleType>
					<xs:simpleType>
						<xs:restriction base="xs:anyURI">
							<xs:enumeration value="pphml://data/image" />
							<xs:enumeration value="pphml://data/image/[\p{L}|\p{N}|\p{Pd}]+" />
						</xs:restriction>
					</xs:simpleType>
					<xs:simpleType>
						<xs:restriction base="xs:anyURI">
							<xs:enumeration value="pphml://data/list" />
							<xs:enumeration value="pphml://data/list/[\p{L}|\p{N}|\p{Pd}]+" />
						</xs:restriction>
					</xs:simpleType>
					<xs:simpleType>
						<xs:restriction base="xs:anyURI">
							<xs:enumeration value="pphml://data/text" />
							<xs:enumeration value="pphml://data/text/[\p{L}|\p{N}|\p{Pd}]+" />
						</xs:restriction>
					</xs:simpleType>
					<xs:simpleType>
						<xs:restriction base="xs:anyURI">
							<xs:enumeration value="pphml://data/track" />
							<xs:enumeration value="pphml://data/track/[\p{L}|\p{N}|\p{Pd}]+" />
						</xs:restriction>
					</xs:simpleType>
					<xs:simpleType>
						<xs:restriction base="xs:anyURI">
							<xs:pattern value="pphml://data/[\p{L}|\p{N}|\p{Pd}]+" />
							<xs:pattern value="pphml://data/[\p{L}|\p{N}|\p{Pd}]+/[\p{L}|\p{N}|\p{Pd}]+" />
						</xs:restriction>
					</xs:simpleType>
				</xs:union>
			</xs:simpleType>
		</xs:attribute>
	</xs:attributeGroup>

	<!--Attributes-->
	<xs:attributeGroup name="pphATTRIBUTE">
		<xs:attribute name="name" use="required">
			<xs:annotation>
				<xs:documentation source="http://www.pphml.org/schema/doc/pphml-v1-0-tp.html#attributes" />
			</xs:annotation>
			<xs:simpleType>
				<xs:union>
					<xs:simpleType>
						<xs:restriction base="xs:anyURI">
							<xs:enumeration value="pphml://attribute/undefined" />
						</xs:restriction>
					</xs:simpleType>
					<xs:simpleType>
						<xs:restriction base="xs:anyURI">
							<xs:enumeration value="pphml://attribute/device/id" />
							<xs:enumeration value="pphml://attribute/device/name" />
							<xs:enumeration value="pphml://attribute/device/state" />
							<xs:enumeration value="pphml://attribute/device/connected" />
							<xs:enumeration value="pphml://attribute/device/disconnected" />
							<xs:pattern value="pphml://attribute/device/[\p{L}|\p{N}|\p{Pd}]+" />
						</xs:restriction>
					</xs:simpleType>
					<xs:simpleType>
						<xs:restriction base="xs:anyURI">
							<xs:enumeration value="pphml://attribute/entity/first-name" />
							<xs:enumeration value="pphml://attribute/entity/last-name" />
							<xs:enumeration value="pphml://attribute/entity/nickname" />
							<xs:enumeration value="pphml://attribute/entity/age" />
							<xs:pattern value="pphml://attribute/entity/[\p{L}|\p{N}|\p{Pd}]+" />
						</xs:restriction>
					</xs:simpleType>
					<xs:simpleType>
						<xs:restriction base="xs:anyURI">
							<xs:enumeration value="pphml://attribute/location/latitude" />
							<xs:enumeration value="pphml://attribute/location/longitude" />
							<xs:enumeration value="pphml://attribute/location/altitude" />
							<xs:pattern value="pphml://attribute/location/[\p{L}|\p{N}|\p{Pd}]+" />
						</xs:restriction>
					</xs:simpleType>
					<xs:simpleType>
						<xs:restriction base="xs:anyURI">
							<xs:pattern value="pphml://attribute/[\p{L}|\p{N}|\p{Pd}]+" />
							<xs:pattern value="pphml://attribute/[\p{L}|\p{N}|\p{Pd}]+/[\p{L}|\p{N}|\p{Pd}]+" />
						</xs:restriction>
					</xs:simpleType>
				</xs:union>
			</xs:simpleType>
		</xs:attribute>
	</xs:attributeGroup>

</xs:schema>

