{% set anchor_map = {} %} {% if grouped_view and sections %} {% for section in sections %} {% for ent in section.entities %} {% set precise_key = ent.uri ~ '|' ~ ent.type.lower() %} {% set _ = anchor_map.update({precise_key: ent.anchor_id}) %} {% if ent.uri not in anchor_map %} {% set _ = anchor_map.update({ent.uri: ent.anchor_id}) %} {% endif %} {% endfor %} {% endfor %} {% elif single_resource and entities %} {% for ent in entities %} {% set precise_key = ent.uri ~ '|' ~ ent.type.lower() %} {% set _ = anchor_map.update({precise_key: ent.anchor_id}) %} {% if ent.uri not in anchor_map %} {% set _ = anchor_map.update({ent.uri: ent.anchor_id}) %} {% endif %} {% endfor %} {% endif %} {% if grouped_view %} {% set display_sections = sections %} {% else %} {% set display_sections = [{'is_single_view': true, 'entities': entities}] %} {% endif %} {% set lang_map = { 'en': 'English', 'es': 'Spanish', 'pt': 'Portuguese', 'fr': 'French', 'de': 'German', 'it': 'Italian', 'zh': 'Chinese', 'ja': 'Japanese', 'ru': 'Russian', 'ar': 'Arabic', 'nl': 'Dutch', 'ko': 'Korean', 'fa': 'Persian' } %} {% set md_types = ['Literal', 'Str', 'literal', 'str', 'string'] %} {# after the sets above: "with context" only sees variables defined before the import #} {% from '_value.html' import render_value with context %} {% include '_toc_sidebar.html' %} {% if not single_resource %} {% endif %}
{% if metadata %} {% if single_resource %} {% set current = entities[0] if entities else None %}
{% else %}

{% if metadata.title %} {% for title in metadata.title %} {{ title.text }} {% endfor %} {% elif metadata.label %} {{ metadata.label[0].text }} {% endif %}

{{ metadata.uri[0].link }}
{% endif %}
{% if single_resource %}
{% else %}
{% endif %}
{% if source_url or upload_id or export_base %} {% set _res = request.query_params.get('resource', '') %}
Export {% if _res %}entity{% endif %}
{% for f in export_formats %} {% if not request.is_static %} {{ f.label }} {% elif export_base %} {{ f.label }} {% endif %} {% endfor %}
{% endif %}
{% endif %} {% if grouped_view and sections %}

Table of Contents

    {% for section in sections %}
  1. {{ type_map[section.title.lower()].plural }} {{ section.entities|length }}
  2. {% endfor %} {% if metadata and metadata._namespaces %}
  3. Namespace Declarations {{ metadata._namespaces|length }}
  4. {% endif %}
{% endif %} {% for section in display_sections %} {% if not section.is_single_view %}

{{ type_map[section.title.lower()].plural }} {{ section.entities|length }}

Jump to:

{% for item in section.entities %} {{ item.label }} {% endfor %}
{% endif %}
{% for item in section.entities %} {% include card_template %} {% endfor %}
{% endfor %} {% if metadata and metadata._namespaces and not single_resource %}

Namespace Declarations back to ToC

{% for ns in metadata._namespaces %}
{{ ns.prefix }}
{{ ns.uri }}
{% endfor %}
{% endif %} {% if single_resource %}
{% if is_static %} ← Back to full documentation {% else %} ← Back to full documentation {% endif %}
{% endif %} {% if warnings %}
{% endif %}