<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2011 rel. 2 sp1 (http://www.altova.com) by smals (SMALS-MVM ASBL/VZW) -->
<!--

	v1.2

	1 - Certaines informations (code enregistrement, euro) ne sont plus utiles d'un point de vue fonctionnel mais elles ont été 
         maintenues pour raison de facilité et de rapidité de mise en oeuvre. Ceci permet de garde le circuit 
         de mise en compte intact.
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<xs:annotation>
		<xs:documentation xml:lang="en">Schema Definition used by Social Secretariat to send Repartition List via SMALS's stream tools (SP7) </xs:documentation>
	</xs:annotation>
	<!--||||||||||||||||||||||||||||||||||||||||||-->
	<!-- RepartitionList  -->
	<!--||||||||||||||||||||||||||||||||||||||||||-->
	<xs:element name="RepartitionList">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				  Root Element.
			  </xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element name="SocialSecretariat" type="SocialSecretariat" minOccurs="1" maxOccurs="unbounded"/>
				<xs:element name="TotalList" type="Total" minOccurs="1" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>Total of the list</xs:documentation>
					</xs:annotation>
				</xs:element>
			</xs:sequence>
			<xs:attribute name="Nature" use="required">
				<xs:annotation>
					<xs:documentation xml:lang="en">Required
Choices, 1 : Provision - 2 : Balance Quarter - 3 : Vacation - 9 : Total</xs:documentation>
				</xs:annotation>
				<xs:simpleType>
					<xs:restriction base="xs:integer">
						<xs:pattern value="[1239]"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
			<xs:attribute name="CreationDate" use="required">
				<xs:annotation>
					<xs:documentation xml:lang="en">Required
DDMMCCYY (8 DIGIT)  --  DD : day of the month  -- MM : month of the year  -- CC : century (19 or 20) -- YY : year</xs:documentation>
				</xs:annotation>
				<xs:simpleType>
					<xs:restriction base="xs:integer">
						<xs:pattern value="[0123][0-9][01][0-9][0-6][0-9][0-9][0-9]"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
			<xs:attribute name="Currency">
				<xs:annotation>
					<xs:documentation xml:lang="en">Always EUR.</xs:documentation>
				</xs:annotation>
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="EUR"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	<!--||||||||||||||||||||||||||||||||||||||||||-->
	<!-- SocialSecretariat  -->
	<!--||||||||||||||||||||||||||||||||||||||||||-->
	<xs:complexType name="SocialSecretariat">
		<xs:annotation>
			<xs:documentation xml:lang="en">This can occur one or many time within a list.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="Employer" type="Employer" minOccurs="1" maxOccurs="unbounded"/>
			<xs:element name="TotalSocialSecretariat" type="Total" minOccurs="1" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>Total of all employers of a Social Secretariat</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="Denomination" use="required">
			<xs:annotation>
				<xs:documentation xml:lang="en">Required
Denomination of the Social Secretariat (Max. Lenght is 48 chars, min Lenght is 2 chars.)</xs:documentation>
			</xs:annotation>
			<xs:simpleType>
				<xs:restriction base="xs:string">
					<xs:maxLength value="48"/>
					<xs:minLength value="2"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="Number" use="required">
			<xs:annotation>
				<xs:documentation xml:lang="en">Required
Social Secretariat or Branch Number (3 Digits)</xs:documentation>
			</xs:annotation>
			<xs:simpleType>
				<xs:restriction base="xs:integer">
					<xs:pattern value="[0-9][0-9][0-9]"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="ControlNumber" use="required">
			<xs:annotation>
				<xs:documentation xml:lang="en">Required
Control Number  (2 Digits)</xs:documentation>
			</xs:annotation>
			<xs:simpleType>
				<xs:restriction base="xs:integer">
					<xs:pattern value="[0-9][0-9]"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
	</xs:complexType>
	<!--||||||||||||||||||||||||||||||||||||||||||-->
	<!-- Employer  -->
	<!--||||||||||||||||||||||||||||||||||||||||||-->
	<xs:complexType name="Employer">
		<xs:annotation>
			<xs:documentation xml:lang="en">This can occur one or many time within a Social Secretariat</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="Payment" type="Payment" minOccurs="1" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute name="CompanyID" use="required">
			<xs:annotation>
				<xs:documentation xml:lang="en">Required
Enterprise Number on 10 Digits OR "0000000000" if unknown (then NOSSRegsitrationNbr must be specified)</xs:documentation>
			</xs:annotation>
			<xs:simpleType>
				<xs:union memberTypes="KnownCompanyID UnknownCompanyID"/>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="NOSSRegistrationNbr" use="required">
			<xs:annotation>
				<xs:documentation xml:lang="en">Required
8 Digits Number + 2 Digit Control Number or DIMONA Identification Number. If unknown "0000000000" (then CompanyID must be specified)</xs:documentation>
			</xs:annotation>
			<xs:simpleType>
				<xs:restriction base="xs:string">
					<xs:pattern value="[0-9]{10}"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="Denomination" use="required">
			<xs:annotation>
				<xs:documentation xml:lang="en">Required
Denomination of the Employer (Max. Lenght is 96 chars, min Lenght is 2 chars.)</xs:documentation>
			</xs:annotation>
			<xs:simpleType>
				<xs:restriction base="xs:string">
					<xs:maxLength value="96"/>
					<xs:minLength value="2"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
	</xs:complexType>
	<!--||||||||||||||||||||||||||||||||||||||||||-->
	<!-- Payment -->
	<!--||||||||||||||||||||||||||||||||||||||||||-->
	<xs:complexType name="Payment">
		<xs:attribute name="PaymentDate" use="required">
			<xs:annotation>
				<xs:documentation xml:lang="en">Required
DDMMCCYY (8 Digit fixed)  --  DD : day of the month  -- MM : month of the year  -- CC : century (19 or 20) -- YY : year</xs:documentation>
			</xs:annotation>
			<xs:simpleType>
				<xs:restriction base="xs:integer">
					<xs:pattern value="[0123][0-9][01][0-9][0-6][0-9][0-9][0-9]"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="AccountingClass" use="required">
			<xs:annotation>
				<xs:documentation xml:lang="en">Required
Accounting Category Index or 999 on 3 Digit</xs:documentation>
			</xs:annotation>
			<xs:simpleType>
				<xs:restriction base="xs:string">
					<xs:pattern value="[0-9]{3}"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="Quarter0KCCYY" use="required">
			<xs:annotation>
				<xs:documentation xml:lang="en">Required
Quarter with specific format 0KCCYY with this format : "0" -- K = 0,1,2,3 ou 4 -- CC : Century (19 or 20) -- YY : Year</xs:documentation>
			</xs:annotation>
			<xs:simpleType>
				<xs:restriction base="xs:string">
					<xs:pattern value="0[01234][12][09][0-9][0-9]"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="Reference">
			<xs:annotation>
				<xs:documentation xml:lang="en">Always 0262</xs:documentation>
			</xs:annotation>
			<xs:simpleType>
				<xs:restriction base="xs:integer">
					<xs:pattern value="[0-9][0-9][0-9][0-9]"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="Amount" use="required">
			<xs:annotation>
				<xs:documentation xml:lang="en">Required
Expressed in EUROCENT (no decimal separator, no thousand separator)
Max. value on 14 Digit</xs:documentation>
			</xs:annotation>
			<xs:simpleType>
				<xs:restriction base="xs:integer">
					<xs:totalDigits value="14"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="DossierNumber" use="required">
			<xs:annotation>
				<xs:documentation xml:lang="en">Required
8 Digit</xs:documentation>
			</xs:annotation>
			<xs:simpleType>
				<xs:restriction base="xs:integer">
					<xs:totalDigits value="8"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="PageNumber" use="required">
			<xs:annotation>
				<xs:documentation xml:lang="en">Required
4 Digit</xs:documentation>
			</xs:annotation>
			<xs:simpleType>
				<xs:restriction base="xs:integer">
					<xs:totalDigits value="4"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="ColumnNumber" use="required">
			<xs:annotation>
				<xs:documentation xml:lang="en">Required
1 : Delay or Provision -- 2 : Outside of the delay -- 3 : Outside of the delay -- 4 : Outside of the delay </xs:documentation>
			</xs:annotation>
			<xs:simpleType>
				<xs:restriction base="xs:integer">
					<xs:pattern value="[1234]"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="LineNumber" use="required">
			<xs:annotation>
				<xs:documentation xml:lang="en">Required
2 Digit</xs:documentation>
			</xs:annotation>
			<xs:simpleType>
				<xs:restriction base="xs:integer">
					<xs:totalDigits value="2"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
	</xs:complexType>
	<!--||||||||||||||||||||||||||||||||||||||||||-->
	<!-- Total -->
	<!--||||||||||||||||||||||||||||||||||||||||||-->
	<xs:complexType name="Total">
		<xs:attribute name="TotalItem" use="required">
			<xs:annotation>
				<xs:documentation xml:lang="en">Required
Number of items concerned by the total (List or Social Secretariat)</xs:documentation>
			</xs:annotation>
			<xs:simpleType>
				<xs:restriction base="xs:integer">
					<xs:totalDigits value="5"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="SumCompanyID" use="required">
			<xs:annotation>
				<xs:documentation xml:lang="en">Required
Sum of all CompanyID concerned by the total (List or Social Secretariat)</xs:documentation>
			</xs:annotation>
			<xs:simpleType>
				<xs:restriction base="xs:integer">
					<xs:totalDigits value="20"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="SumNOSSRegistrationNbr" use="required">
			<xs:annotation>
				<xs:documentation xml:lang="en">Required
Sum of all NOSSRegistrationNbr (without control number) concerned by the total (List or Social Secretariat)</xs:documentation>
			</xs:annotation>
			<xs:simpleType>
				<xs:restriction base="xs:integer">
					<xs:totalDigits value="13"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="TotalAmount" use="required">
			<xs:annotation>
				<xs:documentation xml:lang="en">Required
Total amount of the current items in EUROCENT (List or Social Secretariat)</xs:documentation>
			</xs:annotation>
			<xs:simpleType>
				<xs:restriction base="xs:integer">
					<xs:totalDigits value="20"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="TotalPaymentCol1" use="required">
			<xs:annotation>
				<xs:documentation xml:lang="en">Required
Total items with ColumnNumber = 1</xs:documentation>
			</xs:annotation>
			<xs:simpleType>
				<xs:restriction base="xs:integer">
					<xs:totalDigits value="5"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="TotalPaymentCol2" use="required">
			<xs:annotation>
				<xs:documentation xml:lang="en">Required
Total items with ColumnNumber = 2</xs:documentation>
			</xs:annotation>
			<xs:simpleType>
				<xs:restriction base="xs:integer">
					<xs:totalDigits value="5"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="TotalPaymentCol3" use="required">
			<xs:annotation>
				<xs:documentation xml:lang="en">Required
Total items with ColumnNumber = 3</xs:documentation>
			</xs:annotation>
			<xs:simpleType>
				<xs:restriction base="xs:integer">
					<xs:totalDigits value="5"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="TotalPaymentCol4" use="required">
			<xs:annotation>
				<xs:documentation xml:lang="en">Required
Total items with ColumnNumber = 4</xs:documentation>
			</xs:annotation>
			<xs:simpleType>
				<xs:restriction base="xs:integer">
					<xs:totalDigits value="5"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="TotalAmountPaymentCol1" use="required">
			<xs:annotation>
				<xs:documentation xml:lang="en">Required
Total amount of items with ColumnNumber = 1</xs:documentation>
			</xs:annotation>
			<xs:simpleType>
				<xs:restriction base="xs:integer">
					<xs:totalDigits value="20"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="TotalAmountPaymentCol2" use="required">
			<xs:annotation>
				<xs:documentation xml:lang="en">Required
Total amount of items with ColumnNumber = 2</xs:documentation>
			</xs:annotation>
			<xs:simpleType>
				<xs:restriction base="xs:integer">
					<xs:totalDigits value="20"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="TotalAmountPaymentCol3" use="required">
			<xs:annotation>
				<xs:documentation xml:lang="en">Required
Total amount of items with ColumnNumber = 3</xs:documentation>
			</xs:annotation>
			<xs:simpleType>
				<xs:restriction base="xs:integer">
					<xs:totalDigits value="20"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="TotalAmountPaymentCol4" use="required">
			<xs:annotation>
				<xs:documentation xml:lang="en">Required
Total amount of items with ColumnNumber = 4</xs:documentation>
			</xs:annotation>
			<xs:simpleType>
				<xs:restriction base="xs:integer">
					<xs:totalDigits value="20"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
	</xs:complexType>
	<!--||||||||||||||||||||||||||||||||||||||||||-->
	<!--Sous-type-->
	<!--||||||||||||||||||||||||||||||||||||||||||-->
	<xs:simpleType name="KnownCompanyID">
		<xs:restriction base="xs:integer">
			<xs:pattern value="[0-9]{10}"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="UnknownCompanyID">
		<xs:restriction base="xs:integer">
			<xs:pattern value="[0]{10}"/>
		</xs:restriction>
	</xs:simpleType>
</xs:schema>
