<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
	<xsd:element name="statisticsDB">
		<xsd:annotation>
			<xsd:documentation>Comment describing your root element</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="cityStatistics" minOccurs="0" maxOccurs="unbounded">
					<xsd:complexType>
						<xsd:sequence>
							<xsd:element name="city" type="xsd:string" nillable="true"/>
							<xsd:element name="organization" minOccurs="0" maxOccurs="unbounded">
								<xsd:complexType>
									<xsd:sequence>
										<xsd:element name="cid" type="xsd:string"/>
										<xsd:element name="name" type="xsd:string" nillable="true"/>
										<xsd:element name="funding" minOccurs="0" maxOccurs="unbounded">
											<xsd:complexType>
												<xsd:all>
													<xsd:element name="pi" type="xsd:string"/>
													<xsd:element name="aid" type="xsd:string"/>
												</xsd:all>
											</xsd:complexType>
										</xsd:element>
									</xsd:sequence>
								</xsd:complexType>
							</xsd:element>
							<xsd:element name="financial" minOccurs="0" maxOccurs="unbounded">
								<xsd:complexType>
									<xsd:all>
										<xsd:element name="aid" type="xsd:string"/>
										<xsd:element name="amount" type="xsd:string" nillable="true"/>
										<xsd:element name="proj" type="xsd:string" nillable="false" minOccurs="0"/>
										<xsd:element name="year" type="xsd:string" nillable="true"/>
									</xsd:all>
								</xsd:complexType>
							</xsd:element>
						</xsd:sequence>
					</xsd:complexType>
					<xsd:keyref name="fk2" refer="tk2">
						<xsd:selector xpath="./organization/funding"/>
						<xsd:field xpath="aid"/>
					</xsd:keyref>
					<xsd:key name="tk2">
						<xsd:selector xpath="./financial"/>
						<xsd:field xpath="aid"/>
					</xsd:key>
				</xsd:element>
			</xsd:sequence>
		</xsd:complexType>
		<xsd:key name="tk4">
			<xsd:selector xpath="./cityStatistics"/>
			<xsd:field xpath="city"/>
		</xsd:key>
	</xsd:element>
</xsd:schema>
