Hi Jaap, I slightly modified your SLD and now I get a green light from GeoServer's validator.
Basically, what I did was move the <MaxScaleDenominator> tags after the closing <ogc:Filter> tag. The order of the elements inside <sld:Rule> does matter, see http://docs.geoserver.org/stable/en/user/styling/sld-reference/rules.html for reference. You also had a <sld:CssParameter> outside of <sld:Stroke>, while it should've been inside. Hope this helps. Best regards, Stefano Costa == GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Dott. Stefano Costa Senior Software Engineer GeoSolutions S.A.S. Via Poggio alle Viti 1187 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 1660272 http://www.geo-solutions.it http://twitter.com/geosolutions_it ------------------------------------------------------- AVVERTENZE AI SENSI DEL D.Lgs. 196/2003 Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003. The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc. Da: "Boheemen van, Jaap" [email protected] A: "[email protected]" [email protected] Cc: Data: Tue, 14 Jul 2015 07:53:06 +0000 Oggetto: [Geoserver-users] cvc-complex-type.2.4.a: Invalid content was found starting with element 'sld:Title'. One of '{"http://www.opengis.net/sld":Symbolizer}' is expected > Hi all, > Hope this is the right place to ask this question > > I’m bit new to SLD’s so any help is appreciated J > > The error in the SLD I am getting is: > line 12: cvc-complex-type.2.4.a: Invalid content was found starting with > element 'sld:Title'. One of '{"http://www.opengis.net/sld":Symbolizer}' is > expected. > line 47: cvc-complex-type.2.4.a: Invalid content was found starting with > element 'sld:Title'. One of '{"http://www.opengis.net/sld":Symbolizer}' is > expected. > line 70: cvc-complex-type.2.4.a: Invalid content was found starting with > element 'sld:CssParameter'. One of '{"http://www.opengis.net/sld":Stroke}' is > expected. > line 77: cvc-complex-type.2.4.a: Invalid content was found starting with > element 'sld:Title'. One of '{"http://www.opengis.net/sld":Symbolizer}' is > expected. > line 113: cvc-complex-type.2.4.a: Invalid content was found starting with > element 'sld:Title'. One of '{"http://www.opengis.net/sld":Symbolizer}' is > expected. > line 168: cvc-complex-type.2.4.a: Invalid content was found starting with > element 'sld:Title'. One of '{"http://www.opengis.net/sld":Symbolizer}' is > expected. > line 219: cvc-complex-type.2.4.a: Invalid content was found starting with > element 'sld:Title'. One of '{"http://www.opengis.net/sld":Symbolizer}' is > expected. > > SLD code I cooked up is below. > > Thanks for the help in advance! > Jaap van Boheemen > > <?xml version="1.0" encoding="UTF-8"?><sld:StyledLayerDescriptor > xmlns="http://www.opengis.net/sld" xmlns:sld="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml" version="1.0.0"> > <sld:NamedLayer> > <sld:Name>Economie_Bedrijventerreinkavels_style</sld:Name> > <sld:UserStyle> > <sld:Name>Economie_Bedrijventerreinkavels_style</sld:Name> > <sld:Title>Economie Bedrijventerreinkavels style</sld:Title> > <sld:FeatureTypeStyle> > <sld:Name>name</sld:Name> > <sld:Rule> > <sld:Name>uitgeefbaar</sld:Name> > <MaxScaleDenominator>50000</MaxScaleDenominator> > <sld:Title>uitgeefbaar</sld:Title> > <ogc:Filter> > <ogc:PropertyIsEqualTo> > <ogc:PropertyName>terrein_status</ogc:PropertyName> > <ogc:Literal>uitgeefbaar</ogc:Literal> > </ogc:PropertyIsEqualTo> > </ogc:Filter> > <sld:PolygonSymbolizer> > <sld:Fill> > <sld:GraphicFill> > <sld:Graphic> > <sld:Mark> > <sld:WellKnownName>shape://horline</sld:WellKnownName> > <sld:Fill> > <sld:CssParameter > name="fill">#4CE600</sld:CssParameter> > </sld:Fill> > <sld:Stroke> > <sld:CssParameter > name="stroke">#4CE600</sld:CssParameter> > </sld:Stroke> > </sld:Mark> > <sld:Size>10</sld:Size> > </sld:Graphic> > </sld:GraphicFill> > <sld:CssParameter name="fill">#4CE600</sld:CssParameter> > </sld:Fill> > <sld:Stroke> > <sld:CssParameter name="stroke">#4CE600</sld:CssParameter> > <sld:CssParameter name="stroke-linecap">round</sld:CssParameter> > <sld:CssParameter name="stroke-width">0.5</sld:CssParameter> > </sld:Stroke> > </sld:PolygonSymbolizer> > </sld:Rule> > <sld:Rule> > <sld:Name>niet terstond uitgeefbaar</sld:Name> > <MaxScaleDenominator>50000</MaxScaleDenominator> > <sld:Title>niet terstond uitgeefbaar</sld:Title> > <ogc:Filter> > <ogc:PropertyIsEqualTo> > <ogc:PropertyName>terrein_status</ogc:PropertyName> > <ogc:Literal>niet terstond uitgeefbaar</ogc:Literal> > </ogc:PropertyIsEqualTo> > </ogc:Filter> > <sld:PolygonSymbolizer> > <sld:Fill> > <sld:GraphicFill> > <sld:Graphic> > <sld:Mark> > <sld:WellKnownName>shape://slash</sld:WellKnownName> > <sld:Fill> > <sld:CssParameter name="fill">#000000</sld:CssParameter> > </sld:Fill> > <sld:Stroke/> > </sld:Mark> > <sld:Size>10</sld:Size> > </sld:Graphic> > </sld:GraphicFill> > <sld:CssParameter name="fill">#000000</sld:CssParameter> > </sld:Fill> > <sld:CssParameter name="stroke-width">0.5</sld:CssParameter> > <sld:Stroke/> > </sld:PolygonSymbolizer> > </sld:Rule> > <sld:Rule> > <sld:Name>uitgegeven</sld:Name> > <MaxScaleDenominator>50000</MaxScaleDenominator> > <sld:Title>uitgegeven</sld:Title> > <ogc:Filter> > <ogc:PropertyIsEqualTo> > <ogc:PropertyName>terrein_status</ogc:PropertyName> > <ogc:Literal>uitgegeven</ogc:Literal> > </ogc:PropertyIsEqualTo> > </ogc:Filter> > <sld:PolygonSymbolizer> > <sld:Fill> > <sld:GraphicFill> > <sld:Graphic> > <sld:Mark> > <sld:WellKnownName>shape://vertline</sld:WellKnownName> > <sld:Fill> > <sld:CssParameter name="fill">#FF0000</sld:CssParameter> > </sld:Fill> > <sld:Stroke> > <sld:CssParameter > name="stroke">#FF0000</sld:CssParameter> > <sld:CssParameter > name="stroke-width">0.5</sld:CssParameter> > </sld:Stroke> > </sld:Mark> > <sld:Size>10</sld:Size> > </sld:Graphic> > </sld:GraphicFill> > <sld:CssParameter name="fill">#FF0000</sld:CssParameter> > </sld:Fill> > <sld:Stroke> > <sld:CssParameter name="stroke">#FF0000</sld:CssParameter> > <sld:CssParameter name="stroke-linecap">round</sld:CssParameter> > <sld:CssParameter name="stroke-width">0.5</sld:CssParameter> > </sld:Stroke> > </sld:PolygonSymbolizer> > </sld:Rule> > <sld:Rule> > <sld:Name>woonbebouwing</sld:Name> > <MaxScaleDenominator>50000</MaxScaleDenominator> > <sld:Title>woonbebouwing</sld:Title> > <ogc:Filter> > <ogc:PropertyIsEqualTo> > <ogc:PropertyName>terrein_status</ogc:PropertyName> > <ogc:Literal>woonbebouwing</ogc:Literal> > </ogc:PropertyIsEqualTo> > </ogc:Filter> > <sld:PolygonSymbolizer> > <sld:Fill> > <sld:GraphicFill> > <sld:Graphic> > <sld:Mark> > <sld:WellKnownName>shape://slash</sld:WellKnownName> > <sld:Fill> > <sld:CssParameter name="fill">#004DA8</sld:CssParameter> > </sld:Fill> > <sld:Stroke> > <sld:CssParameter > name="stroke">#004DA8</sld:CssParameter> > <sld:CssParameter > name="stroke-width">0.5</sld:CssParameter> > </sld:Stroke> > </sld:Mark> > <sld:Size>12</sld:Size> > </sld:Graphic> > </sld:GraphicFill> > <sld:CssParameter name="fill">#004DA8</sld:CssParameter> > </sld:Fill> > </sld:PolygonSymbolizer> > <sld:PolygonSymbolizer> > <sld:Fill> > <sld:GraphicFill> > <sld:Graphic> > <sld:Mark> > <sld:WellKnownName>shape://backslash</sld:WellKnownName> > <sld:Fill> > <sld:CssParameter name="fill">#004DA8</sld:CssParameter> > </sld:Fill> > <sld:Stroke> > <sld:CssParameter > name="stroke">#004DA8</sld:CssParameter> > <sld:CssParameter > name="stroke-width">0.5</sld:CssParameter> > </sld:Stroke> > </sld:Mark> > <sld:Size>12</sld:Size> > </sld:Graphic> > </sld:GraphicFill> > <sld:CssParameter name="fill">#004DA8</sld:CssParameter> > </sld:Fill> > <sld:Stroke> > <sld:CssParameter name="stroke">#005CE6</sld:CssParameter> > <sld:CssParameter name="stroke-width">0.5</sld:CssParameter> > </sld:Stroke> > </sld:PolygonSymbolizer> > </sld:Rule> > <sld:Rule> > <sld:Name>openbare ruimte</sld:Name> > <MaxScaleDenominator>50000</MaxScaleDenominator> > <sld:Title>openbare ruimte</sld:Title> > <ogc:Filter> > <ogc:PropertyIsEqualTo> > <ogc:PropertyName>terrein_status</ogc:PropertyName> > <ogc:Literal>openbare ruimte</ogc:Literal> > </ogc:PropertyIsEqualTo> > </ogc:Filter> > <sld:PolygonSymbolizer> > <sld:Fill> > <sld:GraphicFill> > <sld:Graphic> > <sld:Mark> > <sld:WellKnownName>shape://slash</sld:WellKnownName> > <sld:Fill> > <sld:CssParameter name="fill">#FFFF00</sld:CssParameter> > </sld:Fill> > <sld:Stroke> > <sld:CssParameter > name="stroke">#FFFF00</sld:CssParameter> > <sld:CssParameter > name="stroke-width">0.5</sld:CssParameter> > </sld:Stroke> > </sld:Mark> > <sld:Size>12</sld:Size> > </sld:Graphic> > </sld:GraphicFill> > <sld:CssParameter name="fill">#FFFF00</sld:CssParameter> > </sld:Fill> > </sld:PolygonSymbolizer> > <sld:PolygonSymbolizer> > <sld:Fill> > <sld:GraphicFill> > <sld:Graphic> > <sld:Mark> > <sld:WellKnownName>shape://backslash</sld:WellKnownName> > <sld:Fill> > <sld:CssParameter name="fill">#FFFF00</sld:CssParameter> > </sld:Fill> > <sld:Stroke> > <sld:CssParameter > name="stroke">#FFFF00</sld:CssParameter> > <sld:CssParameter > name="stroke-width">0.5</sld:CssParameter> > </sld:Stroke> > </sld:Mark> > <sld:Size>12</sld:Size> > </sld:Graphic> > </sld:GraphicFill> > <sld:CssParameter name="fill">#FFFF00</sld:CssParameter> > </sld:Fill> > </sld:PolygonSymbolizer> > </sld:Rule> > <sld:Rule> > <sld:Name>niet bekend</sld:Name> > <MaxScaleDenominator>50000</MaxScaleDenominator> > <sld:Title>niet bekend</sld:Title> > <ogc:Filter> > <ogc:PropertyIsEqualTo> > <ogc:PropertyName>terrein_status</ogc:PropertyName> > <ogc:Literal>niet bekend</ogc:Literal> > </ogc:PropertyIsEqualTo> > </ogc:Filter> > <sld:PolygonSymbolizer> > <sld:Fill> > <sld:CssParameter name="fill">#CCCCCC</sld:CssParameter> > </sld:Fill> > </sld:PolygonSymbolizer> > </sld:Rule> > </sld:FeatureTypeStyle> > </sld:UserStyle> > </sld:NamedLayer> > </sld:StyledLayerDescriptor> > **** Disclaimer ****
test.sld
Description: Binary data
------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/
_______________________________________________ Geoserver-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
