Open gpprojekt-marcin opened 4 years ago
I've diagnosed the issue to be a cyclic dependency chain. The MZ namespace imports the BT one, and the BT one imports the MZ one. Not sure if this is allowed per XML specifications, but at the very least it confuses Xerces-C. When I "move" the content of the MZ schema into the BT one with proper replacing of namespaces and removal of import of the MZ schema, the driver can open the file. It is confused by the ot:geometria but that's a different limitation
@rouault Thank's for fast reply. So what's now? I want to help but my C/C++ skill ends at ./configure && make -j9 && make install
. SCMPrint from xerces pkg don't complain about resolving BT_ModelPodstawowy.xsd
. SCMPrint BT_ModelPodstawowy.xsd >
output.txt
<element name="geometria" type="gml:PolygonType"/>
I find out that cyclic depencies are used in higher level xsd too, so I think they are not forbidden in XML specs. Image from https://stackoverflow.com/a/8944124
- Do you identify this as bug or it is xerces thing or this usecase is too narrow and this issue should be closed?
I don't know. Might be a limitation due to the way we use Xerces in the driver. Would require deeper investigation.
- Do you think there is way to get rid of problem with ot:geometria or maybe it should have its own issue?
One way would be to modify the schema so that ot:geometria isn't directly of type gml:PolygonType, but rather of type gml:PolygonPropertyType, that is you'll have <ot:geometria><gml:Polygon ....>...</gml:Polygon></ot:geometria>
, which is generally what is used in most application schemas of GML, and well handled by the driver.
Expected behavior and actual behavior.
Actual behavior
Expected
Steps to reproduce the problem.
Operating system, GDAL version and provenance