'Odfpy maintains a list of known namespaces. In some cases we have a namespace URL,
and needs to look up or assign the prefix for it.'

def get_nsprefix(self, namespace):

    if (namespace is None):
        namespace = ''
    prefix = _nsassign(namespace)
    if (not self.namespaces.has_key(namespace)):
        self.namespaces[namespace] = prefix
    return prefix
