[mapserver-commits] r9544 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Wed Nov 11 15:39:19 EST 2009


Author: assefa
Date: 2009-11-11 15:39:16 -0500 (Wed, 11 Nov 2009)
New Revision: 9544

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/mapcontext.c
Log:
 [WMC] embedded SLD in context does not work with namespace prefix (#3115)

Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2009-11-11 15:08:02 UTC (rev 9543)
+++ trunk/mapserver/HISTORY.TXT	2009-11-11 20:39:16 UTC (rev 9544)
@@ -14,6 +14,8 @@
 Current Version (SVN trunk):
 ----------------------------
 
+- [WMC] embedded SLD in context does not work with namespace prefix (#3115)
+
 - Support name aliases used in sld text symbolizer (#3114)
 
 - decode html and unicode entities for polygon truetype symbol fills

Modified: trunk/mapserver/mapcontext.c
===================================================================
--- trunk/mapserver/mapcontext.c	2009-11-11 15:08:02 UTC (rev 9543)
+++ trunk/mapserver/mapcontext.c	2009-11-11 20:39:16 UTC (rev 9544)
@@ -549,6 +549,11 @@
   sprintf(pszStyle, "wms_style_%s_sld_body", pszStyleName);
 
   psStyleSLDBody = CPLGetXMLNode(psStyle, "SLD.StyledLayerDescriptor");
+  /*some clients such as OpenLayers add a name space, which I believe is wrong but
+   added this additional test for compatibility #3115*/
+  if (psStyleSLDBody == NULL)
+    psStyleSLDBody = CPLGetXMLNode(psStyle, "SLD.sld:StyledLayerDescriptor");
+
   if(psStyleSLDBody != NULL && &(layer->metadata) != NULL)
   {
       pszValue = CPLSerializeXMLTree(psStyleSLDBody);



More information about the mapserver-commits mailing list