swebb wrote:
> I hope someone can help me. I am just looking into using geotools to help
> parse a featuretypestyle but I'm having difficulty with the basics. I
> receive a xml string as part of a message that is sent to a process I am
> working on, the string contains some xml which I have the xsd for. The xsd
> defines an xml structure that contains a featuretypestyle plus a few
> extra's. I thought I start by trying to parse a string containing a
> featuretypestyle.
Right; you are aware that featureTypeStyle is part of an style layer 
descriptor document; and requires code for both OGC Filter (and filter 
requires OGC GML). So you actually have to round up several schemas in 
order to get what you need done.

We have been debugging the DOM based parser this week on trunk - the 
example here works in most cases:
- http://docs.codehaus.org/display/GEOTDOC/02+DOM+Parser

The bugs we have been working on mostly the use of RasterSymbolizer 
elements.

> I first tried to take the geotools xsd file structure and
> run xjc on FeatureStyle but xjc didn't like the xsd file and reported :-
>
> [ERROR] Element "{http://www.opengis.net/se}Value"; shows up in more
> properties.
>   line 831 of file:/C:/universedummy/xsd/OGC/se/1.1.0/Symbolizer.xsd
>
> [ERROR] The following location is relevant to the above error
>   line 830 of file:/C:/universedummy/xsd/OGC/se/1.1.0/Symbolizer.xsd
>
> Failed to parse a schema.
>   
OGC schemas are known to break most tools; often due to mistakes; the 
rest of the time through using little known corners of xsd in tricky 
ways. I notice above that you are using symbology encoding 1.1 as your 
target; we have not started working with this one yet. You will find 
Johann Sorel is working on this; and should start commiting his work on 
GeoTools 2.6.x later in the week.
> I'm using Java 6 by the way.
>
> So then I thought I would try using GTXML however I'm struggling to find
> examples I can follow.
> In the user manual I found 
> http://docs.codehaus.org/display/GEOTDOC/FeatureType+Parsing+and+Encoding
> this  for 2.5 but  I get errors against the latest stable version of 2.4 I
> am trying to use.
>   
The examples are for 2.5 it is true; what errors are you getting? I 
assume you are following the examples on this page:
- http://docs.codehaus.org/display/GEOTDOC/SLD+XML+Support

We do not have a set of GTXML binding for Symbology Encoding 1.1.0 yet; 
perhaps that is the source of your errors? If you want to go through the 
XML Developers Guide 
(http://docs.codehaus.org/display/GEOTDOC/XML+Developers+Guide) and 
start producing bindings for SE 1.1 it would be greatly appreciated; you 
could use the existing bindings for SLD 1.0 as a guide.

Cheers,
Jody

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to