http://www.opengeospatial.org/standards/sld



Date: Wed, 29 Jun 2011 14:48:33 +0400
From: [email protected]
To: [email protected]
CC: [email protected]
Subject: Re: [Geoserver-users] SLD validation fails on GS 2.1.1

Ah, got that!
Should be put before Halo tag.

Can someone give me a link to a schema itself?

Thnx


2011/6/29 Gis Mage <[email protected]>

Hi Andrea,

Changed the tag order.
Still no luck - same error.
Any clues?

SLD is now:
--------------------------------

<?xml version="1.0" encoding="UTF-8"?>


á<StyledLayerDescriptor xmlns:xlink='http://www.w3.org/1999/xlink' 
xmlns:gml='http://www.opengis.net/gml' xmlns:ogc='http://www.opengis.net/ogc' 
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' version='1.0.0' 
xsi:schemaLocation='http://www.opengis.net/sldáStyledLayerDescriptor.xsd' 
xmlns='http://www.opengis.net/sld' >



ááá<NamedLayer>

á áá<Name>cities</Name>


áá áá<UserStyle>

á á áá<FeatureTypeStyle>

áá á á áá<Rule>

á á á á áá<Name>labels</Name>


áá á á á áá<Title>city labels</Title>


áá á á á áá<ogc:Filter>á á áá

á á á á á áá<ogc:PropertyIsEqualTo>

áá á á á á á áá<ogc:PropertyName>adm_sts</ogc:PropertyName>


áá á á á á á áá<ogc:Literal>0</ogc:Literal>


áá á á á á áá</ogc:PropertyIsEqualTo>á á áá

á á á á áá</ogc:Filter>áá

áá á á áá<TextSymbolizer>

á á á áá<Label>

áá á á á áá<ogc:PropertyName>name</ogc:PropertyName>


áá á á áá</Label>

á á á áá<Font>

áá á á á á á<CssParameter name="font-family">Arial</CssParameter>



áá á á á á á<CssParameter name="font-size">8</CssParameter>



áá á á á á á<CssParameter name="font-style">normal</CssParameter>



áá á á á á á<CssParameter name="font-weight">normal</CssParameter>



áá á á áá</Font>

á á á áá<Halo>

áá á á á á á áá<Radius>

á á á á á á á áá<ogc:Literal>1</ogc:Literal>


áá á á á á á áá</Radius>

á á á á á á áá<Fill>

áá á á á á á á áá<CssParameter name="fill" >#ffffff</CssParameter>



áá á á á á á áá</Fill>

á á á áá</Halo>
á á á á á á
á á á á á á<LabelPlacement>


á á á á á áá<PointPlacement>
á á á á á á á<AnchorPoint>

á á á á á á á áá<AnchorPointX>-0.05</AnchorPointX>

á á á á á á á áá<AnchorPointY>-0.05</AnchorPointY>

á á á á á á áá</AnchorPoint>
á á á á á á</PointPlacement>

á á á á áá</LabelPlacement>
á á á á á á


áá á á áá<Fill>

á á á á áá<CssParameter name="fill" >#000000</CssParameter>



áá á á áá</Fill>

á á á áá 

á á á áá<Priority>

áá á á á áá<ogc:PropertyName>comment</ogc:PropertyName>


áá á á áá</Priority>

á á áá</TextSymbolizer>

áá áá</Rule>

á á</FeatureTypeStyle>

ááá</UserStyle>

áá</NamedLayer>

á</StyledLayerDescriptor>
----------------------------


2011/6/29 Andrea Aime <[email protected]>


On Wed, Jun 29, 2011 at 11:58 AM, Gis Mage <[email protected]> wrote:

> Hi list!

>

> I've got an error:

>

> org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was

> found starting with element 'LabelPlacement'. One of

> '{"http://www.opengis.net/sld":Graphic,

> "http://www.opengis.net/sld":Priority,

> "http://www.opengis.net/sld":VendorOption}' is expected.



Your SLD elements are declared out of order.

The definition from the schema is:



 á<xsd:element name="TextSymbolizer" substitutionGroup="sld:Symbolizer">

 á á<xsd:annotation>

 á á á<xsd:documentation>

 á á á áA "TextSymbolizer" is used to render text labels according to

 á á á ávarious graphical parameters.

 á á á</xsd:documentation>

 á á</xsd:annotation>

 á á<xsd:complexType>

 á á á<xsd:complexContent>

 á á á á<xsd:extension base="sld:SymbolizerType">

 á á á á á<xsd:sequence>

 á á á á á á<xsd:element ref="sld:Geometry" minOccurs="0"/>

 á á á á á á<xsd:element ref="sld:Label" minOccurs="0"/>

 á á á á á á<xsd:element ref="sld:Font" minOccurs="0"/>

 á á á á á á<xsd:element ref="sld:LabelPlacement" minOccurs="0"/>

 á á á á á á<xsd:element ref="sld:Halo" minOccurs="0"/>

 á á á á á á<xsd:element ref="sld:Fill" minOccurs="0"/>



 á á á á á á<!-- GeoServer specific extensions, these are not part of

