tags
The tag mappings specified in a tags
property
consist of:
-
A
name
property identifying a DC-X tag -
A second property specifying how the DC-X tag is to be set
tags: - name: Creator first-of: - field: byline - meta: author - meta: creator - name: Title meta: title - name: body template: > {%- raw %} <p>{{caption}}</p> {%- endraw %} context: - name: caption field: caption - name: Provider first-of: - field: credit - meta: organizational-unit
The following variations are possible:
-
- name: Creator field: byline
Assign the value of the uploaded content item's
byline
field to the DC-XCreator
tag. -
- name: Creator meta: creator
Assign the value of the uploaded content item's
creator
metadata field to the DC-XCreator
tag. -
- name: Creator first-of: - field: byline - meta: author - meta: creator
Read the fields listed under
first-of
in the specified order. Use the first one that contains a value to set the DC-XCreator
tag. -
- name: body template: > <p>{{caption}}</p> context: - name: caption field: caption
Use the result of executing the specified Jinja2 template to set the DC-X
body
tag. Thecontext
property can be used to define the variables that will be available to the template. These variables can be assigned values in exactly the same way as values are assigned to DC-X tags. So in this example, the{{caption}}
variable will be replaced with the content of the uploaded content item'scaption
field.