public function setXmlDeclaration($xmldec, $called_from_macro)
    {
        // FIXME
        if (!$this->_xmlDeclaration) {
            $this->_xmlDeclaration = $xmldec;
        }

        if ($this->_parentContext) {
            $this->_parentContext->setXmlDeclaration($xmldec, $called_from_macro);
        } else if ($this->_echoDeclarations) {
            if (!$called_from_macro) {
                echo $xmldec."\n";
            } else {
                throw new PHPTAL_ConfigurationException("Executed macro in file with XML declaration when using echoExecute(). This is not supported yet. Remove XML declaration or use PHPTAL->execute().");
            }
        } else if (!$this->_xmlDeclaration) {
            $this->_xmlDeclaration = $xmldec;
        }
    }