namespace prefix xhtml on link is not defined - sitemap.xml

前端 未结 1 771
长发绾君心
长发绾君心 2021-02-05 18:25

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 go

相关标签:
1条回答
  • 2021-02-05 18:51

    This would do the work.

    Change

    <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"   
    >
    

    Explanation

    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.

    0 讨论(0)
提交回复
热议问题