<!-- XML schema for XML order of applicant on green card lottery 

     Developed by Soft fund ltd. 

     Original copyright:

     Copyright 2001 W3C (Massachusetts Institute of Technology,
     Institut National de Recherche en Informatique et en Automatique,
     Keio University). All Rights Reserved.
     http://www.w3.org/Consortium/Legal/

     This document is governed by the W3C Software License [1] as
     described in the FAQ [2].

     [1] http://www.w3.org/Consortium/Legal/copyright-software-19980720
     [2] http://www.w3.org/Consortium/Legal/IPR-FAQ-20000620.html#DTD     	
-->
<?xml version="1.0" encoding="windows-1251"?>
<xsd:schema targetNamespace="order.xsd" xmlns:order="order.xsd" xmlns:price="price.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" version="1.1">
	<!--  Elements -->
	<xsd:element name="Order" type="order:Order">
		<xsd:annotation>
			<xsd:documentation>The customer order element</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:complexType name="Order">
		<xsd:annotation>
			<xsd:documentation>The order data type</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="Header" type="order:Header"/>
			<xsd:element name="Application" type="order:Application" maxOccurs="unbounded"/>
			<xsd:element name="RecepientLastName" type="xsd:string"/>
			<xsd:element name="RecepientFirstName" type="xsd:string"/>
			<xsd:element name="RecepientAddress" type="order:Address"/>
			<xsd:element name="RecepientPhone" type="order:Phone"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="Header">
		<xsd:annotation>
			<xsd:documentation>The order header</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="Status" type="order:Status" default="0"/>
			<xsd:element name="OrderType" type="order:OrderType"/>
			<xsd:element name="OrderDate" type="xsd:date"/>
			<xsd:element name="DeliveryDate" type="xsd:string"/>
			<xsd:element name="RegNum" type="xsd:integer" default="0"/>
			<xsd:element name="Fees" type="order:Fees"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="Fees">
		<xsd:annotation>
			<xsd:documentation>The order fees</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="PaymentMethod" type="order:PaymentMethod"/>
			<xsd:element name="SumToPay" type="xsd:decimal" default="0"/>
			<xsd:element name="CurrencyToPay" type="xsd:string"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="Application">
		<xsd:annotation>
			<xsd:documentation>The application data</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="ChildCount" type="xsd:integer" default="0"/>
			<xsd:element name="ApplicantType" type="order:ApplicantType" default="APPLICANT"/>
			<xsd:element name="FamilyMembersInfo" type="order:PersonalInfo" maxOccurs="unbounded"/>
			<xsd:element name="ApplicantAddress" type="order:Address"/>
			<xsd:element name="ApplicantPhone" type="order:Phone"/>
			<xsd:element name="ApplicantMobilePhone" type="order:MobilePhone"/>
			<xsd:element name="ApplicantEMail" type="xsd:string"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:simpleType name="Status">
		<xsd:annotation>
			<xsd:documentation>Status data type</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:integer">
			<xsd:enumeration value="0"/>
			<xsd:enumeration value="1"/>
			<xsd:enumeration value="2"/>
			<xsd:enumeration value="4"/>
			<xsd:enumeration value="8"/>
			<xsd:enumeration value="16"/>
			<xsd:enumeration value="32"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="PaymentMethod">
		<xsd:annotation>
			<xsd:documentation>Payment method to select</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="CASH_ON"/>
			<xsd:enumeration value="INTERNET"/>
			<xsd:enumeration value="BANK"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="OrderType">
		<xsd:annotation>
			<xsd:documentation>Order type to select</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="SINGLE"/>
			<xsd:enumeration value="PARENT"/>
			<xsd:enumeration value="PARENT_PLUS"/>
			<xsd:enumeration value="COUPLE_ONE"/>
			<xsd:enumeration value="COUPLE_ONE_PLUS"/>
			<xsd:enumeration value="COUPLE_BOTH"/>
			<xsd:enumeration value="COUPLE_BOTH_PLUS"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="ApplicantType">
		<xsd:annotation>
			<xsd:documentation>Applicant type</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="APPLICANT"/>
			<xsd:enumeration value="SPOUSE"/>
			<xsd:enumeration value="CHILD"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="Year">
		<xsd:restriction base="xsd:integer">
			<xsd:minInclusive value="1900"/>
			<xsd:maxInclusive value="1990"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="Month">
		<xsd:restriction base="xsd:integer">
			<xsd:minInclusive value="1"/>
			<xsd:maxInclusive value="12"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="Day">
		<xsd:restriction base="xsd:integer">
			<xsd:minInclusive value="1"/>
			<xsd:maxInclusive value="31"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:complexType name="PersonalInfo">
		<xsd:sequence>
			<xsd:element name="PersonType" type="order:ApplicantType"/>
			<xsd:element name="LastName" type="xsd:string"/>
			<xsd:element name="FirstName" type="xsd:string"/>
			<xsd:element name="DayOfBirth" type="order:Day"/>
			<xsd:element name="MonthOfBirth" type="order:Month"/>
			<xsd:element name="YearOfBirth" type="order:Year"/>
			<xsd:element name="PlaceOfBirth" type="xsd:string"/>
			<xsd:element name="AreaOfBirth" type="xsd:string"/>
			<xsd:element name="CountryOfBirth" type="xsd:string"/>
			<xsd:element name="CountryOfParent" type="xsd:string" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="Address">
		<xsd:sequence>
			<xsd:element name="Country" type="xsd:string"/>
			<xsd:element name="City" type="xsd:string"/>
			<xsd:element name="Street" type="xsd:string"/>
			<xsd:element name="House" type="xsd:string"/>
			<xsd:element name="Apt" type="xsd:string"/>
			<xsd:element name="Zip" type="xsd:string"/>
			<xsd:element name="PostOffice" type="xsd:string"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="Phone">
		<xsd:sequence>
			<xsd:element name="CountryCode" type="xsd:integer" default="0"/>
			<xsd:element name="AreaCode" type="xsd:integer" default="0"/>
			<xsd:element name="PhoneNum" type="xsd:integer" default="0"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="MobilePhone">
		<xsd:sequence>
			<xsd:element name="MobileCode" type="xsd:integer" default="0"/>
			<xsd:element name="MobileNum" type="xsd:integer" default="0"/>
		</xsd:sequence>
	</xsd:complexType>
</xsd:schema>
