code: def findNamespaceURI(self, prefix, node):
          
          attrkey = (self.NS_XMLNS, prefix)
          DOCUMENT_NODE = node.DOCUMENT_NODE
          ELEMENT_NODE = node.ELEMENT_NODE
          while 1:
              if node is None:
                  raise DOMException('Value for prefix %s not found.' % prefix)
              if node.nodeType != ELEMENT_NODE:
                  node = node.parentNode
                  continue
              result = node._attrsNS.get(attrkey, None)
              if result is not None:
                  return result.value
              if hasattr(node, '__imported__'):
                  raise DOMException('Value for prefix %s not found.' % prefix)
              node = node.parentNode
              if node.nodeType == DOCUMENT_NODE:
                  raise DOMException('Value for prefix %s not found.' % prefix)
docs: Find a namespace uri given a prefix and a context node.