<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:10.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";}
span.EmailStyle24
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">These are both incredibly helpful responses – thank you Andrew and Mark!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>



<p style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri"><font face="Calibri">__________________________________ <br><br style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri">Sarah Newhouse   <em>(she, her, hers)</em> <br style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri">Digital Preservation Archivist  <br style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri"></font><span style="font-size: 14.6667px;">Othmer Library of Chemical History</span><font face="Calibri">   <br style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri">t. +1.215.873.8249  
 <br></font></p>



<p style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri"><font face="Calibri"><strong>Science History Institute </strong><br style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri">Chemistry &#x2022; Engineering 
&#x2022; Life Sciences <br style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri">315 
Chestnut Street &#x2022; Philadelphia, PA 19106 &#x2022; U.S.A. <br style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri">Learn about the scientific 
discoveries that changed our world at <a title="" href="https://www.sciencehistory.org/learn">sciencehistory.org/learn</a></font></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt">From:</span></b><span style="font-size:11.0pt"> archivesspace_users_group-bounces@lyralists.lyrasis.org <archivesspace_users_group-bounces@lyralists.lyrasis.org>
<b>On Behalf Of </b>Andrew Morrison<br>
<b>Sent:</b> Thursday, October 20, 2022 4:35 AM<br>
<b>To:</b> archivesspace_users_group@lyralists.lyrasis.org<br>
<b>Subject:</b> Re: [Archivesspace_Users_Group] id=0 error on EAD XML import<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p>Don't be surprised if the import fails again, with the same message but for a subrecord, or with a different message. That is because the ArchivesSpace EAD importer uses a SAX parser method (<a href="https://en.wikipedia.org/wiki/Simple_API_for_XML">https://en.wikipedia.org/wiki/Simple_API_for_XML</a>)
 to read the XML, not a DOM (Document Object Model) method. The former is faster and uses less memory, but cannot scan an entire XML file for issues and report back with a list of things to fix, as the latter would. That is why many people use a pre-import
 validation step to find most of the issues that might occur, without the laborious process of creating an import job, waiting for it to fail, then re-running.<o:p></o:p></p>
<p>Harvard have made theirs into a web service which you might find useful:<o:p></o:p></p>
<p><a href="https://eadchecker.lib.harvard.edu/">https://eadchecker.lib.harvard.edu/</a><o:p></o:p></p>
<p>I think it is fairly generic (unlike a similar validation script used here which imposes editorial restrictions as well.)<o:p></o:p></p>
<p>Andrew.<o:p></o:p></p>
<p><o:p> </o:p></p>
<div>
<p class="MsoNormal">On 19/10/2022 22:19, Custer, Mark wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="font-size:11.0pt">Sarah,</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I suspect that your EAD file is missing an archdesc/did/unitid field.  This is where ArchivesSpace pulls information to create its Identifier field for the new Resource (see the attached screenshot), which
 is a required element.  </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">If you add something there, then I believe it should work.  Here’s an example from one of our EAD files,
<a href="https://github.com/YaleArchivesSpace/Archives-at-Yale-EAD3/blob/master/brbl-ead/1000.xml#L80">
https://github.com/YaleArchivesSpace/Archives-at-Yale-EAD3/blob/master/brbl-ead/1000.xml#L80</a>  (this file is EAD3, but the archdesc/did/unitid construction looks the same in EAD2002).</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">As for why you don’t have one in your file, I expect that’s because the call number is stored in a related MARC holdings record, or somewhere else that’s not being migrated as part of the MARC XML to EAD conversion
 (e.g., an 099 field).</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Mark</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black"><a href="mailto:archivesspace_users_group-bounces@lyralists.lyrasis.org">archivesspace_users_group-bounces@lyralists.lyrasis.org</a>