the SLD 1.0 standard -->

 á á á á á á<xsd:element ref="sld:Graphic" minOccurs="0"/>

 á á á á á á<xsd:element ref="sld:Priority" minOccurs="0"/>

 á á á á á á<xsd:element ref="sld:VendorOption" minOccurs="0"

maxOccurs="unbounded" />





 á á á á á</xsd:sequence>

 á á á á</xsd:extension>

 á á á</xsd:complexContent>

 á á</xsd:complexType>

 á</xsd:element>



As you can see LabelPlacement has to be put between halo and fill, not

after



Cheers

Andrea



> when trying to validate the following style:

> ------------------------

> <?xml version="1.0" encoding="UTF-8"?>

> <StyledLayerDescriptor xmlns:xlink='http://www.w3.org/1999/xlink'

> xmlns:gml='http://www.opengis.net/gml'

> xmlns:ogc='http://www.opengis.net/ogc'

> xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' version='1.0.0'

> xsi:schemaLocation='http://www.opengis.net/sld StyledLayerDescriptor.xsd'

> xmlns='http://www.opengis.net/sld' >

> áá<NamedLayer>

> á áá<Name>cities</Name>

> á áá<UserStyle>

> á ááá <FeatureTypeStyle>

> á ááááá <Rule>

> á á á á áá<Name>labels</Name>

> á á á á áá<Title>city labels</Title>

> á á á á áá<ogc:Filter>

> á á á á á áá<ogc:PropertyIsEqualTo>

> á á á á á á áá<ogc:PropertyName>adm_sts</ogc:PropertyName>

> á á á á á á áá<ogc:Literal>0</ogc:Literal>

> á á á á á áá</ogc:PropertyIsEqualTo>

> á á á á áá</ogc:Filter>

> á á ááá <TextSymbolizer>

> á á á áá<Label>

> á á á á á <ogc:PropertyName>name</ogc:PropertyName>

> á á á á </Label>

> á á á áá<Font>

> á á á á á á<CssParameter name="font-family">Arial</CssParameter>

> á á á á á á<CssParameter name="font-size">8</CssParameter>

> á á á á á á<CssParameter name="font-style">normal</CssParameter>

> á á á á á á<CssParameter name="font-weight">normal</CssParameter>

> á á á áá</Font>

> á á á áá<Halo>

> á á á á á á áá<Radius>

> á á á á á á á áá<ogc:Literal>1</ogc:Literal>

> á á á á á á áá</Radius>

> á á á á á á áá<Fill>

> á á á á á á á áá<CssParameter name="fill" >#ffffff</CssParameter>

> á á á á á á áá</Fill>

> á á á áá</Halo>

> á á á áá<Fill>

> á á á á áá<CssParameter name="fill" >#000000</CssParameter>

> á á á áá</Fill>

> á á á á á<LabelPlacement>

> á á á á á á<PointPlacement>

> á á á á á á á<AnchorPoint>

> á á á á á á á á<AnchorPointX>-0.05</AnchorPointX>

> á á á á á á á á<AnchorPointY>-0.05</AnchorPointY>

> á á á á á á á</AnchorPoint>

> á á á á á á</PointPlacement>

> á á á á á</LabelPlacement>

> á á á áá<Priority>

> á á á á áá<ogc:PropertyName>comment</ogc:PropertyName>

> á á á áá</Priority>

> á á áá</TextSymbolizer>

> á áá</Rule>

> á á</FeatureTypeStyle>

> áá</UserStyle>

> áá</NamedLayer>

> </StyledLayerDescriptor>

>

> ----------------------------------

>

> What's the problem with LabelPlacement tag?

>

> ------------------------------------------------------------------------------

> All of the data generated in your IT infrastructure is seriously valuable.

> Why? It contains a definitive record of application performance, security

> threats, fraudulent activity, and more. Splunk takes this data and makes

> sense of it. IT sense. And common sense.

> http://p.sf.net/sfu/splunk-d2d-c2

> _______________________________________________

> Geoserver-users mailing list

> [email protected]

> https://lists.sourceforge.net/lists/listinfo/geoserver-users

>

>







--

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

Ing. Andrea Aime

GeoSolutions S.A.S.

Tech lead



Via Poggio alle Viti 1187

55054 áMassarosa (LU)

Italy



phone: +39 0584 962313

fax: á á á+39 0584 962313



http://www.geo-solutions.it

http://geo-solutions.blogspot.com/

http://www.youtube.com/user/GeoSolutionsIT

http://www.linkedin.com/in/andreaaime

http://twitter.com/geowolf



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






------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users                    
                  
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to