public function resolveNamespace($shortNs)
    {
        if (!($this->dom instanceof \DOMDocument)) {
            throw new RuntimeException("DOM is not initialized");
        }

        if (!is_array($this->namespaces)) {
            $this->namespaces = $this->getDocNamespaces($this->dom);
        }

        if (array_key_exists($shortNs, $this->namespaces)) {
            return $this->namespaces[$shortNs];
        } else {
            return $shortNs;
        }
    }