'Match by (optional) name and/or (optional) namespace.
@param name: The optional element tag name.
@type name: str
@param ns: An optional namespace.
@type ns: (I{prefix}, I{name})
@return: True if matched.
@rtype: boolean'

def match(self, name=None, ns=None):

    if (name is None):
        byname = True
    else:
        byname = (self.name == name)
    if (ns is None):
        byns = True
    else:
        byns = (self.namespace()[1] == ns[1])
    return (byname and byns)
