我正在使用simple real estate website W3C验证器在剪切和粘贴Creative Commons许可证时给出了以下错误:
Error Line 121, Column 279: *Attribute xmlns:dct not allowed here.*
…rl.org/dc/terms/" property="dct:title">Bangalore Property Buy</span> by <a xml…
Warning Line 121, Column 279: *Attribute with the local name xmlns:dct is not serializable as XML 1.0.*
…rl.org/dc/terms/" property="dct:title">Bangalore Property Buy</span> by <a xml…
Error Line 121, Column 457: *Attribute xmlns:cc not allowed here.*
…tributionName" rel="cc:attributionURL">IndiranagarSeller@-ignore-this-gmail.co…
Warning Line 121, Column 457: *Attribute with the local name xmlns:cc is not serializable as XML 1.0.*
…tributionName" rel="cc:attributionURL">IndiranagarSeller@-ignore-this-gmail.co…
我该如何解决这个问题以及错误意味着什么?
答案 0 :(得分:1)
您需要切换到XHTML并更改DOCTYPE
以使用RDF的DTD。
然后,您的HTML文档将以以下内容开头:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"
"http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
<html version="XHTML+RDFa 1.0" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
但是,如果进行此更改,您可能会遇到进一步的验证问题。