<?xml version="1.0" encoding="UTF-8"?> 
<!--
************************************************************************
**  (C) Copyright IBM Corp. 2006
**
**  This program is made available under the terms of the Common Public 
**  License 1.0 as published by the Open Source Initiative (OSI). 
**  http://www.opensource.org/licenses/cpl1.0.php
************************************************************************
-->

<xsd:schema targetNamespace="http://tpox-benchmark.com/custacc" xmlns:custacc="http://tpox-benchmark.com/custacc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" > 
	
	<xsd:complexType name="PhoneType"> 
		<xsd:sequence> 
			<xsd:element name="CountryCode" type="xsd:string"/> 
			<xsd:element name="AreaCode" type="xsd:string"/> 
			<xsd:element name="Number" type="xsd:string"/> 
			<xsd:element name="Extension" type="xsd:string" minOccurs="0"/> 
		</xsd:sequence> 
		<xsd:attribute name="primary" use="required"> 
			<xsd:simpleType> 
				<xsd:restriction base="xsd:NMTOKEN"> 
					<xsd:enumeration value="Yes"/> 
					<xsd:enumeration value="No"/> 
				</xsd:restriction> 
			</xsd:simpleType> 
		</xsd:attribute> 
		<xsd:attribute name="type" type="xsd:string" use="required"/> 
	</xsd:complexType> 
	<xsd:complexType name="AddressType"> 
		<xsd:sequence> 
			<xsd:element name="gStreet"> 
				<xsd:complexType> 
					<xsd:sequence> 
						<xsd:element name="Street" type="xsd:string" maxOccurs="unbounded"/> 
					</xsd:sequence> 
				</xsd:complexType> 
			</xsd:element> 
			<xsd:element name="POBox" type="xsd:string" minOccurs="0" /> 
			<xsd:element name="City" type="xsd:string"/> 
			<xsd:element name="PostalCode" type="xsd:string"/> 
			<xsd:element name="State" type="xsd:string"/> 
			<xsd:element name="Country" type="xsd:string"/> 
			<xsd:element name="CityCountry" type="xsd:string"/> 
			<xsd:element name="Phones"> 
				<xsd:complexType>   <!-- name="CustomerPhonesType"--> 
					<xsd:sequence> 
						<xsd:element name="Phone" type="custacc:PhoneType" minOccurs="0" maxOccurs="unbounded"/> 
					</xsd:sequence> 
				</xsd:complexType> 
			</xsd:element> 
		</xsd:sequence> 
		<xsd:attribute name="primary" use="required"> 
			<xsd:simpleType> 
				<xsd:restriction base="xsd:NMTOKEN"> 
					<xsd:enumeration value="No"/> 
					<xsd:enumeration value="Yes"/> 
				</xsd:restriction> 
			</xsd:simpleType> 
		</xsd:attribute> 
		<xsd:attribute name="type" type="xsd:string" use="required"/> 
	</xsd:complexType> 
	<xsd:complexType name="EmailType"> 
		<xsd:simpleContent> 
			<xsd:extension base="xsd:string"> 
				<xsd:attribute name="primary" use="required"> 
					<xsd:simpleType> 
						<xsd:restriction base="xsd:NMTOKEN"> 
							<xsd:enumeration value="No"/> 
							<xsd:enumeration value="Yes"/> 
						</xsd:restriction> 
					</xsd:simpleType> 
				</xsd:attribute> 
			</xsd:extension> 
		</xsd:simpleContent> 
	</xsd:complexType> 
	<xsd:complexType name="AddressesType"> 
		<xsd:sequence> 
			<xsd:element name="Address" type="custacc:AddressType"  minOccurs="0" maxOccurs="unbounded" /> 
			<xsd:element name="EmailAddresses" minOccurs="0"> 
				<xsd:complexType> 
					<xsd:sequence> 
						<xsd:element name="Email" type="custacc:EmailType"  minOccurs="0" maxOccurs="unbounded"/> 
					</xsd:sequence> 
				</xsd:complexType> 
			</xsd:element> 
		</xsd:sequence> 
	</xsd:complexType> 
	<xsd:simpleType name="PremiumCustomerType"> 
		<xsd:restriction base="xsd:NMTOKEN"> 
			<xsd:enumeration value="Yes"/> 
			<xsd:enumeration value="No"/> 
		</xsd:restriction> 
	</xsd:simpleType> 
	<xsd:simpleType name="CustomerStatusType"> 
		<xsd:restriction base="xsd:NMTOKEN"> 
			<xsd:enumeration value="Active"/> 
			<xsd:enumeration value="Inactive"/> 
		</xsd:restriction> 
	</xsd:simpleType> 



	
	
	<xsd:complexType name="EncryptedType" mixed="false">
	    <xsd:sequence>
	      <xsd:element ref="custacc:CipherData"/> 
	    </xsd:sequence>
	    <xsd:attribute name='Type' type='xsd:anyURI' use='optional'/>
	</xsd:complexType>

	<xsd:element name="CipherData" type="custacc:CipherDataType" /> 

	<xsd:complexType name="CipherDataType" mixed="false">
	  <xsd:sequence>
		<xsd:element name="CipherValue" type="xsd:base64Binary" /> 
	  </xsd:sequence>
	</xsd:complexType>


	<xsd:complexType name="OnlineType"> 
		<xsd:sequence> 
			<xsd:element name="Login" type="xsd:string"/> 
			<xsd:element name="Pin"> 
				<xsd:complexType> 
					<xsd:sequence> 
						<xsd:element name="EncryptedData" type="custacc:EncryptedType"/> 
					</xsd:sequence> 
				</xsd:complexType> 
			</xsd:element> 
			<xsd:element name="Trading-password"> 
				<xsd:complexType> 
					<xsd:sequence> 
						<xsd:element name="EncryptedData" type="custacc:EncryptedType"/> 
					</xsd:sequence> 
				</xsd:complexType> 
			</xsd:element> 
		</xsd:sequence> 
	</xsd:complexType> 
	<xsd:complexType name="TaxType"> 
		<xsd:sequence> 
			<xsd:element name="TaxID" type="xsd:string"  minOccurs="0"/> 
			<xsd:element name="SSN" minOccurs="0"> 
				<xsd:complexType> 
					<xsd:sequence> 
						<xsd:element name="EncryptedData" type="custacc:EncryptedType"/> 
					</xsd:sequence> 
				</xsd:complexType> 
			</xsd:element> 
			<xsd:element name="TaxRate" type="xsd:decimal"/> 
		</xsd:sequence> 
	</xsd:complexType> 
	<xsd:complexType name="BankingInfoType"> 
		<xsd:sequence> 
			<xsd:element name="CustomerSince" type="xsd:date"/> 
			<xsd:element name="PremiumCustomer" type="custacc:PremiumCustomerType"/> 
			<xsd:element name="CustomerStatus" type="custacc:CustomerStatusType"/> 
			<xsd:element name="LastContactDate" type="xsd:date"/> 
			<xsd:element name="ReviewFrequency" type="xsd:string"/> 
			<xsd:element name="Online" type="custacc:OnlineType"/> 
			<xsd:element name="Tax" type="custacc:TaxType"/> 
			<xsd:element name="Currency" type="xsd:string"/> 
		</xsd:sequence> 
	</xsd:complexType> 
	<xsd:complexType name="NameType"> 
		<xsd:sequence> 
			<xsd:element name="Title" type="xsd:string" minOccurs="0" /> 
			<xsd:element name="FirstName" type="xsd:string"/> 
			<xsd:element name="MiddleName" type="xsd:string" minOccurs="0" maxOccurs="10"/> 
			<xsd:element name="LastName" type="xsd:string"/> 
			<xsd:element name="Suffix" type="xsd:string" minOccurs="0" /> 
		</xsd:sequence> 
	</xsd:complexType> 
	<xsd:simpleType name="GenderType"> 
		<xsd:restriction base="xsd:NMTOKEN"> 
			<xsd:enumeration value="Male"/> 
			<xsd:enumeration value="Female"/> 
		</xsd:restriction> 
	</xsd:simpleType> 
	<xsd:complexType name="BalanceType"> 
		<xsd:sequence> 
			<xsd:element name="OnlineActualBal" type="xsd:decimal"/> 
			<xsd:element name="OnlineClearedBal" type="xsd:decimal"/> 
			<xsd:element name="WorkingBalance" type="xsd:decimal"/> 
		</xsd:sequence> 
	</xsd:complexType> 
	<xsd:simpleType name="PassbookType"> 
		<xsd:restriction base="xsd:NMTOKEN"> 
			<xsd:enumeration value="Yes"/> 
			<xsd:enumeration value="No"/> 
		</xsd:restriction> 
	</xsd:simpleType> 
	<xsd:complexType name="mValueDateType"> 
		<xsd:sequence> 
			<xsd:element name="ValueDate" type="xsd:date"/> 
			<xsd:element name="CreditMovement" type="xsd:decimal"/> 
			<xsd:element name="ValueDatedBal" type="xsd:decimal"/> 
		</xsd:sequence> 
		<!-- REMOVED xsd:attribute name="m" type="xsd:integer" use="required"/--> 
	</xsd:complexType> 
	<xsd:simpleType name="AllowNettingType"> 
		<xsd:restriction base="xsd:NMTOKEN"> 
			<xsd:enumeration value="Yes"/> 
			<xsd:enumeration value="No"/> 
		</xsd:restriction> 
	</xsd:simpleType> 
	<xsd:complexType name="InputterType"> 
		<xsd:simpleContent> 
			<xsd:extension base="xsd:string"> 
				<xsd:attribute name="c" type="xsd:decimal" use="optional"/> 
			</xsd:extension> 
		</xsd:simpleContent> 
	</xsd:complexType> 
	<xsd:complexType name="PositionType"> 
		<xsd:sequence> 
			<xsd:element name="Symbol" type="xsd:string"/> 
			<xsd:element name="Name" type="xsd:string"/> 
			<xsd:element name="Type" type="xsd:string"/> 
			<xsd:element name="Quantity" type="xsd:decimal"/> 
		</xsd:sequence> 
		<!-- REMOVED xsd:attribute name="id" type="xsd:integer" use="required"/--> 
	</xsd:complexType> 
	<xsd:complexType name="AccountType"> 
		<xsd:sequence> 
			<xsd:element name="Category" type="xsd:string"/> 
			<xsd:element name="AccountTitle" type="xsd:string"/> 
			<xsd:element name="ShortTitle" type="xsd:string"/> 
			<xsd:element name="Mnemonic" type="xsd:string"/> 
			<xsd:element name="Currency" type="xsd:string"/> 
			<xsd:element name="CurrencyMarket" type="xsd:string"/> 
			<xsd:element name="OpeningDate" type="xsd:date"/> 
			<xsd:element name="AccountOfficer" type="xsd:string"/> 
			<xsd:element name="LastUpdate" type="xsd:dateTime"/> 
			<xsd:element name="Balance" type="custacc:BalanceType"/> 
			<xsd:element name="Passbook" type="custacc:PassbookType"/> 
			<xsd:element name="gValueDate"> 
				<xsd:complexType> 
					<xsd:sequence> 
						<xsd:element name="mValueDate" type="custacc:mValueDateType" maxOccurs="unbounded"/> 
					</xsd:sequence> 
				</xsd:complexType> 
			</xsd:element> 
			<xsd:element name="ChargeCcy" type="xsd:string"/> 
			<xsd:element name="InterestCcy" type="xsd:string"/> 
			<xsd:element name="AllowNetting" type="custacc:AllowNettingType"/> 
			<xsd:element name="gInputter"> 
				<xsd:complexType> 
					<xsd:sequence> 
						<xsd:element name="Inputter" type="custacc:InputterType" maxOccurs="unbounded"/> 
					</xsd:sequence> 
				</xsd:complexType> 
			</xsd:element> 
			<xsd:element name="Holdings"> 
				<xsd:complexType> 
					<xsd:sequence> 
						<xsd:element name="Position" type="custacc:PositionType" maxOccurs="unbounded"/> 
					</xsd:sequence> 
				</xsd:complexType> 
			</xsd:element> 
		</xsd:sequence> 
		<xsd:attribute name="id" type="xsd:string" use="required"/> 
	</xsd:complexType> 
	<xsd:complexType name="CustomerType"> 
		<xsd:sequence> 
			<xsd:element name="Mnemonic" type="xsd:string"/> 
			<xsd:element name="ShortNames"> 
				<xsd:complexType> 
					<xsd:sequence> 
						<xsd:element name="ShortName" type="xsd:string" maxOccurs="unbounded"/> 
					</xsd:sequence> 
				</xsd:complexType> 
			</xsd:element> 
			<xsd:element name="Name" type="custacc:NameType"/> 
			<xsd:element name="DateOfBirth" type="xsd:date"/> 
			<xsd:element name="Gender" type="custacc:GenderType"/> 
			<xsd:element name="Nationality" type="xsd:string"/> 
			<xsd:element name="CountryOfResidence" type="xsd:string"/> 
			<xsd:element name="Languages"> 
				<xsd:complexType> 
					<xsd:sequence> 
						<xsd:element name="Language" type="xsd:string" maxOccurs="unbounded"/> 
					</xsd:sequence> 
				</xsd:complexType> 
			</xsd:element> 
			<xsd:element name="Addresses" type="custacc:AddressesType"/> 
			<xsd:element name="BankingInfo" type="custacc:BankingInfoType"/> 
			<xsd:element name="Accounts"> 
				<xsd:complexType> 
					<xsd:sequence> 
						<xsd:element name="Account" type="custacc:AccountType" maxOccurs="unbounded"/> 
					</xsd:sequence> 
				</xsd:complexType> 
			</xsd:element> 
		</xsd:sequence> 
		<xsd:attribute name="id" type="xsd:integer" use="required"/> 
	</xsd:complexType> 
	<xsd:element name="Customer" type="custacc:CustomerType"/> 
</xsd:schema> 



	
