【问题标题】:Undefined attribute name (xmlns)未定义的属性名称 (xmlns)
【发布时间】:2012-09-16 23:04:07
【问题描述】:

这是我的 HTML 页面的开头:

1. <?xml version="1.0" encoding="utf-8" ?>
2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3. <html xmlns="http://www.w3.org/1999/xhtml" lang="fr">
4.     (...)
5. </html>

无论有没有&lt;?xml ... ?&gt; 部分,Eclipse 都会在 第 3 行

向我返回一个警告事件

未定义的属性名称(xmlns)。

这个xmlns 属性是正确验证所必需的,所以我不明白为什么 Eclipse 会返回警告。

此外,我正在使用 Eclipse Indigo 3.7.2 和 Eclipse 数据库中的最后一个 PHP 开发工具。

任何人都知道如何删除此警告,或找到跳过此警告的方法?

感谢您的阅读和帮助。

【问题讨论】:

    标签: html xml eclipse sdk html-validation


    【解决方案1】:

    这里有类似案例的错误:https://bugs.eclipse.org/bugs/show_bug.cgi?id=313859

    <?xml version="1.0" encoding="utf-8" ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="fr">
    <head>
    <title>Title of the document</title>
    </head>
    
    <body>
    <div>The content of the document.</div>
    </body>
    
    </html> 
    

    应该验证。在 Eclipse Juno 和此处验证良好:http://validator.w3.org

    【讨论】:

      猜你喜欢
      • 2016-05-18
      • 2023-02-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-02-01
      • 2019-01-31
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多