when upgrading from 2.0.1, morpho did not catch empty <offline> element
a user updated her morpho to 1.7.1, and loaded a 2.0.1 package. The first thing she must do is upgrade to EML2.1.0
The data package did not included a data table, but included the table attribute descriptions, so morpho 1.7.1 had inserted 2 elements which are not allowed in EML2.1:
1. an empty <objectName> </objectName>
2. <offline> with no children
Morpho presented the user with a dialog box for adding the objectName, but ignored the offline element. The error message (from the parser) was not useful to the scientist.
The file is attached.
[Note: this file actually had 2 errors, but the other problem is addressed in another bug: 3978]
#4 Updated by Jing Tao over 10 years ago
When morpho runs the correction wizard, first it will detect the path which has blank value. Then Morpho selects the subtree which contains the blank value and transform it to an OrderedMap object. The original data will be populated into a UI pages by setPageData(map) method.
DataLocation is a kind of special page. It has different UI for different distribution type, offline, online and no distribution et all. In previous version, it used the path in the OderedMap object (from setPageData method) to determine the distribution type. For example, if the map has "offline", it thought this was offline distribution.
In Margaret's case, the offline element has empty value, so the map doesn't have any element to denote the distribution type. Morpho thinks it is a type without distribution element. So it only displays the object name field.
Now I added a mechanism - in order to look up the distribution type, morpho not only looks the OrderedMap object, but also the path with empty value. So even map object doesn't have any indication, but the path with empty value does. This approach fixes the bug.