<?xml version="1.0" encoding="UTF-8"?>
{%- set last = offset_next if offset_next is not none else total %}
<list response="get_list" type="pr" total="{{ total }}" first="{{ offset + 1 }}" last="{{ last }}">
{%- for result in results %}
<entry id="{{ result.number|e }}">
{% set name_tuple = result.name.split(maxsplit=1) -%}
{% if name_tuple|length < 2 -%}
<ln></ln>
<fn>{{ name_tuple[0]|e }}</fn>
{% else -%}
<ln>{{ name_tuple[1]|e }}</ln>
<fn>{{ name_tuple[0]|e }}</fn>
{% endif -%}
<hm>{{ result.number|e }}</hm>
</entry>
{%- endfor %}
</list>
