protected function getDocument()
    {
        if (null === $this->document) {
            $this->document = \DOMImplementation::createDocument(
                'http://www.w3.org/1999/xhtml',
                'html',
                \DOMImplementation::createDocumentType(
                    'html',
                    '-//W3C//DTD XHTML 1.0 Strict//EN',
                    'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'
                )
            );
        }

        return $this->document;
    }