def uriForPrefix(pre): pre = str(pre) ns = apirdflib.getNamespaces() for n in ns: pref, pth = n if pre == pref: return pth log.error("Requested unknown prefix %s:" % pre) return None
def uriForPrefix(pre): pre = str(pre) ns = apirdflib.getNamespaces() for n in ns: pref, pth = n if pre == pref: return pth log.warning("Requested unknown prefix %s:" % pre) return None
def prefixFromUri(uri): uri = str(uri) ns = apirdflib.getNamespaces() for n in ns: pref, pth = n if uri.startswith(str(pth)): return pref log.error("Requested unknown namespace uri %s" % uri) return None
def prefixFromUri(uri): uri = str(uri) ns = apirdflib.getNamespaces() for n in ns: pref, pth = n if uri.startswith(str(pth)): return pref log.warning("Requested unknown namespace uri %s" % uri) return None