我正在尝试验证我的网站 Hybrid.cz在 W3C 验证器中。不幸的是,由于“DOCTYPE 声明中的公共(public)标识符和系统标识符之间不匹配”,它一直显示相同的错误。它说:
This document uses an inconsistent DOCTYPE declaration. The System Identifier w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd declares the XHTML 1.0 Transitional document type, but the associated Public Identifier -//W3C//DTD XHTML+RDFa 1.0 Transitional//EN does not match this document type.
The recommended Public Identifier for w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd is -//W3C//DTD XHTML 1.0 Transitional//EN.
我的 DOCTYPE 是:
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML+RDFa 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
我对 DOCTYPES 不是很熟悉。但我希望能够在站点内使用 RDFa 属性。我该怎么办?
最佳答案
您找到一个 DTD,它支持您想使用的混合 XML 语言,然后为它查找正确的 Doctype。
Searching出现 XHTML+RDFa 1.1 - Second Edition规范。
这表明 Doctype 是:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN"
"http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd">
关于xhtml - Website W3C validator 显示 "Mismatch between Public and System identifiers in the DOCTYPE declaration",怎么办?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26378776/