[mapserver-commits] r12559 - in trunk/mapserver/xmlmapfile: . tests

svn at osgeo.org svn at osgeo.org
Tue Sep 20 11:02:49 EDT 2011


Author: aboudreault
Date: 2011-09-20 08:02:49 -0700 (Tue, 20 Sep 2011)
New Revision: 12559

Modified:
   trunk/mapserver/xmlmapfile/mapfile.xsd
   trunk/mapserver/xmlmapfile/mapfile.xsl
   trunk/mapserver/xmlmapfile/tests/layerset.xml
   trunk/mapserver/xmlmapfile/tests/mapfile-test.xml
   trunk/mapserver/xmlmapfile/tests/symbolset.xml
Log:
Updated XMLMapfile stuff for MapServer 6.0

Modified: trunk/mapserver/xmlmapfile/mapfile.xsd
===================================================================
--- trunk/mapserver/xmlmapfile/mapfile.xsd	2011-09-19 21:54:31 UTC (rev 12558)
+++ trunk/mapserver/xmlmapfile/mapfile.xsd	2011-09-20 15:02:49 UTC (rev 12559)
@@ -1,5 +1,5 @@
 <?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="5.6.3">
+<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.0.1">
 	<!-- Definition of types -->
 	<xs:simpleType name="rgbColorValueType">
 		<xs:restriction base="xs:integer">
@@ -278,10 +278,10 @@
 				<xs:element name="colorAttribute" type="ms:attributeType"/>
 			</xs:choice>
 			<xs:element name="encoding" minOccurs="0"/>
-			<xs:element name="maxoverlapangle" 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">
@@ -344,6 +344,7 @@
 					</xs:union>
 				</xs:simpleType>
 			</xs:element>
+			<xs:element name="Style" type="ms:Style" minOccurs="0"/>
 			<xs:element name="wrap" type="xs:string" minOccurs="0"/>
 		</xs:sequence>
 		<xs:attribute name="type" use="required">
@@ -369,31 +370,61 @@
 					</xs:union>
 				</xs:simpleType>
 			</xs:element>
-			<xs:element name="antialias" type="ms:booleanEnum"/>
+			<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="END"/>
 						<xs:enumeration value="VERTICES"/>
-						<xs:enumeration value="BBOX"/>
 					</xs:restriction>
 				</xs:simpleType>
 			</xs:element>
-			<xs:element name="maxSize" type="xs:integer" default="50" minOccurs="0"/>
-			<xs:element name="minSize" type="xs:integer" default="0" minOccurs="0"/>
-			<xs:element name="minWidth" type="xs:integer" 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="size" default="1" minOccurs="0">
 				<xs:simpleType>
 					<xs:union memberTypes="xs:positiveInteger ms:attributeType"/>
@@ -441,34 +472,7 @@
 			<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="gap" type="xs:integer" default="0" minOccurs="0"/>
 			<xs:element name="image" type="xs:string" 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="pattern" minOccurs="0">
-				<xs:simpleType>
-					<xs:list itemType="xs:integer"/>
-				</xs:simpleType>
-			</xs:element>
 			<xs:element name="Points" minOccurs="0">
 				<xs:complexType>
 					<xs:sequence>
@@ -478,7 +482,7 @@
 			</xs:element>
 			<xs:element name="transparent" type="xs:integer" minOccurs="0"/>
 		</xs:sequence>
-		<xs:attribute name="name" type="xs:string"/>
+	        <xs:attribute name="name" type="xs:string"/>
 		<xs:attribute name="type" use="required">
 			<xs:simpleType>
 				<xs:restriction base="xs:string">
@@ -486,7 +490,6 @@
 					<xs:enumeration value="ELLIPSE"/>
 					<xs:enumeration value="PIXMAP"/>
 					<xs:enumeration value="TRUETYPE"/>
-					<xs:enumeration value="CARTOLINE"/>
 					<xs:enumeration value="HATCH"/>
 					<xs:enumeration value="SIMPLE"/>
 				</xs:restriction>
@@ -576,7 +579,6 @@
         <!-- CLUSTER Definition -->
 	<xs:complexType name="Cluster">
 		<xs:sequence>
-			<xs:element name="buffer" type="xs:positiveInteger" 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"/>
@@ -594,6 +596,7 @@
 			<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"/>

