def strip_attributes(*names):
    """ Strips all attributes with the keys provided as ``names`` from the element. """

    def handler(element, previous_result):
        for name in names:
            element.attrib.pop(name, None)
        return previous_result

    return handler