def METHOD_NAME(self, name=None, ns=None):
    """
    Match by (optional) name and/or (optional) namespace.
    @param name: The optional attribute tag name.
    @type name: str
    @param ns: An optional namespace.
    @type ns: (I{prefix}, I{name})
    @return: True if matched.
    @rtype: boolean
    """
    byname = name is None or (self.name == name)
    byns = ns is None or (self.namespace()[1] == ns[1])
    return byname and byns