public function registerNamespace($prefix, $namespace)
{
$prefix = $this->validatePrefix($prefix);
if (isset($this->_reserved[$prefix])) {
throw new \LogicException(sprintf('Can not register reserved namespace prefix "%s".', $prefix));
}
$this->_namespaces[$prefix] = $namespace;
if (isset($this->_xpath) && $prefix !== '#default') {
$this->_xpath->registerNamespace($prefix, $namespace);
}
}