Bug #19038
template->startPage returns invalid XHTML
Status: | Resolved | Start date: | 2008-06-30 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Christian Kuhn | % Done: | 0% |
|
Category: | - | Spent time: | - | |
Target version: | - | |||
TYPO3 Version: | 4.2 | Is Regression: | ||
PHP Version: | 5.2 | Sprint Focus: | ||
Complexity: |
Description
The doctype header of template->docType='xhtml_trans' does not produce valid xhtml markup in template->startPage().
template->docType="xhtml_trans"
template->startPage('foo');
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
.....
W3 validator returns:
Line 7, Column 1: Missing xmlns attribute for element html. The value should be: http://www.w3.org/1999/xhtml
<html>
Many Document Types based on XML need a mandatory xmlns="" on the root element. For example, the root element for XHTML will look like:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
Line 4, Column 5: XML Parsing Error: XML declaration allowed only at the start of the document .
(issue imported from #M8861)
Related issues
History
#1 Updated by Christian Kuhn over 6 years ago
Resolved as duplicate of #16033