addAttribute generates a warning if the attribute already exists