<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
{% for url in urls %}
<url>
{# check if hostname is not already in url #}
<loc>{% if url.loc|replace({hostname:''}) == url.loc %}{{ scheme }}://{{hostname}}{{url.loc}}{% else %}{{url.loc}}{% endif %}</loc>
{% if url.lastmod is defined %}
<lastmod>{{ url.lastmod }}</lastmod>
{% endif %}
{% if url.changefreq is defined %}
<changefreq>{{ url.changefreq }}</changefreq>
{% endif %}
{% if url.priority is defined %}
<priority>{{ url.priority }}</priority>
{% endif %}
</url>
{% endfor %}
</urlset>