selecting all attributes in the document correctly