<span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse"><div>Hi all, </div><div><br></div><div>I'a, trying to use SLD files with Mapserver.</div><div><br></div>
<div>I'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><?xml version="1.0" encoding="UTF-8"?></div><div><StyledLayerDescriptor version="1.1.0"</div><div>  xmlns="<a href="http://www.opengis.net/sld">http://www.opengis.net/sld</a>"</div>
<div>  xmlns:se="<a href="http://www.opengis.net/se">http://www.opengis.net/se</a>"</div><div>  xmlns:ogc="<a href="http://www.opengis.net/ogc">http://www.opengis.net/ogc</a>"</div><div>  xmlns:xlink="<a href="http://www.w3.org/1999/xlink">http://www.w3.org/1999/xlink</a>"</div>
<div>  xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>"</div><div>  xsi:schemaLocation="<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>"></div><div><NamedLayer></div><div>  <se:Name>INDEX_20K</se:Name></div>
<div>    <UserStyle></div><div>      <se:Name>xxx</se:Name></div><div>      <se:FeatureTypeStyle></div><div>        <se:Rule></div><div>          <se:PolygonSymbolizer></div><div>            <se:Geometry></div>
<div>              <ogc:PropertyName>center-line</ogc:PropertyName></div><div>            </se:Geometry></div><div><span class="Apple-tab-span" style="white-space:pre">      </span>        <se:Fill></div>
<div><span class="Apple-tab-span" style="white-space:pre">      </span>            <sld:CssParameter name="fill">#008040</sld:CssParameter></div><div><span class="Apple-tab-span" style="white-space:pre">   </span>            <sld:CssParameter name="fill-opacity">0.5</sld:CssParameter></div>
<div><span class="Apple-tab-span" style="white-space:pre">      </span>        </se:Fill></div><div>            <se:Stroke></div><div>              <sld:CssParameter name="stroke">#008040</sld:CssParameter></div>
<div>              <sld:CssParameter name="stroke-width">2</sld:CssParameter></div><div>            </se:Stroke></div><div>          </se:PolygonSymbolizer></div><div>        </se:Rule></div>
<div>      </se:FeatureTypeStyle></div><div>    </UserStyle></div><div>  </NamedLayer></div><div></StyledLayerDescriptor></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><?xml version="1.0" encoding="UTF-8"?></div><div><sld:UserStyle xmlns="<a href="http://www.opengis.net/sld">http://www.opengis.net/sld</a>" xmlns:sld="<a href="http://www.opengis.net/sld">http://www.opengis.net/sld</a>" xmlns:ogc="<a href="http://www.opengis.net/ogc">http://www.opengis.net/ogc</a>" xmlns:gml="<a href="http://www.opengis.net/gml">http://www.opengis.net/gml</a>"></div>
<div>  <sld:Name>INDEX_20K</sld:Name></div><div>  <sld:Title>Default polygon style</sld:Title></div><div>  <sld:Abstract>A sample style</sld:Abstract></div><div>  <sld:FeatureTypeStyle></div>
<div>    <sld:Name>name</sld:Name></div><div>    <sld:Rule></div><div>      <sld:Name>default</sld:Name></div><div>      <sld:Title>Index20K</sld:Title></div><div>      <sld:PolygonSymbolizer></div>
<div>        <sld:Fill></div><div>          <sld:CssParameter name="fill">#008040</sld:CssParameter></div><div>          <sld:CssParameter name="fill-opacity">0.5</sld:CssParameter></div>
<div>        </sld:Fill></div><div>        <sld:Stroke></div><div>          <sld:CssParameter name="stroke">#008040</sld:CssParameter></div><div>          <sld:CssParameter name="stroke-width">2</sld:CssParameter></div>
<div>        </sld:Stroke></div><div>      </sld:PolygonSymbolizer></div><div>    </sld:Rule></div><div>  </sld:FeatureTypeStyle></div><div></sld:UserStyle></div></div></div><div><br></div><div>
The one from Udig is simply ignored by mapserver (without raising any error)</div><div><div><div><?xml version="1.0" encoding="UTF-8"?></div><div><sld:StyledLayerDescriptor xmlns="<a href="http://www.opengis.net/sld">http://www.opengis.net/sld</a>" xmlns:sld="<a href="http://www.opengis.net/sld">http://www.opengis.net/sld</a>" xmlns:ogc="<a href="http://www.opengis.net/ogc">http://www.opengis.net/ogc</a>" xmlns:gml="<a href="http://www.opengis.net/gml">http://www.opengis.net/gml</a>" version="1.0.0"></div>
<div>    <sld:UserLayer></div><div>        <sld:LayerFeatureConstraints></div><div>            <sld:FeatureTypeConstraint/></div><div>        </sld:LayerFeatureConstraints></div><div>        <sld:UserStyle></div>
<div>            <sld:Name>Default Styler</sld:Name></div><div>            <sld:Title/></div><div>            <sld:IsDefault>1</sld:IsDefault></div><div>            <sld:FeatureTypeStyle></div>
<div>                <sld:Name>simple</sld:Name></div><div>                <sld:FeatureTypeName>Feature</sld:FeatureTypeName></div><div>                <sld:SemanticTypeIdentifier>generic:geometry</sld:SemanticTypeIdentifier></div>
<div>                <sld:SemanticTypeIdentifier>simple</sld:SemanticTypeIdentifier></div><div>                <sld:Rule></div><div>                    <sld:PolygonSymbolizer></div><div>                        <sld:Fill></div>
<div>                            <sld:CssParameter name="fill">#008040</sld:CssParameter></div><div>                            <sld:CssParameter name="fill-opacity">0.5</sld:CssParameter></div>
<div>                        </sld:Fill></div><div>                        <sld:Stroke></div><div>                            <sld:CssParameter name="stroke">#008000</sld:CssParameter></div>
<div>                            <sld:CssParameter name="stroke-width">2</sld:CssParameter></div><div>                        </sld:Stroke></div><div>                    </sld:PolygonSymbolizer></div>
<div>                </sld:Rule></div><div>            </sld:FeatureTypeStyle></div><div>        </sld:UserStyle></div><div>    </sld:UserLayer></div><div></sld:StyledLayerDescriptor></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>