You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran across this interesting issue with an older EML file. I downloaded the file, imported it using EML::read_eml() and then wrote it back to .xml using EML::write_eml(). The result was a corrupted eml file with conflicts in the namespace that nevertheless passes the EML::eml_validate() validation check:
It appears that even though the xmlns:eml attribute is now eml-2.2.0, the schema location (xsi:schemaLocation=) and xmlns:ds both still indicate the original EML 2.1.1.
Both files validate using EML::eml_validate(). I assume this is because the EML package does not actually use the namespace within the EML file to identify the schema to validate against but instead has that namespace hardcoded in elsewhere.
I understand it is possible to tell EML to switch between schema versions, but I still think this qualifies as a potential bug. I can see users generating an EML file under one schema and (perhaps years later) updating it under a second schema. In that scenario, this namespace conflict is easily introduced. If the default it to update everything to the latest schema, that should be done consistently.
On a side note, it would be nice to preserve the evolution of an EML file if it is edited under multiple different schemas during it's lifetime (for instance as a data package is incrementally added to and versioned). But I think there is likely a better place to systematically implement that version history than the eml namespace.
The text was updated successfully, but these errors were encountered:
I ran across this interesting issue with an older EML file. I downloaded the file, imported it using EML::read_eml() and then wrote it back to .xml using EML::write_eml(). The result was a corrupted eml file with conflicts in the namespace that nevertheless passes the EML::eml_validate() validation check:
I downloaded a data package from EDI: https://portal.edirepository.org/nis/mapbrowse?packageid=knb-lter-and.4780.4
The file knb-lter-and.4780.4.xml is an EML formatted file. Upon download, the initial eml tag in knb-lter-and.4780.4.xml looks like so:
I then imported to R with EML::read_eml and wrote it back to .xml:
And when I open the new "exportedEML.xml" file I see:
It appears that even though the xmlns:eml attribute is now eml-2.2.0, the schema location (xsi:schemaLocation=) and xmlns:ds both still indicate the original EML 2.1.1.
Both files validate using EML::eml_validate(). I assume this is because the EML package does not actually use the namespace within the EML file to identify the schema to validate against but instead has that namespace hardcoded in elsewhere.
I understand it is possible to tell EML to switch between schema versions, but I still think this qualifies as a potential bug. I can see users generating an EML file under one schema and (perhaps years later) updating it under a second schema. In that scenario, this namespace conflict is easily introduced. If the default it to update everything to the latest schema, that should be done consistently.
On a side note, it would be nice to preserve the evolution of an EML file if it is edited under multiple different schemas during it's lifetime (for instance as a data package is incrementally added to and versioned). But I think there is likely a better place to systematically implement that version history than the eml namespace.
The text was updated successfully, but these errors were encountered: