[fdo-trac] #468: Fix looping inheritance in gml212 schema.
FDO
trac_fdo at osgeo.org
Thu Feb 26 09:53:46 EST 2009
#468: Fix looping inheritance in gml212 schema.
-----------------------------+----------------------------------------------
Reporter: brentrobinson | Owner: brentrobinson
Type: defect | Status: new
Priority: major | Milestone:
Component: FDO API | Version: 3.4.0
Severity: 2 | Keywords: XML GML AbstractFeatureType stack overflow
External_id: |
-----------------------------+----------------------------------------------
The following code lead to a stack overflow on the last line:
{{{
FdoFeatureSchemaCollection* schema =
FdoFeatureSchemaCollection::Create(NULL);
FdoPtr<FdoXmlFlags> flags = FdoXmlFlags::Create(
L"fdo.osgeo.org/schemas/feature",
FdoXmlFlags::ErrorLevel_VeryLow);
FdoXmlReaderP gmlReader = FdoGml212Schema::CreateReader();
schema->ReadXml(gmlReader, flags);
schema->WriteXml(L"e:/transient/testschema.xml",
FdoXmlFlagsP(FdoXmlFlags::Create(L"www.autodesk.com")));
FdoFeatureSchemaCollection* schema2 =
FdoFeatureSchemaCollection::Create(NULL);
schema2->ReadXml(L"e:/transient/testschema.xml",
FdoXmlFlagsP(FdoXmlFlags::Create(L"www.autodesk.com",
FdoXmlFlags::ErrorLevel_Normal)));
}}}
The Gml212 schema describes the GML 2.1.2 base types (of which one of the
types is AbstractFeatureType). When FDO writes schemas, it writes feature
classes as being based on AbstractFeatureType. However, this means
AbstractFeatureType ends up based on itself.
The fix is to not extend AbstractFeatureType from itself when writing it
to XML.
--
Ticket URL: <http://trac.osgeo.org/fdo/ticket/468>
FDO <http://fdo.osgeo.org/>
Feature Data Objects
More information about the fdo-trac
mailing list