<!ELEMENT root (employee)>
<!ELEMENT employee (employeebaseinformation, employeepayrollinformation, employmentperiods?, employeesettings?, employeesettlementpoints?, employeeeducationalinformation?, employeeadditionalinformation?)>
<!ELEMENT employeebaseinformation (netvisorkey?,employeeidentifier?, foreignemployeeidentification?, companyidentifier?, firstname?, lastname?, companyname?, phonenumber?, email?)>
<!ELEMENT employeepayrollinformation (streetaddress, postnumber, city, municipality?, country?, nationality?, language?, employeenumber?, 
        profession?, jobbegindate?, payrollrulegroupname, bankaccountnumber?, bankidentificationcode?, accountingaccountnumber?, 
        hierarchy?, dimension*, payslipdeliverymethod?, isjointowner?, isathlete?, isperformingartist?, employeeinsurancetype?,
        ispersonworkingonaroadferryonalandislands?, isentrepreneurwithoptionalyelormyel?, ispersonreceivingeppoinsurancesalary?, isinvoicingserviceuserwithoutbusinessid?, ispersonworkingabroad?, nosocialsecuritypayment?, receivessalaryfromdiplomaticembassy?,
        activity?, foreclosure?, foreclosuremaintenancepersons?, taxnumber?, placeofbusiness?, isleasedemployeeabroadaircraft?, isleasedemployeeabroadship?)>

