def _node_name(node): name = name_cache.get(node.schema) if name is None: if strip_prefixes: name = c2str(node.schema.name) else: mod = lib.lyd_node_module(node) name = "%s:%s" % (c2str(mod.name), c2str(node.schema.name)) name_cache[node.schema] = name return name
def module(self) -> Module: mod = lib.lyd_node_module(self.cdata) if not mod: raise self.context.error("cannot get module") return Module(self.context, mod)
def module(self): mod = lib.lyd_node_module(self._node) if not mod: raise self.context.error('cannot get module') return Module(self.context, mod)