Handling works without author

Actually a pretty tricky issue, which already caused a lot of discussions ;)

Relevant part in template of *.edition.meta:

    <edition>
        <isEditionOf>{{ id }}.work</isEditionOf>
{% if work.author.fullname %}
        {% if work.author.id %}
        <agent role="author" id="{{ work.author.id }}">{{ work.author.fullname }}</agent>
        {% else %}
        <agent role="author">{{ work.author.fullname }}</agent>
        {% endif %}
{% endif %}
        <source>

Relevant part in template of *.work.meta:

    <work>

{% if work.author.fullname %}
    {% if work.author.id %}
        <agent role="author" id="{{ work.author.id }}">{{ work.author.fullname }}</agent>
    {% else %}
        <agent role="author">{{ work.author.fullname }}</agent>
    {% endif %}
{% endif %}

How to handle?

*.edition.meta

Use info on collector in collection.yaml to integrate an agent with role 'collector':

{% if work.author.fullname %}
...
{% elif collector.fullname %}
    {% if collector.id %}
        <agent role="collector" id="{{ work.author.id }}">{{ collector.fullname }}</agent>
    {% else %}
        <agent role="collector">{{ collector.fullname }}</agent>
    {% endif %}
{% endif %}

*.work.meta

Do not add any agent!