<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tp3="http://www.e-clo.pl/ZEFIR2/eZefir2/xsd/v3_0/Types.xsd" xmlns:tr="http://www.e-clo.pl/ZEFIR2/eZefir2/xsd/v3_0/Trader.xsd" targetNamespace="http://www.e-clo.pl/ZEFIR2/eZefir2/xsd/v3_0/Trader.xsd" elementFormDefault="qualified" attributeFormDefault="unqualified" version="3_0" xml:lang="pl">
	<xs:import namespace="http://www.e-clo.pl/ZEFIR2/eZefir2/xsd/v3_0/Types.xsd" schemaLocation="Types_Z3.xsd"/>
	<xs:complexType name="ZTrader">
		<xs:annotation>
			<xs:documentation>
        DANE PODATNIKA.
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:choice>
				<xs:element name="PrivatePerson" type="tr:ZPrivatePerson"/>
				<xs:element name="Corporate" type="tr:ZCorporate"/>
			</xs:choice>
		</xs:sequence>
		<xs:attribute name="typeOfTaxpayer" use="optional">
			<xs:annotation>
				<xs:documentation source="doc" xml:lang="pl">
          Pole
          pozwalające na oznaczenie czy podatnik jest firmą czy osobą
          fizyczną.
				</xs:documentation>
			</xs:annotation>
			<xs:simpleType>
				<xs:restriction base="xs:string">
					<xs:enumeration value="F">
						<xs:annotation>
							<xs:documentation>
                Osoba fizyczna.
							</xs:documentation>
						</xs:annotation>
					</xs:enumeration>
					<xs:enumeration value="N">
						<xs:annotation>
							<xs:documentation>
                Podatnik niebędący osobą fizyczną.
							</xs:documentation>
						</xs:annotation>
					</xs:enumeration>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="ZPrivatePerson">
		<xs:annotation>
			<xs:documentation>
        Podstawowy zestaw danych o osobie fizycznej.
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="BasicData" type="tr:ZIDPrivatePerson"/>
			<xs:element name="AddressData" type="tr:ZAddress"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="ZCorporate">
		<xs:annotation>
			<xs:documentation>
        Podstawowy zestaw danych o osobie niefizycznej.
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="TaxpayerData" type="tr:ZIDCorporateReg"/>
			<xs:element name="Residence" type="tr:ZAddress"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="ZIDPrivatePerson">
		<xs:annotation>
			<xs:documentation>
        Podstawowy zestaw danych identyfikacyjnych o osobie
        fizycznej.
			</xs:documentation>
		</xs:annotation>
		<xs:attribute name="firstName" type="tp3:ZName" use="required">
			<xs:annotation>
				<xs:documentation source="doc" xml:lang="pl">
          Pierwsze
          imię.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="surname" type="tp3:ZSurname" use="required">
			<xs:annotation>
				<xs:documentation source="doc" xml:lang="pl">
          Nazwisko.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="dateOfBirth" type="tp3:ZDate" use="optional">
			<xs:annotation>
				<xs:documentation source="doc" xml:lang="pl">
          Data
          urodzenia.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="ZIDCorporate">
		<xs:annotation>
			<xs:documentation>
        Podstawowy zestaw danych identyfikacyjnych o osobie
        niefizycznej.
			</xs:documentation>
		</xs:annotation>
		<xs:attribute name="fullName" type="tp3:ZCharacter" use="required">
			<xs:annotation>
				<xs:documentation source="doc" xml:lang="pl">
          Nazwa pełna.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="ZIDCorporateReg">
		<xs:annotation>
			<xs:documentation>
        Podstawowy zestaw danych identyfikacyjnych o osobie
        niefizycznej.
			</xs:documentation>
		</xs:annotation>
		<xs:attribute name="fullName" type="tp3:ZCharacter" use="required">
			<xs:annotation>
				<xs:documentation source="doc" xml:lang="pl">
          Nazwa
          pełna.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="REGON" type="tp3:ZNrREGON" use="optional">
			<xs:annotation>
				<xs:documentation source="doc" xml:lang="pl">
          Numer
          identyfikacyjny REGON.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="ZAddress">
		<xs:annotation>
			<xs:documentation>
        Dane adresowe
			</xs:documentation>
		</xs:annotation>
		<xs:attribute name="country" use="required">
			<xs:annotation>
				<xs:documentation source="doc" xml:lang="pl">
          Kod kraju
          zgodny z udostępnionym słownikiem.
				</xs:documentation>
			</xs:annotation>
			<xs:simpleType>
				<xs:restriction base="xs:string">
					<xs:maxLength value="2"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="province" type="tp3:ZProvinceCode" use="optional">
			<xs:annotation>
				<xs:documentation source="doc" xml:lang="pl">
          Kod
          województwa.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="district" type="tp3:ZDistrictCode" use="optional">
			<xs:annotation>
				<xs:documentation source="doc" xml:lang="pl">
          Kod
          powiatu.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="commune" type="tp3:ZCommuneCode" use="optional">
			<xs:annotation>
				<xs:documentation source="doc" xml:lang="pl">
          Kod
          gminy.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="street" type="tp3:ZCharacter" use="optional">
			<xs:annotation>
				<xs:documentation source="doc" xml:lang="pl">
          Nazwa
          ulicy.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="houseNumber" type="tp3:ZBuildingNumber" use="optional">
			<xs:annotation>
				<xs:documentation source="doc" xml:lang="pl">
          Numer domu.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="localNumber" type="tp3:ZSuiteNumber" use="optional">
			<xs:annotation>
				<xs:documentation source="doc" xml:lang="pl">
          Numer
          lokalu.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="city" type="tp3:ZCity" use="required">
			<xs:annotation>
				<xs:documentation source="doc" xml:lang="pl">
          Nazwa
          miejscowości.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="postalCode" type="tp3:ZPostalCode" use="optional">
			<xs:annotation>
				<xs:documentation source="doc" xml:lang="pl">
          Numer kodu
          pocztowego.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="postalName" type="tp3:ZCity" use="optional">
			<xs:annotation>
				<xs:documentation source="doc" xml:lang="pl">
          Nazwa
          miejscowości, siedziby poczty.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="email" type="tp3:ZEmail" use="optional">
			<xs:annotation>
				<xs:documentation source="doc" xml:lang="pl">
          Adres
          poczty elektronicznej.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="provinceName" type="xs:string" use="optional">
			<xs:annotation>
				<xs:documentation source="doc" xml:lang="pl">
          Nazwa województwa.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="districtName" type="xs:string" use="optional">
			<xs:annotation>
				<xs:documentation source="doc" xml:lang="pl">
          Nazwa powiatu.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="communeName" type="xs:string" use="optional">
			<xs:annotation>
				<xs:documentation source="doc" xml:lang="pl">
          Nazwa gminy.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
</xs:schema>
