consbio / gis-metadata-parser

Parser for GIS metadata standards including ArcGIS, FGDC and ISO-19115
BSD 3-Clause "New" or "Revised" License
20 stars 3 forks source link

XML tags losing 'gco; gmd, etc...' prefixes when serializing #2

Closed grwhumphries closed 6 years ago

grwhumphries commented 6 years ago

Just using the serialize function here to output the data, and writing the new xml file out, I notice that the structure of the original XML isn't preserved. The tags and <gco:...? etc.. that are standard for ISO 19139 metadata are lost.

Basic structure looks like this from input:

<?xml version="1.0" encoding="UTF-8"?>

- + + + + + + + + + + + </gmd:MD_Metadata>

Comes out like this:

<?xml version="1.0" encoding="UTF-8"?> - fileIdentifier language hierarchyLevel contact etc...

I believe those prefixes are quite important for ISO quality standardss

dharvey-consbio commented 6 years ago

The ISO standard is very verbose. I had to make a choice about how much of it I was going to support. I decided to strip namespaces because there are nuances that are difficult to manage, and even more difficult to convert between standards.

So, at least for now, the scope of this project is to provide a developer with a simple, easy-to-use tool that reads-in, updates, converts and writes out metadata content between standards. For now it has to focus on what the standards have in common to do what it does well.

But thanks for the feedback. I will be pondering this to see if I can figure out an elegant way to improve support for ISO standard namespaces.