'Add this namespace URI to the mapping, without caring what
alias it ends up with'

def add(self, namespace_uri):

    alias = self.namespace_to_alias.get(namespace_uri)
    if (alias is not None):
        return alias
    i = 0
    while True:
        alias = ('ext' + str(i))
        try:
            self.addAlias(namespace_uri, alias)
        except KeyError:
            i += 1
        else:
            return alias
    assert False, 'Not    reached'
