Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 2.7-M4
-
Fix Version/s: None
-
Component/s: xml
-
Labels:None
-
Testcase included:yes
Description
The XSDTypeDefinition for GML 3.2 AbstractGMLType is incomplete because metaDataProperty has no type definition. (This is the complex type definition created dynamically from the schema, not the compiled types in GMLSchema.) This is likely caused by its type being hidden in deprecatedTypes.xsd and GML 3.2 relying on the single-point-of-entry gml.xsd.
One of the changes in GML 3.2 was to put a bunch of definitions in deprecatedTypes.xsd. This includes MetaDataPropertyType. This deprecated type is used in gmlBase.xsd, in particular, to define AbstractGMLType (via StandardObjectProperties). Yes, a deprecated type is used to define the base class of just about everything else. The particularly nasty thing about the way this was done is that deprecatedTypes.xsd is not imported by gmlBase.xsd. GML 3.2 is only usable if you import gml.xsd and allow it to import both gmlBase.xsd and deprecatedTypes.xsd. Parsing gmlBase.xsd will not work. You can see this in Eclipse. I don't think EMF is very happy about this either. I have no idea how to fix it.
This failure is blocking app-schema support for GML 3.2.
The attached unit test demonstrates the failure. The GML 3.1 test passes but the GML 3.2 test fails. It is also worth noting that the getQName() for metaDataProperty prints no namespace prefix because the "element" of this XSDNamedComponent is set to null. All the other children have types.
Child element declaration types for {http://www.opengis.net/gml}AbstractGMLType : QName: gml:metaDataProperty URI: http://www.opengis.net/gml#metaDataProperty Type: org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl@1493102 (element: [complexType: null]) (name: MetaDataPropertyType, targetNamespace: http://www.opengis.net/gml) (derivationMethod: <unset>, final: [], abstract: <unset>, contentTypeCategory: elementOnly, prohibitedSubstitutions: [], lexicalFinal: null, block: null, mixed: <unset>) QName: gml:description URI: http://www.opengis.net/gml#description Type: org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl@30ae41 (element: [complexType: null]) (name: StringOrRefType, targetNamespace: http://www.opengis.net/gml) (derivationMethod: extension, final: [], abstract: <unset>, contentTypeCategory: simple, prohibitedSubstitutions: [], lexicalFinal: null, block: null, mixed: <unset>) QName: gml:name URI: http://www.opengis.net/gml#name Type: org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl@4204 (element: [complexType: null]) (name: CodeType, targetNamespace: http://www.opengis.net/gml) (derivationMethod: extension, final: [], abstract: <unset>, contentTypeCategory: simple, prohibitedSubstitutions: [], lexicalFinal: null, block: null, mixed: <unset>) Child element declaration types for {http://www.opengis.net/gml/3.2}AbstractGMLType : QName: metaDataProperty URI: http://www.opengis.net/gml/3.2#metaDataProperty Type: null <<< FAILURE QName: gml:description URI: http://www.opengis.net/gml/3.2#description Type: org.eclipse.xsd.impl.XSDSimpleTypeDefinitionImpl@68cd79 (element: null) (name: StringOrRefType, targetNamespace: http://www.opengis.net/gml/3.2) (variety: atomic, final: null, lexicalFinal: null, validFacets: null) QName: gml:descriptionReference URI: http://www.opengis.net/gml/3.2#descriptionReference Type: org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl@89e2f1 (element: [complexType: null]) (name: ReferenceType, targetNamespace: http://www.opengis.net/gml/3.2) (derivationMethod: <unset>, final: [], abstract: <unset>, contentTypeCategory: empty, prohibitedSubstitutions: [], lexicalFinal: null, block: null, mixed: <unset>) QName: gml:identifier URI: http://www.opengis.net/gml/3.2#identifier Type: org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl@92668c (element: [complexType: null]) (name: CodeWithAuthorityType, targetNamespace: http://www.opengis.net/gml/3.2) (derivationMethod: restriction, final: [], abstract: <unset>, contentTypeCategory: simple, prohibitedSubstitutions: [], lexicalFinal: null, block: null, mixed: <unset>) QName: gml:name URI: http://www.opengis.net/gml/3.2#name Type: org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl@18a9fc8 (element: [complexType: null]) (name: CodeType, targetNamespace: http://www.opengis.net/gml/3.2) (derivationMethod: extension, final: [], abstract: <unset>, contentTypeCategory: simple, prohibitedSubstitutions: [], lexicalFinal: null, block: null, mixed: <unset>)