未定义链接上的命名空间前缀 xhtml - sitemap.xml [英] namespace prefix xhtml on link is not defined - sitemap.xml
本文介绍了未定义链接上的命名空间前缀 xhtml - sitemap.xml的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试将语言添加到我的 sitemap.xml 文件中,但出现未定义链接上的命名空间前缀 xhtml"错误.我如何定义它?我在谷歌上找不到任何有用的东西.
I am trying to add language to my sitemap.xml file, but I get a "namespace prefix xhtml on link is not defined" error. How do I defined it? I cannot find anything useful on 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
映射到存储架构的位置 http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd
.
Define the xmlns:xhtml
as given. Map the xmlns:xhtml
to a place, where the schema is stored http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd
.
这篇关于未定义链接上的命名空间前缀 xhtml - sitemap.xml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文