{% extends "templates/base.tpl" %} {% set data = query(""" PREFIX library: PREFIX license: CONSTRUCT { ?item library:title ?title ; library:author ?author ; library:license ?license . ?license license:id ?license_id ; license:name ?license_name . } WHERE { ?item library:title ?title ; library:author ?author ; library:license ?license . FILTER (?item = ) OPTIONAL { ?license license:id ?license_id_optional ; license:name ?license_name_optional . } BIND(COALESCE(?license_id_optional, SUBSTR(STR(?license), 14)) AS ?license_id) BIND(COALESCE(?license_name_optional, SUBSTR(STR(?license), 14)) AS ?license_name) } """, { "@context": { "library": "dokk:library:", "license": "dokk:license:", "library:author": { "@container": "@set" }, "library:license": { "@container": "@set" } }, "library:title": {} } )["@graph"][0] %} {% block title %}{{ data['library:title'] }}{% endblock %} {% block body %}
{{ plaintext }}

{{ data["library:title"] }}

Authors {% for author in data["library:author"]|sort() %} {{ author }} {% endfor%}

License {% for license in data["library:license"]|sort(attribute="license:id") %} {{ license['license:id'] }} {% endfor%}

{% endblock %}