doctype example



    public function unsetTraverser()
    {
        $this->traverser = null;

        return $this;
    }

    public function document($dom)
    {
        $this->doctype();
        if ($dom->documentElement) {
            foreach ($dom->childNodes as $node) {
                $this->traverser->node($node);
            }
            $this->nl();
        }
    }

    protected function doctype()
    {
        $this->wr(static::DOCTYPE);
        

    protected function markupDeclaration()
    {
        $tok = $this->scanner->next();

        // Comment:         if ('-' == $tok && '-' == $this->scanner->peek()) {
            $this->scanner->consume(2);

            return $this->comment();
        } elseif ('D' == $tok || 'd' == $tok) { // Doctype             return $this->doctype();
        } elseif ('[' == $tok) { // CDATA section             return $this->cdataSection();
        }

        // FINISH         $this->parseError('Expected <!--, <![CDATA[, or <!DOCTYPE. Got <!%s', $tok);
        $this->bogusComment('<!');

        return true;
    }

    
Home | Imprint | This part of the site doesn't use cookies.