Bug #19038
closedtemplate->startPage returns invalid XHTML
0%
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)