<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19046"></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=530370420-08062011>Hi,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=530370420-08062011></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=530370420-08062011>if i take your sld file and modify it for my datset, i 
have no problem to apply it as SLD or SLD_BODY to the wms layer. Using 
OpenLayers 2.10 and MapServer.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=530370420-08062011>So it seems it's not a bug with 
OpenLayers.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=530370420-08062011></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=530370420-08062011>online example</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><A 
href="http://gis.ibbeck.de/ginfo/apps/OLExamples/OL210/MapServer_SLD_World/MapServer_SLD_World.asp?SLDsrcIdx=56">http://gis.ibbeck.de/ginfo/apps/OLExamples/OL210/MapServer_SLD_World/MapServer_SLD_World.asp?SLDsrcIdx=56</A></FONT></DIV>
<DIV>&nbsp;</DIV><U><FONT color=#810081 size=2 face=Arial></FONT></U>
<DIV><FONT color=#0000ff size=2 face=Arial></FONT><FONT color=#0000ff size=2 
face=Arial></FONT><BR><SPAN class=530370420-08062011><FONT color=#0000ff size=2 
face=Arial>Arnd</FONT></SPAN></DIV>
<DIV><SPAN class=530370420-08062011><FONT color=#0000ff size=2 
face=Arial></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr lang=de class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>Von:</B> openlayers-users-bounces@lists.osgeo.org 
[mailto:openlayers-users-bounces@lists.osgeo.org] <B>Im Auftrag von 
</B>IvanBell<BR><B>Gesendet:</B> Mittwoch, 8. Juni 2011 14:58<BR><B>An:</B> 
users@openlayers.org<BR><B>Betreff:</B> [OpenLayers-Users] OpenLayers SLD 
Bug?<BR></FONT><BR></DIV>
<DIV></DIV>
<P>I am having difficulty troubleshooting an OpenLayers issue I have had for 
several weeks now. The issue concerns coloring polygons in a layer using 
multiple SLD styles filtered by the polygons' feature id.</P>
<P>I had a variation of the issue posted in <A 
href="http://osgeo-org.1803224.n2.nabble.com/WMS-polygon-fill-color-td6374589.html" 
rel=nofollow target=_top link="external">this forum</A> a few weeks ago, when I 
was trying to figure out SLD and before I even knew there was an OpenLayers 
issue with SLD.</P>
<P>I also posted an <A 
href="http://osgeo-org.1803224.n2.nabble.com/Multiple-SLD-Rules-for-PolygonSymbolizer-on-a-Single-Layer-td6378253.html" 
rel=nofollow target=_top link="external">SLD syntax issue</A> to the GeoServer 
forum.</P>
<P>On Monday, I was able to eliminate GeoServer as the problem.</P>
<P>The OpenLayers problems I am having are detailed in the <A 
href="http://osgeo-org.1803224.n2.nabble.com/Multiple-SLD-Rules-for-PolygonSymbolizer-on-a-Single-Layer-td6378253.html#a6432838" 
rel=nofollow target=_top link="external">06/02 post to the SLD syntax issue</A> 
in the GeoServer forum.</P>
<P>Basically, within GeoServer, if I configure/apply the following default SLD 
style for the layer:</P><PRE><BLOCKQUOTE>
      &lt;sld:StyledLayerDescriptor
         xmlns:sld=\"http://www.opengis.net/sld\"
         version=\"1.0.0\"
         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
         xsi:schemaLocation=\"http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd\"
         xmlns:ogc=\"http://www.opengis.net/ogc\"
         xmlns:gml=\"http://www.opengis.net/gml\"&gt;
         &lt;sld:NamedLayer&gt;
            &lt;sld:Name&gt;LaPalma:Polygon_Layer_Room&lt;/sld:Name&gt;
            &lt;sld:UserStyle&gt;
               &lt;sld:FeatureTypeStyle&gt;
                  &lt;sld:Rule&gt;
                     &lt;ogc:Filter&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.1\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.2\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.3\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.4\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.5\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.6\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.7\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.8\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.9\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.10\"/&gt;
                     &lt;/ogc:Filter&gt;
                     &lt;sld:PolygonSymbolizer&gt;
                        &lt;sld:Fill&gt;
                           &lt;sld:CssParameter name=\"fill\"&gt;#0000FF&lt;/sld:CssParameter&gt;
                           &lt;sld:CssParameter name=\"fill-opacity\"&gt;0.8&lt;/sld:CssParameter&gt;
                        &lt;/sld:Fill&gt;
                        &lt;sld:Stroke&gt;
                           &lt;sld:CssParameter name=\"stroke\"&gt;#000080&lt;/sld:CssParameter&gt;
                           &lt;sld:CssParameter name=\"stroke-opacity\"&gt;1&lt;/sld:CssParameter&gt;
                           &lt;sld:CssParameter name=\"stroke-width\"&gt;1&lt;/sld:CssParameter&gt;
                        &lt;/sld:Stroke&gt;
                     &lt;/sld:PolygonSymbolizer&gt;
                  &lt;/sld:Rule&gt;
                  &lt;sld:Rule&gt;
                     &lt;ogc:Filter&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.11\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.12\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.13\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.14\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.15\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.16\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.17\"/&gt;
                     &lt;/ogc:Filter&gt;
                     &lt;sld:PolygonSymbolizer&gt;
                        &lt;sld:Fill&gt;
                           &lt;sld:CssParameter name=\"fill\"&gt;#FF0000&lt;/sld:CssParameter&gt;
                           &lt;sld:CssParameter name=\"fill-opacity\"&gt;0.8&lt;/sld:CssParameter&gt;
                        &lt;/sld:Fill&gt;
                        &lt;sld:Stroke&gt;
                           &lt;sld:CssParameter name=\"stroke\"&gt;#800000&lt;/sld:CssParameter&gt;
                           &lt;sld:CssParameter name=\"stroke-opacity\"&gt;1&lt;/sld:CssParameter&gt;
                           &lt;sld:CssParameter name=\"stroke-width\"&gt;1&lt;/sld:CssParameter&gt;
                        &lt;/sld:Stroke&gt;
                     &lt;/sld:PolygonSymbolizer&gt;
                  &lt;/sld:Rule&gt;
                  &lt;sld:Rule&gt;
                     &lt;ogc:Filter&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.18\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.19\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.20\"/&gt;
                     &lt;/ogc:Filter&gt;
                     &lt;sld:PolygonSymbolizer&gt;
                        &lt;sld:Fill&gt;
                           &lt;sld:CssParameter name=\"fill\"&gt;#00FF00&lt;/sld:CssParameter&gt;
                           &lt;sld:CssParameter name=\"fill-opacity\"&gt;0.8&lt;/sld:CssParameter&gt;
                        &lt;/sld:Fill&gt;
                        &lt;sld:Stroke&gt;
                           &lt;sld:CssParameter name=\"stroke\"&gt;#008000&lt;/sld:CssParameter&gt;
                           &lt;sld:CssParameter name=\"stroke-opacity\"&gt;1&lt;/sld:CssParameter&gt;
                           &lt;sld:CssParameter name=\"stroke-width\"&gt;1&lt;/sld:CssParameter&gt;
                        &lt;/sld:Stroke&gt;
                     &lt;/sld:PolygonSymbolizer&gt;
                  &lt;/sld:Rule&gt;
                  &lt;sld:Rule&gt;
                     &lt;ogc:Filter&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.21\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.22\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.23\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.24\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.25\"/&gt;
                     &lt;/ogc:Filter&gt;
                     &lt;sld:PolygonSymbolizer&gt;
                        &lt;sld:Fill&gt;
                           &lt;sld:CssParameter name=\"fill\"&gt;#FFFF00&lt;/sld:CssParameter&gt;
                           &lt;sld:CssParameter name=\"fill-opacity\"&gt;0.8&lt;/sld:CssParameter&gt;
                        &lt;/sld:Fill&gt;
                        &lt;sld:Stroke&gt;
                           &lt;sld:CssParameter name=\"stroke\"&gt;#808000&lt;/sld:CssParameter&gt;
                           &lt;sld:CssParameter name=\"stroke-opacity\"&gt;1&lt;/sld:CssParameter&gt;
                           &lt;sld:CssParameter name=\"stroke-width\"&gt;1&lt;/sld:CssParameter&gt;
                        &lt;/sld:Stroke&gt;
                     &lt;/sld:PolygonSymbolizer&gt;
                  &lt;/sld:Rule&gt;
                  &lt;sld:Rule&gt;
                     &lt;ogc:Filter&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.26\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.27\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.28\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.29\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.30\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.31\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.32\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.33\"/&gt;
                     &lt;/ogc:Filter&gt;
                     &lt;sld:PolygonSymbolizer&gt;
                        &lt;sld:Fill&gt;
                           &lt;sld:CssParameter name=\"fill\"&gt;#FF007F&lt;/sld:CssParameter&gt;
                           &lt;sld:CssParameter name=\"fill-opacity\"&gt;0.8&lt;/sld:CssParameter&gt;
                        &lt;/sld:Fill&gt;
                        &lt;sld:Stroke&gt;
                           &lt;sld:CssParameter name=\"stroke\"&gt;#C71585&lt;/sld:CssParameter&gt;
                           &lt;sld:CssParameter name=\"stroke-opacity\"&gt;1&lt;/sld:CssParameter&gt;
                           &lt;sld:CssParameter name=\"stroke-width\"&gt;1&lt;/sld:CssParameter&gt;
                        &lt;/sld:Stroke&gt;
                     &lt;/sld:PolygonSymbolizer&gt;
                  &lt;/sld:Rule&gt;
                  &lt;sld:Rule&gt;
                     &lt;ogc:Filter&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.34\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.35\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.36\"/&gt;
                     &lt;/ogc:Filter&gt;
                     &lt;sld:PolygonSymbolizer&gt;
                        &lt;sld:Fill&gt;
                           &lt;sld:CssParameter name=\"fill\"&gt;#FFC0CB&lt;/sld:CssParameter&gt;
                           &lt;sld:CssParameter name=\"fill-opacity\"&gt;0.8&lt;/sld:CssParameter&gt;
                        &lt;/sld:Fill&gt;
                        &lt;sld:Stroke&gt;
                           &lt;sld:CssParameter name=\"stroke\"&gt;#FF3E96&lt;/sld:CssParameter&gt;
                           &lt;sld:CssParameter name=\"stroke-opacity\"&gt;1&lt;/sld:CssParameter&gt;
                           &lt;sld:CssParameter name=\"stroke-width\"&gt;1&lt;/sld:CssParameter&gt;
                        &lt;/sld:Stroke&gt;
                     &lt;/sld:PolygonSymbolizer&gt;
                  &lt;/sld:Rule&gt;
                  &lt;sld:Rule&gt;
                     &lt;ogc:Filter&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.37\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.38\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.39\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.40\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.41\"/&gt;
                     &lt;/ogc:Filter&gt;
                     &lt;sld:PolygonSymbolizer&gt;
                        &lt;sld:Fill&gt;
                           &lt;sld:CssParameter name=\"fill\"&gt;#800080&lt;/sld:CssParameter&gt;
                           &lt;sld:CssParameter name=\"fill-opacity\"&gt;0.8&lt;/sld:CssParameter&gt;
                        &lt;/sld:Fill&gt;
                        &lt;sld:Stroke&gt;
                           &lt;sld:CssParameter name=\"stroke\"&gt;#68228B&lt;/sld:CssParameter&gt;
                           &lt;sld:CssParameter name=\"stroke-opacity\"&gt;1&lt;/sld:CssParameter&gt;
                           &lt;sld:CssParameter name=\"stroke-width\"&gt;1&lt;/sld:CssParameter&gt;
                        &lt;/sld:Stroke&gt;
                     &lt;/sld:PolygonSymbolizer&gt;
                  &lt;/sld:Rule&gt;
                  &lt;sld:Rule&gt;
                     &lt;ogc:Filter&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.42\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.43\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.44\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.45\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.46\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.47\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.48\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.49\"/&gt;
                        &lt;ogc:FeatureId fid=\"Polygon_Layer_Room.50\"/&gt;
                     &lt;/ogc:Filter&gt;
                     &lt;sld:PolygonSymbolizer&gt;
                        &lt;sld:Fill&gt;
                           &lt;sld:CssParameter name=\"fill\"&gt;#C00000&lt;/sld:CssParameter&gt;
                           &lt;sld:CssParameter name=\"fill-opacity\"&gt;0.8&lt;/sld:CssParameter&gt;
                        &lt;/sld:Fill&gt;
                        &lt;sld:Stroke&gt;
                           &lt;sld:CssParameter name=\"stroke\"&gt;#FF1CAE&lt;/sld:CssParameter&gt;
                           &lt;sld:CssParameter name=\"stroke-opacity\"&gt;1&lt;/sld:CssParameter&gt;
                           &lt;sld:CssParameter name=\"stroke-width\"&gt;1&lt;/sld:CssParameter&gt;
                        &lt;/sld:Stroke&gt;
                     &lt;/sld:PolygonSymbolizer&gt;
                  &lt;/sld:Rule&gt;
                  &lt;sld:Rule&gt;
                     &lt;sld:ElseFilter/&gt;
                     &lt;sld:PolygonSymbolizer&gt;
                        &lt;sld:Fill&gt;
                           &lt;sld:CssParameter name=\"fill\"&gt;#00FFFF&lt;/sld:CssParameter&gt;
                           &lt;sld:CssParameter name=\"fill-opacity\"&gt;0.8&lt;/sld:CssParameter&gt;
                        &lt;/sld:Fill&gt;
                        &lt;sld:Stroke&gt;
                           &lt;sld:CssParameter name=\"stroke\"&gt;#0000FF&lt;/sld:CssParameter&gt;
                           &lt;sld:CssParameter name=\"stroke-opacity\"&gt;1&lt;/sld:CssParameter&gt;
                           &lt;sld:CssParameter name=\"stroke-width\"&gt;1&lt;/sld:CssParameter&gt;
                        &lt;/sld:Stroke&gt;
                     &lt;/sld:PolygonSymbolizer&gt;
                  &lt;/sld:Rule&gt;
               &lt;/sld:FeatureTypeStyle&gt;
            &lt;/sld:UserStyle&gt;
         &lt;/sld:NamedLayer&gt;
      &lt;/sld:StyledLayerDescriptor&gt;
