boxplot ha scritto:
> Hi,
> 
> I try to setup this kind of style and receive the following error message
> every time:
> 
> Error message:
> org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was
> found starting with element 'ogc:Function'. One of
> '{"http://www.opengis.net/ogc":PropertyName}' is expected.
> org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was
> found starting with element 'ogc:Function'. One of
> '{"http://www.opengis.net/ogc":PropertyName}' is expected.
> 
> SLD:
> <StyledLayerDescriptor version="1.0.0" xmlns="http://www.opengis.net/sld";
>   xmlns:ogc="http://www.opengis.net/ogc";
> xmlns:xlink="http://www.w3.org/1999/xlink";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>   xsi:schemaLocation="http://www.opengis.net/sld
> http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd";>
>   <NamedLayer>
> 
>     <Name>StartEnd</Name>
>     <UserStyle>
>       <FeatureTypeStyle>
>         <Rule>
>           <LineSymbolizer>
>           <Stroke></Stroke>
>           </LineSymbolizer>
>        
>           <PointSymbolizer>
>             <Geometry>
>               <ogc:Function name="startPoint">
>                 <ogc:PropertyName>the_geom</ogc:PropertyName>
>               </ogc:Function>
>             </Geometry>
>             <Graphic>
>               <Mark>
>                 <WellKnownName>square</WellKnownName>
>                 <Stroke>
>                   <CssParameter name="stroke">0x00FF00</CssParameter>
>                   <CssParameter name="stroke-width">1.5</CssParameter>
>                 </Stroke>
>               </Mark>
>               <Size>8</Size>
>             </Graphic>
>           </PointSymbolizer>
>          </Rule>
>        </FeatureTypeStyle>          
>        <FeatureTypeStyle>
>          <Rule>
>           <PointSymbolizer>
>             <Geometry>
>               <ogc:Function name="endPoint">
>                 <ogc:PropertyName>the_geom</ogc:PropertyName>
>               </ogc:Function>
>             </Geometry>
>             <Graphic>
>               <Mark>
>                 <WellKnownName>circle</WellKnownName>
>                 <Fill>
>                   <CssParameter name="fill">0xFF0000</CssParameter>
>                 </Fill>
>               </Mark>
>               <Size>4</Size>
>             </Graphic>
>           </PointSymbolizer>
>         </Rule>
>       </FeatureTypeStyle>
>     </UserStyle>
>   </NamedLayer>
> </StyledLayerDescriptor>
> 
> What am I doing wrong?

Assuming you are using a recent enough version of GeoTools,
you're still referencing the official SLD schema, which does
not contain the gt2 specific extesions.

Moreover, how are you parsing the SLD?

Cheers
Andrea

-- 
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to