{{ xml_header }}
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"{{ if {locales:count} > 1 }} xmlns:xhtml="http://www.w3.org/1999/xhtml"{{ /if }}>
    {{ seo:sitemap_collections }}
        {{ collection from="{handle}" seo_noindex:isnt="true" as="results" }}
            {{ results }}
                <url>
                    <loc>{{ permalink }}</loc>
                    <lastmod>{{ updated_at format="Y-m-d"}}</lastmod>
                    <changefreq>{{ sitemap_change_frequency ? sitemap_change_frequency : 'weekly' }}</changefreq>
                    <priority>{{ sitemap_priority ? sitemap_priority : '0.5' }}</priority>
                    {{ if {locales:count} > 1 }}
                        {{ locales }}
                            <xhtml:link rel="alternate" hreflang="{{ locale:full }}" href="{{ permalink }}"/>
                        {{ /locales }}
                    {{ /if }}
                </url>
            {{ /results }}
        {{ /collection }}
    {{ /seo:sitemap_collections }}
</urlset>
