From: Sean G. <se...@sm...> - 2003-09-14 02:24:01
|
Cameron Taggart wrote: >>http://oms.ars.usda.gov/~en/gml.zip >> >> >Thanks, I got it. > > > >>>Is the current GML parser your referrring to, the module named >>>"gmldatasource"? I created my first map using WMS last night. While >>>trying to figure that out, I had the opportunity to browse through some >>>of code. One of the classes I visited was LayerReader.java for parsing >>>through layers.xml. Does the GML parser take a similar approach ( >>>capturing SAX events)? Wouldn't it be cleaner and easier to use a >>>Java/XML binding tool now that they are actually usable? >>> >>> Hi Cameron, I have had some experience with Java/XML binding tools, mainly JAXB, and I don't think they are up to the task of parsing GML. This is mainly because GML schemas are dynamic. The actual schemas defined by the OGC basically define base types that feature type schema instances extend or use to create their own schema. So basically, for each different concrete feature type there is a different schema. For this to work with an XML binding tool you would need to dynamically generate the bindings for each schema, which clearly has problems. Having said that, since Geotools is library to be used by other applications, for functionality such as this we should be as low level as possible for the purposes of performance and flexiblity and to avoid imposing dependencies on users. Others: I'd also like to know what is happening with Ian's GML parser? I remember when he first introduced it to the team it seemed to be a big imrpovement on the current one and it also avoided the need to parse schema's, which is a potential performance bottleneck. Is work still being done on this? Is there a plan to add it to the GT codebase? Sean |