<a href="mailto:archivesspace_users_group-bounces@lyralists.lyrasis.org"><archivesspace_users_group-bounces@lyralists.lyrasis.org></a> on behalf of Newhouse, Sarah
<a href="mailto:snewhouse@sciencehistory.org"><snewhouse@sciencehistory.org></a><br>
<b>Date: </b>Wednesday, October 19, 2022 at 4:33 PM<br>
<b>To: </b>Archivesspace Users Group <a href="mailto:archivesspace_users_group@lyralists.lyrasis.org">
<archivesspace_users_group@lyralists.lyrasis.org></a><br>
<b>Subject: </b>[Archivesspace_Users_Group] id=0 error on EAD XML import</span><o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt">Hi all,</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I’m trying to import a test EAD file that I transformed from MARC XML as a trial run for doing this in batches. I knew it would be janky, but I can’t narrow in on the specific form of the jank here. When I
 import I get the error below (it’s long, apologies). My two best guesses are <br>
a) ASpace is missing something in each XML element needed to create an ID in every one of the JSON fields below?  (which appears to be the entire resource record)<br>
b) there’s something missing from the <ead> element in the XML file? (which there shouldn’t be – I copied it in manually from an ASpace EAD export)</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I know this id_0 error is vague and has confused other people before, but I couldn’t find enough information to help me narrow in on the specific issue is here.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Thanks!</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">********************************************************</span><o:p></o:p></p>
<pre>The following errors were found:<o:p></o:p></pre>
<pre>        id_0 : Property is required but was missing<o:p></o:p></pre>
<pre> <o:p></o:p></pre>
<pre> <o:p></o:p></pre>
<pre> For JSONModel(:resource): <o:p></o:p></pre>
<pre> #<JSONModel(:resource) {"jsonmodel_type"=>"resource", "external_ids"=>[], "subjects"=>[{"ref"=>"/subjects/import_e9b747a7-9d78-4dac-b424-51ff0dabc301"}, {"ref"=>"/subjects/import_b6e2afcf-be53-480e-981d-cc359ca31719"}, {"ref"=>"/subjects/import_24b83fea-3081-4770-a77b-a2b3e870d75a"}, {"ref"=>"/subjects/import_b5b565e8-4cf4-44ee-bef4-bb5d80ea6788"}, {"ref"=>"/subjects/import_30ccd3c2-8d46-4373-a803-9ff8f7ad3d7a"}, {"ref"=>"/subjects/import_68e70347-cfb7-4ccb-b1f9-2349ae2a3448"}, {"ref"=>"/subjects/import_c06a6464-07d2-4bb4-8305-c75da3453954"}, {"ref"=>"/subjects/import_7713afda-99d0-4382-b478-29c7c3a1167c"}, {"ref"=>"/subjects/import_0330ec33-8f81-46ed-b221-01bbf11d0cf2"}, {"ref"=>"/subjects/import_87b9ccf4-4873-4aa4-a951-a3eebb894f03"}, {"ref"=>"/subjects/import_eb959373-7080-4a29-9a16-6cf2f30ad375"}, {"ref"=>"/subjects/import_5412219d-8ae6-4cf9-904f-f2ef463377b7"}, {"ref"=>"/subjects/import_2158afa2-e11b-4f15-a145-8d26f01eea6a"}, {"ref"=>"/subjects/import_1e46c0e2-5f32-4c0e-97f9-07ddf8eb9531"}, {"ref"=>"/subjects/import_310a1db4-7b94-4a72-82ca-120f408b82d7"}, {"ref"=>"/subjects/import_80cf34db-8f1e-4d19-8b01-a2f5332471a4"}, {"ref"=>"/subjects/import_a201450a-2a58-45fe-b85f-b499b45b4023"}, {"ref"=>"/subjects/import_1a9edf46-9143-42dd-a46c-ba3894c8d00d"}, {"ref"=>"/subjects/import_ab2fd197-ab6e-4c56-8c66-73832460557d"}], "linked_events"=>[], "extents"=>[{"jsonmodel_type"=>"extent", "import_context"=>"<physdesc class=\"cdata\"> ... </physdesc>", "number"=>"169", "extent_type"=>"Linear Feet", "portion"=>"whole"}], "lang_materials"=>[{"jsonmodel_type"=>"lang_material", "notes"=>[], "import_context"=>"<did class=\"cdata\" id=\"a1\"> ... </did>", "language_and_script"=>{"jsonmodel_type"=>"language_and_script", "language"=>"und"}}], "dates"=>[{"jsonmodel_type"=>"date", "import_context"=>"<unitdate class=\"cdata\" encodinganalog=\"245$f\" type=\"inclusive\"> ... </unitdate>", "date_type"=>"inclusive", "expression"=>"1921-1998.", "label"=>"creation"}], "external_documents"=>[], "rights_statements"=>[], "linked_agents"=>[{"ref"=>"/agents/people/import_b71f978e-703f-4bc5-8c8e-a3f9f4b5d47f", "role"=>"creator", "relator"=>"creator", "terms"=>[]}, {"ref"=>"/agents/families/import_1c6bec99-db8e-43c9-85b0-c2e36da5f606", "role"=>"subject", "relator"=>"subject", "terms"=>[]}, {"ref"=>"/agents/families/import_e71eb985-1fe4-4725-8270-7d170afcc236", "role"=>"subject", "relator"=>"subject", "terms"=>[]}], "import_previous_arks"=>[], "is_slug_auto"=>true, "restrictions"=>false, "revision_statements"=>[], "instances"=>[], "deaccessions"=>[], "related_accessions"=>[], "classifications"=>[], "notes"=>[{"jsonmodel_type"=>"note_singlepart", "content"=>["This collection consists of fifteen series, which include: Biographical Information; Associations, Societies, and Organizations; Awards and Honors; Personal Files; Consulting, Research, and General Correspondence - Domestic; Consulting, Research, and General Correspondence - Foreign; Lectures; Manuscripts; Patent Applications; Patent Information; Polytechnic Files; Reports; Chronological Correspondence; Othmer Images - Photographs, Negatives, and Slides; and Artifacts. The bulk of the paper archives is correspondence pertaining to issues of chemical engineering. His personal life is also represented, particularly in Series I and IV."], "import_context"=>"<abstract class=\"cdata\" encodinganalog=\"520$a\"> ... </abstract>", "type"=>"abstract", "publish"=>true}, {"jsonmodel_type"=>"note_multipart", "subnotes"=>[{"publish"=>true, "jsonmodel_type"=>"note_text", "content"=>"Othmer was born in Omaha, Nebraska on May 11, 1904. In 1927, he earned a Ph. D. in chemical engineering from the University of Michigan. In 1932, he began a career as a professor for the Chemical Engineering Department of Brooklyn Polytechnic Institute, where he remained until his death in 1995. He also consulted for hundreds of companies on numerous chemical engineering issues. He received over 150 patents worldwide. He invented the Othmer Still, a basic laboratory device for the determination of vapor-liquid equilibrium data. He collaborated with Dr. Raymond Kirk to create the Kirk-Othmer Encyclopedia of Chemical Technology."}], "import_context"=>"<bioghist class=\"cdata\" encodinganalog=\"545\" id=\"a2\"> ... </bioghist>", "type"=>"bioghist", "persistent_id"=>"a2", "publish"=>true}, {"jsonmodel_type"=>"note_multipart", "subnotes"=>[{"publish"=>true, "jsonmodel_type"=>"note_text", "content"=>"Collection also includes furniture and unboxed artifacts."}], "import_context"=>"<odd class=\"cdata\" encodinganalog=\"500\" id=\"a5\"> ... </odd>", "type"=>"odd", "persistent_id"=>"a5", "publish"=>true}, {"jsonmodel_type"=>"note_multipart", "subnotes"=>[{"publish"=>true, "jsonmodel_type"=>"note_text", "content"=>"Othmer's patents, lectures, and manuscripts have been bound."}], "import_context"=>"<altformavail class=\"cdata\" encodinganalog=\"530\" id=\"a9\"> ... </altformavail>", "type"=>"altformavail", "persistent_id"=>"a9", "publish"=>true}, {"jsonmodel_type"=>"note_multipart", "subnotes"=>[{"publish"=>true, "jsonmodel_type"=>"note_text", "content"=>"The Donald F. Othmer Papers, Othmer Library of Chemical History, Chemical Heritage Foundation, Philadelphia, Pennsylvania."}], "import_context"=>"<prefercite class=\"cdata\" encodinganalog=\"524\" id=\"a18\"> ... </prefercite>", "type"=>"prefercite", "persistent_id"=>"a18", "publish"=>true}, {"jsonmodel_type"=>"note_multipart", "subnotes"=>[{"publish"=>true, "jsonmodel_type"=>"note_text", "content"=>"Donald F. Othmer; Bequest; 1996."}], "import_context"=>"<acqinfo class=\"cdata\" encodinganalog=\"541\" id=\"a19\"> ... </acqinfo>", "type"=>"acqinfo", "persistent_id"=>"a19", "publish"=>true}, {"jsonmodel_type"=>"note_bibliography", "content"=>["Publications: Thackray, Arnold. and Crow, Amy Beth, eds. Donald Frederick and Mildred Topp Othmer: A Commemorative of Their Lives and Legacies. Philadelphia: Chemical Heritage Foundation, 1999."], "items"=>[], "import_context"=>"<bibliography class=\"cdata\" encodinganalog=\"581\" id=\"a11\"> ... </bibliography>", "persistent_id"=>"a11", "publish"=>true}, {"jsonmodel_type"=>"note_multipart", "subnotes"=>[{"publish"=>true, "jsonmodel_type"=>"note_text", "content"=>"Unpublished finding aid available."}], "import_context"=>"<otherfindaid class=\"cdata\" encodinganalog=\"555\" id=\"a8\"> ... </otherfindaid>", "type"=>"otherfindaid", "persistent_id"=>"a8", "publish"=>true}], "metadata_rights_declarations"=>[], "uri"=>"/repositories/import/resources/import_4f6627d1-465a-4884-8fac-f679bc179286", "publish"=>true, "finding_aid_language"=>"eng", "finding_aid_script"=>"Latn", "finding_aid_title"=>"Finding Aid toThe Donald F. Othmer Papers,<date encodinganalog=\"Date\">1921-1998.</date>", "finding_aid_author"=>"Finding aid prepared by MarcEdit", "finding_aid_language_note"=>"Finding aid written in English.", "level"=>"collection", "title"=>"The Donald F. Othmer Papers,"}><o:p></o:p></pre>
<pre> <o:p></o:p></pre>
<pre> <o:p></o:p></pre>
<pre>In : <o:p></o:p></pre>
<pre> &lt;ead class=&quot;cdata&quot;&gt; ... &lt;/ead&gt; <o:p></o:p></pre>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<p>__________________________________ <br>
<br>
Sarah Newhouse   <em><span style="font-family:"Calibri",sans-serif">(she, her, hers)</span></em>
<br>
Digital Preservation Archivist <br>
Othmer Library of Chemical History  <br>
t. +1.215.873.8249 <o:p></o:p></p>
<p><strong><span style="font-family:"Calibri",sans-serif">Science History Institute </span></strong><br>
Chemistry • Engineering • Life Sciences <br>
315 Chestnut Street • Philadelphia, PA 19106 • U.S.A. <br>
Learn about the scientific discoveries that changed our world at <a href="https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.sciencehistory.org%2Flearn&data=05%7C01%7Cmark.custer%40yale.edu%7C9b153ca67a2d4048107f08dab211204d%7Cdd8cbebb21394df8b4114e3e87abeb5c%7C0%7C0%7C638018084010631566%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=ysbYdMSs5epGIGOk5otuXZWlm5i6lEskiG0KAVvRm0A%3D&reserved=0">
sciencehistory.org/learn</a><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><br>
<br>
<o:p></o:p></span></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>Archivesspace_Users_Group mailing list<o:p></o:p></pre>
<pre><a href="mailto:Archivesspace_Users_Group@lyralists.lyrasis.org">Archivesspace_Users_Group@lyralists.lyrasis.org</a><o:p></o:p></pre>
<pre><a href="http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group">http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group</a><o:p></o:p></pre>
</blockquote>
</div>
</body>
</html>