Modified: trunk/mapserver/xmlmapfile/mapfile.xsl
===================================================================
--- trunk/mapserver/xmlmapfile/mapfile.xsl	2011-09-19 21:54:31 UTC (rev 12558)
+++ trunk/mapserver/xmlmapfile/mapfile.xsl	2011-09-20 15:02:49 UTC (rev 12559)
@@ -595,7 +595,7 @@
     </xsl:call-template>
     <xsl:call-template name="print">
       <xsl:with-param name="indent" select="$indent"/>
-      <xsl:with-param name="node" select="'ms:maxoverlapangle'"/>
+      <xsl:with-param name="node" select="'ms:maxOverlapAngle'"/>
     </xsl:call-template>
     <xsl:apply-templates select="ms:color">
       <xsl:with-param name="indent" select="$indent"/>
@@ -677,6 +677,9 @@
       <xsl:with-param name="indent" select="$indent"/>
       <xsl:with-param name="node" select="'ms:size'"/>
     </xsl:call-template>
+    <xsl:apply-templates select="ms:Style">
+      <xsl:with-param name="indent" select="$indent + 1"/>
+    </xsl:apply-templates>
     <xsl:call-template name="print">
       <xsl:with-param name="indent" select="$indent"/>
       <xsl:with-param name="node" select="'ms:wrap'"/>
@@ -786,12 +789,35 @@
     </xsl:call-template>
     <xsl:call-template name="print">
       <xsl:with-param name="indent" select="$indent"/>
+      <xsl:with-param name="node" select="'ms:maxWidth'"/>
+    </xsl:call-template>
+    <xsl:call-template name="print">
+      <xsl:with-param name="indent" select="$indent"/>
       <xsl:with-param name="node" select="'ms:minSize'"/>
     </xsl:call-template>
     <xsl:call-template name="print">
       <xsl:with-param name="indent" select="$indent"/>
       <xsl:with-param name="node" select="'ms:minWidth'"/>
     </xsl:call-template>
+    <xsl:call-template name="print">
+      <xsl:with-param name="indent" select="$indent"/>
+      <xsl:with-param name="node" select="'ms:gap'"/>
+    </xsl:call-template>
+    <xsl:call-template name="print">
+      <xsl:with-param name="indent" select="$indent"/>
+      <xsl:with-param name="node" select="'ms:lineCap'"/>
+    </xsl:call-template>
+    <xsl:call-template name="print">
+      <xsl:with-param name="indent" select="$indent"/>
+      <xsl:with-param name="node" select="'ms:lineJoin'"/>
+    </xsl:call-template>
+    <xsl:call-template name="print">
+      <xsl:with-param name="indent" select="$indent"/>
+      <xsl:with-param name="node" select="'ms:lineJoinMaxSize'"/>
+    </xsl:call-template>
+    <xsl:apply-templates select="ms:pattern">
+      <xsl:with-param name="indent" select="$indent"/>
+    </xsl:apply-templates>
     <xsl:apply-templates select="ms:offset">
       <xsl:with-param name="indent" select="$indent"/>
     </xsl:apply-templates>
@@ -957,28 +983,9 @@
     </xsl:call-template>
     <xsl:call-template name="print">
       <xsl:with-param name="indent" select="$indent"/>
-      <xsl:with-param name="node" select="'ms:gap'"/>
-    </xsl:call-template>
-    <xsl:call-template name="print">
-      <xsl:with-param name="indent" select="$indent"/>
       <xsl:with-param name="node" select="'ms:image'"/>
       <xsl:with-param name="quote" select="1"/>
     </xsl:call-template>
-    <xsl:call-template name="print">
-      <xsl:with-param name="indent" select="$indent"/>
-      <xsl:with-param name="node" select="'ms:lineCap'"/>
-    </xsl:call-template>
-    <xsl:call-template name="print">
-      <xsl:with-param name="indent" select="$indent"/>
-      <xsl:with-param name="node" select="'ms:lineJoin'"/>
-    </xsl:call-template>
-    <xsl:call-template name="print">
-      <xsl:with-param name="indent" select="$indent"/>
-      <xsl:with-param name="node" select="'ms:lineJoinMaxSize'"/>
-    </xsl:call-template>
-    <xsl:apply-templates select="ms:pattern">
-      <xsl:with-param name="indent" select="$indent"/>
-    </xsl:apply-templates>
     <xsl:apply-templates select="ms:Points">
       <xsl:with-param name="indent" select="$indent + 1"/>
     </xsl:apply-templates>
