Eclipse 和微数据错误 ("Undefined attribute name")

Eclipse and Microdata errors ("Undefined attribute name")

我正在使用:版本:Mars.2 Release (4.5.2) 用于 JSP / HTML5 开发,目前收到关于微数据属性的警告,例如:

Multiple annotations found at this line:

  • Undefined attribute name (itemtype).
  • Undefined attribute name (itemscope).

我知道可以禁用警告,但我喜欢将它们用于其他属性。 Eclipse 中是否存在阻止它正确识别微数据的错误?

示例:

    <article class="col-sm-4">
        <h4><i class="fa fa-envelope text-accent"></i> Mail</h4>
        <address>
          <span itemscope="" itemtype="http://schema.org/Organization">
              <span itemprop="name">Customer Service</span><br>
              <span itemprop="name">Company Name</span><br>
              <span itemprop="address" itemscope="" itemtype="http://schema.org/PostalAddress">
                  <span itemprop="street-address">P.O. Box 555</span><br>
                  <span itemprop="addressLocality">Union</span>, <span itemprop="ddressRegion">NJ</span> <span itemprop="postalCode">07083</span><br>
            </span>
          </span>
        </address>              
    </article>

您可以让 Eclipse 忽略您选择的属性名称,方法是在逗号分隔的列表中输入它们。

为此,请导航至工作区设置。菜单路径为:Project->Properties

这将打开项目的Properties window。在此 window 的左侧展开 "Validation" 部分,然后单击 "HTML Syntax"。现在 "HTML Syntax" 已突出显示,单击位于 window.
Project Properties window

This will open the "Preferences" window for the Workspace filtered to HTML Validation section. Check the "Ignore specified attribute names in validation" check box and add in the attribute names you want Eclipse to ignore during the validation process.
Workspace Settings window[= 右上角的 "Configure Workspace Settings" link 13=] 我正在为 PHP 开发人员

使用 Eclipse

版本:Luna Service Release 2 (4.4.2)