{% load settings %}{% spaceless %}<journal_article publication_type="full_text">{% endspaceless %}

            <titles>
                {% if article.scheduled %}
                <title>{{ article.title }}</title>
                {% else %}
                <title>Title Pending {{ article.pk }}</title>
                {% endif %}
            </titles>

            {% include "common/identifiers/crossref_contributors.xml" %}

            {% if article.abstract  and article.scheduled %}
                <jats:abstract>
                    <jats:p>{{ article.get_clean_abstract }}</jats:p>
                </jats:abstract>
            {% endif %}

            {% if article.date_published %}
                <publication_date media_type="online">
                    <month>{{ article.date_published|date:"m" }}</month>
                    <day>{{ article.date_published|date:"d" }}</day>
                    <year>{{ article.date_published|date:"Y" }}</year>
                </publication_date>
            {% else %}
                {% now "Y" as current_year %}
                <publication_date media_type="online">
                    <year>{{ current_year }}</year>
                </publication_date>
            {% endif %}

            {% if article.date_accepted %}
                <acceptance_date media_type="online">
                    <month>{{ article.date_accepted.month }}</month>
                    <day>{{ article.date_accepted.day }}</day>
                    <year>{{ article.date_accepted.year }}</year>
                </acceptance_date>
            {% endif %}
            {% if first_page or last_page or other_pages %}
                <pages>
                    {% if first_page %}
                        <first_page>{{ first_page }}</first_page>
                    {% endif %}
                    {% if last_page %}
                        <last_page>{{ last_page }}</last_page>
                    {% endif %}
                    {% if other_pages %}
                        <other_pages>{{ other_pages }}</other_pages>
                    {% endif %}
                </pages>
            {% endif %}

            <publisher_item>
                <item_number item_number_type="article_number">{{ article.object.pk }}</item_number>
            </publisher_item>

            {% if article.object.funders.exists %}
            <fr:program name="fundref">
                {% for funder in article.object.funders.all %}
                <fr:assertion name="fundgroup">
                    <fr:assertion name="funder_name">{{ funder.name }}</fr:assertion>
                    {% if funder.fundref_id %}
                    <fr:assertion name="funder_identifier">{{ funder.fundref_id }}</fr:assertion>
                    {% endif %}
                    {% if funder.funding_id %}
                    <fr:assertion name="award_number">{{ funder.funding_id }}</fr:assertion>
                    {% endif %}
                </fr:assertion>
                {% endfor %}
            </fr:program>
            {% endif %}



            <doi_data>
                <doi>{{ article.doi }}</doi>
                <resource>{{ article.url }}</resource>
                {% if article.scheduled %}
                    <collection property="crawler-based">
                        <item crawler="similarity-check">
                            {% if article.pdf_url %}
                                <resource>{{ article.pdf_url }}</resource>
                            {% else %}
                                <resource>{{ article.url }}</resource>
                            {% endif %}
                        </item>
                    </collection>
                {% endif %}
            </doi_data>

            {% if article.scheduled and article.citation_list %}
                {{ article.citation_list|safe }}
            {% else %}
                <citation_list/>
            {% endif %}

        </journal_article>
