Well-formed XML may have elements and attributes with the same names because there's nothing in the W3C Recommendation prohibiting it.
Valid XML may have elements and attributes with the same name if permitted by an associated schema (DTD, XSD, etc) because validity is function of the relationship between an XML document and a schema, not an intrinsic property of an XML document.