<!ELEMENT netvisorkey (#PCDATA)>
<!ELEMENT employeeidentifier (#PCDATA)>
<!ELEMENT companyidentifier (#PCDATA)>
<!ELEMENT firstname (#PCDATA)>
<!ELEMENT lastname (#PCDATA)>
<!ELEMENT companyname (#PCDATA)>
<!ELEMENT phonenumber (#PCDATA)>
<!ELEMENT email (#PCDATA)>

<!ELEMENT foreignemployeeidentification (identifier, issuingcountry, gender, dateofbirth)>
<!ELEMENT identifier (#PCDATA)>
<!ATTLIST identifier type (taxidentificationnumber|foreignpersonalidentifier|other) #REQUIRED>
<!ELEMENT issuingcountry (#PCDATA)>
<!ATTLIST issuingcountry type CDATA #FIXED "ISO-3166">
<!ELEMENT gender (#PCDATA)>
<!ELEMENT dateofbirth (#PCDATA)>
<!ATTLIST dateofbirth format CDATA #FIXED "ansi">

<!ELEMENT streetaddress (#PCDATA)>
<!ELEMENT postnumber (#PCDATA)>
<!ELEMENT city (#PCDATA)>
<!ELEMENT municipality (#PCDATA)>
<!ELEMENT country (#PCDATA)>
<!ELEMENT nationality (#PCDATA)>
<!ELEMENT language (#PCDATA)>
<!ELEMENT employeenumber (#PCDATA)>
<!ELEMENT profession (#PCDATA)>
<!ELEMENT jobbegindate (#PCDATA)>
<!ATTLIST jobbegindate format CDATA #FIXED "ansi">
<!ELEMENT payrollrulegroupname (#PCDATA)>
<!ELEMENT bankaccountnumber (#PCDATA)>
<!ELEMENT bankidentificationcode (#PCDATA)>
<!ELEMENT accountingaccountnumber (#PCDATA)>
<!ELEMENT hierarchy (#PCDATA)>
<!ATTLIST hierarchy type (netvisor|customer) #REQUIRED>

<!ELEMENT dimension (dimensionname, dimensionitem?, dimensionitemcode?, dimensionitemname?)>
<!ELEMENT dimensionname (#PCDATA)>
<!ELEMENT dimensionitem (#PCDATA)>
<!ATTLIST dimensionitem fatherid CDATA #IMPLIED>
<!ELEMENT dimensionitemcode (#PCDATA)>
<!ELEMENT dimensionitemname (#PCDATA)>

<!ELEMENT payslipdeliverymethod (#PCDATA)>
<!ATTLIST payslipdeliverymethod type (netvisor) #REQUIRED>

<!ELEMENT isjointowner (#PCDATA)>
<!ELEMENT isathlete (#PCDATA)>
<!ELEMENT isperformingartist (#PCDATA)>
<!ELEMENT ispersonworkingonaroadferryonalandislands (#PCDATA)>
<!ELEMENT isentrepreneurwithoptionalyelormyel (#PCDATA)>
<!ELEMENT ispersonreceivingeppoinsurancesalary (#PCDATA)>
<!ELEMENT isinvoicingserviceuserwithoutbusinessid (#PCDATA)>
<!ELEMENT ispersonworkingabroad (#PCDATA)>
<!ELEMENT nosocialsecuritypayment (#PCDATA)>
<!ELEMENT receivessalaryfromdiplomaticembassy (#PCDATA)>
<!ELEMENT activity (#PCDATA)>
<!ELEMENT foreclosure (#PCDATA)>
<!ELEMENT foreclosuremaintenancepersons (#PCDATA)>
<!ELEMENT taxnumber (#PCDATA)>
<!ELEMENT placeofbusiness (#PCDATA)>
<!ELEMENT isleasedemployeeabroadaircraft (#PCDATA)>
<!ELEMENT isleasedemployeeabroadship (#PCDATA)>

<!ELEMENT employeeinsurancetype (#PCDATA)>

<!ELEMENT employmentperiods (employmentperiod+)>
<!ELEMENT employmentperiod (companystartdate?, startdate, probationenddate?, employmentmode?, profession, comment?, enddate?, endreason?, occupationclassification?, employmentcontract?, employmentform?, parttimepercent?, regularworkinghours?, groundsforemployment?, kevaprofessionalclasscode?, kevaemploymentregistration?, ispaymenttypemonthlywage?, ispaymenttypehourlywage?, ispaymenttypepiecewage?, collectiveagreement?, stateemploymentfund?, carbenefityear?, isabroadcarbenefit?, caremissionsvalue?, trafioccupationcode? )>

<!ELEMENT companystartdate (#PCDATA)>
<!ATTLIST companystartdate format CDATA #FIXED "ansi">
<!ELEMENT startdate (#PCDATA)>
<!ATTLIST startdate format CDATA #FIXED "ansi">
<!ELEMENT probationenddate (#PCDATA)>
<!ATTLIST probationenddate format CDATA #FIXED "ansi">
<!ELEMENT employmentmode (#PCDATA)>
<!ATTLIST employmentmode type (netvisor) #REQUIRED>
<!ELEMENT comment (#PCDATA)>
<!ELEMENT enddate (#PCDATA)>
<!ATTLIST enddate format CDATA #FIXED "ansi">
<!ELEMENT endreason (#PCDATA)>
<!ATTLIST endreason type (netvisor) #REQUIRED>
<!ELEMENT occupationclassification (#PCDATA)>
<!ATTLIST occupationclassification type (isco) #REQUIRED>
<!-- employmentcontract: With fixed-term contract, also enddate must be given. -->
<!ELEMENT employmentcontract (#PCDATA)>
<!ATTLIST employmentcontract type (netvisor) #REQUIRED>
<!ELEMENT employmentform (#PCDATA)>
<!ATTLIST employmentform type (netvisor) #REQUIRED>
<!-- parttimepercent: Decimal value between 0 and 100 including boundaries. Rounded to nearest two decimal places. Can be given only when employment form is part-time. -->
<!ELEMENT parttimepercent (#PCDATA)>
<!-- regularworkinghours: Decimal value between 0 and 168 including boundaries. Rounded to nearest two decimal places. -->
<!ELEMENT regularworkinghours (#PCDATA)>

<!ELEMENT groundsforemployment (#PCDATA)>
<!ELEMENT kevaprofessionalclasscode (#PCDATA)>
<!ELEMENT kevaemploymentregistration (#PCDATA)>
<!ATTLIST kevaemploymentregistration type CDATA #FIXED "keva">
<!ATTLIST kevaemploymentregistration pensionprovidercode CDATA #IMPLIED>
<!ELEMENT ispaymenttypemonthlywage (#PCDATA)>
<!ELEMENT ispaymenttypehourlywage (#PCDATA)>
<!ELEMENT ispaymenttypepiecewage (#PCDATA)>
<!ELEMENT collectiveagreement (#PCDATA)>
<!ATTLIST collectiveagreement type CDATA #FIXED "cbacode">
<!ELEMENT stateemploymentfund (#PCDATA)>
<!ELEMENT carbenefityear (#PCDATA)>
<!ELEMENT isabroadcarbenefit (#PCDATA)>
<!ELEMENT caremissionsvalue (#PCDATA)>
<!ELEMENT trafioccupationcode (#PCDATA)>

<!ELEMENT employeesettings (payrollservice?,resourcemanagement?)>
<!ELEMENT payrollservice (#PCDATA)>
<!ELEMENT resourcemanagement (#PCDATA)>

<!ELEMENT employeesettlementpoints (employeeworkpensioninsurance?, employeeunemploymentinsurance?, employeeaccidentinsurance?, employeegrouplifeinsurance?, employeeotherinsurance?, employeeunionmembershipfee?, employeeforeclosure?)>
<!ELEMENT employeeworkpensioninsurance (type, name)>
<!ELEMENT employeeunemploymentinsurance (type, name)>
<!ELEMENT employeeaccidentinsurance (type, name)>
<!ELEMENT employeegrouplifeinsurance (type, name)>
<!ELEMENT employeeotherinsurance (type, name)>
<!ELEMENT employeeunionmembershipfee (type, name)>
<!ELEMENT employeeforeclosure (type, name)>
<!ELEMENT type (#PCDATA)>
<!ELEMENT name (#PCDATA)>

<!ELEMENT employeeeducationalinformation (degree+)>
<!ELEMENT degree (name, school, graduationyear, primarydegree)>
<!ELEMENT school (#PCDATA)>
<!ELEMENT graduationyear (#PCDATA)>
<!ELEMENT primarydegree (#PCDATA)>

<!ELEMENT employeeadditionalinformation (additionalinformationfield+)>
<!ELEMENT additionalinformationfield (name, value)>
<!ELEMENT value (#PCDATA)>
