def METHOD_NAME(self, root, ns):
    """
    Match by I{targetNamespace} excluding those that
    are equal to the specified namespace to prevent
    adding an import to itself.
    @param root: A schema root.
    @type root: L{Element}
    """
    tns = root.get('targetNamespace')
    if len(self.tns):
        matched = ( tns in self.tns )
    else:
        matched = 1
    itself = ( ns == tns )
    return ( matched and not itself )