Versions Compared

Key

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

Creation of metadata for larger sets of assets can be easier to manage in tabular form. Sometimes metadata is already available in a format that can be easily transformed to a spreadsheet. The template provided here serves as a generalized, extensible starting point for organizing metadata in tables. Metadata organized according to this template can be transformed to XML files with OpenRefine. Use the step-by-step-instructions on this page: _Convert Spreadsheet tabular metadata to DAMS MODS XML

Works out of the box

The template provided here will work out of the box without the need to create an individual XML template. Cells in the metadata spreadsheet that are left empty will not result in empty XML elements or attributes.

...

Code Block
languagexml
titleExample: repeatable template block
<!-- Add'l Genre term; duplicate section as necessary -->
	{{if(isNull(cells['Genre2']), "", jsonize("<genre").replace('"',''))}}
        {{if(isNull(cells['Genre2Authority']), "", jsonize("authority='" + cells['Genre2Authority'].value + "'").replace('"',''))}} 
        {{if(isNull(cells['Genre2AuthorityURI']), "", jsonize("authorityURI='" + cells['Genre2AuthorityURI'].value + "'").replace('"',''))}}
        {{if(isNull(cells['Genre2Lang']), "", jsonize("lang='" + cells['Genre2Lang'].value + "'").replace('"',''))}}
    {{if(isNull(cells['Genre2']), "", jsonize(">" + cells['Genre2'].value + "</genre>").replace('"',''))}}

The code references the spreadsheet columns that are going to populate the XML template: Genre2, Genre2Authority, Genre2AuthorityURI, Genre2Lang. If you duplicate a code block in the XML document, make sure to change the code to reference the new metadata columns you are adding (e.g. Genre3, Genre3Authority, Genre3AuthorityURI, Genre3Lang).

Info

Remember that some XML elements like Identifiers or Notes always need a respective Type attribute to be specified (e.g. OCLC number, call number, etc.)


Attachments
previewfalse
uploadfalse
oldfalse
sortByname