[Geoserver-users] Error with SLD styles

Hi

I’ve just uploaded an SLD file from QGIS to Geoserver and I’m getting the following error:

line 221: cvc-complex-type.2.4.d: Invalid content was found starting with element ‘se:Mark’. No child element is expected at this point.

I’ve done a little digging around and I think it’s something to do with needing to include a maxOccurs = “unbounded” into the SLD, but I have no idea where. Below is a sample where it is failing.

se:PolygonSymbolizer
se:Fill
se:GraphicFill
se:Graphic/
<se:Mark maxOccurs=“unbounded”>
se:WellKnownNameline</se:WellKnownName>
se:Stroke
<se:SvgParameter name=“stroke”>#ff55ff</se:SvgParameter>
</se:Stroke>
</se:Mark>
</se:GraphicFill>
</se:Fill>
se:Stroke
<se:SvgParameter name=“stroke”>#ff55ff</se:SvgParameter>
<se:SvgParameter name=“stroke-width”>0.7</se:SvgParameter>
</se:Stroke>
</se:PolygonSymbolizer>

Any help would be great.

Thanks

Steve

Steve Campbell

GIS Manager

Corporate Strategy and Communications

Borough of Poole | Civic Centre | Poole BH15 2RU

Tel: 01202 633 362

Email: s.campbell@anonymised.com

Website:www.boroughofpoole.com

Think Green! Please Recycle

DISCLAIMER:
This email and any files transmitted with it may be confidential, legally privileged and protected in law and are intended solely for the use of the individual to whom it is addressed. The copyright in all documentation is the property of the Borough of Poole and this email and any documentation must not be copied or used other than as strictly necessary for the purpose of this email, without prior written consent which may be subject to conditions. Any view or opinions presented are solely those of the author and do not necessarily represent those of the Borough of Poole. The Borough of Poole reserves the right to inspect incoming and outgoing emails. If you have received this email in error please contact the sender by return and confirm that its contents have been destroyed. Telephone enquiries should be directed to the Borough switchboard on 01202 633633.

Steve,

The tag se:Graphic is not an empty element, but should simply wrap the full se:Mark tag. Hence:

se:PolygonSymbolizer
se:Fill
se:GraphicFill
se:Graphic

se:Mark

se:WellKnownNameline</se:WellKnownName>
se:Stroke
<se:SvgParameter name=“stroke”>#ff55ff</se:SvgParameter>
</se:Stroke>
</se:Mark>

</se:Graphic>
</se:GraphicFill>
</se:Fill>
se:Stroke
<se:SvgParameter name=“stroke”>#ff55ff</se:SvgParameter>
<se:SvgParameter name=“stroke-width”>0.7</se:SvgParameter>
</se:Stroke>
</se:PolygonSymbolizer>

HTH

Kind regards,

Edward


Date: Fri, 24 May 2013 17:54:57 +0100
From: s.campbell@anonymised.com
To: geoserver-users@anonymised.comsourceforge.net
Subject: [Geoserver-users] Error with SLD styles

Hi

I’ve just uploaded an SLD file from QGIS to Geoserver and I’m getting the following error:

line 221: cvc-complex-type.2.4.d: Invalid content was found starting with element ‘se:Mark’. No child element is expected at this point.

I’ve done a little digging around and I think it’s something to do with needing to include a maxOccurs = “unbounded” into the SLD, but I have no idea where. Below is a sample where it is failing.

se:PolygonSymbolizer
se:Fill
se:GraphicFill
se:Graphic/
<se:Mark maxOccurs=“unbounded”>
se:WellKnownNameline</se:WellKnownName>
se:Stroke
<se:SvgParameter name=“stroke”>#ff55ff</se:SvgParameter>
</se:Stroke>
</se:Mark>
</se:GraphicFill>
</se:Fill>
se:Stroke
<se:SvgParameter name=“stroke”>#ff55ff</se:SvgParameter>
<se:SvgParameter name=“stroke-width”>0.7</se:SvgParameter>
</se:Stroke>
</se:PolygonSymbolizer>

Any help would be great.

Thanks

Steve

Steve Campbell

GIS Manager

Corporate Strategy and Communications

Borough of Poole | Civic Centre | Poole BH15 2RU

Tel: 01202 633 362

Email: s.campbell@anonymised.com

Website:www.boroughofpoole.com

Think Green! Please Recycle

DISCLAIMER:
This email and any files transmitted with it may be confidential, legally privileged and protected in law and are intended solely for the use of the individual to whom it is addressed. The copyright in all documentation is the property of the Borough of Poole and this email and any documentation must not be copied or used other than as strictly necessary for the purpose of this email, without prior written consent which may be subject to conditions. Any view or opinions presented are solely those of the author and do not necessarily represent those of the Borough of Poole. The Borough of Poole reserves the right to inspect incoming and outgoing emails. If you have received this email in error please contact the sender by return and confirm that its contents have been destroyed. Telephone enquiries should be directed to the Borough switchboard on 01202 633633.
------------------------------------------------------------------------------ Try New Relic Now & We’ll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users

On Fri, May 24, 2013 at 10:54 PM, Edward Mac Gillavry <
emacgillavry@anonymised.com> wrote:

Steve,

The tag <se:Graphic> is not an empty element, but should simply wrap the
full <se:Mark> tag. Hence:

Yep, spot on.
I've also tried briefly the SDL generated by QGis, in 1.8 there are other
errors that make the document
invalid. I know some have been fixed, but only in the development version.
When QGis 2.0 comes out it should have a better support for SLD 1.1 (as in,
generating correct, or
at least more correct, SLD docs).

Cheers
Andrea

--

GeoServer training in Milan, 6th & 7th June 2013! Visit
http://geoserver.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------