Opened 13 years ago

Closed 13 years ago

#4252 closed defect (fixed)

3.1 xsd is incorrect for FeatureCollection

Reported by: hdam99 Owned by: warmerdam
Priority: normal Milestone: 1.9.0
Component: OGR_SF Version: 1.8.1
Severity: normal Keywords: GML
Cc:

Description

The 2.1 xsd is correct, but not 3.1

Currently it generated this:

<xs:element name="FeatureCollection" type="ogr:FeatureCollectionType" substitutionGroup="gml:_GML"/> <xs:complexType name="FeatureCollectionType">

<xs:complexContent>

<xs:extension base="gml:AbstractFeatureType">

<xs:sequence minOccurs="0" maxOccurs="unbounded">

<xs:element name="featureMember">

<xs:complexType>

<xs:sequence>

<xs:element ref="gml:_Feature"/>

</xs:sequence>

</xs:complexType>

</xs:element>

</xs:sequence>

</xs:extension>

</xs:complexContent>

</xs:complexType>

Like 2.1, the substitutionGroup should be gml:_FeatureCollection, not gml:_GML

The correct semantic should be:

<xs:element name="FeatureCollection" type="ogr:FeatureCollectionType" substitutionGroup="gml:_FeatureCollection"/> <xs:complexType name="FeatureCollectionType">

<xs:complexContent>

<xs:extension base="gml:AbstractFeatureCollectionType">

<xs:sequence>

<xs:element name="featureMember" minOccurs="0" maxOccurs="unbounded">

<xs:complexType>

<xs:sequence>

<xs:element ref="gml:_Feature"/>

</xs:sequence>

</xs:complexType>

</xs:element>

</xs:sequence>

</xs:extension>

</xs:complexContent>

</xs:complexType>

Attachments (2)

incorrectFeatureCollection.xsd (17.2 KB ) - added by hdam99 13 years ago.
correctFeatureCollection.xsd (19.9 KB ) - added by hdam99 13 years ago.

Download all attachments as: .zip

Change History (4)

by hdam99, 13 years ago

by hdam99, 13 years ago

comment:1 by Even Rouault, 13 years ago

I guess this ticket is the outcome of http://osgeo-org.1803224.n2.nabble.com/Error-in-parsing-3-1-gml-file-in-deegree-3-0-3-and-3-1-pre-13-td6789430.html ?

The XSD written by the OGR driver is based on the recommandations of the following OGC document (which was the current one at GML 3.1.1 time): 06-049r1_Geography_Markup_Language_GML_Simple_Features_Profile.pdf . The part of the XSD used in this ticket is directly taken from paragraph 8.4.2.

I have looked at what appears to be the new active document ( from http://www.opengeospatial.org/standards/gml ), 10-100r3_Geography_Markup_Language_GML_simple_features_profile_with_technical_note.pdf , and I see differences in the new 8.4.2 section. But not the ones recommanded by the deegree folks...

Is there a strong reason to consider it following the GML 3.1.1 doc is no longer valid, and that we should now follow the GML 3.2.1 doc ? Perhaps you could re-raise the issue with the deegree folks.

comment:2 by Even Rouault, 13 years ago

Component: defaultOGR_SF
Resolution: fixed
Status: newclosed

I've pushed the following fix :

r23162 /trunk/ (5 files in 3 dirs): GML: accept 'GML3Deegree' as a valid value for the dataset creation option FORMAT, to produce a .XSD that should be better handled by Deegree3 (#4252)

I've verified that output of FORMAT=GML3 and FORMAT=GML3Deegree are valid when validating the .gml against the generated .xsd

Note: See TracTickets for help on using tickets.