'Verifies that the specified attribute matches ``expected``.
This keyword works exactly like `Element Attribute Should Be` except
that the expected value can be given as a pattern that the attribute of
the element must match.
Pattern matching is similar as matching files in a shell, and it is
always case-sensitive. In the pattern, \'*\' matches anything and \'?\'
matches any single character.
Examples using ``${XML}`` structure from `Example`:
| Element Attribute Should Match | ${XML} | id | ?   | xpath=first |
| Element Attribute Should Match | ${XML} | id | c*d | xpath=third/second |'

def element_attribute_should_match(self, source, name, pattern, xpath='.', message=None):

    attr = self.get_element_attribute(source, name, xpath)
    if (attr is None):
        raise AssertionError(("Attribute    '%s'    does    not    exist." % name))
    should_match(attr, pattern, message, values=False)
