<?xml version="1.0" encoding="UTF-8"?>
<xs:schema	xmlns:xs="http://www.w3.org/2001/XMLSchema"
				xmlns:record="http://rets.org/xsd/ChangeRecords/2007-08"
				xmlns:commons="http://rets.org/xsd/RETSCommons/2007-08" 
				targetNamespace="http://rets.org/xsd/ChangeRecords/2007-08"
				elementFormDefault="qualified"
				attributeFormDefault="unqualified">

	<!--
		(C)2007 National Association of REALTORS(R)

		Tab stops
		:set ts=3

		File History
		======================
		$Header: ChangeRecords.xsd, 21, 10/8/2007 1:22:11 PM, Paul Stusiak$
		
		$Log:
		 21   055_RETS_Standard 1.20        10/8/2007 1:22:11 PM   Paul Stusiak
		      Update version timestamp
		 20   055_RETS_Standard 1.19        7/26/2007 9:09:59 PM   Paul Stusiak
		      update version timestamp
		 19   055_RETS_Standard 1.18        7/26/2007 11:44:45 AM  Gina Accawi
		      Add a category for the change.
		 18   055_RETS_Standard 1.17        7/25/2007 1:30:23 PM   Gina Accawi
		      Change DateChanged to ModificationTimestamp.
		 17   055_RETS_Standard 1.16        7/25/2007 10:56:53 AM  Gina Accawi
		      Correct type for EntryId
		 16   055_RETS_Standard 1.15        7/25/2007 10:50:30 AM  Gina Accawi
		      Add XPath field. Modify example resource to be a real resource. Add
		      example XPath to documentation.
		 15   055_RETS_Standard 1.14        7/9/2007 12:37:04 PM   Paul Stusiak
		      Update versionTimestamp to 2007-07-09T19:21:00Z
		 14   055_RETS_Standard 1.13        7/6/2007 2:29:42 PM    Gina Accawi
		      Rename ids.
		 13   055_RETS_Standard 1.12        7/2/2007 9:45:28 AM    Gina Accawi
		      Rename ResourceKey to be the actual ResourceNameKey.
		 12   055_RETS_Standard 1.11        6/29/2007 12:34:38 PM  Gina Accawi
		      Add a key for the resource.
		 11   055_RETS_Standard 1.10        5/2/2007 1:10:33 PM    Paul Stusiak
		      change namespace reference, clean up some comments, update version
		      time stamp
		 10   055_RETS_Standard 1.9         4/3/2007 4:59:28 PM    Paul Stusiak
		      use url resolution for include, import to test schema validation
		 9    055_RETS_Standard 1.8         4/3/2007 1:43:55 AM    Paul Stusiak
		      change namespace to remote location (www.ftc2.com) for testing
		 8    055_RETS_Standard 1.7         4/2/2007 11:26:53 AM   Paul Stusiak
		      change namespace to match responding server and to use the URI
		      versioning suggested by both HP and XFront
		 7    055_RETS_Standard 1.6         3/30/2007 6:20:19 PM   Paul Stusiak
		      Update of the versionTimestamp and the namespace (namespace to
		      200704). Change formating to a standard format
		 6    055_RETS_Standard 1.5         3/26/2007 6:43:42 PM   Paul Stusiak
		      additional annotations added and some minor corrections
		 5    055_RETS_Standard 1.4         3/20/2007 9:34:39 PM   Paul Stusiak
		      add partial documentation, change namespace to match global element
		 4    055_RETS_Standard 1.3         3/20/2007 9:32:46 PM   Paul Stusiak
		      Change file name to match the value of the global element
		 3    055_RETS_Standard 1.2         3/8/2007 11:35:12 AM   Gina Accawi
		      Rename ID to Id, EntryID to EntryId. Add type for EntryId as
		      SecureString. 
		 2    055_RETS_Standard 1.1         2/22/2007 3:34:45 PM   Gina Accawi
		      Remove all references to the schemaLocation as being
		      http://retsserver.realtors.org:8080/xsd/.  These references have been
		      changed to be relative path (as the current directory). Now,
		      regardless of where they are published, the referential internal
		      integrity will remain. The assumption is that these will all reside as
		       neighbors on the target distribution server.
		 1    055_RETS_Standard 1.0         12/20/2006 12:32:45 PM Jeff Brush      
		$
	-->

	<xs:annotation>
		<xs:documentation>
			Schema for system record change reporting
		</xs:documentation>
	</xs:annotation>

	<xs:import	namespace="http://rets.org/xsd/RETSCommons/2007-08"
					schemaLocation="../../../xsd/RETSCommons/2007-08/RETSCommons.xsd"/>

	<!-- Types -->
	<xs:complexType name="ChangeTypeEnum">
		<xs:annotation>
			<xs:appinfo>
				Status
			</xs:appinfo>
		</xs:annotation>
		<xs:simpleContent>
			<xs:restriction base="commons:OtherEnumerationDescriptionString">
				<xs:enumeration value="Status"/>
				<xs:enumeration value="Price"/>
				<xs:enumeration value="Media"/>
				<xs:enumeration value="New"/>
				<xs:enumeration value="Other"/>
			</xs:restriction>
		</xs:simpleContent>
	</xs:complexType>
	
	
	<xs:complexType name="Field">
		<xs:sequence>
				<xs:element	name="Name"
								type="xs:string">
					<xs:annotation>
						<xs:documentation>
							The field name
						</xs:documentation>
						<xs:appinfo>
							ListPrice
						</xs:appinfo>
					</xs:annotation>
				</xs:element>
				<xs:element name="XPath"
								type="xs:string">
					<xs:annotation>
						<xs:documentation>
							The XPath to locate the node being changed.
						</xs:documentation>
						<xs:appinfo>
							Listings/Listing/ListingPricing/ListPrice
						</xs:appinfo>
					</xs:annotation>
				</xs:element>
				<xs:element	name="OldValue"
								type="xs:string">
					<xs:annotation>
						<xs:documentation>
							The previous field value, represented as a string
						</xs:documentation>
						<xs:appinfo>
							265000
						</xs:appinfo>
					</xs:annotation>
				</xs:element>
				<xs:element	name="NewValue"
								type="xs:string">
					<xs:annotation>
						<xs:documentation>
							The current field value, represented as a string
						</xs:documentation>
						<xs:appinfo>
							263000
						</xs:appinfo>
					</xs:annotation>
				</xs:element>
				<xs:element name="Category"
							type="record:ChangeTypeEnum"
							minOccurs="0">
					<xs:annotation>
						<xs:documentation>
							The category of change made. 
						</xs:documentation>
						<xs:appinfo>
							Price
						</xs:appinfo>
					</xs:annotation>
				</xs:element>
				<xs:any	namespace="##other"
							minOccurs="0"
							maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute	ref="commons:isgSecurityClass"
							use="required">
			<xs:annotation>
				<xs:documentation>
					The security status of the entire element
				</xs:documentation>
				<xs:appinfo>
					private
				</xs:appinfo>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="Fields">
		<xs:sequence>
			<xs:element	name="Field"
							type="record:Field"
							maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="ChangeRecord">
		<xs:sequence>
			<xs:element name="ChangeRecordKey"
							type="commons:resource-key"
							minOccurs="1"
							maxOccurs="1">
				<xs:annotation>
					<xs:documentation>
						This the is the keyfield for the resource.
					</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element	name="ChangeRecordId"
							type="xs:string">
				<xs:annotation>
					<xs:documentation>
						The record unique identifier with a system wide
						scope, usually a long datatype represented as a
						string
					</xs:documentation>
					<xs:appinfo>
						912677311
					</xs:appinfo>
				</xs:annotation>
			</xs:element>
			<xs:element	name="EntryId"
							type="commons:resource-key"
							minOccurs="0">
				<xs:annotation>
					<xs:documentation>
						The key/identifier for the participant who
						entered this change record. May be a
						member, person, system, or other resource.
					</xs:documentation>
					<xs:appinfo>
						6778930
					</xs:appinfo>
				</xs:annotation>
			</xs:element>
			<xs:element	name="Resource"
							type="xs:string"
							minOccurs="0">
				<xs:annotation>
					<xs:documentation>
						The system or well known resource name
					</xs:documentation>
					<xs:appinfo>
						Listings
					</xs:appinfo>
				</xs:annotation>
			</xs:element>
			<xs:element	name="ModificationTimestamp"
							type="commons:ModificationTimestamp"
							minOccurs="0">
				<xs:annotation>
					<xs:documentation>
						The timestamp of the change
					</xs:documentation>
					<xs:appinfo>
						2007-02-10T12:00:00-05:00
					</xs:appinfo>
				</xs:annotation>
			</xs:element>
			<xs:element	name="ChangedBy"
							type="xs:string"
							minOccurs="0">
				<xs:annotation>
					<xs:documentation>
						The a unique representation of the
						person who changed the record for
						audit purposes. While regular
						names may be used, a unique identifier
						for the person should be provided in
						the EntryId field. Implementors are
						encouraged to use a system unique
						identifier.
					</xs:documentation>
					<xs:appinfo>
						T3324
					</xs:appinfo>
				</xs:annotation>
			</xs:element>
			<xs:element	name="Fields"
							type="record:Fields"
							minOccurs="0"/>
			<xs:any		namespace="##other"
							minOccurs="0"
							maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	
	<!-- Elements -->
	<xs:element name="ChangeRecords">
		<xs:complexType>
			<xs:sequence>
				<xs:element	name="ChangeRecord"
								type="record:ChangeRecord"
								minOccurs="0"
								maxOccurs="unbounded"/>
			</xs:sequence>
			<xs:attribute	name="versionTimestamp"
								type="xs:dateTime"
								use="required"
								fixed="2007-10-08T16:27:23Z"/>
		</xs:complexType>
	</xs:element>
</xs:schema>