Attribute redefined

The same attribute appears twice on one element.

The message, as the validator reports it
Attribute id redefined

Why it happens

  • A duplicated attribute after a merge or copy and paste.
  • Code that adds an attribute without checking whether it is already set.

How to fix it

Keep one of them. If both values matter, they belong in different attributes or in child elements.

Example

Reports the error
<item id="1" id="2"/>
Fixed
<item id="1"/>