GML feature collection

Added by Wim Looijen almost 2 years ago

Dear all,

We used the data validation tools by Geonovum and we received the following error:

XML document 'NLps_nationaleparken.gml': 1:834: cvc-elt.1.a: Cannot find the declaration of element 'gml:FeatureCollection'.

Is this an omission in the validation tools or in the export to GML in HALE?

Best Regards,

Wim Looijen


Replies (4)

RE: GML feature collection - Added by Thorsten Reitz almost 2 years ago

Dear Wim,

without looking at the GML file in question (or at least its header), that is hard to find out. Did you use the GML (WFS 2.0 FeatureCollection) writer configuration or a different one?

All the best,

Thorsten

RE: GML feature collection - Added by Wim Looijen almost 2 years ago

Hi Thorsten,

I have attached the gml file in question.

We used the GML (Feature Collection) export.

Cheers,
Wim

RE: GML feature collection - Added by Wim Looijen almost 2 years ago

Hi Thorsten,

I received word form the developers of the validation software:

The problem is that the root element is gml:FeatureCollection, but the xsi:schemaLocation does not declare where the schema documents for the gml namespace can be found. While the GML schema is imported by the PS schema, this is not sufficient for the root element according to the XML Schema rules.

If the xsi:schemaLocation attribute is changed to:

xsi:schemaLocation="http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd http://inspire.ec.europa.eu/schemas/ps/4.0 http://inspire.ec.europa.eu/schemas/ps/4.0/ProtectedSites.xsd"

the document is valid.

I guess you will have to do that in the HALE software?

Cheers,
Wim

RE: GML feature collection - Added by Simon Templer almost 2 years ago

Hi Wim,

the XML Schema validation tools we encountered so far were able to deal with the root element only being defined in an import of the referenced schema. So it surprises me that this would be needed here.

If the root element is the only problem, then you can alternatively export the data from hale as a WFS 2.0 FeatureCollection. The WFS 2.0 FeatureCollection is defined in a different schema, that is not imported in the main schema, so the schema location is added there automatically on export.

Best,
Simon

(1-4/4)