Hi,
I have a workspace transforming data to write it in INSPIRE GML format (theme Hydrography). Earlier this year, some of the INSPIRE application schemas (XSDs) where upgraded to a new version Include changes from 2024.1 schema release · Issue #1027 · INSPIRE-MIF/helpdesk-validator, including the hy-p one that I’m using here (v4.0 to v5.0).
Therefore I changed my INSPIRE GML writer to point to the new XSD URI and adapted the xsi:schemaLocation parameter consequently. However, when indicating the v5.0 the output GML is not written correctly: there are remnants of the v4.0 in it.
First in the imports, see xmlns:hy-p4 and xmlns:hy4:
<gml:FeatureCollection xmlns:omor="http://inspire.ec.europa.eu/schemas/omor/3.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sr="http://inspire.ec.europa.eu/schemas/sr/4.0" xmlns:base="http://inspire.ec.europa.eu/schemas/base/4.0" xmlns:gts="http://www.isotc211.org/2005/gts" xmlns:hy-n="http://inspire.ec.europa.eu/schemas/hy-n/4.0" xmlns:omop="http://inspire.ec.europa.eu/schemas/omop/3.0" xmlns:hy="http://inspire.ec.europa.eu/schemas/hy/5.0" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:base-3_3="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:gsr="http://www.isotc211.org/2005/gsr" xmlns:om="http://www.opengis.net/om/2.0" xmlns:hy4="http://inspire.ec.europa.eu/schemas/hy/4.0" xmlns:gss="http://www.isotc211.org/2005/gss" xmlns:gn="http://inspire.ec.europa.eu/schemas/gn/4.0" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:sc="http://www.interactive-instruments.de/ShapeChange/AppInfo" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:hy-p4="http://inspire.ec.europa.eu/schemas/hy-p/4.0" xmlns:net="http://inspire.ec.europa.eu/schemas/net/4.0" xmlns:hy-p="http://inspire.ec.europa.eu/schemas/hy-p/5.0" gml:id="idafb2e1b9-af4e-4d00-b1a2-07ed3a6513ee" xsi:schemaLocation="http://inspire.ec.europa.eu/schemas/hy-p/5.0 http://inspire.ec.europa.eu/schemas/hy-p/5.0/HydroPhysicalWaters.xsd http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd http://inspire.ec.europa.eu/schemas/base/4.0 http://inspire.ec.europa.eu/schemas/base/4.0/BaseTypes.xsd http://inspire.ec.europa.eu/schemas/gn/4.0 http://inspire.ec.europa.eu/schemas/gn/4.0/GeographicalNames.xsd http://www.isotc211.org/2005/gmd http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd">
...
Then also in the FeatureMembers where some of the elements are encoded in the v4.0, example (I included the GML in the associated zip file):
<hy-p4:inspireId>
<base-3_3:Identifier>
<base-3_3:localId>A39682C09219AA32F73D7803C22169A0</base-3_3:localId>
<base-3_3:namespace>http://geodata.wallonie.be/id/ge/watercourse/</base-3_3:namespace>
</base-3_3:Identifier>
</hy-p4:inspireId>
<hy-p4:delineationKnown>FALSE</hy-p4:delineationKnown>
<hy-p4:length uom="m">1281.21</hy-p4:length>
<hy-p4:level>underground</hy-p4:level>
That’s even the case for base-3_3 which is supposed to be replaced with new version 4.0 of BaseTypes.
I’m currently using FME2020.1.2, I first thought that this issue was linked to the online XSD not being read properly by FME. But in the latest FME2024.1 you implemented the new application schemas v5.0, I tested it and still got the same issue.
When getting into the logs, I noticed that the XSD was successfully downloaded:
INFORM|URI 'https://inspire.ec.europa.eu/schemas/hy-p/5.0/HydroPhysicalWaters.xsd' mapped to 'https://inspire.ec.europa.eu/schemas/hy-p/5.0/HydroPhysicalWaters.xsd'
INFORM|'https://inspire.ec.europa.eu/schemas/hy-p/5.0/HydroPhysicalWaters.xsd' mapped to 'C:\Users\ajacques\AppData\Local\Temp\FME_XSD_CACHE\fmexsd_1730896429864_15544.xml'
But right after this, some XSD Semantics configuration file is used and it imports the wrong hy-p4 XSD:
2024-11-06 14:02:46| 0.3| 0.0|INFORM|Using XSD semantics configuration file 'C:\Program Files\FME2020\xml\gml_v3.2\inspire_config.xml'.
2024-11-06 14:02:46| 0.3| 0.0|INFORM|XSD semantics configuration file: 'file:///C:/Program Files/FME2020/xml/gml_v3.2/inspire_config.xml' including 'gml_config.xml'
2024-11-06 14:02:46| 0.3| 0.0|INFORM|Using prefix 'hy-p' for uri 'http://inspire.ec.europa.eu/schemas/hy-p/5.0'
2024-11-06 14:02:46| 0.3| 0.0|INFORM|Using prefix 'hy-p4' for uri 'http://inspire.ec.europa.eu/schemas/hy-p/4.0'
2024-11-06 14:02:46| 0.3| 0.0|INFORM|Using prefix 'sc' for uri 'http://www.interactive-instruments.de/ShapeChange/AppInfo'
2024-11-06 14:02:46| 0.3| 0.0|INFORM|Using prefix 'gmd' for uri 'http://www.isotc211.org/2005/gmd'
2024-11-06 14:02:46| 0.3| 0.0|INFORM|Using prefix 'gn' for uri 'http://inspire.ec.europa.eu/schemas/gn/4.0'
2024-11-06 14:02:46| 0.3| 0.0|INFORM|Using prefix 'om' for uri 'http://www.opengis.net/om/2.0'
2024-11-06 14:02:46| 0.3| 0.0|INFORM|Using prefix 'net' for uri 'http://inspire.ec.europa.eu/schemas/net/4.0'
2024-11-06 14:02:46| 0.3| 0.0|INFORM|Using prefix 'gss' for uri 'http://www.isotc211.org/2005/gss'
2024-11-06 14:02:46| 0.3| 0.0|INFORM|Using prefix 'gsr' for uri 'http://www.isotc211.org/2005/gsr'
2024-11-06 14:02:46| 0.3| 0.0|INFORM|Using prefix 'base-3_3' for uri 'http://inspire.ec.europa.eu/schemas/base/3.3'
2024-11-06 14:02:46| 0.3| 0.0|INFORM|Using prefix 'gml' for uri 'http://www.opengis.net/gml/3.2'
2024-11-06 14:02:46| 0.3| 0.0|INFORM|Using prefix 'hy4' for uri 'http://inspire.ec.europa.eu/schemas/hy/4.0'
2024-11-06 14:02:46| 0.3| 0.0|INFORM|Using prefix 'hy' for uri 'http://inspire.ec.europa.eu/schemas/hy/5.0'
2024-11-06 14:02:46| 0.3| 0.0|INFORM|Using prefix 'xlink' for uri 'http://www.w3.org/1999/xlink'
2024-11-06 14:02:46| 0.3| 0.0|INFORM|Using prefix 'omop' for uri 'http://inspire.ec.europa.eu/schemas/omop/3.0'
2024-11-06 14:02:46| 0.3| 0.0|INFORM|Using prefix 'hy-n' for uri 'http://inspire.ec.europa.eu/schemas/hy-n/4.0'
2024-11-06 14:02:46| 0.3| 0.0|INFORM|Using prefix 'gts' for uri 'http://www.isotc211.org/2005/gts'
2024-11-06 14:02:46| 0.3| 0.0|INFORM|Using prefix 'base' for uri 'http://inspire.ec.europa.eu/schemas/base/4.0'
2024-11-06 14:02:46| 0.3| 0.0|INFORM|Using prefix 'gco' for uri 'http://www.isotc211.org/2005/gco'
2024-11-06 14:02:46| 0.3| 0.0|INFORM|Using prefix 'sr' for uri 'http://inspire.ec.europa.eu/schemas/sr/4.0'
2024-11-06 14:02:46| 0.3| 0.0|INFORM|Using prefix 'xsi' for uri 'http://www.w3.org/2001/XMLSchema-instance'
2024-11-06 14:02:46| 0.3| 0.0|INFORM|Using prefix 'omor' for uri 'http://inspire.ec.europa.eu/schemas/omor/3.0'
2024-11-06 14:02:46| 0.3| 0.0|INFORM|<INSPIRE_1 Writer> - Writing the GML document 'HY.watercourse.KARST__ECOULEMENTS_SOUTERRAINS.gml'
Thus, I went to open that inspire_config.xml and there I replaced the v4.0 XSD by the new one and hy-p4 by hy-p5 (see attached file).
In that way, the GML is written correctly without mention of hy-p4 (GML in the zipped file).
Now, what I’d like to understand/know is:
- Did I find the real source of the issue? Or am I missing something?
- What’s the purpose of that XML?
- Do I have to fix it myself for the time being or can Safe provide a fix in an upcoming version release?
- Do all the new application schemas have to be updated in that file in order to be written properly? The old ones have to be “removed” and the new ones added?
EDIT: bonus question: how to fix this in FME Flow as well?
Thanks for your time and consideration, I can provide the entire logs and screenshots of the writer configuration if needed.
Best regards,
Antoine