Bug #19038

template->startPage returns invalid XHTML

Added by Christian Kuhn about 7 years ago. Updated over 6 years ago.

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

related to Core - Bug #15617: template->docType is not compatible with IE Resolved 2006-02-13
duplicates Core - Bug #16033: Login-Page (typo3/index.php): removing whitespace precedi... Resolved 2006-04-12

History

#1 Updated by Christian Kuhn over 6 years ago

Resolved as duplicate of #16033

Also available in: Atom PDF