I would like the page at the following url to validate as HTML 4.01 strict:
http://ataru.gomen.org/files/test.html
The page pops up a window whose markup does validate as HTML 4.01
strict according to the W3C's validator. However, the markup on the
page itself is rejected by the validator, because it stumbles on the
script that writes the markup for the popped-up window. Is there
something I'm missing here, or is this just a limitation of the W3C's
validator?
The file is
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
<!-- Hide script if browser does not support it.
function foo() {
var aWin=open();
aWin.document.open();
var txt='';
txt+="<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n";
txt+="\n";
txt+="<html>\n";
txt+=" <head>\n";
txt+=" <title>Popup</title>\n";
txt+=" <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n";
txt+=" </head>\n";
txt+=" <body>\n";
txt+=" <h1>This is a popup.</h1>\n";
txt+=" </body>\n";
txt+="</html>\n";
aWin.document.write( txt );
aWin.document.close();
}
//-->
</script>
</head>
<body onload="foo()">
<h1>Hello, world!</h1>
</body>
</html>
--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.