def getNamespace(self, prefix):
namespace = None<EOL>if prefix == '<STR_LIT>':<EOL><INDENT>namespace = DOM.findDefaultNS(prefix, self.__node)<EOL><DEDENT>else:<EOL><INDENT>try:<EOL><INDENT>namespace = DOM.findNamespaceURI(prefix, self.__node)<EOL><DEDENT>except DOMException as ex:<EOL><INDENT>if prefix != '<STR_LIT>':<EOL><INDENT>raise SchemaError('<STR_LIT>'%(prefix, self.__node._get_tagName()))<EOL><DEDENT>namespace = XMLNS.XML<EOL><DEDENT><DEDENT>return namespace<EOL>
prefix -- deference namespace prefix in node's context.
           Ascends parent nodes until found.