ZF-6024: there is no xmlns declaration in XHTML and nothing may not be before DOCTYPE
Description
- The root element of the XHTML document must contain an xmlns declaration for the XHTML namespace. The namespace for XHTML is defined to be http://www.w3.org/1999/xhtml. The Zend Framework does not generate a root element correctly. An example root element might look like:
www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- 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.
Comments
Posted by Pádraic Brady (padraic) on 2009-09-17T15:25:06.000+0000
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.