Bug #3358
closedCorrecting invalid eml 201 document downloaded from metacat 1.8.0
0%
Description
There is the possibility of older documents with illegal eml trying to be saved to Metacat. If these older versions have illegal eml elements in them there will be an error. The end user working with Morpho, trying to save an illegal eml data package, will not see the error. They will just notice that the data package did not save to the network. (The error will be in stderr.log in the Morpho application directory)
The 1.8.1 release of Metacat fixes an EML error in the element 'references' that documents saved up to Metacat in an earlier release may contain. If a document, that has been downloaded from an earlier version of Metacat, contains the element that looks like this <references system="document"> there will be an error when trying to save it to the new release of Metacat.
The error is: cvc-type.3.1.1: [attributes] of element 'references' must be empty, excepting those whose [namespace name] is identical to http://www.w3.org/2001/XMLSchema-instance and whose [local name] is one of type, nil, schemaLocation or noNamespaceSchemaLocation.
Documents on Metacat 1.8.1 have had the illegal attribute removed by a script that runs upon instillation. If you want to save a data set with this error you will need to remove the system="document" part of the references tag.
Updated by Jing Tao over 16 years ago
Two new class -EML201DocumentCorrector and CorrectEML201DocsFrame were added to to this job.
When morpho is started up, it will check every profile_name.xml under /home/.morpho/profile dir. If profile_name.xml doesn't have <eml201corrected> element or have </eml201corrected> element but the value is false, class EML201DocumentCorrector will be called. It will clean cache in this profile first, then go through very eml 201 document and remove the extra attribute if the document has one. After the process is done, a line <eml201corrected>true</eml201corrected> will be append to profile_name.xml.
This is one time deal. After <eml201corrected>true</eml201corrected> being appending, morpho will skip it in next time startup.