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

svn at osgeo.org svn at osgeo.org
Tue Apr 5 09:01:09 EDT 2011


Author: aboudreault
Date: 2011-04-05 06:01:09 -0700 (Tue, 05 Apr 2011)
New Revision: 11461

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/xmlmapfile/mapfile.xsd
   trunk/mapserver/xmlmapfile/mapfile.xsl
   trunk/mapserver/xmlmapfile/tests/layerset.xml
   trunk/mapserver/xmlmapfile/tests/mapfile-test.xml
Log:
Updated xml mapfile schema and xsl with the new lexer properties (#3735)

Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2011-04-05 12:44:11 UTC (rev 11460)
+++ trunk/mapserver/HISTORY.TXT	2011-04-05 13:01:09 UTC (rev 11461)
@@ -15,6 +15,8 @@
 Current Version (SVN trunk): 
 ---------------------------- 
 
+- Updated xml mapfile schema and xsl with the new lexer properties (#3735)
+
 - Updated PHP/MapScript for MS RFC 69: clustering. (#3700)
 
 - Move allocation of cgiRequestObj paramNames/Values to msAllocCgiObj() (#1888)

Modified: trunk/mapserver/xmlmapfile/mapfile.xsd
===================================================================
--- trunk/mapserver/xmlmapfile/mapfile.xsd	2011-04-05 12:44:11 UTC (rev 11460)
+++ trunk/mapserver/xmlmapfile/mapfile.xsd	2011-04-05 13:01:09 UTC (rev 11461)
@@ -264,7 +264,7 @@
 					<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]"/>
+								<xs:pattern value="[aA][uU][tT][oO]|[fF][oO][lL][lL][oO][wW]|[aA][uU][tT][oO]2"/>
 								<!-- attribute -->
 							</xs:restriction>
 						</xs:simpleType>
@@ -272,15 +272,13 @@
 				</xs:simpleType>
 			</xs:element>
 			<xs:element name="antialias" type="ms:booleanEnum" minOccurs="0"/>
-			<xs:element name="backgroundColor" type="ms:rgbColorType" minOccurs="0"/>
-			<xs:element name="backgroundShadowColor" type="ms:rgbColorType" minOccurs="0"/>
-			<xs:element name="backgroundShadowSize" type="ms:sizeType" 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="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"/>
@@ -452,6 +450,7 @@
 						<xs:enumeration value="ROUND"/>
 						<xs:enumeration value="SQUARE"/>
 						<xs:enumeration value="TRIANGLE"/>
+				                <xs:enumeration value="SVG"/>
 					</xs:restriction>
 				</xs:simpleType>
 			</xs:element>
@@ -572,12 +571,23 @@
 		</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: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"/>
+			<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>
@@ -589,6 +599,7 @@
 						<xs:enumeration value="ORACLESPATIAL"/>
 						<xs:enumeration value="WMS"/>
 						<xs:enumeration value="PLUGIN"/>
+						<xs:enumeration value="UNION"/>
 					</xs:restriction>
 				</xs:simpleType>
 			</xs:element>

Modified: trunk/mapserver/xmlmapfile/mapfile.xsl
===================================================================
--- trunk/mapserver/xmlmapfile/mapfile.xsl	2011-04-05 12:44:11 UTC (rev 11460)
+++ trunk/mapserver/xmlmapfile/mapfile.xsl	2011-04-05 13:01:09 UTC (rev 11461)
@@ -148,7 +148,7 @@
     <xsl:apply-templates select="ms:Map"/>
   </xsl:template>
 
-<xsl:template match="ms:color | ms:backgroundColor | ms:outlineColor | ms:backgroundShadowColor |  ms:shadowColor | ms:imageColor | ms:offsite">
+<xsl:template match="ms:color | ms:backgroundColor | ms:outlineColor | ms:shadowColor | ms:imageColor | ms:offsite">
   <xsl:param name="indent"/>
    <xsl:choose>
      <xsl:when test="starts-with(name(), 'ms:')">
@@ -175,7 +175,7 @@
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="ms:size | ms:offset | ms:keySize | ms:keySpacing | ms:backgroundShadowSize | ms:shadowSize">
+<xsl:template match="ms:size | ms:offset | ms:keySize | ms:keySpacing | ms:shadowSize">
   <xsl:param name="indent"/>
   <xsl:choose>
     <xsl:when test="starts-with(name(), 'ms:')">
@@ -589,19 +589,14 @@
       <xsl:with-param name="indent" select="$indent"/>
       <xsl:with-param name="node" select="'ms:antialias'"/>
     </xsl:call-template>
-     <xsl:apply-templates select="ms:backgroundColor">
-      <xsl:with-param name="indent" select="$indent"/>
-    </xsl:apply-templates>
-    <xsl:apply-templates select="ms:backgroundShadowColor">
-      <xsl:with-param name="indent" select="$indent"/>
-    </xsl:apply-templates>
-    <xsl:apply-templates select="ms:backgroundShadowSize">
-      <xsl:with-param name="indent" select="$indent"/>
-    </xsl:apply-templates>
     <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:maxoverlapangle'"/>
+    </xsl:call-template>
     <xsl:apply-templates select="ms:color">
       <xsl:with-param name="indent" select="$indent"/>
     </xsl:apply-templates>
@@ -1288,6 +1283,9 @@
       <xsl:with-param name="indent" select="$indent"/>
       <xsl:with-param name="node" select="'ms:postLabelCache'"/>
     </xsl:call-template>
+    <xsl:apply-templates select="ms:Cluster">
+      <xsl:with-param name="indent" select="$indent + 1"/>
+    </xsl:apply-templates>
     <xsl:for-each select="ms:processing">
       <xsl:call-template name="print">
         <xsl:with-param name="indent" select="$indent"/>
@@ -1356,6 +1354,39 @@
       <xsl:with-param name="indent" select="$indent - 1"/>
     </xsl:call-template>
   </xsl:template>
+
+  <xsl:template match="ms:Cluster">
+    <xsl:param name="indent"/>
+    <xsl:call-template name="print">
+      <xsl:with-param name="text" select="'CLUSTER'"/>
+      <xsl:with-param name="indent" select="$indent - 1"/>
+    </xsl:call-template>
+    <xsl:call-template name="print">
+      <xsl:with-param name="indent" select="$indent"/>
+      <xsl:with-param name="node" select="'ms:maxdistance'"/>
+    </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>
+    <xsl:call-template name="printExpression">
+      <xsl:with-param name="indent" select="$indent"/>
+      <xsl:with-param name="node" select="'ms:group'"/>
+    </xsl:call-template>
+    <xsl:call-template name="printExpression">
+      <xsl:with-param name="indent" select="$indent"/>
+      <xsl:with-param name="node" select="'ms:filter'"/>
+    </xsl:call-template>
+    <xsl:call-template name="print">
+      <xsl:with-param name="text" select="'END&#xa;'"/>
+      <xsl:with-param name="indent" select="$indent - 1"/>
+    </xsl:call-template>
+  </xsl:template>
   
   <xsl:template match="ms:SymbolSet">
     <xsl:param name="indent" select="0"/>

Modified: trunk/mapserver/xmlmapfile/tests/layerset.xml
===================================================================
--- trunk/mapserver/xmlmapfile/tests/layerset.xml	2011-04-05 12:44:11 UTC (rev 11460)
+++ trunk/mapserver/xmlmapfile/tests/layerset.xml	2011-04-05 13:01:09 UTC (rev 11461)
@@ -10,11 +10,8 @@
       <keyImage>/home/myusername/layer1.png</keyImage>
       <Label type="TRUETYPE">
         <align>LEFT</align>
-        <angle>12</angle>
+        <angle>AUTO2</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>
@@ -65,6 +62,13 @@
     </Class>
     <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>
+      <region>region1</region>
+    </Cluster>
     <connection>user=nobody password=****** dbname=dbname host=localhost port=5432</connection>
     <connectionType>SDE</connectionType>
     <data>../data</data>

Modified: trunk/mapserver/xmlmapfile/tests/mapfile-test.xml
===================================================================
--- trunk/mapserver/xmlmapfile/tests/mapfile-test.xml	2011-04-05 12:44:11 UTC (rev 11460)
+++ trunk/mapserver/xmlmapfile/tests/mapfile-test.xml	2011-04-05 13:01:09 UTC (rev 11461)
@@ -66,7 +66,7 @@
           <driver>AGG/PNG</driver>
           <extension>png</extension>
           <formatOption>TILED=YES</formatOption>
-          <imageMode>RGB</imageMode>
+          <imageMode>RGBA</imageMode>
           <mimeType>image/png</mimeType>
           <transparent>ON</transparent>
         </OutputFormat>



More information about the mapserver-commits mailing list