【发布时间】:2015-01-27 12:26:46
【问题描述】:
这里是我的站点地图的结构:
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>somefile.xml</loc>
</sitemap>
</sitemapindex>
somefile.xml
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.google.com/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>[some url]</loc>
<link rel="alternate" hreflang="en" href="[some url]" />
<link rel="alternate" hreflang="en" href="[some url]?lang=en" />
<link rel="alternate" hreflang="fr" href="[some url]?lang=fr" />
<priority>1.00</priority>
</url>
这是谷歌的错误信息:
您的站点地图或站点地图索引文件未正确声明 命名空间。预期:http://www.sitemaps.org/schemas/sitemap/0.9 找到:http://www.w3.org/1999/xhtml 标签:urlset
我想我遗漏了一些东西,互联网上的信息令人困惑。什么是正确的语法?如果你能提供帮助,谢谢。
【问题讨论】:
标签: xml namespaces sitemap