<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.mycompany.com/customerrelations" xmlns="http://www.mycompany.com/customerrelations"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema">	
	
	<xsd:simpleType name="AddressLine">
		<xsd:restriction base="xsd:token">
			<xsd:minLength value="1" />
			<xsd:maxLength value="128" />
		</xsd:restriction>
	</xsd:simpleType>
	
	<xsd:simpleType name="PostalCode">
		<xsd:restriction base="xsd:token">
			<xsd:minLength value="1" />
			<xsd:maxLength value="5" />
		</xsd:restriction>
	</xsd:simpleType>
	
	<xsd:simpleType name="Country">
		<xsd:restriction base="xsd:token">
			<xsd:minLength value="1" />
			<xsd:maxLength value="128" />
		</xsd:restriction>
	</xsd:simpleType>
	
	<xsd:complexType name="Address" >
        <xsd:sequence>
            <xsd:element name="line1" type="AddressLine" nillable="false" minOccurs="0" maxOccurs="1"/>
			<xsd:element name="line2" type="AddressLine" nillable="false" minOccurs="0" maxOccurs="1"/>
            <xsd:element name="postalCode" type="xsd:token" nillable="false" minOccurs="0" maxOccurs="1"/>
            <xsd:element name="city" type="PostalCode" nillable="false" minOccurs="0" maxOccurs="1"/>
			<xsd:element name="country" type="Country" nillable="false" minOccurs="0" maxOccurs="1"/>
        </xsd:sequence>
    </xsd:complexType>

</xsd:schema>
