| {{ section_labels.get(field_key, field_key|replace('_', ' ')|title) }} | {% if field_key == 'subject' and value_at_idx.valueURI %} {# Handle subject with URI link #} {% set uri = value_at_idx.valueURI %} {% set is_external = uri.startswith('http://') or uri.startswith('https://') %} {% if is_external %} {{ field_val }} {% else %} {{ field_val }} {% endif %} {% else %} {{ field_val }} {% endif %} |
|---|---|
| {{ section_labels.get(key, key|replace('_', ' ')|title) }} | {{ value_at_idx }} |
| {{ section_labels.get(key, key|replace('_', ' ')|title) }} |
{% if value is mapping %}
{% for k, v in value.items() %}
{{ k|replace('_', ' ')|title }}:
{% set nested_uri = (v|string)|trim %}
{% if nested_uri.startswith('http://') or nested_uri.startswith('https://') %}
{{ nested_uri }}
{% else %}
{{ v }}
{% endif %}
{% if not loop.last %} {% endif %} {% endfor %} {% elif value is iterable and value is not string %} {% for item in value %} {% if item is mapping %} {% for k, v in item.items() %} {% set list_uri = (v|string)|trim %} {% if list_uri.startswith('http://') or list_uri.startswith('https://') %} {{ list_uri }} {% else %} {{ v }} {% endif %}{% if not loop.last %} • {% endif %} {% endfor %} {% else %} {% set list_item_uri = (item|string)|trim %} {% if list_item_uri.startswith('http://') or list_item_uri.startswith('https://') %} {{ list_item_uri }} {% else %} {{ item }} {% endif %} {% endif %} {% if not loop.last %} {% endif %} {% endfor %} {% else %} {% set raw_uri = (value|string)|trim %} {% if raw_uri.startswith('http://') or raw_uri.startswith('https://') %} {{ raw_uri }} {% else %} {{ value }} {% endif %} {% endif %} |
|---|
| {{ _('Contributor Type') }} | {{ seen_types.values|join(', ') }} |
|---|---|
| {{ _('Email') }} | {{ author.email }} |
| {{ _('Affiliation') }} |
{% set aff_seen = namespace(values=[], rendered=0) %}
{% for aff in author.affiliation %}
{% set aff_uri = (aff.affiliationIdentifier or '')|string|trim %}
{% if ' — ' in aff_uri %}
{% set aff_uri = aff_uri.split(' — ')[0]|trim %}
{% endif %}
{% if aff_uri and not (aff_uri.startswith('http://') or aff_uri.startswith('https://')) %}
{% if aff.affiliationIdentifierScheme == 'ROR' %}
{% set aff_candidate = aff_uri
|replace('https://ror.org/', '')
|replace('http://ror.org/', '')
|replace('ror.org/', '')
|replace('ROR:', '')
|replace('ror:', '')
|trim %}
{% if aff_candidate
and ' ' not in aff_candidate
and '/' not in aff_candidate
and ':' not in aff_candidate
and aff_candidate|length >= 6
and aff_candidate|length <= 12 %}
{% set aff_uri = 'https://ror.org/' ~ aff_candidate %}
{% endif %}
{% endif %}
{% endif %}
{% set aff_label = (aff.affiliation or '')|string|trim %}
{% set aff_key = ((aff_label|lower) ~ '|' ~ (aff_uri|lower)) %}
{% if aff_label and aff_key not in aff_seen.values %}
{% set aff_seen.values = aff_seen.values + [aff_key] %}
{% if aff_seen.rendered > 0 %} {% endif %} {% if aff_uri.startswith('http://') or aff_uri.startswith('https://') %} {{ aff_label }} {% else %} {{ aff_label }} {% endif %} {% set aff_seen.rendered = aff_seen.rendered + 1 %} {% endif %} {% endfor %} {% if aff_seen.rendered == 0 %}-{% endif %} |
| {{ _('Identifiers') }} |
{% set id_seen = namespace(values=[], rendered=0) %}
{% for id in author.nameIdentifiers %}
{% set identifier_uri = (id.nameIdentifier or '')|string|trim %}
{% if ' — ' in identifier_uri %}
{% set identifier_uri = identifier_uri.split(' — ')[0]|trim %}
{% endif %}
{% if identifier_uri and not (identifier_uri.startswith('http://') or identifier_uri.startswith('https://')) %}
{% if id.nameIdentifierScheme == 'ORCID' %}
{% set identifier_uri = 'https://orcid.org/' ~ identifier_uri %}
{% elif id.nameIdentifierScheme == 'ROR' %}
{% set identifier_uri = 'https://ror.org/' ~ identifier_uri %}
{% endif %}
{% endif %}
{% set id_scheme = (id.nameIdentifierScheme or 'ID')|string|trim %}
{% set id_key = ((id_scheme|lower) ~ '|' ~ (identifier_uri|lower)) %}
{% if id_key not in id_seen.values %}
{% set id_seen.values = id_seen.values + [id_key] %}
{% if id_seen.rendered > 0 %} {% endif %} {% if identifier_uri.startswith('http://') or identifier_uri.startswith('https://') %} {{ id_scheme }} {% else %} {{ id_scheme }} {% endif %} {% set id_seen.rendered = id_seen.rendered + 1 %} {% endif %} {% endfor %} {% if id_seen.rendered == 0 %}-{% endif %} |
{{ desc.description }}
| {{ section_labels.get('relatedIdentifier', _('Identifier')) }} | {{ section_labels.get('relatedIdentifierType', _('Type')) }} | {{ section_labels.get('relationType', _('Relation')) }} |
|---|---|---|
| {% if is_external_uri %} {{ rid }} {% else %} {{ rid }} {% endif %} | {{ rid_type }} | {{ relation }} |
{% for item in section_data %} {{ item }} {% endfor %}
{# Plain text #} {% elif display_type == 'text' %}{{ section_data }}
{# Resilient fallback for unknown display_type values #} {% else %} {% if section_data is mapping %}| {{ key }} | {{ value }} |
|---|
{{ section_data }}
{% endif %} {% endif %} {% endif %} {% endfor %}{{ fdf_json }}