<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ms="http://www.mapserver.org/mapserver" targetNamespace="http://www.mapserver.org/mapserver" elementFormDefault="qualified" attributeFormDefault="unqualified" version="6.2.1">
	<!-- Definition of types -->
	<xs:simpleType name="rgbColorValueType">
		<xs:restriction base="xs:integer">
			<xs:minInclusive value="-1"/>
			<xs:maxInclusive value="255"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:complexType name="rgbColorType">
		<xs:attribute name="red" type="ms:rgbColorValueType" use="required"/>
		<xs:attribute name="green" type="ms:rgbColorValueType" use="required"/>
		<xs:attribute name="blue" type="ms:rgbColorValueType" use="required"/>
	</xs:complexType>
	<xs:simpleType name="rgbColorExtendedValueType">
		<xs:restriction base="xs:integer">
			<xs:minInclusive value="-1"/>
			<xs:maxInclusive value="255"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:complexType name="rgbExtendedColorType">
		<xs:attribute name="red" type="ms:rgbColorExtendedValueType" use="required"/>
		<xs:attribute name="green" type="ms:rgbColorExtendedValueType" use="required"/>
		<xs:attribute name="blue" type="ms:rgbColorExtendedValueType" use="required"/>
	</xs:complexType>
	<xs:simpleType name="stateEnum">
		<xs:restriction base="xs:string">
			<xs:enumeration value="ON"/>
			<xs:enumeration value="OFF"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="embedStateEnum">
		<xs:restriction base="xs:string">
			<xs:enumeration value="EMBED"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="stateEnumUnion">
		<xs:union memberTypes="ms:stateEnum ms:embedStateEnum"/>
	</xs:simpleType>
	<xs:simpleType name="booleanEnum">
		<xs:restriction base="xs:string">
			<xs:enumeration value="TRUE"/>
			<xs:enumeration value="FALSE"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="positionEnum">
		<xs:restriction base="xs:string">
			<xs:enumeration value="UL"/>
			<xs:enumeration value="UC"/>
			<xs:enumeration value="UR"/>
			<xs:enumeration value="LL"/>
			<xs:enumeration value="LC"/>
			<xs:enumeration value="LR"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="fullPositionEnum">
		<xs:restriction base="xs:string">
			<xs:enumeration value="CL"/>
			<xs:enumeration value="CC"/>
			<xs:enumeration value="CR"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:complexType name="sizeType">
		<xs:attribute name="x" type="xs:nonNegativeInteger"/>
		<xs:attribute name="y" type="xs:nonNegativeInteger"/>
	</xs:complexType>
	<xs:complexType name="pointType">
		<xs:attribute name="x" type="xs:float"/>
		<xs:attribute name="y" type="xs:float"/>
	</xs:complexType>
	<xs:simpleType name="angleType">
		<xs:restriction base="xs:double">
			<xs:minInclusive value="-360"/>
			<xs:maxInclusive value="360"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="attributeType">
		<xs:restriction base="xs:string">
			<xs:pattern value="\[.+\]"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="debugModeEnum">
		<xs:restriction base="xs:string">
			<xs:pattern value="[oO][nN]|[oO][fF][fF]|1|2|3|4|5"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="unitType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="FEET"/>
			<xs:enumeration value="INCHES"/>
			<xs:enumeration value="KILOMETERS"/>
			<xs:enumeration value="METERS"/>
			<xs:enumeration value="MILES"/>
			<xs:enumeration value="NAUTICALMILES"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="extendedUnitType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="PIXELS"/>
			<xs:enumeration value="DD"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="unitTypeUnion">
		<xs:union memberTypes="ms:unitType ms:extendedUnitType"/>
	</xs:simpleType>
	<xs:complexType name="itemType">
		<xs:sequence>
			<xs:element name="item" minOccurs="0" maxOccurs="unbounded">
				<xs:complexType>
					<xs:simpleContent>
						<xs:extension base="xs:string">
							<xs:attribute name="name" type="xs:string" use="required"/>
						</xs:extension>
					</xs:simpleContent>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:simpleType name="alignEnum">
		<xs:restriction base="xs:string">
			<xs:enumeration value="LEFT"/>
			<xs:enumeration value="CENTER"/>
			<xs:enumeration value="RIGHT"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:complexType name="expressionType">
          <xs:simpleContent>
	    <xs:extension base="xs:string">
	      <xs:attribute name="type" default="CONSTANT">
                <xs:simpleType>
	          <xs:restriction base="xs:string">
	            <xs:enumeration value="CONSTANT"/>
	            <xs:enumeration value="REGEX"/>
                    <xs:enumeration value="MSEXPR"/>
		  </xs:restriction>
                </xs:simpleType>
              </xs:attribute>
	    </xs:extension>
	  </xs:simpleContent>
	</xs:complexType>
	<xs:complexType name="symbolType">
          <xs:simpleContent>
	    <xs:extension base="xs:string">
	      <xs:attribute name="type" default="ID">
                <xs:simpleType>
	          <xs:restriction base="xs:string">
	            <xs:enumeration value="ID"/>
                    <xs:enumeration value="NAME"/>
		  </xs:restriction>
                </xs:simpleType>
              </xs:attribute>
	    </xs:extension>
	  </xs:simpleContent>
	</xs:complexType>
	<!-- Definition of Mapfile elements -->
	<!-- QUERYMAP Definition -->
	<xs:complexType name="QueryMap">
		<xs:all>
			<xs:element name="color" type="ms:rgbColorType" minOccurs="0"/>
			<xs:element name="size" type="ms:sizeType" minOccurs="0"/>
			<xs:element name="style" minOccurs="0">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="NORMAL"/>
						<xs:enumeration value="HILITE"/>
						<xs:enumeration value="SELECTED"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
		</xs:all>
		<xs:attribute name="status" type="ms:stateEnum"/>
	</xs:complexType>
	<!-- WEB Definition -->
	<xs:complexType name="Web">
		<xs:sequence>
			<xs:element name="browseFormat" type="xs:string" minOccurs="0"/>
			<xs:element name="empty" type="xs:string" minOccurs="0"/>
			<xs:element name="error" type="xs:string" minOccurs="0"/>
			<xs:element name="footer" type="xs:string" minOccurs="0"/>
			<xs:element name="header" type="xs:string" minOccurs="0"/>
			<xs:element name="imagePath" type="xs:string" minOccurs="0"/>
			<xs:element name="tempPath" type="xs:string" minOccurs="0"/>
			<xs:element name="imageUrl" type="xs:string" minOccurs="0"/>
			<xs:element name="legendFormat" type="xs:string" minOccurs="0"/>
			<xs:element name="log" type="xs:string" minOccurs="0"/>
			<xs:element name="maxScaleDenom" type="xs:double" minOccurs="0"/>
			<xs:element name="maxTemplate" type="xs:string" minOccurs="0"/>
			<xs:element name="Metadata" type="ms:itemType" minOccurs="0"/>
			<xs:element name="minScaleDenom" type="xs:double" minOccurs="0"/>
			<xs:element name="minTemplate" type="xs:string" minOccurs="0"/>
			<xs:element name="queryFormat" type="xs:string" minOccurs="0"/>
			<xs:element name="template" type="xs:string" minOccurs="0"/>
			<xs:element name="Validation" type="ms:itemType" minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>
	<!-- OUTPUTFORMAT Definition -->
	<xs:complexType name="OutputFormat">
		<xs:sequence>
			<xs:element name="driver" type="xs:string" minOccurs="0"/>
			<xs:element name="extension" type="xs:string" minOccurs="0"/>
			<xs:element name="formatOption" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="imageMode">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="PC256"/>
						<xs:enumeration value="RGB"/>
						<xs:enumeration value="RGBA"/>
						<xs:enumeration value="BYTE"/>
						<xs:enumeration value="INT16"/>
						<xs:enumeration value="FLOAT32"/>
						<xs:enumeration value="FEATURE"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="mimeType" type="xs:string" minOccurs="0"/>
			<xs:element name="transparent" type="ms:stateEnum" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute name="name" type="xs:string"/>
	</xs:complexType>
	<!-- LEGEND Definition -->
	<xs:complexType name="Legend">
		<xs:all>
			<xs:element name="imageColor" type="ms:rgbColorType" minOccurs="0"/>
			<xs:element name="keySize" type="ms:sizeType" minOccurs="0"/>
			<xs:element name="keySpacing" type="ms:sizeType" minOccurs="0"/>
			<xs:element name="Label" type="ms:Label" minOccurs="0"/>
			<xs:element name="outlineColor" type="ms:rgbColorType" minOccurs="0"/>
			<xs:element name="position" type="ms:positionEnum" minOccurs="0"/>
			<xs:element name="postLabelCache" type="ms:booleanEnum" minOccurs="0"/>
			<xs:element name="template" type="xs:string" minOccurs="0"/>
		</xs:all>
		<xs:attribute name="status" type="ms:stateEnumUnion"/>
	</xs:complexType>
	<!-- SCALEBAR Definition -->
	<xs:complexType name="ScaleBar">
		<xs:sequence>
			<xs:element name="align" type="ms:alignEnum"/>
			<xs:element name="backgroundColor" type="ms:rgbColorType" minOccurs="0"/>
			<xs:element name="color" type="ms:rgbColorType" minOccurs="0"/>
			<xs:element name="imageColor" type="ms:rgbColorType" minOccurs="0"/>
			<xs:element name="intervals" type="xs:positiveInteger" default="4" minOccurs="0"/>
			<xs:element name="Label" type="ms:Label" minOccurs="0"/>
			<xs:element name="outlineColor" type="ms:rgbColorType"/>
			<xs:element name="position" type="ms:positionEnum" default="LR" minOccurs="0"/>
			<xs:element name="postLabelCache" type="ms:booleanEnum" default="FALSE" minOccurs="0"/>
			<xs:element name="size" type="ms:sizeType" minOccurs="0"/>
			<xs:element name="style" minOccurs="0">
				<xs:simpleType>
					<xs:restriction base="xs:integer">
						<xs:minInclusive value="0"/>
						<xs:maxInclusive value="1"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="transparent" type="ms:stateEnum" minOccurs="0"/>
			<xs:element name="units" type="ms:unitType" default="MILES" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute name="status" type="ms:stateEnumUnion" default="OFF"/>
	</xs:complexType>
	<!-- LABEL Definition -->
	<xs:complexType name="Label">
		<xs:sequence>
			<xs:element name="align" type="ms:alignEnum" minOccurs="0"/>
			<xs:element name="angle" minOccurs="0">
				<xs:simpleType id="labelAngleType">
					<xs:union memberTypes="ms:angleType ms:attributeType">
						<xs:simpleType>
							<xs:restriction base="xs:string">
								<xs:pattern value="[aA][uU][tT][oO]|[fF][oO][lL][lL][oO][wW]|[aA][uU][tT][oO]2"/>
								<!-- attribute -->
							</xs:restriction>
						</xs:simpleType>
					</xs:union>
				</xs:simpleType>
			</xs:element>
			<xs:element name="antialias" type="ms:booleanEnum" minOccurs="0"/>
			<xs:element name="buffer" type="xs:integer" minOccurs="0"/>
			<xs:choice minOccurs="0">
				<xs:element name="color" type="ms:rgbColorType"/>
				<xs:element name="colorAttribute" type="ms:attributeType"/>
			</xs:choice>
			<xs:element name="encoding" minOccurs="0"/>
			<xs:element name="expression" type="ms:expressionType" minOccurs="0"/>
			<xs:element name="font" type="xs:string" minOccurs="0"/>
			<xs:element name="force" type="ms:booleanEnum" default="FALSE" minOccurs="0"/>
			<xs:element name="maxLength" type="xs:integer" default="0" minOccurs="0"/>
			<xs:element name="maxOverlapAngle" type="xs:float" minOccurs="0"/>
			<xs:element name="maxSize" type="xs:integer" default="256" minOccurs="0"/>
			<xs:element name="minDistance" type="xs:integer" minOccurs="0"/>
			<xs:element name="minFeatureSize" minOccurs="0">
				<xs:simpleType>
					<xs:union memberTypes="xs:integer">
						<xs:simpleType>
							<xs:restriction base="xs:string">
								<xs:enumeration value="AUTO"/>
							</xs:restriction>
						</xs:simpleType>
					</xs:union>
				</xs:simpleType>
			</xs:element>
			<xs:element name="minSize" type="xs:integer" default="4" minOccurs="0"/>
			<xs:element name="offset" type="ms:sizeType" minOccurs="0"/>
			<xs:choice minOccurs="0">
				<xs:element name="outlineColor" type="ms:rgbColorType"/>
				<xs:element name="outlineColorAttribute" type="ms:attributeType"/>
			</xs:choice>
			<xs:element name="outlineWidth" type="xs:integer" default="1" minOccurs="0"/>
			<xs:element name="partials" type="ms:booleanEnum" minOccurs="0"/>
			<xs:element name="position" minOccurs="0">
				<xs:simpleType>
					<xs:union memberTypes="ms:positionEnum ms:fullPositionEnum">
						<xs:simpleType>
							<xs:restriction base="xs:string">
								<xs:enumeration value="AUTO"/>
							</xs:restriction>
						</xs:simpleType>
					</xs:union>
				</xs:simpleType>
			</xs:element>
			<xs:element name="priority" default="1" minOccurs="0">
				<xs:simpleType>
					<xs:union memberTypes="ms:attributeType">
						<xs:simpleType>
							<xs:restriction base="xs:integer">
								<xs:minInclusive value="1"/>
								<xs:maxInclusive value="10"/>
							</xs:restriction>
						</xs:simpleType>
					</xs:union>
				</xs:simpleType>
			</xs:element>
			<xs:element name="repeatDistance" type="xs:integer" minOccurs="0"/>
			<xs:element name="shadowColor" type="ms:rgbColorType" minOccurs="0"/>
			<xs:element name="shadowSize" type="ms:sizeType" minOccurs="0"/>
			<xs:element name="size">
				<xs:simpleType>
					<xs:union memberTypes="ms:attributeType xs:positiveInteger">
						<xs:simpleType>
							<xs:restriction base="xs:string">
								<xs:enumeration value="TINY"/>
								<xs:enumeration value="SMALL"/>
								<xs:enumeration value="MEDIUM"/>
								<xs:enumeration value="LARGE"/>
								<xs:enumeration value="GIANT"/>
							</xs:restriction>
						</xs:simpleType>
					</xs:union>
				</xs:simpleType>
		    <xs:element name="maxScaleDenom" type="xs:double" minOccurs="0"/>
		    <xs:element name="minScaleDenom" type="xs:double" minOccurs="0"/>
			</xs:element>
			<xs:element name="Style" type="ms:Style" minOccurs="0" maxOccurs="unbounded"/>
		        <xs:element name="text" type="xs:string" minOccurs="0"/>                
		        <xs:element name="wrap" type="xs:string" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute name="type" use="required">
			<xs:simpleType>
				<xs:restriction base="xs:string">
					<xs:enumeration value="BITMAP"/>
					<xs:enumeration value="TRUETYPE"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
	</xs:complexType>
    <!-- LABELLEADER Definition -->
    <xs:complexType name="LabelLeader">
        <xs:sequence>
            <xs:element name="gridstep" type="xs:positiveInteger" minOccurs="0"/>
            <xs:element name="maxdistance" type="xs:positiveInteger" minOccurs="0"/>
            <xs:element name="Style"  type="ms:Style" minOccurs="0" maxOccurs="unbounded" />
        </xs:sequence>
    </xs:complexType>
	<!-- STYLE Definition -->
	<xs:complexType name="Style">
		<xs:sequence>
			<xs:element name="angle" default="0" minOccurs="0">
				<xs:simpleType>
					<xs:union memberTypes="xs:double ms:attributeType">
						<xs:simpleType>
							<xs:restriction base="xs:string">
								<xs:enumeration value="AUTO"/>
							</xs:restriction>
						</xs:simpleType>
					</xs:union>
				</xs:simpleType>
			</xs:element>
			<xs:element name="antialias" type="ms:booleanEnum" minOccurs="0"/>
			<xs:element name="backgroundColor" type="ms:rgbColorType" minOccurs="0"/>
			<xs:choice minOccurs="0">
				<xs:element name="color" type="ms:rgbColorType"/>
				<xs:element name="colorAttribute" type="ms:attributeType"/>
			</xs:choice>
			<xs:element name="gap" type="xs:integer" default="0" minOccurs="0"/>
			<xs:element name="geomTransform" minOccurs="0">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="BBOX"/>
						<xs:enumeration value="END"/>
						<xs:enumeration value="LABELPNT"/>
						<xs:enumeration value="LABELPOLY"/>
						<xs:enumeration value="START"/>
						<xs:enumeration value="VERTICES"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
            <xs:element name="initialGap" type="xs:double" minOccurs="0"/>
			<xs:element name="lineCap" default="BUTT" minOccurs="0">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="BUTT"/>
						<xs:enumeration value="ROUND"/>
						<xs:enumeration value="SQUARE"/>
						<xs:enumeration value="TRIANGLE"/>
				                <xs:enumeration value="SVG"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="lineJoin" minOccurs="0">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="ROUND"/>
						<xs:enumeration value="MITER"/>
						<xs:enumeration value="BEVEL"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="lineJoinMaxSize" type="xs:integer" default="3" minOccurs="0"/>
			<xs:element name="maxSize" type="xs:float" default="500" minOccurs="0"/>
			<xs:element name="maxWidth" type="xs:float" default="32" minOccurs="0"/>
			<xs:element name="minSize" type="xs:float" default="0" minOccurs="0"/>
			<xs:element name="minWidth" type="xs:float" default="0" minOccurs="0"/>
			<xs:element name="offset" type="ms:sizeType" minOccurs="0"/>
			<xs:element name="opacity" type="xs:integer" default="0" minOccurs="0"/>
			<xs:choice minOccurs="0">
				<xs:element name="outlineColor" type="ms:rgbColorType"/>
				<xs:element name="outlineColorAttribute" type="ms:attributeType"/>
			</xs:choice>
			<xs:element name="pattern" minOccurs="0">
				<xs:simpleType>
					<xs:list itemType="xs:float"/>
				</xs:simpleType>
			</xs:element>
            <xs:element name="polarOffset" minOccurs="0">
                <xs:simpleType>
                    <xs:union memberTypes="xs:positiveInteger ms:attributeType xs:positiveInteger ms:attributeType"/>
                </xs:simpleType>
            </xs:element>
			<xs:element name="size" default="1" minOccurs="0">
				<xs:simpleType>
					<xs:union memberTypes="xs:double ms:attributeType"/>
				</xs:simpleType>
			</xs:element>
			<xs:element name="symbol" type="ms:symbolType" default="1" minOccurs="0"/>
			<xs:element name="width" default="1" minOccurs="0">
				<xs:simpleType>
					<xs:union memberTypes="xs:double ms:attributeType"/>
				</xs:simpleType>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<!--  CLASS Definition -->
	<xs:complexType name="Class">
		<xs:sequence>
			<xs:element name="backgroundColor" type="ms:rgbColorType" minOccurs="0"/>
			<xs:element name="color" type="ms:rgbColorType" minOccurs="0"/>
			<xs:element name="debug" type="ms:stateEnum" minOccurs="0"/>
			<xs:element name="expression" type="ms:expressionType" minOccurs="0"/>
			<xs:element name="group" type="xs:string" minOccurs="0"/>
			<xs:element name="keyImage" type="xs:string" minOccurs="0"/>
			<xs:element name="Label" type="ms:Label" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="LabelLeader" type="ms:LabelLeader" minOccurs="0"/>
			<xs:element name="maxScaleDenom" type="xs:double" minOccurs="0"/>
			<xs:element name="maxSize" type="xs:integer" default="50" minOccurs="0"/>
			<xs:element name="minScaleDenom" type="xs:double" minOccurs="0"/>
			<xs:element name="minSize" type="xs:integer" default="0" minOccurs="0"/>
			<xs:choice minOccurs="0">
				<xs:element name="outlineColor" type="ms:rgbColorType"/>
				<xs:element name="outlineColorAttribute" type="ms:attributeType"/>
			</xs:choice>
			<xs:element name="size" type="xs:positiveInteger" default="1" minOccurs="0"/>
			<xs:element name="Style" type="ms:Style" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="symbol" type="ms:symbolType" default="1" minOccurs="0"/>
			<xs:element name="template" type="xs:string" minOccurs="0"/>
			<xs:element name="text" type="xs:string" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute name="name" type="xs:string"/>
		<xs:attribute name="status" type="ms:stateEnum" default="ON"/>
	</xs:complexType>
	<!-- SYMBOL Definition -->
	<xs:complexType name="Symbol">
		<xs:sequence>
            <xs:element name="anchorPoint" type="ms:pointType" minOccurs="0"/>
			<xs:element name="antialias" type="ms:booleanEnum" minOccurs="0"/>
			<xs:element name="character" type="xs:string" minOccurs="0"/>
			<xs:element name="filled" type="ms:booleanEnum" minOccurs="0"/>
			<xs:element name="font" type="xs:string" minOccurs="0"/>
			<xs:element name="image" type="xs:string" minOccurs="0"/>
			<xs:element name="Points" minOccurs="0">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="point" type="ms:pointType" minOccurs="0" maxOccurs="unbounded"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="transparent" type="xs:integer" minOccurs="0"/>
		</xs:sequence>
	        <xs:attribute name="name" type="xs:string"/>
		<xs:attribute name="type" use="required">
			<xs:simpleType>
				<xs:restriction base="xs:string">
					<xs:enumeration value="VECTOR"/>
					<xs:enumeration value="ELLIPSE"/>
					<xs:enumeration value="PIXMAP"/>
					<xs:enumeration value="TRUETYPE"/>
					<xs:enumeration value="HATCH"/>
					<xs:enumeration value="SIMPLE"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
	</xs:complexType>
	<!-- FEATURE Definition -->
	<xs:complexType name="Feature">
		<xs:all>
			<xs:element name="Points" minOccurs="0">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="point" type="ms:pointType" minOccurs="0" maxOccurs="unbounded"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="items" type="xs:string" minOccurs="0"/>
			<xs:element name="text" type="xs:string" minOccurs="0"/>
			<xs:element name="wkt" type="xs:string" minOccurs="0"/>
		</xs:all>
	</xs:complexType>
	<!-- GRID Definition -->
	<xs:complexType name="Grid">
		<xs:sequence>
			<xs:element name="labelFormat" type="xs:string" minOccurs="0"/>
			<xs:element name="maxArcs" type="xs:double" minOccurs="0"/>
			<xs:element name="maxInterval" type="xs:double" minOccurs="0"/>
			<xs:element name="maxSubdivide" type="xs:double" default="256" minOccurs="0"/>
			<xs:element name="minArcs" type="xs:double" minOccurs="0"/>
			<xs:element name="minInterval" type="xs:double" minOccurs="0"/>
			<xs:element name="minSubdivide" type="xs:double" minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>
	<!-- JOIN Definition -->
	<xs:complexType name="Join">
		<xs:sequence>
			<xs:element name="connection" type="xs:string" minOccurs="0"/>
			<xs:element name="connectionType" minOccurs="0">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="MYSQL"/>
						<xs:enumeration value="POSTGRESQL"/>
						<xs:enumeration value="CSV"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="footer" type="xs:string" minOccurs="0"/>
			<xs:element name="from" type="xs:string" minOccurs="0"/>
			<xs:element name="header" type="xs:string" minOccurs="0"/>
			<xs:element name="table" type="xs:string" minOccurs="0"/>
			<xs:element name="template" type="xs:string" minOccurs="0"/>
			<xs:element name="to" type="xs:string"/>
		</xs:sequence>
		<xs:attribute name="name" type="xs:string" use="required"/>
		<xs:attribute name="type" default="ONE-TO-ONE">
			<xs:simpleType>
				<xs:restriction base="xs:string">
					<xs:enumeration value="ONE-TO-ONE"/>
					<xs:enumeration value="ONE-TO-MANY"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
	</xs:complexType>
	<!-- REFERENCE Definition -->
	<xs:complexType name="Reference">
		<xs:sequence>
			<xs:element name="color" type="ms:rgbColorType" minOccurs="0"/>
			<xs:element name="extent" minOccurs="0">
				<xs:simpleType>
					<xs:list itemType="xs:double"/>
				</xs:simpleType>
			</xs:element>
			<xs:element name="image" type="xs:string" minOccurs="0"/>
			<xs:element name="marker" minOccurs="0">
				<xs:simpleType>
					<xs:union memberTypes="xs:positiveInteger xs:string"/>
				</xs:simpleType>
			</xs:element>
			<xs:element name="markerSize" type="xs:positiveInteger" minOccurs="0"/>
			<xs:element name="maxBoxSize" type="xs:positiveInteger" minOccurs="0"/>
			<xs:element name="minBoxSize" type="xs:positiveInteger" minOccurs="0"/>
			<xs:element name="outlineColor" type="ms:rgbExtendedColorType" minOccurs="0"/>
			<xs:element name="size" type="ms:sizeType" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute name="status" type="ms:stateEnum" default="OFF"/>
	</xs:complexType>
        <!-- CLUSTER Definition -->
	<xs:complexType name="Cluster">
		<xs:sequence>
			<xs:element name="buffer" type="xs:float" minOccurs="0"/>
			<xs:element name="filter" type="ms:expressionType" minOccurs="0"/>
			<xs:element name="group" type="ms:expressionType" minOccurs="0"/>
			<xs:element name="maxdistance" type="xs:positiveInteger" minOccurs="0"/>
			<xs:element name="region" type="xs:string" minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>
	<!-- LAYER Definition -->
	<xs:complexType name="Layer">
		<xs:sequence>
			<xs:element name="Class" type="ms:Class" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="classGroup" type="xs:string" minOccurs="0"/>
			<xs:element name="classItem" type="xs:string" minOccurs="0"/>
			<xs:element name="Cluster" type="ms:Cluster" minOccurs="0"/>
			<xs:element name="connection" type="xs:string" minOccurs="0"/>
			<xs:element name="connectionType" minOccurs="0">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="LOCAL"/>
						<xs:enumeration value="SDE"/>
						<xs:enumeration value="OGR"/>
						<xs:enumeration value="WFS"/>
						<xs:enumeration value="POSTGIS"/>
						<xs:enumeration value="ORACLESPATIAL"/>
						<xs:enumeration value="WMS"/>
						<xs:enumeration value="PLUGIN"/>
						<xs:enumeration value="UNION"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="data" type="xs:string" minOccurs="0"/>
			<xs:element name="debug" type="ms:debugModeEnum" default="OFF" minOccurs="0"/>
			<xs:element name="dump" type="ms:booleanEnum" default="FALSE" minOccurs="0"/>
			<xs:element name="extent" minOccurs="0">
				<xs:simpleType>
					<xs:list itemType="xs:double"/>
				</xs:simpleType>
			</xs:element>
			<xs:element name="Feature" type="ms:Feature" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="filter" type="ms:expressionType" minOccurs="0"/>
			<xs:element name="filterItem" type="xs:string" minOccurs="0"/>
			<xs:element name="footer" type="xs:string" minOccurs="0"/>
			<xs:element name="Grid" type="ms:Grid" minOccurs="0"/>
			<xs:element name="group" type="xs:string" minOccurs="0"/>
			<xs:element name="header" type="xs:string" minOccurs="0"/>
			<xs:element name="Join" type="ms:Join" minOccurs="0"/>
			<xs:element name="labelCache" type="ms:stateEnum" default="ON" minOccurs="0"/>
			<xs:element name="labelItem" type="xs:string" minOccurs="0"/>
			<xs:element name="labelMaxScaleDenom" type="xs:double" minOccurs="0"/>
			<xs:element name="labelMinScaleDenom" type="xs:double" minOccurs="0"/>
			<xs:element name="labelRequires" type="xs:string" minOccurs="0"/>
			<xs:element name="mask" type="xs:string" minOccurs="0"/>
			<xs:element name="maxFeatures" type="xs:positiveInteger" minOccurs="0"/>
			<xs:element name="maxGeoWidth" type="xs:double" minOccurs="0"/>
			<xs:element name="maxScaleDenom" type="xs:double" minOccurs="0"/>
			<xs:element name="Metadata" type="ms:itemType" minOccurs="0"/>
			<xs:element name="minGeoWidth" type="xs:double" minOccurs="0"/>
			<xs:element name="minScaleDenom" type="xs:double" minOccurs="0"/>
			<xs:element name="offsite" type="ms:rgbColorType" minOccurs="0"/>
			<xs:element name="opacity" minOccurs="0">
				<xs:simpleType>
					<xs:union>
						<xs:simpleType>
							<xs:restriction base="xs:string">
								<xs:enumeration value="ALPHA"/>
							</xs:restriction>
						</xs:simpleType>
						<xs:simpleType>
							<xs:restriction base="xs:integer">
								<xs:minInclusive value="0"/>
								<xs:maxInclusive value="100"/>
							</xs:restriction>
						</xs:simpleType>
					</xs:union>
				</xs:simpleType>
			</xs:element>
			<xs:element name="plugin" type="xs:string" minOccurs="0"/>
			<xs:element name="postLabelCache" type="ms:booleanEnum" default="FALSE" minOccurs="0"/>
			<xs:element name="processing" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="projection" minOccurs="0">
				<xs:simpleType>
					<xs:list itemType="xs:string"/>
				</xs:simpleType>
			</xs:element>
			<xs:element name="requires" type="xs:string" minOccurs="0"/>
			<xs:element name="sizeUnits" default="PIXELS" minOccurs="0">
				<xs:simpleType>
					<xs:union memberTypes="ms:unitType">
						<xs:simpleType>
							<xs:restriction base="xs:string">
								<xs:enumeration value="PIXELS"/>
							</xs:restriction>
						</xs:simpleType>
					</xs:union>
				</xs:simpleType>
			</xs:element>
			<xs:element name="styleItem" type="xs:string" minOccurs="0"/>
			<xs:element name="symbolScaleDenom" type="xs:double" minOccurs="0"/>
			<xs:element name="template" type="xs:string" minOccurs="0"/>
			<xs:element name="tileIndex" type="xs:string" minOccurs="0"/>
			<xs:element name="tileItem" type="xs:string" default="LOCATION" minOccurs="0"/>
			<xs:element name="tolerance" type="xs:double" minOccurs="0"/>
			<xs:element name="toleranceUnits" type="ms:unitTypeUnion" default="PIXELS" minOccurs="0"/>
			<xs:element name="transform" default="TRUE" minOccurs="0">
				<xs:simpleType>
					<xs:union memberTypes="ms:booleanEnum ms:fullPositionEnum"/>
				</xs:simpleType>
			</xs:element>
			<xs:element name="units" minOccurs="0">
				<xs:simpleType>
					<xs:union memberTypes="ms:unitType ms:extendedUnitType">
						<xs:simpleType>
							<xs:restriction base="xs:string">
								<xs:enumeration value="PERCENTAGES"/>
							</xs:restriction>
						</xs:simpleType>
					</xs:union>
				</xs:simpleType>
			</xs:element>
			<xs:element name="Validation" type="ms:itemType" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute name="name" type="xs:string" use="required"/>
		<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="CIRCLE"/>
					<xs:enumeration value="ANNOTATION"/>
					<xs:enumeration value="RASTER"/>
					<xs:enumeration value="QUERY"/>
					<xs:enumeration value="CHART"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="status" default="ON">
			<xs:simpleType>
				<xs:union memberTypes="ms:stateEnum">
					<xs:simpleType>
						<xs:restriction base="xs:string">
							<xs:enumeration value="DEFAULT"/>
						</xs:restriction>
					</xs:simpleType>
				</xs:union>
			</xs:simpleType>
		</xs:attribute>
	</xs:complexType>
	<!-- LAYERSET Definition -->
	<xs:element name="LayerSet">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="Layer" type="ms:Layer" minOccurs="0" maxOccurs="unbounded"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<!-- SYMBOLSET Definition -->
	<xs:element name="SymbolSet">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="Symbol" type="ms:Symbol" minOccurs="0" maxOccurs="unbounded"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<!-- MAP Definition -->
	<xs:element name="Map">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="angle" type="xs:double" default="0" minOccurs="0"/>
				<xs:element name="Config" type="ms:itemType" minOccurs="0"/>
				<xs:element name="dataPattern" type="xs:string" minOccurs="0"/>
				<xs:element name="debug" type="ms:debugModeEnum" default="OFF" minOccurs="0"/>
				<xs:element name="defResolution" type="xs:positiveInteger" default="72" minOccurs="0"/>
				<xs:element name="extent" minOccurs="0">
					<xs:simpleType>
						<xs:list itemType="xs:double"/>
					</xs:simpleType>
				</xs:element>
				<xs:element name="fontSet" type="xs:string" minOccurs="0"/>
				<xs:element name="imageColor" type="ms:rgbColorType" minOccurs="0"/>
				<xs:element name="imageType" type="xs:string" minOccurs="0"/>
				<xs:element name="include" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element name="Layer" type="ms:Layer" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element name="Legend" type="ms:Legend" minOccurs="0"/>
				<xs:element name="maxSize" type="xs:positiveInteger" minOccurs="0"/>
				<xs:element name="OutputFormat" type="ms:OutputFormat" maxOccurs="unbounded"/>
				<xs:element name="projection" minOccurs="0">
					<xs:simpleType>
						<xs:list itemType="xs:string"/>
					</xs:simpleType>
				</xs:element>
				<xs:element name="QueryMap" type="ms:QueryMap" minOccurs="0"/>
				<xs:element name="Reference" type="ms:Reference" minOccurs="0"/>
				<xs:element name="resolution" type="xs:positiveInteger" default="72" minOccurs="0"/>
				<xs:element name="ScaleBar" type="ms:ScaleBar" minOccurs="0"/>
				<xs:element name="scaleDenom" type="xs:double" minOccurs="0"/>
				<xs:element name="shapePath" type="xs:string" minOccurs="0"/>
				<xs:element name="size" type="ms:sizeType" minOccurs="0"/>
				<xs:element name="Symbol" type="ms:Symbol" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element name="symbolSet" type="xs:string" minOccurs="0"/>
				<xs:element name="templatePattern" type="xs:string" minOccurs="0"/>
				<xs:element name="units" default="METERS" minOccurs="0">
					<xs:simpleType>
						<xs:union memberTypes="ms:unitType">
							<xs:simpleType>
								<xs:restriction base="xs:string">
									<xs:enumeration value="DD"/>
								</xs:restriction>
							</xs:simpleType>
						</xs:union>
					</xs:simpleType>
				</xs:element>
				<xs:element name="Web" type="ms:Web" minOccurs="0" maxOccurs="unbounded"/>
			</xs:sequence>
			<xs:attribute name="name" type="xs:string" use="required"/>
			<xs:attribute name="status" type="ms:stateEnum" default="ON"/>
			<xs:attribute name="version" type="xs:string" use="required"/>
		</xs:complexType>
	</xs:element>
</xs:schema>
