EAD export: Country code should not be added to mainagencycode in <eadid> element
|Target version:||Release 2.5.0|
|Google Code Legacy ID:||Tested version:||2.4, 2.5|
First reported in the User forum, 2019-03-07: https://groups.google.com/d/msg/ica-atom-users/kmvW3MyJP2o/y7IxcLbvBQAJ
Tested and reproduced in demo 2.4 site and 2.5 Vagrant.
- Create or find an archival institution that has an identifier and a full address (including country) added to it
- Create or find a description linked to this institution - add at least title, identifier, LOD and save
- Export the description as EAD and examine the output
The <eadid> element contains several attributes, including @countrycode and @mainagencycode. We take the country code from the country used in the address of the related repository, and the mainagency code from the repository's identifier. However, we are duplicating the country code by adding it to both @countrycode and as a prefix on the @mainagency code.
This goes against what the EAD 2002 standard says for the @mainagency code:
"Values should be supplied without the country code, which should be placed instead in the COUNTRYCODE attribute."
Example from the demo site: https://demo.accesstomemory.org/art-institute-of-ontario-fonds
<eadid identifier="art-institute-of-ontario-fonds" countrycode="CA" mainagencycode="CA-ON00012" url="http://demo.accesstomemory.org/index.php/art-institute-of-ontario-fonds" encodinganalog="identifier">SC034</eadid>
- Linked repository country: Canada
- Linked repository identifier: ON00012
- Description @countrycode: CA
- Description @mainagencycode: CA-ON00012
From the EAD 2002 Tag library
A required subelement of <eadheader> that designates a unique code for a particular EAD finding aid document.
Two of the attributes, COUNTRYCODE and MAINAGENCYCODE, are required to make the <eadid> compliant with ISAD element 3.1.1. MAINAGENCYCODE provides the ISO 15511 code for the institution that maintains the finding aid (which may not be the same as the institution that is the custodian of the materials described). COUNTRYCODE supplies the ISO 3166-1 code for the country of the maintenance agency. In addition to these two attributes, it is recommended that repositories also use at least one of the following attributes: URL, PUBLICID, or IDENTIFIER to make the <eadid> globally unique. PUBLICID should be a Formal Public Identifier, URL an absolute or relative address, and IDENTIFIER a machine-readable unique identifier for the finding aid file. (The proper syntax for PUBLICID is defined in ISO/IEC 9070:1991 Information technology -- SGML support facilities -- Registration procedures for public text owner identifiers.)
A unique code for the country in which the materials being described are held. Codes are to be taken from ISO 3166-1 Codes for the Representation of Names of Countries, column A2. Available in <eadid> and <unitid>.
A code in <eadid> compliant with ISO/DIS 15511 Information and Documentation International Standard Identifier for Libraries and Related Organizations (ISIL). Values should be supplied without the country code, which should be placed instead in the COUNTRYCODE attribute.
- No country code is appended to the mainagencycode on EAD 2002 XML exports
- Reference code inheritance still behaves the same
#1 Updated by Dan Gillean 3 months ago
Issue appears to be here: https://github.com/artefactual/atom/blob/qa/2.5.x/plugins/sfEadPlugin/lib/sfEadPlugin.class.php#L198
#6 Updated by Evelyn McLellan about 1 month ago
- Status changed from QA/Review to Feedback
- Assignee set to Dan Gillean
I updated https://atom25.1804.qa.accesstomemory.net/ using Ansible AWX but it looks like the mainagencycode still has the countrycode prefix attached to it:
<eadid identifier="art-institute-of-ontario-fonds" countrycode="CA" mainagencycode="CA-ON00012" url="http://atom24.archivematica.org/index.php/art-institute-of-ontario-fonds" encodinganalog="identifier">SC034</eadid>