glez
glez

Reputation: 1214

Eclipse and Microdata errors ("Undefined attribute name")

I'm using: Version: Mars.2 Release (4.5.2) for JSP / HTML5 development and currently receiving warnings on Microdata attributes such as:

Multiple annotations found at this line:

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

I know the warnings can be disabled but I like them in place for other attributes. Is there a bug in Eclipse that prevents it from properly recognizing the Microdata?

Example:

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

Upvotes: 2

Views: 3045

Answers (1)

jnutt
jnutt

Reputation: 46

You can have Eclipse ignore attribute names of your choosing by entering them in a comma separated list.

To do this, navigate to Workspace settings. Menu path is: Project->Properties

This will open the Properties window for the project. In the left hand side of this window expand the "Validation" section, next, click on "HTML Syntax". Now that "HTML Syntax" is highlighted, click on the "Configure Workspace Settings" link located on the upper right hand side of the 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

I am using Eclipse for PHP Developers

Version: Luna Service Release 2 (4.4.2)

Upvotes: 3

Related Questions