<?xml version="1.0" encoding="UTF-8"?>
<xs:schema  xmlns:xs="http://www.w3.org/2001/XMLSchema"
				xmlns:teams="http://rets.org/xsd/Teams/2007-08"
				xmlns:members="http://rets.org/xsd/Members/2007-08"
				xmlns:offices="http://rets.org/xsd/Offices/2007-08"
				xmlns:commons="http://rets.org/xsd/RETSCommons/2007-08"
				targetNamespace="http://rets.org/xsd/Teams/2007-08"
				elementFormDefault="qualified"
				attributeFormDefault="unqualified">

	<xs:annotation>
		<xs:documentation>
			A team of Persons and Members. A team may exist for the
			life time of a listing or the team may persist beyond a
			given listing or transaction.
		</xs:documentation>
	</xs:annotation>

	<xs:import  namespace="http://www.w3.org/XML/1998/namespace"
					schemaLocation="http://www.w3.org/2001/xml.xsd"/>
	<xs:import  namespace="http://rets.org/xsd/RETSCommons/2007-08"
					schemaLocation="../../../xsd/RETSCommons/2007-08/RETSCommons.xsd"/>
	<xs:import  namespace="http://rets.org/xsd/Members/2007-08"
					schemaLocation="../../../xsd/Members/2007-08/Members.xsd"/>
	<xs:import  namespace="http://rets.org/xsd/Offices/2007-08"
					schemaLocation="../../../xsd/Offices/2007-08/Offices.xsd"/>

	<!-- Types -->
	<xs:complexType name="TeamMemberType">
		<xs:annotation>
			<xs:documentation>
				A team member is a Member in a role. This role is for the
				listing and there is a role for the Member in a team.

				The team role persists for the life of the team.
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element	name="TeammateKey"
							type="commons:resource-key"
							minOccurs="1"
							maxOccurs="1">
				<xs:annotation>
					<xs:appinfo>
						<retsid></retsid>
					</xs:appinfo>
				</xs:annotation>
			</xs:element>
			<xs:choice>
				<xs:element	name="TeamMember"
								type="members:MemberType"
								minOccurs="1"
								maxOccurs="1">
					<xs:annotation>
						<xs:documentation>
							The teammate information, either a person or a
							member, in a role.
						</xs:documentation>
						<xs:appinfo>
							<retsid></retsid>
						</xs:appinfo>
					</xs:annotation>
				</xs:element>
				<xs:element	name="TeamPerson"
								type="commons:ContactablePerson"
								minOccurs="1"
								maxOccurs="1">
					<xs:annotation>
						<xs:appinfo>
							<retsid></retsid>
						</xs:appinfo>
					</xs:annotation>
				</xs:element>
			</xs:choice>
			<xs:element	name="TeamRole"
							type="commons:TeamRoleEnum"
							minOccurs="1"
							maxOccurs="1">
				<xs:annotation>
					<xs:documentation>
						The role a particular member plays in a team.
						May be different from the role the member 
						plays in a transaction.
					</xs:documentation>
					<xs:appinfo>
						<retsid></retsid>
						<example>Team Photographer</example>
					</xs:appinfo>
				</xs:annotation>
			</xs:element>
			<xs:element	name="ModificationTimestamp"
						type="commons:ModificationTimestamp"
						minOccurs="0">
				<xs:annotation>
					<xs:documentation>
						A timestamp for the most recent modification of this
						record.
					</xs:documentation>
					<xs:appinfo>
						<retsid></retsid>
						<example>2007-01-15T11:23:09Z</example>
					</xs:appinfo>
				</xs:annotation>
			</xs:element>
			</xs:sequence>
	</xs:complexType>

	<xs:complexType name="TeamType">
		<xs:sequence>
			<xs:element name="TeamKey"
								type="commons:resource-key"
								minOccurs="1"
								maxOccurs="1">
				<xs:annotation>
					<xs:documentation>
						Unique identifier for this team.
					</xs:documentation>
					<xs:appinfo>
						<retsid></retsid>
						<example>2343234</example>
					</xs:appinfo>
				</xs:annotation>
			</xs:element>
			<xs:element name="TeamName"
							type="commons:SecureString"
							minOccurs="0">
				<xs:annotation>
					<xs:documentation>
						A team may be given a name.
					</xs:documentation>
					<xs:appinfo>
						<retsid></retsid>
						<example>Hammontree Bees</example>
					</xs:appinfo>
				</xs:annotation>
			</xs:element>
			<xs:element name="TeamMate"
							type="teams:TeamMemberType"
							minOccurs="1"
							maxOccurs="unbounded">
				<xs:annotation>
					<xs:appinfo>
						<retsid></retsid>
					</xs:appinfo>
				</xs:annotation>
			</xs:element>
			<xs:element name="TeamContactMethod"
							type="commons:ContactMethod"
							minOccurs="0">
				<xs:annotation>
					<xs:appinfo>
						<retsid></retsid>
					</xs:appinfo>
				</xs:annotation>
			</xs:element>
			<xs:element name="TeamWebsite"
							type="xs:anyURI"
							minOccurs="0">
				<xs:annotation>
					<xs:documentation>
						The website URI for the team.
					</xs:documentation>
					<xs:appinfo>
						<retsid></retsid>
						<example>http://www.hammontreebees.com</example>
					</xs:appinfo>
				</xs:annotation>
			</xs:element> 
			<xs:element name="TeamOffice"
							type="offices:Office"
							minOccurs="0">
				<xs:annotation>
					<xs:appinfo>
						<retsid></retsid>
					</xs:appinfo>
				</xs:annotation>
			</xs:element>
			<xs:element name="ModificationTimestamp"
							type="commons:ModificationTimestamp"
							minOccurs="0">
				<xs:annotation>
					<xs:documentation>
						A timestamp for the most recent modification of this
						record.
					</xs:documentation>
					<xs:appinfo>
						<retsid></retsid>
						<example>2007-01-15T11:23:09Z</example>
					</xs:appinfo>
				</xs:annotation>
			</xs:element>
			<xs:any     namespace="##other"
							minOccurs="0"
							maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute  name="teamId"
							type="xs:string"
							use="required">
			<xs:annotation>
				<xs:documentation>
					The local, well-known identifier for the team. May be the same 
					as or different from the key.
				</xs:documentation>
				<xs:appinfo>
					<retsid></retsid>
					<example>12345890</example>
				</xs:appinfo>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute	ref="xml:lang"
							use="optional">
			<xs:annotation>
				<xs:documentation>
					The preferred locale/language of this person.

					The values are formed using the language tags
					defined in RFC 3066, using the lang code and
					country code from ISO 639 and ISO 3166
					http://www.loc.gov/standards/iso639-2/php/code_list.php
					http://www.iso.org/iso/en/prods-services/iso3166ma/index.html

					This form is <!-- <ISOLangCode>[-<ISOCountryCode>] -->
					(ignore the xml comment tags)

					Note that the separator is the dash '-' and not the
					underscore character.
					
					Valid values include en, en-US and other combinations of
					the code sets.

					If omitted, the lang values is assumed to be en.

					Further note that like the xml:lang attribute, this
					element should be treated as case-insensitive. That is,
					the values en-us, en-US, En-us and any other case
					combination should be treated as identical.
				</xs:documentation>
				<xs:appinfo>
					<example>en-US</example>
					<retsid></retsid>
				</xs:appinfo>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute	name="systemId"
							use="optional">
			<xs:annotation>
				<xs:documentation>
					An identifier of the system that a participant
					'belongs' to when the event involves more than
					one system.
				</xs:documentation>
				<xs:appinfo>
					<retsid></retsid>
				</xs:appinfo>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute	name="versionTimestamp"
							type="xs:dateTime"
							use="required"
							fixed="2007-07-26T21:59:00Z">
			<xs:annotation>
				<xs:appinfo>
					<retsid></retsid>
				</xs:appinfo>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>

	<xs:element	name="Team"
					type="teams:TeamType"/>
</xs:schema>