<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.homeconnections.gov.uk" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.homeconnections.gov.uk" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0a" id="CBLDataTypes">
	<xsd:include schemaLocation="CBLCommonSimpleTypes_v1_0.xsd"/>
	<xsd:annotation>
		<xsd:appinfo xmlns:gms="http://www.govtalk.gov.uk/CM/gms" xmlns:dcq="http://purl.org/dc/terms/" xmlns:dc="http://purl.org/dc/elements/1.1/">
			<dc:contributor>Anite Public Sector Limited</dc:contributor>
			<dc:creator>Anite Public Sector Limited  http://www.anite.com
				<dcq:owner>Home Connections Project, Camden, Westminster, Barnet, Kensington - Chelsea, Islington</dcq:owner>
				<dcq:contact>info@homeconnections.org.uk</dcq:contact>
			</dc:creator>
			<dc:date>
				<dcq:created>2001-12-12</dcq:created>
			</dc:date>
			<dc:date>
				<dcq:modified>2002-01-25</dcq:modified>
				<dcq:modified>2004-03-22</dcq:modified>
			</dc:date>
			<dc:format>text</dc:format>
			<dc:format>
				<dc:medium>http://www.w3.org/2000/10/XMLSchema</dc:medium>
			</dc:format>
			<dc:format>
				<dc:medium>XML Schema (.xsd) file, W3C Recommendation 2000</dc:medium>
			</dc:format>
			<dc:identifier>CBLDataTypes</dc:identifier>
			<dc:language>en</dc:language>
			<dc:publisher>Anite CGD, Unit 4 Eaton Court, Colmworth Business Park, Eaton Socon, Cambridgeshire PE19 8YH</dc:publisher>
			<dc:rights>
				<dcq:copyright>Home Connections 2002-2004</dcq:copyright>
				<gms:SecurityClassification>Unclassified</gms:SecurityClassification>
			</dc:rights>
			<dc:subject>
				<gms:Category>People, communities and living</gms:Category>
			</dc:subject>
			<dc:subject>
				<gms:Project>Home Connections Choice Based Lettings</gms:Project>
			</dc:subject>
			<dc:title>CBL Data Types architectural schema</dc:title>
			<dc:description>
				<dcq:abstract>Schema for general data type definitions</dcq:abstract>
			</dc:description>
			<dc:relation>
				<gms:IsPartOf>PropertyStructure-v1.0</gms:IsPartOf>
			</dc:relation>
			<dc:relation>
				<gms:IsPartOf>IndividualStructure-v1.0</gms:IsPartOf>
			</dc:relation>
		</xsd:appinfo>
		<xsd:documentation>
			This schema provides common data types to be used throughtout the CBL XML schemas
		</xsd:documentation>
	</xsd:annotation>
	<!-- Begin CBL Data type definitions -->
	<xsd:simpleType name="HMSPropertyReferenceType">
		<xsd:restriction base="xsd:integer"/>
	</xsd:simpleType>
	<xsd:simpleType name="HMSIndividualReferenceType">
		<xsd:restriction base="xsd:string">
			<xsd:maxLength value="10"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="CBLPropertyReferenceType">
		<xsd:restriction base="xsd:integer"/>
	</xsd:simpleType>
	<xsd:simpleType name="CBLIndividualReferenceType">
		<xsd:restriction base="xsd:integer"/>
	</xsd:simpleType>
	<xsd:simpleType name="HMSRecordStateType">
		<xsd:annotation>
			<xsd:documentation>
				This is used to indicate the status of a record being transfered. Data is not deleted, only put into 1 of 3 states to keep
				historic records and an audit trail
				The descriptions matching the data values are as follows:
				D: Deleted
				M: Modified
				N: New
			</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="RestrictedStringType">
			<xsd:maxLength value="1"/>
			<xsd:enumeration value="D"/>
			<xsd:enumeration value="M"/>
			<xsd:enumeration value="N"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="CBLDataDescriptionType">
		<xsd:restriction base="RestrictedStringType">
			<xsd:maxLength value="60"/>
			<xsd:minLength value="1"/>
			<xsd:whiteSpace value="preserve"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="OSGridReferenceEastType">
		<xsd:restriction base="xsd:integer">
			<xsd:maxInclusive value="9999999"/>
			<xsd:minInclusive value="0"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="OSGridReferenceNorthType">
		<xsd:restriction base="xsd:integer">
			<xsd:maxInclusive value="9999999"/>
			<xsd:minInclusive value="0"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="CBLNotesType">
		<xsd:annotation>
			<xsd:documentation>
				This type has been defined to allow remarks/comments to be applied to a schema. It is to be applied to
				freeform string based elements for within the CBL Data Structure messaging schemas.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="PopulatedStringType">
			<xsd:maxLength value="255"/>
			<xsd:whiteSpace value="preserve"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="CBLTimeFormatType">
		<xsd:annotation>
			<xsd:documentation>
				Standard time format as defined in W3C specification pattern is hh:mm:ss
			</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:time"/>
	</xsd:simpleType>
	<xsd:complexType name="CBLDateTimeStructure">
		<xsd:annotation>
			<xsd:documentation>
				This is a complex type derived from the date and time types defined above. This gives the XML
				document generator the option to specify a date as either date only or date and time.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="CBLDate" type="DateType"/>
			<xsd:element name="CBLTime" type="CBLTimeFormatType" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:simpleType name="CBLContactMethodType">
		<xsd:annotation>
			<xsd:documentation>
				The preferred method of contact
				The descriptions matching the data values are as follows:
				D: Daytime telephone number
				E: Evening telephone number
				M: Mobile number
				L: Email address
				P: Postal address
			</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="RestrictedStringType">
			<xsd:maxLength value="1"/>
			<xsd:enumeration value="D"/>
			<xsd:enumeration value="E"/>
			<xsd:enumeration value="M"/>
			<xsd:enumeration value="L"/>
			<xsd:enumeration value="P"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="CBLChannelType">
		<xsd:annotation>
			<xsd:documentation>
				The method that an individual used to communicate with the property provider
				The descriptions matching the data values are as follows:
				T: Telephone
				E: Email
				W: Walk-in, i.e face to face contact
				P: By Post
			</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="RestrictedStringType">
			<xsd:maxLength value="1"/>
			<xsd:enumeration value="T"/>
			<xsd:enumeration value="E"/>
			<xsd:enumeration value="W"/>
			<xsd:enumeration value="P"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="CodeValueType">
		<xsd:restriction base="RestrictedStringType">
			<xsd:maxLength value="6"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="CodeDescriptionType">
		<xsd:restriction base="RestrictedStringType">
			<xsd:maxLength value="20"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="PropertyCodeValueType">
		<xsd:restriction base="RestrictedStringType">
			<xsd:maxLength value="4"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="PropertyCodeDescriptionType">
		<xsd:annotation>
			<xsd:documentation>
				This element contains the actual code of the Council or the actual code for the Housing Association.  e.g SCC for sheffield 
			</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="RestrictedStringType">
			<xsd:maxLength value="25"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:complexType name="CBLAreaCodeType">
		<xsd:annotation>
			<xsd:documentation>
				This is a complex type derived from the CodeValue and CodeDescription types.
				Used to identify borough sub-regions.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="CodeValue" type="CodeValueType"/>
			<xsd:element name="CodeDescription" type="CodeDescriptionType" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="CBLPropertySubType">
		<xsd:annotation>
			<xsd:documentation/>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="PropertySubCode" type="PropertyCodeValueType"/>
			<xsd:element name="PropertySubDescription" type="PropertyCodeDescriptionType" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:simpleType name="CBLDwellingType">
		<xsd:annotation>
			<xsd:documentation>
				The following descriptions apply to the enumerated types listed below:
				B:  Bungalow              
				BD: Bungalow-Detached     
				BE: End-Terraced Bungalow
				BF: Pre-Fabricated Bungalow
				BI: Inner-Terraced Bungalow
				BS: Bungalow-Semi         
				BT: Bedsit 
				CR: Caravan 
				H:  House
				HD: House-Detached
				HS: House-Semi  
				FG: Lower Flat
				FL: Flat     
				FM: Flat in a Multi Storey Block
				FU: Upper Flat  
				HE: End-Terraced House
				HT: Inner-Terraced House
				M:  Maisonette   
				ML: Lower Maisonette
				MU: Upper Maisonette
				OT: Other 
				SH: Sheltered-Housing
			</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:maxLength value="2"/>
			<xsd:enumeration value="B"/>
			<xsd:enumeration value="BD"/>
			<xsd:enumeration value="BS"/>
			<xsd:enumeration value="CR"/>
			<xsd:enumeration value="H"/>
			<xsd:enumeration value="HD"/>
			<xsd:enumeration value="HS"/>
			<xsd:enumeration value="FL"/>
			<xsd:enumeration value="M"/>
			<xsd:enumeration value="BT"/>
			<xsd:enumeration value="SH"/>
			<xsd:enumeration value="OT"/>
			<xsd:enumeration value="BE"/>
			<xsd:enumeration value="BI"/>
			<xsd:enumeration value="BF"/>
			<xsd:enumeration value="FG"/>
			<xsd:enumeration value="FM"/>
			<xsd:enumeration value="FU"/>
			<xsd:enumeration value="HT"/>
			<xsd:enumeration value="HE"/>
			<xsd:enumeration value="ML"/>
			<xsd:enumeration value="MU"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="HMSOfferStatusType">
		<xsd:annotation>
			<xsd:documentation>
				The current state of the offer
				The descriptions matching the data values are as follows:
				S: Successful
				R: Refused
				W: Withdrawn
				U: Unsuccessful
				J: Rejected
				C: Created
			</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="RestrictedStringType">
			<xsd:maxLength value="1"/>
			<xsd:enumeration value="S"/>
			<xsd:enumeration value="R"/>
			<xsd:enumeration value="W"/>
			<xsd:enumeration value="U"/>
			<xsd:enumeration value="J"/>
			<xsd:enumeration value="C"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="CBLVulnerableCategoriesType">
		<xsd:annotation>
			<xsd:documentation>
				The Vulnerability categories  that Home Connections want implemented are:				
				GLN: General needs
				HML: Homeless
				LDB:  Learning Disability
				LIT:  Leaving Institution
				MDV: Medical Vulnerability
				MTV:  Mentally Vulnerable
				PYV:  Physically Vulnerable
				RAS:  Refugees / Asylum Seekers
				SHL:  Single Homeless
				VWM: Vulnerable Woman
				YGP : Young Persons	
			</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="RestrictedStringType">
			<xsd:maxLength value="3"/>
			<xsd:enumeration value="GLN"/>
			<xsd:enumeration value="HML"/>
			<xsd:enumeration value="LDB"/>
			<xsd:enumeration value="LIT"/>
			<xsd:enumeration value="MDV"/>
			<xsd:enumeration value="MTV"/>
			<xsd:enumeration value="PYV"/>
			<xsd:enumeration value="RAS"/>
			<xsd:enumeration value="SHL"/>
			<xsd:enumeration value="VWM"/>
			<xsd:enumeration value="YGP"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="CBLDisabledCategoriesType">
		<xsd:annotation>
			<xsd:documentation>
				The Disabled categories element is provided for extension. Currently no
				categories are defined:				
			</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="RestrictedStringType">
			<xsd:maxLength value="10"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="CBLCategoryCodeType">
		<xsd:annotation>
			<xsd:documentation>
				The Categories of Applicant that Home Connections want implemented are:
				ACE:  Accommodation for the Elderly
				HML:  Homeless
				HGR:  Housing Register
				NOM:  Nominations
				NHP:  Non-homeless private sector
				TRN: Transfers
				OT: Other
			</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="RestrictedStringType">
			<xsd:maxLength value="3"/>
			<xsd:enumeration value="ACE"/>
			<xsd:enumeration value="HML"/>
			<xsd:enumeration value="HGR"/>
			<xsd:enumeration value="NOM"/>
			<xsd:enumeration value="NHP"/>
			<xsd:enumeration value="TRN"/>
			<xsd:enumeration value="OT"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="WarningCodeType">
		<xsd:restriction base="RestrictedStringType">
			<xsd:maxLength value="4"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="CouncilTaxBandType">
		<xsd:annotation>
			<xsd:documentation>
				A:
				B:
				C:
				D:
				E:
				F:
				G:
				H:
			</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:maxLength value="1"/>
			<xsd:enumeration value="A"/>
			<xsd:enumeration value="B"/>
			<xsd:enumeration value="C"/>
			<xsd:enumeration value="D"/>
			<xsd:enumeration value="C"/>
			<xsd:enumeration value="E"/>
			<xsd:enumeration value="F"/>
			<xsd:enumeration value="G"/>
			<xsd:enumeration value="H"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="CurrentTenureType">
		<xsd:annotation>
			<xsd:documentation>
				Tenure Code values:
				Council Tenant
				Owner Occupier
				HA
				Private Rented
				Bed and Breakfast
				Assured Shorthold
				Interim Accommodation
				Tied Tenancy
			</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:maxLength value="50"/>
		<!--	<xsd:enumeration value="CT"/>
			<xsd:enumeration value="OO"/>
			<xsd:enumeration value="SF"/>
			<xsd:enumeration value="PR"/>
			<xsd:enumeration value="CT"/>
			<xsd:enumeration value="OO"/>
			<xsd:enumeration value="SF"/>
			<xsd:enumeration value="PR"/> -->
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="CBLBiddingRestrictionCodeType">
		<xsd:annotation>
			<xsd:documentation>
				The restrictiction on cross-borough bidding
				The descriptions matching the data values are as follows:
				ON: Controlling Borough Bidding Only
				SR: Sub-Regional Letting Enabled
				CB: Full Cross-Borough Bidding Enabled
			</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="RestrictedStringType">
			<xsd:maxLength value="2"/>
			<xsd:enumeration value="ON"/>
			<xsd:enumeration value="SR"/>
			<xsd:enumeration value="CB"/>
		</xsd:restriction>
	</xsd:simpleType>
</xsd:schema>
