function __construct($output, $log_level = self::LOG_PROTOCOL) { parent::__construct($output, $log_level); /* reverse-map the DTD */ $dtd = array(); foreach ($this->_dtd['namespaces'] as $nsid => $nsname) { $dtd['namespaces'][$nsname] = $nsid; } foreach ($this->_dtd['codes'] as $cp => $value) { $dtd['codes'][$cp] = array(); foreach ($this->_dtd['codes'][$cp] as $tagid => $tagname) { $dtd['codes'][$cp][$tagname] = $tagid; } } $this->_dtd = $dtd; }