function addNamespace($nsName, $nsURI) { if (!array_key_exists($nsName, $this->namespaces)) { $this->namespaces[$nsName] = $nsURI; } }