Repository: gohugoio/hugo (language: go)

Issue:
sitemap.xml as a plain text - bug in declaration in urlset
<!-- Please answer these questions before submitting your issue. Thanks! -->

### What version of Hugo are you using (`hugo version`)?

<pre>
$ hugo version
hugo v0.104.3-58b824581360148f2d91f5cc83f69bd22c1aa331+extended linux/amd64 BuildDate=2022-10-04T14:25:23Z VendorInfo=gohugoio
</pre>

### Does this issue reproduce with the latest release?
I found bug in default sitemap template (for multilingial sites)
After generate sitemap (i.e https://example.org/en/sitemap.xml) and open it in browser - you see xml as a plain text, because urlset declaration is not valid 

### Solution
You need add to sitemap.xml template in urlset tag this declarations:
`<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd http://www.w3.org/TR/xhtml11/xhtml11_schema.html http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/TR/xhtml11/xhtml11_schema.html">`


Discussion / hints:
The problem is a 301 redirect with:

```
http://www.w3.org/1999/xhtml
```

```
wget http://www.w3.org/1999/xhtml
```

> --2022-12-09 15:20:18--  http://www.w3.org/1999/xhtml
Resolving www.w3.org (www.w3.org)... 104.18.23.19, 104.18.22.19, 2606:4700::6812:1613, ...
Connecting to www.w3.org (www.w3.org)|104.18.23.19|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://www.w3.org/1999/xhtml [following]
--2022-12-09 15:20:18--  https://www.w3.org/1999/xhtml
Connecting to www.w3.org (www.w3.org)|104.18.23.19|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://www.w3.org/1999/xhtml/ [following]
--2022-12-09 15:20:18--  https://www.w3.org/1999/xhtml/
Reusing existing connection to www.w3.org:443.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘xhtml’



Fix patch:
diff --git a/tpl/tplimpl/embedded/templates/_default/sitemap.xml b/tpl/tplimpl/embedded/templates/_default/sitemap.xml
index cdb3748e862..5d9448063ae 100644
--- a/tpl/tplimpl/embedded/templates/_default/sitemap.xml
+++ b/tpl/tplimpl/embedded/templates/_default/sitemap.xml
@@ -1,6 +1,6 @@
 {{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
-<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
-  xmlns:xhtml="http://www.w3.org/1999/xhtml">
+<urlset xmlns="https://www.sitemaps.org/schemas/sitemap/0.9"
+  xmlns:xhtml="https://www.w3.org/1999/xhtml">
   {{ range .Data.Pages }}
     {{- if .Permalink -}}
   <url>
diff --git a/tpl/tplimpl/embedded/templates/_default/sitemapindex.xml b/tpl/tplimpl/embedded/templates/_default/sitemapindex.xml
index 01cf65bc598..616f4772900 100644
--- a/tpl/tplimpl/embedded/templates/_default/sitemapindex.xml
+++ b/tpl/tplimpl/embedded/templates/_default/sitemapindex.xml
@@ -1,5 +1,5 @@
 {{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
-<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
+<sitemapindex xmlns="https://www.sitemaps.org/schemas/sitemap/0.9">
   {{ range . }}
   <sitemap>
     <loc>{{ .SitemapAbsURL }}</loc>


Test patch:
diff --git a/hugolib/minify_publisher_test.go b/hugolib/minify_publisher_test.go
index 03b46a5fe7e..189dc463fb2 100644
--- a/hugolib/minify_publisher_test.go
+++ b/hugolib/minify_publisher_test.go
@@ -59,5 +59,5 @@ func TestMinifyPublisher(t *testing.T) {
 	b.AssertFileContent("public/index.xml", "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?><rss version=\"2.0\" xmlns:atom=\"http://www.w3.org/2005/Atom\"><channel><title/><link>https://example.org/</link>")
 
 	// Sitemap
-	b.AssertFileContent("public/sitemap.xml", "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?><urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\" xmlns:xhtml=\"http://www.w3.org/1999/xhtml\"><url><loc>h")
+	b.AssertFileContent("public/sitemap.xml", "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?><urlset xmlns=\"https://www.sitemaps.org/schemas/sitemap/0.9\" xmlns:xhtml=\"https://www.w3.org/1999/xhtml\"><url><loc>h")
 }