473,388 Members | 1,480 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

4.01 strict validation problem

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.
Jul 23 '05 #1
2 1411
On Fri, 1 Oct 2004 16:23:31 +0000 (UTC), Christopher Benson-Manica
<at***@nospam.cyberspace.org> wrote:
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


The validator result page gave you a link in the explanation which leads
to this solution. It was two clicks away the whole time.

Replace all </ instances in the script with <\/ and you're fixed up.
Jul 23 '05 #2
Neal <ne*****@yahoo.com> spoke thus:
The validator result page gave you a link in the explanation which leads
to this solution. It was two clicks away the whole time.
Eeyeesh, so it was... *smack*
Replace all </ instances in the script with <\/ and you're fixed up.


Thank you. (Note to self: the little blue things are "links". Use
them next time...)

--
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.
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Jonny | last post by:
How can you validate Javascript generated HTML for XHTML 1.0 strict compliance? To avoid the "<" and "&" problem, all inline scripts MUST be enclosed with either: <!-- script --> Looked down...
59
by: Philipp Lenssen | last post by:
I've tested some of the new Nokia 6600 functionality. It ships with WAP2 and XHTML Support (it says). What it does is check the Doctype -- if it's not the XHTML Mobile Profile Doctype, but a...
13
by: Spartanicus | last post by:
I've been thinking about using a custom "stricter" local HTML 4.01 Strict DTD for the purpose of local validation. That way I wouldn't have to change my doctype, my documents would still adhere to...
41
by: CMAR | last post by:
What are the pluses and minuses of constructing and validating between XHTML Transitional vs. HTLM 4.01 Strict Thanks, CMA
3
by: Robert Smith | last post by:
I have a very basic form validation script, which wont work due to XHTML Strict not allowing me to use the name attribute on a form. Here is part of my code: if...
9
by: rbronson1976 | last post by:
Hello all, I have a very strange situation -- I have a page that validates (using http://validator.w3.org/) as "XHTML 1.0 Strict" just fine. This page uses this DOCTYPE: <!DOCTYPE html PUBLIC...
2
by: PapaRandy | last post by:
Hello, I am trying to validate the following .py webpage as HTML (through W3C). I put: ----------------------------------------------------------------------------- print "Content-type:...
2
by: Bruno Schneider | last post by:
I've seen this page, that seems invalid to me. Doctype is incomplete and it does not have a <bodytag. However, W3C validator validates it as HTML 4.01 strict, even when I force the DOCTYPE. I think...
92
by: Erwin Moller | last post by:
Hi group, I encoutered page validation error, but I don't know a way around. The page has the following doctype: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.