Skip to main content

Hi FME community,

I’ve been tasked with trying to get the metadata we hold (in a SQL server database) into an INSPIRE-compliant format.
I was hoping that we could use the metadata we currently hold (Title, Abstract, Temporal Extents etc) and run it through an INSPIRE XSD template. However, it’s pretty overwhelming when I look at the XSD templates (which I got from here - application-schemas/schemas at main · INSPIRE-MIF/application-schemas · GitHub) as there are so many nested parts (see screenshot).

 



Is there a relatively straightforward method I could use for each topic of data (be they addresses, parcels of land etc - which have their own topic under the INSPIRE framework) which could be joined in FME and output an XML file which can be imported to the data in ArcPro?

 

It seems a bit convoluted but I’m just trying to get an idea of where to go from here with a large shift in metadata storage and how we will be using it at my organisation going forward.

 

Thanks

Hi @joe.fme. I’m sharing some tips and resources that a couple of colleagues provided me:

  1. Metadata Matters! What it is and How to Manage it: Check out the section on XSD based XML Metadata Writing
  2. Implementing INSPIRE with FME: Simple video tutorial using existing workspace templates
  3. Efficiently Implementing INSPIRE & Creating INSPIRE Mashups with FME: Webinar showing more complex examples)
  4. Tips:
    • If you are familiar with you schema, you should be able to target the elements you want to write too or populate.
    • You can see an example of this in the XSD-Driven XML writing tutorial. You can use an AttributeCreator to assign the elements values and then connect it to the XSD Writer, where you select the feature paths you want to insert/write too.

I hope this helps.


Hi there, thank you for replying! I think I am making headway, though the end result is not quite there yet. It’s so bad I was dreaming about XML forests last night, so it’s getting to me 😧

I can create an XML template with the elements fanned out, like this

 

This results in all of the _result attributes having the same title/abstract/etc, which is frustrating (and even then, the resulting XML files with different names are all error-ridden things).

I thought I had a handle on this but it seems to be making less sense as I go on. I’ll return to the tutorials etc to see what I may have missed.

 


I will add, I tried this, which results in fanned-out XML documents, but they all have formatting errors/can’t be viewed as valid XML files
 

 


Hello @joe.fme! Haha very funny, hopefully you won’t lose anymore sleep over XML from here on out! Looks like you’ve gotten all the data into FME Form thus far - awesome! 

INSPIRE can be a bit overwhelming to understand, especially if you’re using a more complex schema. To avoid confusing you further, I am going to speak to the workspace from this article, the cap:alert demo. 

In the following workspace, we leverage the XSD-Driven XML Writer. The writer, when supplied the appropriate app schema, as well as the target feature paths (see parameter Application Schema > Features > Features Paths), removes the need to template or structure the XML before hand. The selected feature paths in the writer will tell FME Form what elements should be mapped to or populated. You might be able to simply select the top level element, similar to the cap:alert workspace.

To re-iterate, if you have an XSD available, you do not require the XMLTemplater, you can simply send the data to the writer.

We can use something like an AttributeCreator or AttributeManager to assign element values before writing. We assign values in this workspace in AttributeCreator_3. The 'New Attribute' will be the element you want to populate (eg. name of the element), where the 'Value' will represent what's being supplied (eg. the content).


Once the data is prepared to be written out, we can add the XSD-Driven XML Writer. Select the output location and then change the Feature Type Definition to Import from Dataset. This will pull the feature type definitions from the XSD automatically, instead of you doing it manually eg. (point the import wizard to the XSD). In the cap:alert demo, we create a single feature, which is the alert itself. INSPIRE will likely have more than 1.

Please feel free to reach out with additional questions if something is not clear - more than happy to help! A workspace template is attached, feel free to try it yourself! Alternatively if you get stuck, consider sharing a sample dataset and XSD file. Happy FMEing, Kailin.


Reply