link 上的命名空间前缀 xhtml 未定义 - sitemap.xml
namespace prefix xhtml on link is not defined - sitemap.xml
我正在尝试将语言添加到我的 sitemap.xml 文件中,但出现 "namespace prefix xhtml on link is not defined" 错误。我如何定义它?我在 google.
上找不到任何有用的东西
这是文件:
<?xml version="1.0" encoding="UTF-8"?>
<urlset
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
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">
<!-- created with Free Online Sitemap Generator www.xml-sitemaps.com -->
<url>
<loc>https://www.leepio.dk/</loc>
</urlset>
这样就可以了。
改变
<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/1999/xhtml 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/1999/xhtml"
>
说明
定义给定的 xmlns:xhtml
。将 xmlns:xhtml
映射到存储模式的位置 <a href="http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd" rel="noreferrer">http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd</a>
.
我正在尝试将语言添加到我的 sitemap.xml 文件中,但出现 "namespace prefix xhtml on link is not defined" 错误。我如何定义它?我在 google.
上找不到任何有用的东西这是文件:
<?xml version="1.0" encoding="UTF-8"?>
<urlset
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
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">
<!-- created with Free Online Sitemap Generator www.xml-sitemaps.com -->
<url>
<loc>https://www.leepio.dk/</loc>
</urlset>
这样就可以了。
改变
<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/1999/xhtml 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/1999/xhtml"
>
说明
定义给定的 xmlns:xhtml
。将 xmlns:xhtml
映射到存储模式的位置 <a href="http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd" rel="noreferrer">http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd</a>
.