The following was adapted from the blog post "Converting Spreadsheets into MODSXML using Open Refine" by The Digital Scholarship Unit (DSU) at the UTSC Library. When archives metadata can be exported to spreadsheet, it is possible to use OpenRefine and xml_split to create a DAMS MODS XML for each record in the spreadsheet. The following is written for Mac Sierra. Windows 10 documentation forthcoming.
...
Code Block |
---|
language | xml |
---|
title | Replace line 1 of your MODS record with these lines |
---|
linenumbers | true |
---|
|
<!-- For Prefix -->
<?xml version="1.0" encoding="UTF-8"?>
<modsCollection xmlns="http://www.loc.gov/mods/v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-4.xsd">
<!-- For Row Template -->
|
Example screenshot.
Code Block |
---|
title | For each variable value in your metadata, replace the fixed string value with a jsonize(value) expression matching the corresponding metadata field in your spreadsheet |
---|
linenumbers | true |
---|
|
{{jsonize(cells["title"].value).replace('"','')}} |
...
Code Block |
---|
title | Paste these lines to the bottom of your MODS record |
---|
linenumbers | true |
---|
|
<!-- Don't put anything in Row Separator -->
<!-- For Suffix -->
</modsCollection> |
Example screenshot.
...