@@ -1367,10 +1374,6 @@
     </xsl:call-template>
     <xsl:call-template name="print">
       <xsl:with-param name="indent" select="$indent"/>
-      <xsl:with-param name="node" select="'ms:buffer'"/>
-    </xsl:call-template>
-    <xsl:call-template name="print">
-      <xsl:with-param name="indent" select="$indent"/>
       <xsl:with-param name="node" select="'ms:region'"/>
       <xsl:with-param name="quote" select="1"/>
     </xsl:call-template>

Modified: trunk/mapserver/xmlmapfile/tests/layerset.xml
===================================================================
--- trunk/mapserver/xmlmapfile/tests/layerset.xml	2011-09-19 21:54:31 UTC (rev 12558)
+++ trunk/mapserver/xmlmapfile/tests/layerset.xml	2011-09-20 15:02:49 UTC (rev 12559)
@@ -45,13 +45,19 @@
         <antialias>TRUE</antialias>
         <backgroundColor red="244" green="43" blue="22"/>
         <color red="244" green="43" blue="22"/>
+        <gap>13</gap>
         <geomTransform>VERTICES</geomTransform>
+        <lineCap>ROUND</lineCap>
+        <lineJoin>BEVEL</lineJoin>
+        <lineJoinMaxSize>3</lineJoinMaxSize>
         <maxSize>244</maxSize>
+        <maxWidth>28</maxWidth>
         <minSize>6</minSize>
         <minWidth>24</minWidth>
         <offset x="12" y="33"/>
         <opacity>1253</opacity>
         <outlineColorAttribute>[myOulineColorAttribute]</outlineColorAttribute>
+        <pattern>2 3</pattern>
         <size>[mySize]</size>
         <symbol type="NAME">star.gif</symbol>
         <width>[myWidth]</width>
@@ -63,7 +69,6 @@
     <classGroup>group1</classGroup>
     <classItem>population</classItem>
     <Cluster>
-      <buffer>2</buffer>
       <filter type="MSEXPR">(type=’road’ and size &lt; 2)</filter>
       <group type="REGEX">/ddea/i</group>
       <maxdistance>20</maxdistance>
@@ -94,7 +99,7 @@
     <header>http://mapgears.com/templates/myHeader1.html</header>
     <Join name="myJoin1" type="ONE-TO-MANY">
       <connection>user=nobody password=****** dbname=dbname host=localhost port=5432</connection>
-      <connectionType>OGR</connectionType>
+      <connectionType>POSTGRESQL</connectionType>
       <from>ID</from>
       <table>./data/lookup.dbf</table>
       <template>http://mapgears.com/templates/myJoin1.html</template>

Modified: trunk/mapserver/xmlmapfile/tests/mapfile-test.xml
===================================================================
--- trunk/mapserver/xmlmapfile/tests/mapfile-test.xml	2011-09-19 21:54:31 UTC (rev 12558)
+++ trunk/mapserver/xmlmapfile/tests/mapfile-test.xml	2011-09-20 15:02:49 UTC (rev 12559)
@@ -23,15 +23,13 @@
 			<align>CENTER</align>
 			<angle>FOLLOW</angle>
 			<antialias>TRUE</antialias>
-			<backgroundColor red="244" green="43" blue="22"/>
-			<backgroundShadowColor red="244" green="43" blue="22"/>
-			<backgroundShadowSize x="2" y="2"/>
 			<buffer>2</buffer>
 			<colorAttribute>[myColor]</colorAttribute>
 			<encoding>ISO 8859-1</encoding>
 			<font>serif</font>
 			<force>TRUE</force>
 			<maxLength>244</maxLength>
+			<maxOverlapAngle>30</maxOverlapAngle>
 			<maxSize>244</maxSize>
 			<minDistance>24</minDistance>
 			<minFeatureSize>AUTO</minFeatureSize>
