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/sldStyledLayerDescriptor.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