if name and found:
                found = found and n.hasAttribute('name') and n.getAttribute('name') == name