<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSPY v5 rel. 2 U (http://www.xmlspy.com) by jonathan peltenburg (GeoWise) -->
<xs:schema targetNamespace="http://data.instantatlas.com/atlas" xmlns="http://data.instantatlas.com/atlas" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:annotation>
		<xs:appinfo>atlas-data-v1.1.xsd 1.2 2006/04/21</xs:appinfo>
		<xs:documentation xml:lang="en">(c) Copyright 2006 GeoWise Limited. See http://www.instantatlas.com/ for related information. This schema defines the data structure for XML files used in InstantAtlas reports.</xs:documentation>
	</xs:annotation>
	<xs:element name="AtlasData">
		<xs:annotation>
			<xs:documentation>The root element for the data file.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="Geography" maxOccurs="unbounded"/>
			</xs:sequence>
			<xs:attribute name="version" type="xs:string" use="optional" default="1.3"/>
			<xs:attribute name="data-source" type="xs:string" use="optional">
				<xs:annotation>
					<xs:documentation xml:lang="en">The data source for this data. This could be the data manager version or some other information. It is deliberately left free-form! End clients can use this any way they choose!</xs:documentation>
				</xs:annotation>
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	<xs:element name="ThemeList">
		<xs:annotation>
			<xs:documentation>A list of themes for an atlas.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:choice maxOccurs="unbounded">
					<xs:annotation>
						<xs:documentation>A choice between an 'in-line' definition for a theme or one held in an external file.</xs:documentation>
					</xs:annotation>
					<xs:element ref="Theme"/>
					<xs:element ref="ThemeFile"/>
				</xs:choice>
			</xs:sequence>
		</xs:complexType>
		<xs:unique name="themeIdUnique">
			<xs:selector xpath="Theme|ThemeFile"/>
			<xs:field xpath="@id|@theme-id"/>
		</xs:unique>
		<xs:unique name="indicatorIdDateUnique">
			<xs:selector xpath="Theme/Indicator|ThemeFile/Indicator"/>
			<xs:field xpath="@id"/>
			<xs:field xpath="@date"/>
		</xs:unique>
	</xs:element>
	<xs:element name="ThemeFile">
		<xs:annotation>
			<xs:documentation>A pointer to a file containing one "Theme" element.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:choice maxOccurs="unbounded">
				<xs:element name="Indicator" minOccurs="0" maxOccurs="unbounded">
					<xs:annotation>
						<xs:documentation>An individual indicator. This allows a quick lookup of the indicators in a theme without loading the external file.</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:sequence>
							<xs:element ref="Property" minOccurs="0" maxOccurs="unbounded"/>
						</xs:sequence>
						<xs:attributeGroup ref="indicatorAttributes"/>
						<xs:attribute name="href" type="xs:anyURI" use="optional"/>
					</xs:complexType>
				</xs:element>
				<xs:element ref="Property" minOccurs="0" maxOccurs="unbounded"/>
			</xs:choice>
			<xs:attribute name="theme-id" type="xs:string" use="required">
				<xs:annotation>
					<xs:documentation xml:lang="en">The ID of the theme.</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="theme-name" type="xs:string" use="required">
				<xs:annotation>
					<xs:documentation xml:lang="en">The name of the theme - this will be used in user interfaces.</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="file-name" type="xs:anyURI" use="required"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="Theme">
		<xs:annotation>
			<xs:documentation>An individual theme with its own set of indicator children.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:choice maxOccurs="unbounded">
				<xs:choice minOccurs="0">
					<xs:element name="Indicator" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation>An individual indicator.</xs:documentation>
						</xs:annotation>
						<xs:complexType>
							<xs:choice maxOccurs="unbounded">
								<xs:element name="Summary" minOccurs="0">
									<xs:annotation>
										<xs:documentation>A summary of the numerical data held in an indicator. This should only be present (and will only be looked for by code) if the parent Indicator is marked as "numeric".</xs:documentation>
									</xs:annotation>
									<xs:complexType>
										<xs:attribute name="min" type="xs:double" use="required">
											<xs:annotation>
												<xs:documentation xml:lang="en">The minimum numerical value held in an Indicator.</xs:documentation>
											</xs:annotation>
										</xs:attribute>
										<xs:attribute name="max" type="xs:double" use="required">
											<xs:annotation>
												<xs:documentation xml:lang="en">The maximum numerical value held in an Indicator.</xs:documentation>
											</xs:annotation>
										</xs:attribute>
										<xs:attribute name="mean" type="xs:double" use="required">
											<xs:annotation>
												<xs:documentation xml:lang="en">The mean of the numerical values held in an Indicator.</xs:documentation>
											</xs:annotation>
										</xs:attribute>
										<xs:attribute name="standard-deviation" type="xs:double" use="required">
											<xs:annotation>
												<xs:documentation xml:lang="en">The standard deviation of the numerical values held in an Indicator.</xs:documentation>
											</xs:annotation>
										</xs:attribute>
										<xs:attribute name="median" type="xs:double" use="optional">
											<xs:annotation>
												<xs:documentation xml:lang="en">The median numerical value held in an Indicator.</xs:documentation>
											</xs:annotation>
										</xs:attribute>
									</xs:complexType>
								</xs:element>
								<xs:element ref="Value" maxOccurs="unbounded"/>
								<xs:element ref="ComparisonValue" minOccurs="0" maxOccurs="unbounded"/>
								<xs:element ref="Limits" minOccurs="0"/>
								<xs:element ref="Associate" minOccurs="0" maxOccurs="unbounded"/>
								<xs:element ref="Property" minOccurs="0" maxOccurs="unbounded"/>
							</xs:choice>
							<xs:attributeGroup ref="indicatorAttributes"/>
							<xs:attribute name="href" type="xs:anyURI" use="optional"/>
						</xs:complexType>
						<xs:unique name="indicatorAssociateUnique">
							<xs:selector xpath="Associate"/>
							<xs:field xpath="@id"/>
						</xs:unique>
						<xs:unique name="indicatorValueForUnique">
							<xs:selector xpath="Value"/>
							<xs:field xpath="@for"/>
						</xs:unique>
						<xs:unique name="indicatorPropertyNameUnique">
							<xs:selector xpath="Property"/>
							<xs:field xpath="@name"/>
						</xs:unique>
					</xs:element>
					<xs:element name="IndicatorFile" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation>An individual indicator whose data is held in a separate file.</xs:documentation>
						</xs:annotation>
						<xs:complexType>
							<xs:attributeGroup ref="indicatorAttributes"/>
							<xs:attribute name="href" type="xs:anyURI" use="optional"/>
							<xs:attribute name="file-name" type="xs:anyURI" use="required"/>
						</xs:complexType>
					</xs:element>
				</xs:choice>
				<xs:element ref="Theme" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="ThemeFile" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="Property" minOccurs="0" maxOccurs="unbounded"/>
			</xs:choice>
			<xs:attribute name="id" type="xs:string" use="required">
				<xs:annotation>
					<xs:documentation xml:lang="en">The ID of the theme.</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="name" type="xs:string" use="required">
				<xs:annotation>
					<xs:documentation xml:lang="en">The name of the theme - this will be used in user interfaces.</xs:documentation>
				</xs:annotation>
			</xs:attribute>
		</xs:complexType>
		<xs:unique name="themePropertyNameUnique">
			<xs:selector xpath="Property"/>
			<xs:field xpath="@name"/>
		</xs:unique>
	</xs:element>
	<xs:simpleType name="indicatorDataType">
		<xs:annotation>
			<xs:documentation>The data type of an individual indicator. Note that 'rate' is just a synonym for 'numeric'.</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:enumeration value="numeric"/>
			<xs:enumeration value="categoric"/>
			<xs:enumeration value="rate"/>
			<xs:enumeration value="count"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:attributeGroup name="indicatorAttributes">
		<xs:annotation>
			<xs:documentation>Attributes belonging to an indicator.</xs:documentation>
		</xs:annotation>
		<xs:attribute name="id" type="xs:string" use="required">
			<xs:annotation>
				<xs:documentation xml:lang="en">The ID of the indicator.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="name" type="xs:string" use="required">
			<xs:annotation>
				<xs:documentation xml:lang="en">The name of the indicator which will be displayed in user interfaces.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="type" type="indicatorDataType" use="optional" default="numeric">
			<xs:annotation>
				<xs:documentation xml:lang="en">The type of data that is valid for this indicator - one of 'numeric' or 'categoric'.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="date" type="xs:string" use="optional" default="1900-01-01"/>
		<xs:attribute name="precision" use="optional" default="-1">
			<xs:annotation>
				<xs:documentation xml:lang="en">The precision (number of decimal places) for the data within this indicator. This is a presentation attribute - it does not constrain the actual data values but should be used by any presentation of the data (e.g. in a table).</xs:documentation>
			</xs:annotation>
			<xs:simpleType>
				<xs:restriction base="xs:integer">
					<xs:minInclusive value="-1"/>
					<xs:maxInclusive value="30"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
	</xs:attributeGroup>
	<xs:element name="Geography">
		<xs:annotation>
			<xs:documentation>An individual geography type that can be used in this atlas - e.g. countries, wards or districts. Many atlases will only have one geography.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:choice maxOccurs="unbounded">
				<xs:element ref="FeatureList"/>
				<xs:element ref="FilterList" minOccurs="0"/>
				<xs:element ref="ThemeList"/>
				<xs:element ref="Property" minOccurs="0" maxOccurs="unbounded"/>
			</xs:choice>
			<xs:attribute name="id" type="xs:ID" use="required"/>
			<xs:attribute name="name" type="xs:string" use="required">
				<xs:annotation>
					<xs:documentation xml:lang="en">The name of the geography - used in the user interface.</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="type" use="required">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="point"/>
						<xs:enumeration value="line"/>
						<xs:enumeration value="polygon"/>
						<xs:enumeration value="mixed"/>
						<xs:enumeration value="unspecified"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
		</xs:complexType>
		<xs:unique name="geoPropertyNameUnique">
			<xs:selector xpath="Property"/>
			<xs:field xpath="@name"/>
		</xs:unique>
		<xs:key name="filterId">
			<xs:selector xpath="FilterList/Filter"/>
			<xs:field xpath="@id"/>
		</xs:key>
		<xs:key name="featureId">
			<xs:selector xpath="FeatureList/Feature"/>
			<xs:field xpath="@id"/>
		</xs:key>
		<xs:key name="comparisonFeatureId">
			<xs:selector xpath="FeatureList/ComparisonFeature"/>
			<xs:field xpath="@id"/>
		</xs:key>
		<xs:key name="superFeatureId">
			<xs:selector xpath="FeatureList/Feature|FeatureList/ComparisonFeature"/>
			<xs:field xpath="@id"/>
		</xs:key>
		<xs:keyref name="filterFeatureRef" refer="filterId">
			<xs:selector xpath="FeatureList/Feature/FilterValue|FeatureList/ComparisonFeature/FilterValue"/>
			<xs:field xpath="@for"/>
		</xs:keyref>
		<xs:keyref name="indicatorValueFeatureRef" refer="featureId">
			<xs:selector xpath="ThemeList/Theme/Indicator/Value"/>
			<xs:field xpath="@for"/>
		</xs:keyref>
		<xs:keyref name="associateValueFeatureRef" refer="featureId">
			<xs:selector xpath="ThemeList/Theme/Indicator/Associate/Value"/>
			<xs:field xpath="@for"/>
		</xs:keyref>
		<xs:keyref name="indicatorComparisonValueFeatureRef" refer="comparisonFeatureId">
			<xs:selector xpath="ThemeList/Theme/Indicator/ComparisonValue"/>
			<xs:field xpath="@for"/>
		</xs:keyref>
		<xs:keyref name="associateComparisonValueFeatureRef" refer="comparisonFeatureId">
			<xs:selector xpath="ThemeList/Theme/Indicator/Associate/ComparisonValue"/>
			<xs:field xpath="@for"/>
		</xs:keyref>
		<xs:keyref name="limitsRangeFeatureRef" refer="superFeatureId">
			<xs:selector xpath="ThemeList/Theme/Indicator/Limits/Range"/>
			<xs:field xpath="@for"/>
		</xs:keyref>
	</xs:element>
	<xs:element name="Property">
		<xs:annotation>
			<xs:documentation>A property that can be used for custom properties e.g. links, metadata etc.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:attribute name="name" type="xs:string" use="required"/>
			<xs:attribute name="value" type="xs:string" use="required"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="Value">
		<xs:annotation>
			<xs:documentation>The value for a given indicator for a given geographical feature.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:simpleContent>
				<xs:extension base="ValueType">
					<xs:attribute name="for" type="xs:string" use="required"/>
				</xs:extension>
			</xs:simpleContent>
		</xs:complexType>
	</xs:element>
	<xs:element name="ComparisonValue">
		<xs:annotation>
			<xs:documentation>The value for a given indicator for a given comparison feature.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:simpleContent>
				<xs:extension base="ValueType">
					<xs:attribute name="for" type="xs:string" use="required"/>
				</xs:extension>
			</xs:simpleContent>
		</xs:complexType>
	</xs:element>
	<xs:simpleType name="ValueType">
		<xs:restriction base="xs:string">
			<xs:minLength value="1"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:complexType name="FeatureType">
		<xs:sequence minOccurs="0">
			<xs:element name="FilterValue" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>A filter that can be used against this feature. A feature can be "filterable" by a number of different filters.</xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:simpleContent>
						<xs:extension base="xs:string">
							<xs:attribute name="for" type="xs:Name" use="required"/>
						</xs:extension>
					</xs:simpleContent>
				</xs:complexType>
			</xs:element>
			<xs:element ref="Property" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute name="id" use="required">
			<xs:annotation>
				<xs:documentation xml:lang="en">The ID of the individual geographical feature. This must be unique within a geography.</xs:documentation>
			</xs:annotation>
			<xs:simpleType>
				<xs:restriction base="xs:string">
					<xs:minLength value="1"/>
					<xs:whiteSpace value="preserve"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="name" type="xs:string" use="required">
			<xs:annotation>
				<xs:documentation xml:lang="en">The name of an individual geographical feature. This need not be unique within a geography, but is usually so. This should be used to populate lists, tables etc. in a user interface.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="href" type="xs:anyURI" use="optional">
			<xs:annotation>
				<xs:documentation xml:lang="en">Any link to metadata or further information about a feature.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:element name="FeatureList">
		<xs:annotation>
			<xs:documentation>A list of all the features (points, lines or polygons) that belong to this geography.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="Feature" maxOccurs="unbounded"/>
				<xs:element ref="ComparisonFeature" minOccurs="0" maxOccurs="unbounded"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="FilterList">
		<xs:annotation>
			<xs:documentation>A list of any filters that can be applied to the data. This allows the user to thin out the data in the map.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="Filter" maxOccurs="unbounded"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="Feature" type="FeatureType">
		<xs:annotation>
			<xs:documentation>An individual feature (a point, a line or a polygon).</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="ComparisonFeature" type="FeatureType">
		<xs:annotation>
			<xs:documentation>An individual comparison feature. A comparison feature may or may not be present in any map.</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="Filter">
		<xs:annotation>
			<xs:documentation>An individual filter that can be applied to the data.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:attribute name="id" type="xs:Name" use="required">
				<xs:annotation>
					<xs:documentation xml:lang="en">The unique ID of the filter. A filter ID only needs to be unique within a geography.</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="name" type="xs:string" use="required">
				<xs:annotation>
					<xs:documentation xml:lang="en">The name of the filter. This should be used in GUIs, lists etc.</xs:documentation>
				</xs:annotation>
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	<xs:element name="Limits">
		<xs:annotation>
			<xs:documentation>The upper and lower limits of values associated with a geographical feature.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="Range" maxOccurs="unbounded"/>
			</xs:sequence>
		</xs:complexType>
		<xs:unique name="limitsRangeForUnique">
			<xs:selector xpath="Range"/>
			<xs:field xpath="@for"/>
		</xs:unique>
	</xs:element>
	<xs:element name="Range">
		<xs:annotation>
			<xs:documentation>The range for a given indicator for a given geographical feature.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:attribute name="for" type="xs:string" use="required"/>
			<xs:attribute name="upper" type="xs:double" use="required"/>
			<xs:attribute name="lower" type="xs:double" use="required"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="Associate">
		<xs:annotation>
			<xs:documentation>A set of data that is associated with an indicator but does not "stand-alone". Examples might be counts to compare with rates, etc.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="Value" maxOccurs="unbounded"/>
				<xs:element ref="ComparisonValue" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="Property" minOccurs="0" maxOccurs="unbounded"/>
			</xs:sequence>
			<xs:attribute name="name" type="xs:string" use="required"/>
			<xs:attribute name="type" type="indicatorDataType" use="optional" default="numeric"/>
			<xs:attribute name="precision" use="optional" default="-1">
				<xs:annotation>
					<xs:documentation xml:lang="en">The precision (number of decimal places) for the data within this indicator. This is a presentation attribute - it does not constrain the actual data values but should be used by any presentation of the data (e.g. in a table).</xs:documentation>
				</xs:annotation>
				<xs:simpleType>
					<xs:restriction base="xs:integer">
						<xs:minInclusive value="-1"/>
						<xs:maxInclusive value="30"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
		</xs:complexType>
		<xs:unique name="associateValueForUnique">
			<xs:selector xpath="Value"/>
			<xs:field xpath="@for"/>
		</xs:unique>
	</xs:element>
</xs:schema>

