Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Probably the most common request we hear relates to the EAD import and export, and I talked to a couple of members about this which was a big topic of conversation in Portland. While we are working to improve the quality of the EAD input and output in the application, there are lots of institutions who want customized EAD handling for their own use cases. But instead of writing customized XSLT for pre- and post-processing ( which a lot of folks do ), it's pretty easy to tweak your ArchivesSpace  EAD importer and exporter, which we did at the Code4Lib Dev House.

Taking an example from the real world, some institutions put additional container information in the EAD container @label attribute. One use case I heard about put the instance_type and container barcode information separated by a space. So, the XML looks like this:

    <container label="text 878788" type="box">12344</container>

with the instance_type = “text” and the barcode = “878788”.

So, for importing, we'll need to customize the EAD converter. You can have a look at the original ArchivesSpace EAD converter in Github , which lives in the ArchivesSpace backend. This converter is a DSL that uses a SAX stream parser approach for processing XML. In this DSL, the “with” keyword you see in the configure method initializes a handler to do something when the parser runs into a specific tag. For example, “with with 'container' do …. end” endis how we convert EAD container nodes.

...

Hope this shows how easy to change your EAD exporter. Let us know if you have any questions or, better yet, if you've created your own plugin so we can add it to our list.