Cannot tell what element owns an attribute · Issue #6 · w3c/dom
There is no way to link an attribute (Attr[1]) back to the element it is owned by - this seems a gap in the spec, as, for example, if you return Attr objects from an xpath query they do not contain...
GitHub