<span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse"><div>Hi all, </div><div><br></div><div>I&#39;a, trying to use SLD files with Mapserver.</div><div><br></div>
<div>I&#39;ve started from an example of this web site (<a href="http://mapserver.org/ogc/sld.html" target="_blank">http://mapserver.org/ogc/sld.html</a>) is working well but if I use a SLD generated by Udig or the Styler (OpenGeo suite), it does not.</div>
<div><br></div><div>working SLD:</div><div><div>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</div><div>&lt;StyledLayerDescriptor version=&quot;1.1.0&quot;</div><div>  xmlns=&quot;<a href="http://www.opengis.net/sld">http://www.opengis.net/sld</a>&quot;</div>
<div>  xmlns:se=&quot;<a href="http://www.opengis.net/se">http://www.opengis.net/se</a>&quot;</div><div>  xmlns:ogc=&quot;<a href="http://www.opengis.net/ogc">http://www.opengis.net/ogc</a>&quot;</div><div>  xmlns:xlink=&quot;<a href="http://www.w3.org/1999/xlink">http://www.w3.org/1999/xlink</a>&quot;</div>
<div>  xmlns:xsi=&quot;<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>&quot;</div><div>  xsi:schemaLocation=&quot;<a href="http://www.opengis.net/sld">http://www.opengis.net/sld</a></div>
<div>  <a href="http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd">http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd</a>&quot;&gt;</div><div>&lt;NamedLayer&gt;</div><div>  &lt;se:Name&gt;INDEX_20K&lt;/se:Name&gt;</div>
<div>    &lt;UserStyle&gt;</div><div>      &lt;se:Name&gt;xxx&lt;/se:Name&gt;</div><div>      &lt;se:FeatureTypeStyle&gt;</div><div>        &lt;se:Rule&gt;</div><div>          &lt;se:PolygonSymbolizer&gt;</div><div>            &lt;se:Geometry&gt;</div>
<div>              &lt;ogc:PropertyName&gt;center-line&lt;/ogc:PropertyName&gt;</div><div>            &lt;/se:Geometry&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>        &lt;se:Fill&gt;</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>            &lt;sld:CssParameter name=&quot;fill&quot;&gt;#008040&lt;/sld:CssParameter&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>            &lt;sld:CssParameter name=&quot;fill-opacity&quot;&gt;0.5&lt;/sld:CssParameter&gt;</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>        &lt;/se:Fill&gt;</div><div>            &lt;se:Stroke&gt;</div><div>              &lt;sld:CssParameter name=&quot;stroke&quot;&gt;#008040&lt;/sld:CssParameter&gt;</div>
<div>              &lt;sld:CssParameter name=&quot;stroke-width&quot;&gt;2&lt;/sld:CssParameter&gt;</div><div>            &lt;/se:Stroke&gt;</div><div>          &lt;/se:PolygonSymbolizer&gt;</div><div>        &lt;/se:Rule&gt;</div>
<div>      &lt;/se:FeatureTypeStyle&gt;</div><div>    &lt;/UserStyle&gt;</div><div>  &lt;/NamedLayer&gt;</div><div>&lt;/StyledLayerDescriptor&gt;</div></div><div><br></div>
<div>The one generated from the Styler raise an error (WMS server error. Invalid SLD document)</div><div><div><div>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</div><div>&lt;sld:UserStyle xmlns=&quot;<a href="http://www.opengis.net/sld">http://www.opengis.net/sld</a>&quot; xmlns:sld=&quot;<a href="http://www.opengis.net/sld">http://www.opengis.net/sld</a>&quot; xmlns:ogc=&quot;<a href="http://www.opengis.net/ogc">http://www.opengis.net/ogc</a>&quot; xmlns:gml=&quot;<a href="http://www.opengis.net/gml">http://www.opengis.net/gml</a>&quot;&gt;</div>
<div>  &lt;sld:Name&gt;INDEX_20K&lt;/sld:Name&gt;</div><div>  &lt;sld:Title&gt;Default polygon style&lt;/sld:Title&gt;</div><div>  &lt;sld:Abstract&gt;A sample style&lt;/sld:Abstract&gt;</div><div>  &lt;sld:FeatureTypeStyle&gt;</div>
<div>    &lt;sld:Name&gt;name&lt;/sld:Name&gt;</div><div>    &lt;sld:Rule&gt;</div><div>      &lt;sld:Name&gt;default&lt;/sld:Name&gt;</div><div>      &lt;sld:Title&gt;Index20K&lt;/sld:Title&gt;</div><div>      &lt;sld:PolygonSymbolizer&gt;</div>
<div>        &lt;sld:Fill&gt;</div><div>          &lt;sld:CssParameter name=&quot;fill&quot;&gt;#008040&lt;/sld:CssParameter&gt;</div><div>          &lt;sld:CssParameter name=&quot;fill-opacity&quot;&gt;0.5&lt;/sld:CssParameter&gt;</div>
<div>        &lt;/sld:Fill&gt;</div><div>        &lt;sld:Stroke&gt;</div><div>          &lt;sld:CssParameter name=&quot;stroke&quot;&gt;#008040&lt;/sld:CssParameter&gt;</div><div>          &lt;sld:CssParameter name=&quot;stroke-width&quot;&gt;2&lt;/sld:CssParameter&gt;</div>
<div>        &lt;/sld:Stroke&gt;</div><div>      &lt;/sld:PolygonSymbolizer&gt;</div><div>    &lt;/sld:Rule&gt;</div><div>  &lt;/sld:FeatureTypeStyle&gt;</div><div>&lt;/sld:UserStyle&gt;</div></div></div><div><br></div><div>
The one from Udig is simply ignored by mapserver (without raising any error)</div><div><div><div>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</div><div>&lt;sld:StyledLayerDescriptor xmlns=&quot;<a href="http://www.opengis.net/sld">http://www.opengis.net/sld</a>&quot; xmlns:sld=&quot;<a href="http://www.opengis.net/sld">http://www.opengis.net/sld</a>&quot; xmlns:ogc=&quot;<a href="http://www.opengis.net/ogc">http://www.opengis.net/ogc</a>&quot; xmlns:gml=&quot;<a href="http://www.opengis.net/gml">http://www.opengis.net/gml</a>&quot; version=&quot;1.0.0&quot;&gt;</div>
<div>    &lt;sld:UserLayer&gt;</div><div>        &lt;sld:LayerFeatureConstraints&gt;</div><div>            &lt;sld:FeatureTypeConstraint/&gt;</div><div>        &lt;/sld:LayerFeatureConstraints&gt;</div><div>        &lt;sld:UserStyle&gt;</div>
<div>            &lt;sld:Name&gt;Default Styler&lt;/sld:Name&gt;</div><div>            &lt;sld:Title/&gt;</div><div>            &lt;sld:IsDefault&gt;1&lt;/sld:IsDefault&gt;</div><div>            &lt;sld:FeatureTypeStyle&gt;</div>
<div>                &lt;sld:Name&gt;simple&lt;/sld:Name&gt;</div><div>                &lt;sld:FeatureTypeName&gt;Feature&lt;/sld:FeatureTypeName&gt;</div><div>                &lt;sld:SemanticTypeIdentifier&gt;generic:geometry&lt;/sld:SemanticTypeIdentifier&gt;</div>
<div>                &lt;sld:SemanticTypeIdentifier&gt;simple&lt;/sld:SemanticTypeIdentifier&gt;</div><div>                &lt;sld:Rule&gt;</div><div>                    &lt;sld:PolygonSymbolizer&gt;</div><div>                        &lt;sld:Fill&gt;</div>
<div>                            &lt;sld:CssParameter name=&quot;fill&quot;&gt;#008040&lt;/sld:CssParameter&gt;</div><div>                            &lt;sld:CssParameter name=&quot;fill-opacity&quot;&gt;0.5&lt;/sld:CssParameter&gt;</div>
<div>                        &lt;/sld:Fill&gt;</div><div>                        &lt;sld:Stroke&gt;</div><div>                            &lt;sld:CssParameter name=&quot;stroke&quot;&gt;#008000&lt;/sld:CssParameter&gt;</div>
<div>                            &lt;sld:CssParameter name=&quot;stroke-width&quot;&gt;2&lt;/sld:CssParameter&gt;</div><div>                        &lt;/sld:Stroke&gt;</div><div>                    &lt;/sld:PolygonSymbolizer&gt;</div>
<div>                &lt;/sld:Rule&gt;</div><div>            &lt;/sld:FeatureTypeStyle&gt;</div><div>        &lt;/sld:UserStyle&gt;</div><div>    &lt;/sld:UserLayer&gt;</div><div>&lt;/sld:StyledLayerDescriptor&gt;</div></div>
<div><br></div><div>Is there any chance that you had similar issues?</div></div><div><br></div><div>thanks!</div><div><br></div><div>MartinO</div></span>