On Thu, Nov 11, 2010 at 11:02 AM, Madhuri k <life.madh...@yahoo.com> wrote:
>
> Hello,
> I am new to geoserver and I am willing to develop a map with road network,
> landmarks etc.
> I am trying to apply styles to the road network in shape file format. When I
> applied optimized and styled label ("Optimized and styled label" SLD is
> found in
> http://docs.geoserver.org/latest/en/user/styling/sld-cookbook/lines.html#optimized-and-styled-label)
> to my road network it is giving me error at  "Font" and "LabelPlacement"
> tabs as below
>
> org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was
> found starting with element 'Font'. One of
> '{"http://www.opengis.net/sld":Graphic,
> "http://www.opengis.net/sld":Priority,
> "http://www.opengis.net/sld":VendorOption}' is expected.
>
> can someone tell me why its incorrect.

Because you're not following the right order for the elements. The
schema mandates
this order:

<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>

Cheers
Andrea

-----------------------------------------------------
Ing. Andrea Aime
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584962313
fax:     +39 0584962313

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

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

------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to