Bug #7280

EAD import errors

Added by Sarah Romkey over 7 years ago. Updated over 7 years ago.

Status:VerifiedStart date:09/19/2014
Priority:MediumDue date:
Assignee:Sarah Romkey% Done:

0%

Category:Import/Export
Target version:Release 2.1.0
Google Code Legacy ID: Tested version:2.1
Sponsored:No Requires documentation:

Description

Following error when trying to import attached EAD. The file did not import.

Warnings were encountered:
libxml error 533 on line 3 in input file: No declaration for attribute xmlns:ns2 of element ead
libxml error 533 on line 3 in input file: No declaration for attribute xmlns of element ead
libxml error 533 on line 3 in input file: No declaration for attribute xmlns:xsi of element ead

john-pine-fonds;ead.xml Magnifier (4.72 KB) Sarah Romkey, 09/19/2014 03:17 PM

r-loggie-company-2;ead.xml Magnifier (12.4 KB) Sarah Romkey, 09/19/2014 03:36 PM

boyd-crowe-fonds;ead.xml Magnifier (4.08 KB) Sarah Romkey, 09/19/2014 03:36 PM

History

#1 Updated by Sarah Romkey over 7 years ago

  • Priority changed from Critical to Medium
  • Target version deleted (Release 2.1.0)

On further investigation, this EAD was created from an AtoM instance which happened to fall in a period of time when the EAD was broken. Therefore this isn't a critical fix.

#2 Updated by Sarah Romkey over 7 years ago

More unsuccessful EAD attached

#3 Updated by Mike Gale over 7 years ago

  • Status changed from New to Code Review
  • Assignee changed from Mike Gale to Jesús García Crespo

I have a solution here: https://github.com/artefactual/atom/tree/dev/issue-7280-ead-namespaces
Just this commit: https://github.com/artefactual/atom/commit/b3e13121767f350ed045c1dfd011770c0969aab0

I wasn't sure if it was worth making a pull request on Github over it Jesús since it's just several lines of code. The problem was actually much harder to figure out than that because of limitations on the DOM PHP library stuff that I had to experiment with / research, so I wrote a pretty extensive commit message explaining why I did it that way.

Hopefully this can finally solve the namespace import failures in AtoM.

#4 Updated by Mike Gale over 7 years ago

  • Status changed from Code Review to New
  • Assignee changed from Jesús García Crespo to Mike Gale

Oh yeah, the other thing I forgot to mention in the commit message too is that if you have a default namespace defined, and then don't register it, regular XPath without a namespace prefix in the query won't work (which is why it was breaking AtoM before). And to register, you HAVE to make a dummy prefix for it for DOMXPath to work. So it was either strip that default namespace out the way I did it, or go through all our XPath queries in AtoM and when we have a default namespace, insert namespace prefixes into our existing XPath queries. So I chose the former approach.

#5 Updated by Mike Gale over 7 years ago

  • Status changed from New to Code Review
  • Assignee changed from Mike Gale to Jesús García Crespo

#6 Updated by Jesús García Crespo over 7 years ago

  • Target version set to Release 2.1.0

#7 Updated by Jesús García Crespo over 7 years ago

  • Status changed from Code Review to QA/Review
  • Assignee changed from Jesús García Crespo to Sarah Romkey

Ok, cherry pied :)

FYI MikeG: you know that you can rewrite commit messages right? rebase -i or commit --amend could help you next time

#8 Updated by Mike Gale over 7 years ago

Thanks for merging it Jesús. And yeah I actually knew about that, but it was late and I forgot! hehe

#9 Updated by Sarah Romkey over 7 years ago

  • Status changed from QA/Review to Verified

Also available in: Atom PDF