<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<xs:element name="Map">
		<xs:complexType>
			<xs:all>
				<xs:element ref="Layers" minOccurs="0" maxOccurs="1" />
				<xs:element ref="Handlers" minOccurs="0" maxOccurs="1" />
				<xs:element ref="Controls" minOccurs="0" maxOccurs="1" />
				<xs:element ref="Styles" minOccurs="0" maxOccurs="1" />
				<xs:element ref="Custom" minOccurs="0" maxOccurs="1" />
			</xs:all>
			<xs:attribute name="name" type="xs:string" />
			<xs:attribute name="center" type="xs:string" />
			<xs:attribute name="zoom" type="xs:integer" />
			<xs:attribute name="maxExtent" type="xs:string" />
			<xs:attribute name="width" type="xs:integer" />
			<xs:attribute name="height" type="xs:integer" />
			<xs:attribute name="proxy" type="xs:string" />
		</xs:complexType>
	</xs:element>

	<xs:element name="Handlers">
		<xs:complexType>
			<xs:all>
				<xs:element ref="DragHandler" minOccurs="0" maxOccurs="1" />
				<xs:element ref="WheelHandler" minOccurs="0" maxOccurs="1" />
			</xs:all>
		</xs:complexType>
	</xs:element>

	<xs:complexType name="Handler" abstract="true">
		<xs:attribute name="active" type="xs:boolean" />
	</xs:complexType>

	<xs:element name="DragHandler">
		<xs:complexType>
			<xs:complexContent>
				<xs:extension base="Handler" />
			</xs:complexContent>
		</xs:complexType>
	</xs:element>

	<xs:element name="WheelHandler">
		<xs:complexType>
			<xs:complexContent>
				<xs:extension base="Handler" />
			</xs:complexContent>
		</xs:complexType>
	</xs:element>

	<xs:element name="Controls">
		<xs:complexType>
			<xs:choice minOccurs="0" maxOccurs="unbounded">
				<xs:element ref="CoreLayerManager" />
				<xs:element ref="CorePanZoom" />
				<xs:element ref="LayerManager" />
				<xs:element ref="PanZoom" />
				<xs:element ref="Pan" />
				<xs:element ref="Zoom" />
				<xs:element ref="ZoomBox" />
				<xs:element ref="Overview" />
				
			</xs:choice>
		</xs:complexType>
	</xs:element>

	<xs:complexType name="Control" abstract="true">
		<xs:attribute name="id" type="xs:ID" />
		<xs:attribute name="x" type="xs:integer" />
		<xs:attribute name="y" type="xs:integer" />
		<xs:attribute name="width" type="xs:integer" />
		<xs:attribute name="height" type="xs:integer" />
	</xs:complexType>
	
	<xs:element name="CoreLayerManager">
		<xs:complexType>
			<xs:complexContent>
				<xs:extension base="Control" />
			</xs:complexContent>
		</xs:complexType>
	</xs:element>
	
	<xs:element name="CorePanZoom">
		<xs:complexType>
			<xs:complexContent>
				<xs:extension base="Control" />
			</xs:complexContent>
		</xs:complexType>
	</xs:element>
	
	<xs:element name="LayerManager">
		<xs:complexType>
			<xs:complexContent>
				<xs:extension base="Control" />
			</xs:complexContent>
		</xs:complexType>
	</xs:element>
	
	<xs:element name="PanZoom">
		<xs:complexType>
			<xs:complexContent>
				<xs:extension base="Control" />
			</xs:complexContent>
		</xs:complexType>
	</xs:element>
	
	<xs:element name="Pan">
		<xs:complexType>
			<xs:complexContent>
				<xs:extension base="Control" />
			</xs:complexContent>
		</xs:complexType>
	</xs:element>
	
	<xs:element name="Zoom">
		<xs:complexType>
			<xs:complexContent>
				<xs:extension base="Control" />
			</xs:complexContent>
		</xs:complexType>
	</xs:element>
	
	<xs:element name="ZoomBox">
		<xs:complexType>
			<xs:complexContent>
				<xs:extension base="Control" />
			</xs:complexContent>
		</xs:complexType>
	</xs:element>
	
	<xs:element name="Overview">
		<xs:complexType>
			<xs:complexContent>
				<xs:extension base="Control" />
			</xs:complexContent>
		</xs:complexType>
	</xs:element>

	<xs:element name="Layers">
		<xs:complexType>
			<xs:choice minOccurs="0" maxOccurs="unbounded">
				<xs:element ref="WMS" />
				<xs:element ref="WMSC" />
				<xs:element ref="WFS" />
				<xs:element ref="FeatureLayer" />
				<xs:element ref="Mapnik" />
				<xs:element ref="CycleMap" />
				<xs:element ref="Maplint" />
			</xs:choice>
		</xs:complexType>
	</xs:element>

	<xs:complexType name="Layer" abstract="true">
		<xs:attribute name="alpha" type="xs:decimal" />
		<xs:attribute name="name" type="xs:string" />
		<xs:attribute name="maxExtent" type="xs:string" />
		<xs:attribute name="numZoomLevels" type="xs:integer" />
		<xs:attribute name="projection" type="xs:string" />
		<xs:attribute name="maxResolution" type="xs:decimal" />
	</xs:complexType>

	<xs:element name="WFS">
		<xs:complexType>
			<xs:complexContent>
				<xs:extension base="Layer">
					<xs:attribute name="style" type="xs:string" />
					<xs:attribute name="url" type="xs:string" />
					<xs:attribute name="typename" type="xs:string" />
					<xs:attribute name="version" type="xs:string" />
				</xs:extension>
			</xs:complexContent>
		</xs:complexType>
	</xs:element>


	<xs:element name="WMS">
		<xs:complexType>
			<xs:complexContent>
				<xs:extension base="Layer">
					<xs:attribute name="url" type="xs:string" />
					<xs:attribute name="layers" type="xs:string" />
					<xs:attribute name="format" type="xs:string" />
				</xs:extension>
			</xs:complexContent>
		</xs:complexType>
	</xs:element>

	<xs:element name="WMSC">
		<xs:complexType>
			<xs:complexContent>
				<xs:extension base="Layer">
					<xs:attribute name="url" type="xs:string" />
					<xs:attribute name="layers" type="xs:string" />
					<xs:attribute name="format" type="xs:string" />
				</xs:extension>
			</xs:complexContent>
		</xs:complexType>
	</xs:element>

	<xs:element name="FeatureLayer">
		<xs:complexType>
			<xs:complexContent>
				<xs:extension base="Layer">
					<xs:attribute name="style" type="xs:string" />
				</xs:extension>
			</xs:complexContent>
		</xs:complexType>
	</xs:element>

	<xs:element name="Mapnik">
		<xs:complexType>
			<xs:complexContent>
				<xs:extension base="Layer">
					<xs:attribute name="url" type="xs:string" />
				</xs:extension>
			</xs:complexContent>
		</xs:complexType>
	</xs:element>
	
	<xs:element name="CycleMap">
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="Layer">
          <xs:attribute name="url" type="xs:string" />
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>
  
  <xs:element name="Maplint">
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="Layer">
          <xs:attribute name="url" type="xs:string" />
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>

	<xs:element name="Styles" />

	<xs:element name="Custom" />

</xs:schema>