我一直在尝试遵循Google的多语言站点地图建议。然而,当我在我的网站上尝试时,我收到以下错误消息:
这是我一直在粘贴到验证器中的Google示例:
即使我将Google的示例粘贴到站点地图验证器中,我也会收到同样的错误。这里有什么我漏掉的吗?错误1845:元素'
{http://www.w3.org/1999/xhtml}link
':没有匹配的全局元素声明可用,但被严格通配符要求。
这是我一直在粘贴到验证器中的Google示例:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>http://www.example.com/english/</loc>
<xhtml:link
rel="alternate"
hreflang="de"
href="http://www.example.com/deutsch/"
/>
<xhtml:link
rel="alternate"
hreflang="de-ch"
href="http://www.example.com/schweiz-deutsch/"
/>
<xhtml:link
rel="alternate"
hreflang="en"
href="http://www.example.com/english/"
/>
</url>
<url>
<loc>http://www.example.com/deutsch/</loc>
<xhtml:link
rel="alternate"
hreflang="en"
href="http://www.example.com/english/"
/>
<xhtml:link
rel="alternate"
hreflang="de-ch"
href="http://www.example.com/schweiz-deutsch/"
/>
<xhtml:link
rel="alternate"
hreflang="de"
href="http://www.example.com/deutsch/"
/>
</url>
<url>
<loc>http://www.example.com/schweiz-deutsch/</loc>
<xhtml:link
rel="alternate"
hreflang="de"
href="http://www.example.com/deutsch/"
/>
<xhtml:link
rel="alternate"
hreflang="en"
href="http://www.example.com/english/"
/>
<xhtml:link
rel="alternate"
hreflang="de-ch"
href="http://www.example.com/schweiz-deutsch/"
/>
</url>
</urlset>