@@ -107,9 +105,6 @@
 			<align>CENTER</align>
 			<angle>[myAngle]</angle>
 			<antialias>FALSE</antialias>
-			<backgroundColor red="244" green="43" blue="22"/>
-			<backgroundShadowColor red="244" green="43" blue="22"/>
-			<backgroundShadowSize x="2" y="2"/>
 			<buffer>2</buffer>
 			<colorAttribute>[myColor]</colorAttribute>
 			<encoding>ISO 8859-1</encoding>
@@ -129,6 +124,9 @@
 			<shadowColor red="244" green="43" blue="22"/>
 			<shadowSize x="15" y="14"/>
 			<size>SMALL</size>
+                        <Style>
+                          <geomTransform>VERTICES</geomTransform>
+                        </Style>
 			<wrap>\n</wrap>
 		</Label>
 		<outlineColor red="12" green="45" blue="12"/>
@@ -142,33 +140,23 @@
 	<shapePath>../data</shapePath>
 	<size x="600" y="400"/>
 	<symbolSet>/tmp/mySymbolSet.sym</symbolSet>
-	<Symbol name="mySymbol2-test2" type="CARTOLINE">
+	<Symbol name="mySymbol2-test2" type="SIMPLE">
 		<antialias>FALSE</antialias>
 		<character>C</character>
 		<filled>TRUE</filled>
 		<font>serif</font>
-		<gap>13</gap>
 		<image>/tmp/test.gif</image>
-		<lineCap>ROUND</lineCap>
-		<lineJoin>BEVEL</lineJoin>
-		<lineJoinMaxSize>3</lineJoinMaxSize>
-		<pattern>2 3</pattern>
 		<Points>
 			<point x="2" y="-3"/>
 		</Points>
 		<transparent>123</transparent>
 	</Symbol>
-        <Symbol name="mySymbol222-test1" type="CARTOLINE">
+        <Symbol name="mySymbol222-test1" type="SIMPLE">
           <antialias>FALSE</antialias>
           <character>C</character>
           <filled>TRUE</filled>
           <font>serif</font>
-          <gap>13</gap>
           <image>/tmp/test.gif</image>
-          <lineCap>ROUND</lineCap>
-          <lineJoin>BEVEL</lineJoin>
-          <lineJoinMaxSize>3</lineJoinMaxSize>
-          <pattern>2 3</pattern>
           <Points>
             <point x="2" y="-3"/>
           </Points>

Modified: trunk/mapserver/xmlmapfile/tests/symbolset.xml
===================================================================
--- trunk/mapserver/xmlmapfile/tests/symbolset.xml	2011-09-19 21:54:31 UTC (rev 12558)
+++ trunk/mapserver/xmlmapfile/tests/symbolset.xml	2011-09-20 15:02:49 UTC (rev 12559)
@@ -1,32 +1,22 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <SymbolSet xmlns="http://www.mapserver.org/mapserver" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mapserver.org/mapserver ../mapfile.xsd">
-	<Symbol name="mySymbol2" type="CARTOLINE">
+	<Symbol name="mySymbol2" type="SIMPLE">
 		<antialias>FALSE</antialias>
 		<character>C</character>
 		<filled>TRUE</filled>
 		<font>serif</font>
-		<gap>13</gap>
 		<image>/tmp/test.gif</image>
-		<lineCap>ROUND</lineCap>
-		<lineJoin>BEVEL</lineJoin>
-		<lineJoinMaxSize>3</lineJoinMaxSize>
-		<pattern>2 3</pattern>
 		<Points>
 			<point x="2" y="-3"/>
 		</Points>
 		<transparent>0</transparent>
 	</Symbol>
-        <Symbol name="mySymbol222" type="CARTOLINE">
+        <Symbol name="mySymbol222" type="SIMPLE">
           <antialias>FALSE</antialias>
           <character>C</character>
           <filled>TRUE</filled>
           <font>serif</font>
-          <gap>13</gap>
           <image>/tmp/test.gif</image>
-          <lineCap>ROUND</lineCap>
-          <lineJoin>BEVEL</lineJoin>
-          <lineJoinMaxSize>3</lineJoinMaxSize>
-          <pattern>2 3</pattern>
           <Points>
             <point x="2" y="-3"/>
           </Points>



More information about the mapserver-commits mailing list