Hello All,

I am doing a fairly simple thing but it doesn't quite seem to work as
expected.
I am creating a new empty style and then uploading a local sld into it (all
via the rest api).

The problem I am seeing is that there are certain xmlns objects being
stripped out - and thus breaking the sld.

The commands I am using;

curl -v -u admin:geoserver -XPOST -H "Content-type: text/xml" -d
"<style><name>topoarea</name><filename>topoarea.sld</filename></style>"
http://localhost:8080/geoserver/rest/styles

curl -v -u admin:geoserver -XPUT -H "Content-type:
application/vnd.ogc.sld+xml" -d @styles/topoareamin.sld
http://localhost:8080/geoserver/rest/styles/topoarea

The sld in questions is below and the bit that gets stripped out is the se
bit (in bold).

If I copy and paste this into the geoserver gui it works fine.

Any help would be much appreciated.

Toby


<?xml version="1.0" encoding="UTF-8"?>
                        <StyledLayerDescriptor xmlns="
http://www.opengis.net/sld"; xmlns:ogc="http://www.opengis.net/ogc";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; version="1.1.0"
xmlns:xlink="http://www.w3.org/1999/xlink"; xsi:schemaLocation="
http://www.opengis.net/sld
http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd";
*xmlns:se="http://www.opengis.net/se
<http://www.opengis.net/se>"*>
                          <NamedLayer>
                            <se:Name>topographicarea</se:Name>
                            <UserStyle>
                              <se:Name>topographicarea</se:Name>
                              <se:FeatureTypeStyle>
                                <se:Rule>
                                  <se:Name></se:Name>
                                  <se:PolygonSymbolizer>
                                    <se:Fill>
                                      <se:SvgParameter
name="fill">#ccff99</se:SvgParameter>
                                    </se:Fill>
                                  </se:PolygonSymbolizer>
                                </se:Rule>
                                <se:Rule>
                                  <se:Name>Building</se:Name>
                                  <se:Description>
                                    <se:Title>Building</se:Title>
                                    <se:Abstract>Buildings</se:Abstract>
                                  </se:Description>
                                  <ogc:Filter xmlns:ogc="
http://www.opengis.net/ogc";>
                                    <ogc:PropertyIsEqualTo>

<ogc:PropertyName>featurecode</ogc:PropertyName>
                                      <ogc:Literal>10021</ogc:Literal>
                                    </ogc:PropertyIsEqualTo>
                                  </ogc:Filter>
                                  <se:PolygonSymbolizer>
                                    <se:Fill>
                                      <se:SvgParameter
name="fill">#ffd8b0</se:SvgParameter>
                                    </se:Fill>
                                  </se:PolygonSymbolizer>
                                </se:Rule>
                              </se:FeatureTypeStyle>
                            </UserStyle>
                          </NamedLayer>
                        </StyledLayerDescriptor>
------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to