Bug #1561
openEML Attribute Page Editor doesn't handle some XML Schema attributes/elements correctly
0%
Description
In morpho 1.5.1, the data Package Wizard creates EML2.0.0 packages without
inserting the (optional) enforced="yes|no" schema attribute in the nominal and
ordinal measurement scale enumeratedDomain elements. If packages are then
edited with the Tree Editor, the enforced="yes|no" attribute is inserted
(confirmed by Sid).
Subsequent edits of the column metadata with the Data --> "Edit Column
Documentation" menu incorrectly brings up the Tree Editor for Nominal and
Ordinal columns. AttributePage.java calls setPageData() in order to populate
the fields found in the OrderedMap of XPATH strings and values. All of the
elements in the map are handled NominalOrdinalPanel.java, but the XML
attributes are not, such as the enforced="yes\no" attribute.
In AttributePage.java, attributes are discarded with:
map.remove(xPathRoot + "/@id");
map.remove(xPathRoot + "/@scope");
and so the 'enforced' attribute can be discarded with:
map.remove(xPathRoot +
"/measurementScale1/nominal1/nonNumericDomain1/enumeratedDomain1/@enforced");
However, this seems like a hack, since at some point down the line the
'enforced' field should be presented as a check box or another widget.
Likewise, other XML attributes should be handled as to not discard the information.