<?xml version="1.0"?>
<xs:schema	xmlns:xs="http://www.w3.org/2001/XMLSchema"
				xmlns:commons="http://rets.org/xsd/RETSCommons/2007-08"
				targetNamespace="http://rets.org/xsd/RETSCommons/2007-08"
				elementFormDefault="qualified"
				attributeFormDefault="unqualified">

	<!--
		Tab stops
		:set ts=3

		File History
		======================
		$Header: Person.xsd, 20, 7/9/2007 8:05:43 AM, Gina Accawi$
		

		$Log:
		 20   055_RETS_Standard 1.19        7/9/2007 8:05:43 AM    Gina Accawi
		      Add reference to the role schema.
		 19   055_RETS_Standard 1.18        7/9/2007 2:00:58 AM    Paul Stusiak
		      Rework of CR 80 to change the way that Role, Team, Person and Member
		      interact as Participants. Person, Member and Team now take on a Role
		      when acting as a Participant for a Listing (or Transaction)
		 18   055_RETS_Standard 1.17        7/6/2007 1:40:16 PM    Gina Accawi
		      Listing participants now have a role in the listing. Additionally,
		      team members have a team role. 
		 17   055_RETS_Standard 1.16        7/5/2007 2:28:49 PM    Gina Accawi
		      Remove Address.xsd, no longer needed.
		 16   055_RETS_Standard 1.15        7/5/2007 2:12:30 PM    Gina Accawi
		      Add gender, languages, birthdate to person. Remove address from
		      contactable person, it is now in the ContactMethods.
		 15   055_RETS_Standard 1.14        6/27/2007 9:48:24 AM   Gina Accawi
		      Case consistency for attribute names.
		 14   055_RETS_Standard 1.13        6/26/2007 1:05:15 PM   Gina Accawi
		      Rename ContactInformation to ContactMethod.
		 13   055_RETS_Standard 1.12        6/25/2007 3:17:14 PM   Gina Accawi
		      Correct reference to ContactInformation to ContactMethods as per CR
		      53.
		 12   055_RETS_Standard 1.11        6/14/2007 3:03:54 PM   Gina Accawi
		      Correct reference for Phone.xsd, which is renamed
		      ContactInformation.xsd.
		 11   055_RETS_Standard 1.10        5/10/2007 3:06:56 PM   Gina Accawi
		      Add RoleContactablePerson for TMS schema use. Is a ContactablePerson
		      with the addition of a Role attribute.
		 10   055_RETS_Standard 1.9         5/1/2007 2:36:59 PM    Paul Stusiak
		      Update the version timestamp, make the schema relative again,
		      normalize the date related typing to use SecureDateTime and naming to
		      be of the form XXXDateTime
		 9    055_RETS_Standard 1.8         4/13/2007 11:54:31 AM  Paul Stusiak
		      Pretty-print update to limit body width to less than 70 characters for
		       review purposes.
		 8    055_RETS_Standard 1.7         4/3/2007 4:59:31 PM    Paul Stusiak
		      use url resolution for include, import to test schema validation
		 7    055_RETS_Standard 1.6         4/3/2007 1:43:59 AM    Paul Stusiak
		      change namespace to remote location (www.ftc2.com) for testing
		 6    055_RETS_Standard 1.5         4/2/2007 11:26:57 AM   Paul Stusiak
		      change namespace to match responding server and to use the URI
		      versioning suggested by both HP and XFront
		 5    055_RETS_Standard 1.4         3/30/2007 6:20:06 PM   Paul Stusiak
		      Update of the versionTimestamp and the namespace (namespace to
		      200704). Change formating to a standard format
		 4    055_RETS_Standard 1.3         3/21/2007 4:16:53 PM   Paul Stusiak
		      move annotation, change some of the element names
		 3    055_RETS_Standard 1.2         3/7/2007 10:58:16 PM   Paul Stusiak
		      Clean up the project information for the purposes of document
		      generation.
		 2    055_RETS_Standard 1.1         2/28/2007 1:55:58 PM   Paul Stusiak
		      correction for ContactInformation refactoring - now in Phone.xsd
		 1    055_RETS_Standard 1.0         2/28/2007 12:26:38 AM  Paul Stusiak
		      completion of first cut at refactoring out from RETSCommons.xsd
		$
		======================
	-->

	<xs:annotation>
		<xs:documentation>
			Elements related to a Person entity.
		</xs:documentation>
	</xs:annotation>

	<xs:include schemaLocation="Primitives.xsd"/>
	<xs:include schemaLocation="ContactMethods.xsd"/>
	<xs:include schemaLocation="Role.xsd"/>

	<!-- Types -->
	<xs:complexType name="FirstName">
		<xs:simpleContent>
			<xs:extension base="xs:string"/>
		</xs:simpleContent>
	</xs:complexType>

	<xs:complexType name="MiddleName">
		<xs:simpleContent>
			<xs:extension base="xs:string"/>
		</xs:simpleContent>
	</xs:complexType>

	<xs:complexType name="LastName">
		<xs:simpleContent>
			<xs:extension base="xs:string"/>
		</xs:simpleContent>
	</xs:complexType>

	<xs:complexType name="NickName">
		<xs:simpleContent>
			<xs:extension base="xs:string"/>
		</xs:simpleContent>
	</xs:complexType>

	<xs:complexType name="Title">
		<xs:simpleContent>
			<xs:extension base="xs:string"/>
		</xs:simpleContent>
	</xs:complexType>

	<xs:complexType name="Suffix">
		<xs:simpleContent>
			<xs:extension base="xs:string"/>
		</xs:simpleContent>
	</xs:complexType>

	<xs:complexType name="CompleteName">
		<xs:annotation>
			<xs:documentation>
				A person's entire given name.  May consist of a
				combination of one or more of: title, first name,
				middle name, nick name, surname and suffix with
				whitespace. An example is
				"Dr. Edwin E. 'Buzz' Aldrin Jr.". Often the nick name is
				surrounded by quotation marks, either single or double.
			</xs:documentation>
			<xs:appinfo>
				Dr. Edwin E. 'Buzz' Aldrin Jr.
			</xs:appinfo>
		</xs:annotation>
		<xs:simpleContent>
			<xs:extension base="commons:SecureString"/>
		</xs:simpleContent>
	</xs:complexType>

	<xs:complexType name="Person">
		<xs:sequence>
			<xs:element	name="PersonalTitle"
							type="commons:Title"
							minOccurs="0"
							maxOccurs="1">
				<xs:annotation>
					<xs:documentation>
						The well known prefixes of Mr, Ms, Miss, Mrs or
						an officially granted name, prefixed to the first
						name. It is also known as pre-nomial letters.
						An example is Dr. or Ms. It may be abbreviated.
					</xs:documentation>
					<xs:appinfo>
						Dr
					</xs:appinfo>
				</xs:annotation>
			</xs:element>
			<xs:element	name="FirstName"
							type="commons:FirstName"
							minOccurs="0"
							maxOccurs="1">
				<xs:annotation>
					<xs:documentation>
						A person's name that precedes the surname.
						An example is "Edwin".
					</xs:documentation>
					<xs:appinfo>
						Edwin
					</xs:appinfo>
				</xs:annotation>
			</xs:element>
			<xs:element	name="MiddleName"
							type="commons:MiddleName"
							minOccurs="0"
							maxOccurs="1">
				<xs:annotation>
					<xs:documentation>
						A person's name that precedes the surname. It may
						consist of an initial or several complete names.
						An example is "E."
					</xs:documentation>
					<xs:appinfo>
						E
					</xs:appinfo>
				</xs:annotation>
			</xs:element>
			<xs:element	name="NickName"
							type="commons:NickName"
							minOccurs="0"
							maxOccurs="1">
				<xs:annotation>
					<xs:documentation>
						A familiar or descriptive name with no legal
						standing. An example is "Buzz"
					</xs:documentation>
					<xs:appinfo>
						Buzz
					</xs:appinfo>
				</xs:annotation>
			</xs:element>
			<xs:element	name="LastName"
							type="commons:LastName"
							minOccurs="0"
							maxOccurs="1">
				<xs:annotation>
					<xs:documentation>
						A person's surname.
						An example is "Aldrin"
					</xs:documentation>
					<xs:appinfo>
						Aldrin
					</xs:appinfo>
				</xs:annotation>
			</xs:element>
			<xs:element	name="Suffix"
							type="commons:Suffix"
							minOccurs="0"
							maxOccurs="10">
				<xs:annotation>
					<xs:documentation>
						An academic, honorary or social name appended
						following the family name. It is also known as
						post-nomial letters. An example is Jr. or DDS.
					</xs:documentation>
					<xs:appinfo>
						Jr
					</xs:appinfo>
				</xs:annotation>
			</xs:element>
			<xs:element name="Birthdate"
							type="xs:date"
							minOccurs="0">
				<xs:annotation>
					<xs:documentation>
						Date of birth for the person.
					</xs:documentation>
				</xs:annotation>		
			</xs:element>
			<xs:element name="Gender"
							type="commons:gender"
							minOccurs="0">
				<xs:annotation>
					<xs:documentation>
						The gender of the person.
					</xs:documentation>
					<xs:appinfo>
						male
					</xs:appinfo>
				</xs:annotation>
			</xs:element>
			<xs:element name="Languages"
							type="xs:string"
							minOccurs="0">
				<xs:annotation>
					<xs:documentation>
						Languages spoken by the person.
					</xs:documentation>
					<xs:appinfo>
						English, German, Spanish
					</xs:appinfo>
				</xs:annotation>
			</xs:element>
			<xs:any	namespace="##other"
						minOccurs="0"
						maxOccurs="30"/>
		</xs:sequence>
		<xs:attribute ref="commons:isgSecurityClass" use="required"/>
	</xs:complexType>

	<xs:complexType name="ContactablePerson">
		<xs:sequence>
			<xs:element	name="Person"
							type="commons:Person"
							minOccurs="0"
							maxOccurs="1"/>
			<xs:element	name="ContactMethod"
							type="commons:ContactMethod"
							minOccurs="0"/>
			<xs:element	name="BusinessName"
							type="xs:string"
							minOccurs="0">
				<xs:annotation>
					<xs:documentation>
						Legal or well known (DBA) name for the business
						associated with the entity.
					</xs:documentation>
					<xs:appinfo>
						Acme Homefinders
					</xs:appinfo>
				</xs:annotation>
			</xs:element>
			<xs:any		namespace="##other"
							minOccurs="0"
							maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute	name="systemUserGUId"
							type="xs:string"
							use="optional">
			<xs:annotation>
				<xs:documentation>
					An optional attribute when a system has additional
					information stored associated with this person. Many
					systems will not have any other information or may
					choose to suppress this value.
				</xs:documentation>
				<xs:appinfo>
					317782231
				</xs:appinfo>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>

	<xs:complexType name="RoleContactablePerson">
		<xs:annotation>
			<xs:documentation>
				In TMS, persons frequently have a Role in a transaction.
				These element items also tend to include contact
				information.
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element	name="ContactablePerson"
							type="commons:ContactablePerson"
							minOccurs="1"
							maxOccurs="1"/>
			<xs:element	name="Role"
							type="commons:ParticipantRoleEnum"
							minOccurs="1"
							maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
</xs:schema>