<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/StaffEmployment.xsd" targetNamespace="http://tempuri.org/StaffEmployment.xsd" id="StaffEmployment">
	<xs:element name="StaffEmployment">
		<xs:complexType>
			<xs:sequence>
				<!-- SAUID of the uploader-->
				<xs:element name="StaffAssignments" maxOccurs="unbounded">
					<xs:complexType>
						<xs:sequence>
							<!--  Beginning of Staff Employment Block -->
							<xs:element name="SAUID" type="string4to4Type"/>
							<xs:element name="YearCode" type="string4to4Type"/>
							<xs:element name="StaffStateID" type="staffStateIDType"/>
							<!-- EndDate only required if ending this position for the staffmember-->
							<!--  CCYY-MM-DD  -->
							<xs:element name="EndDate" type="EndDate"/>
							<xs:element name="EDType" type="EdCategoryType"/>
							<xs:element name="StateJobCode" type="string4to4Type"/>
							<xs:element name="SchoolID" type="SchoolIDType"/>
							<xs:element name="WorkEmail" type="EmailType"/>
							<xs:element name="AssignmentLevel" type="assignmentLevelType"/>
							<xs:element name="HoursPerDay" type="HoursType"/>
							<xs:element name="DaysPerYear" type="DaysType"/>
							<xs:element name="ProgramCategory" type="programCategoryType"/>
							<xs:element name="SubjectMatter" type="subjectMatterType"/>
							<xs:element name="Salary" type="SalaryType"/>
							<xs:element name="FederalFundingPercent" type="FundingType"/>
							<xs:element name="GeneralFundingPercent" type="FundingType"/>
							<xs:element name="OtherFundingPercent" type="FundingType"/>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:simpleType name="staffStateIDType">
		<xs:restriction base="xs:string">
			<xs:pattern value="\d{6}"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="EndDate">
		<xs:restriction base="xs:string">
			<xs:pattern value="|([1-2][0-9][0-9][0-9]-([0][1-9]|[1][0-2])-([0][1-9]|[1-2][0-9]|[3][0-1]))"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="EdCategoryType">
		<xs:restriction base="xs:string">
			<xs:pattern value="[Rr]"/>
			<xs:pattern value="[Vv]"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="string4to4Type">
		<xs:restriction base="xs:string">
			<xs:pattern value="\d{4}"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="SchoolIDType">
		<xs:restriction base="xs:string">
			<xs:pattern value="\d{4}"/>
			<xs:pattern value=""/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="EmailType">
		<xs:restriction base="xs:string">
			<xs:pattern value="([a-zA-Z0-9_\-])([a-zA-Z0-9_\-\.]*)@(\[((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}|((([a-zA-Z0-9\-]+)\.)+))([a-zA-Z]{2,}|(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\])"/>
			<xs:pattern value=""/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="assignmentLevelType">
		<xs:restriction base="xs:string">
			<xs:pattern value="[Ee][Ll]"/>
			<xs:pattern value="[Ss][Ee]"/>
			<xs:pattern value="[Ee][Ss]"/>
			<xs:pattern value="[Aa][Ee]"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="HoursType">
		<xs:restriction base="xs:decimal">
			<xs:pattern value="[0-9].[0-9]"/>
			<xs:pattern value="[0-9]"/>
			<xs:pattern value="[0-1][0-2]"/>
			<xs:pattern value="[0-1][0-2].[0-9]"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="DaysType">
		<xs:restriction base="xs:integer">
			<xs:minInclusive value="0"/>
			<xs:maxInclusive value="280"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="SalaryType">
		<xs:restriction base="xs:integer">
			<xs:minInclusive value="0"/>
			<xs:maxInclusive value="300000"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="programCategoryType">
		<xs:restriction base="xs:string">
			<xs:pattern value="[Ss][Pp]"/>
			<xs:pattern value="[Tt][1]"/>
			<xs:pattern value=""/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="subjectMatterType">
		<xs:restriction base="xs:string">
			<xs:pattern value="[A-Za-z][A-Za-z]"/>
			<xs:pattern value=""/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="yesNoType">
		<xs:restriction base="xs:string">
			<xs:pattern value="[Yy]"/>
			<xs:pattern value="[Nn]"/>
			<xs:pattern value=""/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="FundingType">
		<xs:restriction base="xs:decimal">
			<xs:pattern value="[0-1][0][0]"/>
			<xs:pattern value="[0-1][0][0].[0][0]"/>
			<xs:pattern value=".[0-9][0-9]"/>
			<xs:pattern value="[0-9]"/>
			<xs:pattern value="[0-9][0-9]"/>
			<xs:pattern value="[0-9][0-9].[0-9][0-9]"/>
			<xs:pattern value="[0-9].[0-9][0-9]"/>
		</xs:restriction>
	</xs:simpleType>
</xs:schema>
