FMS6 - Import Schema - Budget Import

Budget Planning Interface Validation XSD

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:element name="Message">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="Header">
					<xs:annotation>
						<xs:documentation>Validation data</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:sequence>
							<xs:element name="LANo">
								<xs:annotation>
									<xs:documentation>Local Authority Number for the school. In Northern Ireland this will be the first 3 characters of the DENI number.</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:pattern value="[0123456789][0123456789][0123456789]"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="SchoolNo">
								<xs:annotation>
									<xs:documentation>The school's identification number. In Northern Ireland this will be the last 4 characters of the DENI number.</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:pattern value="[0123456789][0123456789][0123456789][0123456789]"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="DateCreated" type="xs:dateTime">
								<xs:annotation>
									<xs:documentation>The date and tine this the file was created.</xs:documentation>
								</xs:annotation>
							</xs:element>
							<xs:element name="SerialNumber">
								<xs:annotation>
									<xs:documentation>Serial number identifying the export file. This is not year based.</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="xs:integer">
										<xs:minInclusive value="1"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="OriginatingSoftware">
								<xs:annotation>
									<xs:documentation>Identifies the software generating the message. Not validate. Written to FMS audit trail</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:minLength value="1"/>
										<xs:maxLength value="25"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="FinancialYears">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="FinancialYear" maxOccurs="2">
								<xs:complexType>
									<xs:sequence>
										<xs:element name="FYID">
											<xs:annotation>
												<xs:documentation>Defines the Financial Year in FMS. Writes to the Financial Year that starts in April for the year</xs:documentation>
											</xs:annotation>
											<xs:simpleType>
												<xs:restriction base="xs:string">
													<xs:length value="4"/>
													<xs:pattern value="(20)[012][0123456789]"/>
												</xs:restriction>
											</xs:simpleType>
										</xs:element>
										<xs:element name="Narrative">
											<xs:annotation>
												<xs:documentation>Narrative to write to FMS audit trail at the end of import of any one financial year's data.</xs:documentation>
											</xs:annotation>
											<xs:simpleType>
												<xs:restriction base="xs:string">
													<xs:minLength value="1"/>
													<xs:maxLength value="50"/>
												</xs:restriction>
											</xs:simpleType>
										</xs:element>
										<xs:element name="FundingNarrative">
											<xs:annotation>
												<xs:documentation>Narrative to use when creating Fund Allocations in FMS.</xs:documentation>
											</xs:annotation>
											<xs:simpleType>
												<xs:restriction base="xs:string">
													<xs:minLength value="1"/>
													<xs:maxLength value="50"/>
												</xs:restriction>
											</xs:simpleType>
										</xs:element>
										<xs:element name="CFRHeadings">
											<xs:complexType>
												<xs:sequence>
													<xs:element name="CFRHeading" maxOccurs="unbounded">
														<xs:complexType>
															<xs:sequence>
																<xs:element name="CFRCode">
																	<xs:annotation>
																		<xs:documentation>The CFR Code to which this heading allocation is made.</xs:documentation>
																	</xs:annotation>
																	<xs:simpleType>
																		<xs:restriction base="xs:string">
																			<xs:minLength value="3"/>
																			<xs:maxLength value="4"/>
																			<xs:pattern value="[I][012][0123456789]"/>
																			<xs:pattern value="[E][01234][0123456789]"/>
																			<xs:pattern value="(CI0)[1234]"/>
																			<xs:pattern value="(CE0)[1234]"/>
																		</xs:restriction>
																	</xs:simpleType>
																</xs:element>
																<xs:choice maxOccurs="unbounded">
																	<xs:element name="GLCodeItem" maxOccurs="unbounded">
																		<xs:complexType>
																			<xs:sequence>
																				<xs:element name="Fund">
																					<xs:annotation>
																						<xs:documentation>The FMS Fund</xs:documentation>
																					</xs:annotation>
																					<xs:simpleType>
																						<xs:restriction base="xs:string">
																							<xs:length value="2"/>
																							<xs:pattern value="[0123456789][0123456789]"/>
																						</xs:restriction>
																					</xs:simpleType>
																				</xs:element>
																				<xs:element name="LedgerCode">
																					<xs:annotation>
																						<xs:documentation>The FMS Ledger Code</xs:documentation>
																					</xs:annotation>
																					<xs:simpleType>
																						<xs:restriction base="xs:string">
																							<xs:minLength value="1"/>
																							<xs:maxLength value="8"/>
																							<xs:pattern value="([0123456789]|[ABCDEFGHIJKLMNOPQRSTUVWXYZ])*"/>
																						</xs:restriction>
																					</xs:simpleType>
																				</xs:element>
																				<xs:element name="LedgerType">
																					<xs:annotation>
																						<xs:documentation>The FMS Ledger Type</xs:documentation>
																					</xs:annotation>
																					<xs:simpleType>
																						<xs:restriction base="xs:string">
																							<xs:length value="2"/>
																							<xs:pattern value="([0123456789]|[ABCDEFGHIJKLMNOPQRSTUVWXYZ])*"/>
																							<xs:enumeration value="EX"/>
																							<xs:enumeration value="ES"/>
																							<xs:enumeration value="IN"/>
																						</xs:restriction>
																					</xs:simpleType>
																				</xs:element>
																				<xs:element name="CostCentre">
																					<xs:annotation>
																						<xs:documentation>The FMS Cost Centre. This value must link with the following Ledger Code and Fund in FMS.</xs:documentation>
																					</xs:annotation>
																					<xs:simpleType>
																						<xs:restriction base="xs:string">
																							<xs:minLength value="1"/>
																							<xs:maxLength value="9"/>
																							<xs:pattern value="([0123456789]|[ABCDEFGHIJKLMNOPQRSTUVWXYZ])*"/>
																						</xs:restriction>
																					</xs:simpleType>
																				</xs:element>
																				<xs:choice>
																					<xs:element name="BudgetValue">
																						<xs:annotation>
																							<xs:documentation>The budget value allocated to the above GL Code. NOTE this is restricted to 99,999,999 in the XSD</xs:documentation>
																						</xs:annotation>
																						<xs:simpleType>
																							<xs:restriction base="xs:integer">
																								<xs:minInclusive value="0"/>
																								<xs:maxInclusive value="99999999"/>
																							</xs:restriction>
																						</xs:simpleType>
																					</xs:element>
																					<xs:element name="PeriodValues">
																						<xs:complexType>
																							<xs:sequence>
																								<xs:element name="PeriodValue" maxOccurs="16">
																									<xs:annotation>
																										<xs:documentation>This should appear for as many times as there are Financial Periods in the financial year. If any period is not included then it will be assigned a zero value budget in FMS. </xs:documentation>
																									</xs:annotation>
																									<xs:complexType>
																										<xs:sequence>
																											<xs:element name="FinancialPeriod">
																												<xs:annotation>
																													<xs:documentation>Provided to allow budgeting at period level. If so this will be used at the budget period level not at the Ledger Code allocation level. </xs:documentation>
																												</xs:annotation>
																												<xs:simpleType>
																													<xs:restriction base="xs:string">
																														<xs:length value="2"/>
																														<xs:enumeration value="01"/>
																														<xs:enumeration value="02"/>
																														<xs:enumeration value="03"/>
																														<xs:enumeration value="04"/>
																														<xs:enumeration value="05"/>
																														<xs:enumeration value="06"/>
																														<xs:enumeration value="07"/>
																														<xs:enumeration value="08"/>
																														<xs:enumeration value="09"/>
																														<xs:enumeration value="10"/>
																														<xs:enumeration value="11"/>
																														<xs:enumeration value="12"/>
																														<xs:enumeration value="13"/>
																														<xs:enumeration value="14"/>
																														<xs:enumeration value="15"/>
																														<xs:enumeration value="16"/>
																													</xs:restriction>
																												</xs:simpleType>
																											</xs:element>
																											<xs:element name="FinancialPeriodValue">
																												<xs:annotation>
																													<xs:documentation>The budget value allocated to the above GL Code. NOTE this is restricted to 99,999,999 in the XSD</xs:documentation>
																												</xs:annotation>
																												<xs:simpleType>
																													<xs:restriction base="xs:integer">
																														<xs:minInclusive value="0"/>
																														<xs:maxInclusive value="99999999"/>
																													</xs:restriction>
																												</xs:simpleType>
																											</xs:element>
																										</xs:sequence>
																									</xs:complexType>
																								</xs:element>
																							</xs:sequence>
																						</xs:complexType>
																					</xs:element>
																				</xs:choice>
																			</xs:sequence>
																		</xs:complexType>
																	</xs:element>
																	<xs:element name="FundCodeItem" maxOccurs="unbounded">
																		<xs:complexType>
																			<xs:sequence>
																				<xs:element name="Fund">
																					<xs:annotation>
																						<xs:documentation>The FMS Fund</xs:documentation>
																					</xs:annotation>
																					<xs:simpleType>
																						<xs:restriction base="xs:string">
																							<xs:length value="2"/>
																							<xs:pattern value="[0123456789][0123456789]"/>
																						</xs:restriction>
																					</xs:simpleType>
																				</xs:element>
																				<xs:element name="FundApportionmentValue">
																					<xs:annotation>
																						<xs:documentation>The value allocated to the above Fund Code. NOTE this is restricted to 99,999,999 in FMS and the XSD</xs:documentation>
																					</xs:annotation>
																					<xs:simpleType>
																						<xs:restriction base="xs:integer">
																							<xs:minInclusive value="0"/>
																							<xs:maxInclusive value="99999999"/>
																						</xs:restriction>
																					</xs:simpleType>
																				</xs:element>
																			</xs:sequence>
																		</xs:complexType>
																	</xs:element>
																</xs:choice>
															</xs:sequence>
														</xs:complexType>
													</xs:element>
												</xs:sequence>
											</xs:complexType>
										</xs:element>
										<xs:element name="Checksum">
											<xs:annotation>
												<xs:documentation>Provided for a validity check. This should be the sum of all the positive budget values and will be checked after import</xs:documentation>
											</xs:annotation>
											<xs:simpleType>
												<xs:restriction base="xs:integer">
													<xs:minInclusive value="0"/>
													<xs:maxInclusive value="999999999999"/>
												</xs:restriction>
											</xs:simpleType>
										</xs:element>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
			<xs:attribute name="SchemaVersion" type="xs:string" use="required" fixed="0.02"/>
		</xs:complexType>
	</xs:element>
</xs:schema>