Bug #1462
closedvalidation problem when saving to metacat
0%
Description
I created a package in the wizard, added a data table through the "import"
facility, and then saved locally. I then modified a few metadata fields, and
saved locally again. Then I hit save to save it to metacat, and got the
following validation error. I will attach the EML document to this bug momentarily.
MetacatUpload Exeption in EML200DataPackage!
<error>
cvc-complex-type.2.4.a: Invalid content starting with element 'contact'. One of
'{"":access, "":dataTable, "":spatialRaster, "":spatialVector,
"":storedProcedure, "":view, "":otherEntity}' is expected.
</error>
Problem Saving
<error>
cvc-complex-type.2.4.a: Invalid content starting with element 'contact'. One of
'{"":access, "":dataTable, "":spatialRaster, "":spatialVector,
"":storedProcedure, "":view, "":otherEntity}' is expected.
</error>
Files
Updated by Matt Jones over 20 years ago
Looks like somehow the project element got inserted between the two contact
elements, causing the error.
Updated by Dan Higgins over 20 years ago
I think there is a bug with the insertion of subtrees when the preceeding
sibling is repeated.
Updated by Dan Higgins over 20 years ago
found bug in the 'insertSubtree' method of the AbstractDataPackage class which
resulted in subtree being inserted after the FIRST copy of an element rather
than after the LAST copy. This resulted in project information being inserted
between <Contact> nodes rather than after the last <Contact> node.
Since insertSubtree is used many places, this may have caused problems whenever
subtrees were repeated.
Fix was simple, since a NodeList was used. Simply referenced the last node
rather than the first in the code.