<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<!-- The type "addressBookType" will be defined as a complexType called addressBookType -->
	<xsd:element name="address_book" type="addressBookType"/>
	<!-- addressBookType contains the element "record" which is unbounded in occurance -->
	<xsd:complexType name="addressBookType">
		<xsd:sequence>
			<xsd:element name="record" type="recordType" maxOccurs="unbounded"/>
		</xsd:sequence>
	</xsd:complexType>
	<!-- recordType contains the elements "name", "address", and "contact" -->
	<!-- we use xsd:sequence to declare the order in which they will appear -->
	<xsd:complexType name="recordType">
		<xsd:sequence>
			<xsd:element name="name" type="nameType"/>
			<xsd:element name="address" type="addressType"/>
			<xsd:element name="contact" type="contactType"/>
		</xsd:sequence>
		<xsd:attribute name="ID" type="xsd:string" />
	</xsd:complexType>
	<xsd:complexType name="nameType">
		<xsd:sequence>
			<xsd:element name="first_name" type="xsd:string"/>
			<xsd:element name="middle_name" type="xsd:string"/>
			<xsd:element name="last_name" type="xsd:string"/>
			<xsd:element name="nick_name" type="xsd:string"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="addressType">
		<xsd:sequence>
			<xsd:element name="street_address" type="xsd:string"/>
			<xsd:element name="street_address_detail" type="xsd:string"/>
			<xsd:element name="city" type="xsd:string"/>
			<xsd:element name="state" type="xsd:string"/>
			<xsd:element name="zipcode" type="xsd:string"/>
		</xsd:sequence>
	</xsd:complexType>
	<!-- complexType conatins the elements "home_phone", "work_phone", "cell_phone", "fax_number", and "email_address" -->
	<!-- each of these elements is type "xsd:string" -->
	<xsd:complexType name="contactType">
		<xsd:sequence>
			<xsd:element name="home_phone" type="xsd:string"/>
			<xsd:element name="work_phone" type="xsd:string"/>
			<xsd:element name="cell_phone" type="xsd:string"/>
			<xsd:element name="fax_number" type="xsd:string"/>
			<xsd:element name="email_address" type="xsd:string"/>
		</xsd:sequence>
	</xsd:complexType>
</xsd:schema>

