<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.vendorB.com" targetNamespace="http://www.vendorB.com" elementFormDefault="qualified">
	<xs:element name="vendorB">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="client" type="client" maxOccurs="unbounded"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:complexType name="client">
		<xs:sequence>
			<xs:element name="type">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="UNDEFINED"/>
						<xs:enumeration value="OFFENDER"/>
						<xs:enumeration value="VICTIM"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="clientDetails" type="clientDetails"/>
			<xs:element name="contacts" minOccurs="0">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="contact" type="clientContact" minOccurs="0" maxOccurs="unbounded"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="sentence" type="sentence" minOccurs="0"/>
			<xs:element name="rules" minOccurs="0">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="zone" type="zone" minOccurs="0" maxOccurs="unbounded"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="trace" minOccurs="0">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="tracePoint" type="tracePoint" minOccurs="0" maxOccurs="unbounded"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="events" minOccurs="0">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="event" type="event" minOccurs="0" maxOccurs="unbounded"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="id" type="xs:string" use="optional"/>
	</xs:complexType>
	<xs:complexType name="clientDetails">
		<xs:sequence>
			<xs:element name="title">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="MRS"/>
						<xs:enumeration value="MR"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="firstNames" type="xs:string"/>
			<xs:element name="lastName" type="xs:string"/>
			<xs:element name="birthday" type="xs:date" minOccurs="0"/>
			<xs:element name="nationality" type="xs:string" minOccurs="0"/>
			<xs:element name="residencyType" type="xs:string" minOccurs="0"/>
			<xs:element name="profession" type="xs:string" minOccurs="0"/>
			<xs:element name="maritalStatus" minOccurs="0">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="UNDEFINED"/>
						<xs:enumeration value="NEVER_MARRIED"/>
						<xs:enumeration value="MARRIED"/>
						<xs:enumeration value="DIVORCED"/>
						<xs:enumeration value="WIDOWED"/>
						<xs:enumeration value="REGISTERED_PARTNERSHIP"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="religion" type="xs:string" minOccurs="0"/>
			<xs:element name="language" type="xs:string" minOccurs="0"/>
			<xs:element name="gender" minOccurs="0">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="MALE"/>
						<xs:enumeration value="FEMALE"/>
						<xs:enumeration value="OTHER"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="ethnicity" minOccurs="0">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="EUROPEAN"/>
						<xs:enumeration value="AFRICAN"/>
						<xs:enumeration value="ASIAN"/>
						<xs:enumeration value="INDIAN"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="height" minOccurs="0">
				<xs:simpleType>
					<xs:restriction base="xs:integer">
						<xs:minInclusive value="50"/>
						<xs:maxInclusive value="250"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="weight" minOccurs="0">
				<xs:simpleType>
					<xs:restriction base="xs:integer">
						<xs:minInclusive value="30"/>
						<xs:maxInclusive value="350"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="corpulence" minOccurs="0">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="THIN"/>
						<xs:enumeration value="NORMAL"/>
						<xs:enumeration value="EXTRA_POUNDS"/>
						<xs:enumeration value="OBESE"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="hairColor" minOccurs="0">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="BLACK"/>
						<xs:enumeration value="BROWN"/>
						<xs:enumeration value="CHESTNUT"/>
						<xs:enumeration value="RED"/>
						<xs:enumeration value="BLOND"/>
						<xs:enumeration value="GREY"/>
						<xs:enumeration value="GREY"/>
						<xs:enumeration value="WHITE"/>
						<xs:enumeration value="BALD"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="eyeColor" minOccurs="0">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="BLUE"/>
						<xs:enumeration value="GREEN"/>
						<xs:enumeration value="BROWN"/>
						<xs:enumeration value="BLACK"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="placeOfBirth" type="xs:string" minOccurs="0"/>
			<xs:element name="placeOfOrigin" type="xs:string" minOccurs="0"/>
			<xs:element name="idNumber" type="xs:string" minOccurs="0"/>
			<xs:element name="referenceNumber" type="xs:string" minOccurs="0"/>
			<xs:element name="addresses" minOccurs="0">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="address" type="address" minOccurs="0" maxOccurs="unbounded"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="eAddresses" minOccurs="0">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="eAddress" type="eAddress" minOccurs="0" maxOccurs="unbounded"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="id" type="xs:string" use="optional"/>
	</xs:complexType>
	<xs:complexType name="address">
		<xs:sequence>
			<xs:element name="type" type="xs:string"/>
			<xs:element name="street" type="xs:string" minOccurs="0"/>
			<xs:element name="houseNumber" type="xs:string" minOccurs="0"/>
			<xs:element name="extras" type="xs:string" minOccurs="0"/>
			<xs:element name="zipCode" type="xs:string" minOccurs="0"/>
			<xs:element name="city" type="xs:string" minOccurs="0"/>
			<xs:element name="state" type="xs:string" minOccurs="0"/>
			<xs:element name="country" type="xs:string" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute name="id" type="xs:string" use="optional"/>
	</xs:complexType>
	<xs:complexType name="eAddress">
		<xs:sequence>
			<xs:element name="type">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="EMAIL"/>
						<xs:enumeration value="MOBILE_PHONE"/>
						<xs:enumeration value="PHONE"/>
						<xs:enumeration value="FAX"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="context">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="HOME"/>
						<xs:enumeration value="MOBILE"/>
						<xs:enumeration value="WORK"/>
						<xs:enumeration value="EMAIL"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="description" type="xs:string" minOccurs="0"/>
			<xs:element name="address" type="xs:string"/>
		</xs:sequence>
		<xs:attribute name="id" type="xs:string" use="optional"/>
	</xs:complexType>
	<xs:complexType name="clientContact">
		<xs:sequence>
			<xs:element name="firstNames" type="xs:string"/>
			<xs:element name="lastName" type="xs:string"/>
			<xs:element name="gender" minOccurs="0">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="MALE"/>
						<xs:enumeration value="FEMALE"/>
						<xs:enumeration value="OTHER"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="type">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="PARTNER"/>
						<xs:enumeration value="CHILD"/>
						<xs:enumeration value="PARENT"/>
						<xs:enumeration value="DOCTOR"/>
						<xs:enumeration value="PSYCHOLOG"/>
						<xs:enumeration value="COUNSELOR"/>
						<xs:enumeration value="VICTIM"/>
						<xs:enumeration value="LAWYER"/>
						<xs:enumeration value="OTHER"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="birthday" type="xs:date" minOccurs="0"/>
			<xs:element name="nationality" type="xs:string" minOccurs="0"/>
			<xs:element name="profession" type="xs:string" minOccurs="0"/>
			<xs:element name="contactReason" type="xs:string" minOccurs="0"/>
			<xs:element name="comment" type="xs:string" minOccurs="0"/>
			<xs:element name="description" type="xs:string" minOccurs="0"/>
			<xs:element name="addresses" minOccurs="0">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="address" type="address" minOccurs="0" maxOccurs="unbounded"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="eAddresses" minOccurs="0">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="eAddress" type="eAddress" minOccurs="0" maxOccurs="unbounded"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="id" type="xs:string" use="optional"/>
	</xs:complexType>
	<xs:complexType name="sentence">
		<xs:sequence>
			<xs:element name="crime" type="xs:string"/>
			<xs:element name="infringementDate" type="xs:date" minOccurs="0"/>
			<xs:element name="notifiedOn" type="xs:date" minOccurs="0"/>
			<xs:element name="entryIntoForce" type="xs:date" minOccurs="0"/>
			<xs:element name="monitoringStart" type="xs:dateTime" minOccurs="0"/>
			<xs:element name="monitoringEnd" type="xs:dateTime" minOccurs="0"/>
			<xs:element name="prefecture" type="xs:string" minOccurs="0"/>
			<xs:element name="comments" type="xs:string" minOccurs="0"/>
			<xs:element name="rules" type="xs:string" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute name="id" type="xs:string" use="optional"/>
	</xs:complexType>
	<xs:complexType name="zone">
		<xs:sequence>
			<xs:element name="type">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="CIRCLE"/>
						<xs:enumeration value="POLYGON"/>
						<xs:enumeration value="LINE"/>
						<xs:enumeration value="BASE_STATION"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="name" type="xs:string"/>
			<xs:element name="description" type="xs:string" minOccurs="0"/>
			<xs:element name="message" type="xs:string" minOccurs="0"/>
			<xs:element name="centerLat" type="xs:decimal" minOccurs="0"/>
			<xs:element name="centerLon" type="xs:decimal" minOccurs="0"/>
			<xs:element name="outerRadius" type="xs:nonNegativeInteger" minOccurs="0"/>
			<xs:element name="innerRadius" type="xs:nonNegativeInteger" minOccurs="0"/>
			<xs:element name="width" type="xs:nonNegativeInteger" minOccurs="0"/>
			<xs:element name="buffer" type="xs:nonNegativeInteger" minOccurs="0"/>
			<xs:element name="graceTime" type="xs:nonNegativeInteger" minOccurs="0"/>
			<xs:element name="outerBBoxLat1" type="xs:decimal" minOccurs="0"/>
			<xs:element name="outerBBoxLon1" type="xs:decimal" minOccurs="0"/>
			<xs:element name="outerBBoxLat2" type="xs:decimal" minOccurs="0"/>
			<xs:element name="outerBBoxLon2" type="xs:decimal" minOccurs="0"/>
			<xs:element name="innerBBoxLat1" type="xs:decimal" minOccurs="0"/>
			<xs:element name="innerBBoxLon1" type="xs:decimal" minOccurs="0"/>
			<xs:element name="innerBBoxLat2" type="xs:decimal" minOccurs="0"/>
			<xs:element name="innerBBoxLon2" type="xs:decimal" minOccurs="0"/>
			<xs:element name="points" minOccurs="0">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="point" type="zonePoint" minOccurs="0" maxOccurs="unbounded"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="schedules" minOccurs="0">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="schedule" type="schedule" minOccurs="0" maxOccurs="unbounded"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="id" type="xs:string" use="optional"/>
	</xs:complexType>
	<xs:complexType name="zonePoint">
		<xs:sequence>
			<xs:element name="latitude" type="xs:decimal"/>
			<xs:element name="longitude" type="xs:decimal"/>
		</xs:sequence>
		<xs:attribute name="id" type="xs:string" use="optional"/>
	</xs:complexType>
	<xs:complexType name="schedule">
		<xs:sequence>
			<xs:element name="name" type="xs:string"/>
			<xs:element name="type">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="INCLUSION"/>
						<xs:enumeration value="EXCLUSION"/>
						<xs:enumeration value="MUST_PASS_THROUGH"/>
						<xs:enumeration value="REPORT_PASSAGE"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="scheduleStart" type="xs:date" minOccurs="0"/>
			<xs:element name="scheduleEnd" type="xs:date" minOccurs="0"/>
			<xs:element name="alwaysActive" type="xs:boolean" minOccurs="0"/>
			<xs:element name="startTime" type="xs:time" minOccurs="0"/>
			<xs:element name="endTime" type="xs:time" minOccurs="0"/>
			<!-- if no week day is specified, then always active. If at least one week day specified, then only on indicated days active. -->
			<xs:element name="activeMonday" type="xs:boolean" minOccurs="0"/>
			<xs:element name="activeTuesday" type="xs:boolean" minOccurs="0"/>
			<xs:element name="activeWednesday" type="xs:boolean" minOccurs="0"/>
			<xs:element name="activeThursday" type="xs:boolean" minOccurs="0"/>
			<xs:element name="activeFriday" type="xs:boolean" minOccurs="0"/>
			<xs:element name="activeSaturday" type="xs:boolean" minOccurs="0"/>
			<xs:element name="activeSunday" type="xs:boolean" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute name="id" type="xs:string" use="optional"/>
	</xs:complexType>
	<xs:complexType name="tracePoint">
		<xs:sequence>
			<xs:element name="time" type="xs:dateTime"/>
			<xs:element name="latitude" type="xs:decimal"/>
			<xs:element name="longitude" type="xs:decimal"/>
			<xs:element name="altitude" type="xs:integer" minOccurs="0"/>
			<xs:element name="heading" type="xs:integer" minOccurs="0"/>
			<xs:element name="speed" type="xs:nonNegativeInteger" minOccurs="0"/>
			<xs:element name="accuracy" type="xs:nonNegativeInteger" minOccurs="0"/>
			<xs:element name="speedAccuracy" type="xs:nonNegativeInteger" minOccurs="0"/>
			<xs:element name="headingAccuracy" type="xs:nonNegativeInteger" minOccurs="0"/>
			<xs:element name="source">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="GPS"/>
						<xs:enumeration value="GALILEO"/>
						<xs:enumeration value="GLONASS"/>
						<xs:enumeration value="BAIDU"/>
						<xs:enumeration value="LBS"/>
						<xs:enumeration value="WIFI"/>
						<xs:enumeration value="PROXIMITY_BASE_STATION"/>
						<xs:enumeration value="UNKNOWN"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="id" type="xs:string" use="optional"/>
	</xs:complexType>
	<xs:complexType name="event">
		<xs:sequence>
			<xs:element name="time" type="xs:dateTime"/>
			<xs:element name="type">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="UNDEFINED"/>
						<xs:enumeration value="BATTERY_NOT_CHARGED"/>
						<xs:enumeration value="BATTERY_LOW"/>
						<xs:enumeration value="BASESTATION_MOVED"/>
						<xs:enumeration value="BASESTATION_DISCONNECTED"/>
						<xs:enumeration value="BASESTATION_CONNECTED"/>
						<xs:enumeration value="CHARGER_MISPLACED"/>
						<xs:enumeration value="BRACELET_TAMPERING"/>
						<xs:enumeration value="RADIO_ATTACK"/>
						<xs:enumeration value="ZONE_LIMIT_APPROACH"/>
						<xs:enumeration value="ZONE_VIOLATION"/>
						<xs:enumeration value="PROXIMITY_VICTIM"/>
						<xs:enumeration value="CLOSE_PROXIMITY_VICTIM"/>
						<xs:enumeration value="PANIK_BUTTON"/>
						<xs:enumeration value="ALCOTEST_MISSED"/>
						<xs:enumeration value="ALCOTEST_MISSED_REPEAT"/>
						<xs:enumeration value="ALCOTEST_POSITIVE"/>
						<xs:enumeration value="BRACELET_IMMOBILE"/>
						<xs:enumeration value="CLIENT_CALL"/>
						<xs:enumeration value="CLIENT_NO_FEEDBACK"/>
						<xs:enumeration value="BATTERY_LOW_CAPACITY"/>
						<xs:enumeration value="HEADSET_FAILURE"/>
						<xs:enumeration value="MAINTENANCE_WARNING"/>
						<xs:enumeration value="MAINTENANCE_TIMEOUT"/>
						<xs:enumeration value="LOCALIZATION_LOSS"/>
						<xs:enumeration value="COMMUNICATION_LOSS"/>
						<xs:enumeration value="BRACELET_RESTART"/>
						<xs:enumeration value="BASESTATION_BATTERY_LOW"/>
						<xs:enumeration value="BASESTATION_BATTERY_HOT"/>
						<xs:enumeration value="BASESTATION_RESTART"/>
						<xs:enumeration value="CHARGER_CONNECTED"/>
						<xs:enumeration value="CHARGER_DISCONNECTED"/>
						<xs:enumeration value="BATTERY_FULLY_CHARGED"/>
						<xs:enumeration value="BASESTATION_CHARGER_CONNECTED"/>
						<xs:enumeration value="BASESTATION_CHARGER_DISCONNECTED"/>
						<xs:enumeration value="BASESTATION_IN_PROXIMITY"/>
						<xs:enumeration value="BASESTATION_NOT_IN_PROXIMITY"/>
						<xs:enumeration value="BASESTATION_TAMPERING"/>
						<xs:enumeration value="ENTER_ZONE"/>
						<xs:enumeration value="LEAVE_ZONE"/>
						<xs:enumeration value="BRACELET_OPENED"/>
						<xs:enumeration value="BRACELET_CLOSED"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="priority">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="EVENT"/>
						<xs:enumeration value="TECHNICAL"/>
						<xs:enumeration value="LOW"/>
						<xs:enumeration value="MEDIUM"/>
						<xs:enumeration value="HIGH"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="data" type="xs:string" minOccurs="0"/>
			<xs:element name="reports" minOccurs="0">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="report" type="eventReport" minOccurs="0" maxOccurs="unbounded"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="id" type="xs:string" use="optional"/>
	</xs:complexType>
	<xs:complexType name="eventReport">
		<xs:sequence>
			<xs:element name="time" type="xs:dateTime"/>
			<xs:element name="user" type="xs:string"/>
			<xs:element name="report" type="xs:string"/>
		</xs:sequence>
		<xs:attribute name="id" type="xs:string" use="optional"/>
	</xs:complexType>
</xs:schema>