</BLOCKQUOTE>
</PRE>
<P>then the map is correctly rendered with the various colors/styles for the 
named polygons (by feature id) in that layer. This also includes the "rest" of 
the polygons defined by the &lt;ElseFilter/&gt; style, the use of which I was 
having issues combining with the fid filters.</P>
<P>If, however, I try any variation of applying this SLD using OpenLayers, I get 
the errors described in the <A 
href="http://osgeo-org.1803224.n2.nabble.com/Multiple-SLD-Rules-for-PolygonSymbolizer-on-a-Single-Layer-td6378253.html#a6432838" 
rel=nofollow target=_top link="external">6/2 post</A>.</P>
<P>Can anyone please tell me how to apply the above SLD style (or anything 
similar) using OpenLayers, or is there an OpenLayers SLD bug?</P>
<P>Even if you don't have a solution, any suggestions that might point me to one 
would be appreciated.</P>
<P>Sincerely,<BR>Ivan Bell</P>
<DIV class=signature>Up the Irons!!!</DIV><BR>
<HR align=left width=300>
View this message in context: <A 
href="http://osgeo-org.1803224.n2.nabble.com/OpenLayers-SLD-Bug-tp6453498p6453498.html">OpenLayers 
SLD Bug?</A><BR>Sent from the <A 
href="http://osgeo-org.1803224.n2.nabble.com/OpenLayers-Users-f1822463.html">OpenLayers 
Users mailing list archive</A> at Nabble.com.<BR></BODY></HTML>