Skip to main content

Hello, I am struggling with the INSPIRE GML writer and the new version 5 of the ProtectedSites xsd schema.

Earlier this year, the XSD schema was adjusted, among other things for the following:

  • Correction of spelling error in inspireID
  • Converting enumeration to code lists
  • Adding attribute "thematicIdentifier"
  • Datatype of legalFoundationDate to 'Date'
  • Changing multiplicity of the elements legalFoundationDate and legalFoundationDocument

See https://github.com/INSPIRE-MIF/application-schemas/releases/tag/2024.1 and underlying links.

When I retrieve the attributes of the old version 4 schema, I get the list from appendix 1, which includes:

  • inspireID.Identifier.localId
  • inspireID.Identifier.namespace
  • legalFoundationDate
  • legalFoundationDocument
  • siteDesignation{}.nilReason
  • siteDesignation{}.xsi_nil

This worked well for my application.

However, when I now retrieve the attributes of the new version 5 schema, I get the list from appendix 2. In it:

  • I do see the corrected inspireId attributes.
  • I also see the new ThematicIdentifier attributes.
  • But the legalFoundationDate and legalFoundationDocument attributes are not included.

This last point is especially where I have a problem.

I have experimented with a regular OGC GML (Geography Markup Language) readers and writers, and with the INSPIRE GML variant. I am using version FME(R) 2022.2.4.0 (20230303 - Build 22792 - WIN64), but using FME(R) 2024.0.0.0 (20231124 - Build 24125 - WIN64) does not give any different results.

I also tried to download the version 5 xsd and overwrite it to the folder <FME Installation Dir>\xml\schemas\inspire\ps\4.0, that did not help, nor putting it in a new 5.0 folder. 

The workspace I created reads a dummy GML, because I only need the schema. The schema comes from the INSPIRE XSD schemas, see the link below. The workspace uses the FeatureReader and I have included it as appendix 3.

My questions:
- Do I have insufficient knowledge of GML/XML, e.g. are the attributes no longer mandatory due to the changed multiplicity and therefore FME no longer retrieves them?
- Does the version 5 schema contain errors that cause the attributes to be missing? However, I do see them in the schema https://inspire.ec.europa.eu/schemas/ps/5.0/ProtectedSites.xsd, see the figure below.
- Is there perhaps a bug in the GML reader/writers of FME? I use the option Select Feature Types by XSD, so an adjustment that is necessary to read schemas by Theme should not be necessary in my opinion.

If anyone has an idea, please let me know.

 

Hello @helmoetz, thank you for posting, as well as sharing resources. I’ve filed an issue with development for further investigation: FMEENGINE-83697. I suspect this an issue with the INSPIRE GML Reader, as you are correct, certain expected attributes in the ProtectedSites5.0 schema don’t seem to be accessible. It is possible the INSPIRE Reader is overriding the supplied app schema and using a locally shipped copy instead. To workaround this issue, we might be able to substitute for the XSD-Driven XML Reader, where we can access expected attributes, such as 'legalFoundationDate'.

Can you try using the XSD-Driven XML in the meantime? Happy to help, Kailin.

 

 


 


Hello @helmoetz, thank you for sharing the output. We were able to diagnose the issue! It appears the schema structure has changed slightly between v4 and v5. The v5 ProtectedSite schemas moved the legalFoundationDate and legalFoundationDocument into the DesignationType element in the siteDesignation. Now, the siteDesignation element (in v5) is being mapped as an xml fragment so it is "hiding" the embedded legalFoundationData and legalFoundationDntsocument child elements.

Hope this makes sense, let me know if you have any questions. I will update this thread when the fix becomes available. Happy to help, Kailin. 


Reply