{% load oai %}
{% load url from future %}
  <metadata>
    <oai_dc:dc xmlns:dcterms="http://purl.org/dc/terms/" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
      <dc:title>{{ poly_request.name }}</dc:title>
      <dc:creator>{{ poly_request.user.display_name }}{% if poly_request.sponsor %} - {{poly_request.sponsor}}{% endif %}</dc:creator>
      <dc:identifier>{{ base_url }}{% url 'public-document' pk=poly_request.pk %}</dc:identifier>
      <dc:description>{{ poly_request.nb_pages }}p</dc:description>
      <dc:format>application/pdf</dc:format>
      <dc:date>{{ poly_request.creation_date|date:"c" }}</dc:date>
      <dc:rights>{{ poly_request.copyright_status }}</dc:rights>
      <dc:rights>{{ poly_request.licence.name }}</dc:rights>
      <dc:type>{{ poly_request.usage.name }}</dc:type>
      {% for key, value in settings.OAI_DC_EXTRA %}
      <dc:{{key}}>{{value}}</dc:{{key}}>
      {% endfor %}
    </oai_dc:dc>
  </metadata>
