I propose a change to WFS behaviour that will have widespread impact on GeoServer and GeoTools users. In particular, XML consumers that have grown accustomed to consuming featureMembers may break. However, this change is necessary to support gml:id uniqueness in complex features. GeoServer cannot be be a general-purpose WFS response encoder without it. It is worth noting that deegree encodes featureMember not featureMembers.
In a nutshell: don't use featureMembers because it is an ArrayPropertyType and cannot be used for xlink:href. http://jira.codehaus.org/browse/GEOT-3046 ****** GeoTools (and thus GeoServer) encodes a FeatureCollection as (for example): {code} <wfs:FeatureCollection> <gml:featureMembers> <gsmlMappedFeature gml:id="mf.1" /> <gsmlMappedFeature gml:id="mf.2" /> <gsmlMappedFeature gml:id="mf.3" /> </gml:featureMembers> </wfs:FeatureCollection> {code} In this skeleton, the features are empty, but if they are encoded inline, it is possible that, because of associations, a feature (e.g. mf.3) might have been already been encoded inline as a property of an earlier feature before it is to be returned as a top-level feature in its own right. In this case, the feature should be encoded as an internal xlink:href link on the enclosing property type, because gml:id's cannot be duplicated in a document. This is only possible if featureMember is used. The response then becomes: {code} <wfs:FeatureCollection> <gml:featureMember> <gsmlMappedFeature gml:id="mf.1"> ... <gsmlMappedFeature gml:id="mf.3" /> ... </gsmlMappedFeature> </gml:featureMember> <gml:featureMember> <gsmlMappedFeature gml:id="mf.2" /> </gml:featureMember> <gml:featureMember xlink:href="#mf.3" /> </wfs:FeatureCollection> {code} ****** -- Ben Caradoc-Davies <ben.caradoc-dav...@csiro.au> Software Engineering Team Leader CSIRO Earth Science and Resource Engineering Australian Resources Research Centre ------------------------------------------------------------------------------ _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel