ZF-6024: there is no xmlns declaration in XHTML and nothing may not be before DOCTYPE


  1. The root element of the XHTML document must contain an xmlns declaration for the XHTML namespace. The namespace for XHTML is defined to be The Zend Framework does not generate a root element correctly. An example root element might look like:" xml:lang="en" lang="en">

  1. In the case of XHTML is not generated the XML declaration (<?xml version="1.0" encoding="UTF-8"?>). Cite from W3C: "An XML declaration is not required in all XML documents; however XHTML document authors are strongly encouraged to use XML declarations in all their documents. Such a declaration is required when the character encoding of the document is other than the default UTF-8 or UTF-16 and no encoding was determined by a higher-level protocol. Here is an example of an XHTML document. In this example, the XML declaration is included."

Best regards.


The html element is not generated by the framework but added to the view, either a template or layout, by the developer and/or web designer. You may verify the source of the element by examining these.