Option: Use generic template

As of March 2021, it is required to specify a language code for each DAMS metadata element that allows to do so. If you use the generic template and enter data for a metadata element that allows the specification of a language (e.g. Subject: Topic), you MUST enter a 3-letter language code from ISO 639-3. The default value is 'eng'.

You can download an updated metadata spreadsheet and transformation template for OpenRefine from this page.


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 tabular metadata to 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.

Using the template spreadsheet

The template spreadsheet file (dams-xml-template.xslx) contains columns for all available metadata fields. The column names are based on the field labels we use in the DAMS GUI metadata entry form. The column names are color-coded to indicate REQUIRED and REPEATABLE metadata fields. In a number of cases, the DAMS software requires a piece of metadata to be designated as 'primary' (e.g. primary title and primary contributor). The template spreadsheet indicates these cases through the column name (e.g. PrimaryTitle and PrimaryContributor). For some repeatable metadata fields, the template will already provide one repetition (e.g. Title2). The following section explains how you can extend the spreadsheet and the XML template file to accommodate further repetitions (e.g. Title3, Title4, etc.).

Extending the generic template

If your metadata contains multiple titles, descriptions, or notes per asset, you will need to extend the template files: For each data column you add in the spreadsheet you will have to repeat a block of code in the XML document (dams-xml-template.xml).

The XML template document contains comments that detail which blocks of code can be repeated if necessary:

Example: 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).

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.).


  File Modified

Microsoft Excel Spreadsheet dams-xml-template_2.xlsx

Mar 25, 2021 by MM Hanke

XML File dams-xml-template_2.xml

Mar 25, 2021 by MM Hanke