0
votes

According to using xsd.exe to generate c# files, getting error and warnings I've downloaded all 115 XSD files needed for GML (Geography Markup Language) definition including all referenced files, changed their "schemaLocation" attributes in "import" and "include" elements to correct local paths and tried to generate a C# class using the "xsd.exe" utility:

xsd.exe /classes xsd\online\httpschemasopengisnetgml311base\basicTypes.xsd xsd\online\httpschemasopengisnetgml311base\coordinateOperations.xsd ...

And I keep getting tons of errors, most commonly this kind:

Schema validation warning: The global element 'http://www.opengis.net/gml:_CoordinateOperation' has already been declared. Line 24, position 3.

I've searched through the web but found no solution. I just suspect that there could be some attributes with same names and the "xsd.exe" utility cannot manage this but I am not sure if this can happen.

1

1 Answers

0
votes

I don't think you need to list all the files as parameters unless the schemaLocation attributes aren't correct (although personally I've never had that situation - I would correct that first). So, if you are aware of how the schemas are structured and confident in the schemaLocation attrubutes you should only need to specify those 'top level' schemas which are not referenced by other schemas.