[xsd-users] First question

jaume.faus at vianova.no jaume.faus at vianova.no
Mon Feb 9 05:46:33 EST 2009


Hi, I'm new in the list. So, I'm very sorry if this is a repeating 
question.

I've recently received the assignment of writing a GML (
http://www.opengeospatial.org/standards/gml) parser in C++ to import data 
from such file formats. As GML is XML I thought to find a tool that, like 
this one, generates the parser from the schemas. It is a good thing becaus 
GML is huge. It consts of 30 xsd files.

I have several questions. As I didn't use this tool before, I can't 
generate the parser. 

I have downloaded all the xsd defining this standard into a file structure 
that emulates the one existing in http://schemas.opengis.net/gml/

but when I run the command

xsdcxx parse schemafile

I get several errors telling that AbstractFeature has been implicitly 
declared as anyType. Well, AbstractFeature is the base class in GML so I 
suspect that this anyType is made on purpose to make me map it into my 
app's base class. Is that right? How should I deal with it? should I edit 
the gml.xsd to make AbstractFeature be of my app's type? If so, how do I 
make it?



In other way, I tried to make a CityGML parser which is a profile (more or 
less a subset with some specific additions) of GML, therefore its xsd are 
continuously referencing to GML ones. As I have all xsd in my harddrive in 
the same file structure I thought it will automatically find the resources 
in order to compile. But references in CityGML's schemas are made via http 
links (http://schemas.opengis/gml/...) and it seems that xsdcxx doesn't 
recognize them and tries to open this string as a file.

 Is it possible to configure xsdcxx to automatically download the xsd 
files needed instead of having to download them manually and, in this 
case, edit them to make its links to point to files in the filesystem 
instead of internet addresses?

Thanks in advance!

// jaume


More information about the xsd-users mailing list