datatracker/ietf/templates/doc/bibxml.xml
Robert Sparks 7bc6f2b6b2
fix: return same bibxml for versioned and versionless references (#4470)
* fix: return same bibxml for versioned and versionless references

Fixes #4384.

Refactors bibxml production to remove repeated logic.

Abandons the half-implemented idea that returning information
from the Submission object might be better than the Document or
DocHistory objects.

* fix: test for None with `is not` and simplify choice from multiple qs objects

Addresses review comments.
2022-09-19 10:38:57 -05:00

18 lines
858 B
XML

<?xml version="1.0" encoding="UTF-8"?>
<reference anchor="{{doc_bibtype}}.{{name|slice:"6:"}}">
<front>
<title>{{doc.title}}</title>{% for author in doc.documentauthor_set.all %}
<author initials="{{ author.person.initials }}" surname="{{ author.person.last_name }}" fullname="{{ author.person.name }}">
{% if author.affiliation %}<organization>{{ author.affiliation }}</organization>
{% endif %}</author>{% endfor %}
<date month="{{doc.date|date:"F"}}" day="{{doc.date.day}}" year="{{doc.date.year}}" />
<abstract>
<t>{{doc.abstract}}
</t>
</abstract>
</front>
<seriesInfo name="Internet-Draft" value="{{name}}-{{doc.rev}}" />
{% if doi %}<seriesInfo name="DOI" value="{{doi}}" />
{% endif %}<format type="TXT" target="https://www.ietf.org/archive/id/{{name}}-{{doc.rev}}.txt" />
</reference>