Re: strike, s, u tags OK in strict DTD?

I'll preface this by saying that I understand that HTML-Tidy is not
a "validator" per se.  But it does make an "educated guess" (see the
description of the "doctype" config option).  So all I'm saying
below is that Tidy could use a bit of "re-educating" ;).

"Parsons, Rick" wrote:
> 
> That is because <S> <U> and <STRICT> are deprecated in strict HTML 4.0. If
> you want to use them, you will have to change the DTD to the loose version

No, no, that's not my point.  I *don't* want to use them.  I didn't
think they were OK in strict 4.0 (hence the ? in the subject).  My 
point is that Tidy seems to think that they *are* OK.  Here's a 
capture of Tidy on a test file:

==============================
[C:/Temp/html] tidy strike.htm

Tidy (vers 26th July 1999) Parsing "strike.htm"

"strike.htm" appears to be HTML 4.0
no warnings or errors were found

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<title>testing ability to catch strike, s, u</title>
</head>
<body>
<p><strike>This is one way</strike></p>

<p><s>Here's another way to do it</s></p>

<p><u>This should be underlined</u></p>
</body>
</html>

[C:/Temp/html]
==============================

Note: I had no DTD reference in the original Document.  Tidy thinks
it's HTML 4.0 strict.  I'm trying to make sure all of my docs have
*valid* DTD references, otherwise I wouldn't mind.  If I add the
above DOCTYPE line to the file, it doesn't change Tidy's response.

For any of the other deprecated elements I get a warning:
"line 10 column 1 - Warning: html doctype doesn't match content"
if I try to reference HTML 4.0.  Otherwise it thinks (correctly)
that they're OK in 3.2.  Not for strike, s, and u, however -- it
seems to think these are fine in HTML 4.0 strict.

It's not a terribly big deal -- I can grep for the offending tags 
in the documents that come back as HTML 4.0, or I can try to get
an SGML parser to do the validation (the files aren't on the 
internet, or I'd use validator.w3.org).  But I thought people
should be aware that Tidy may say your file "appears to be" 4.0 
strict, when it isn't.

Zac

-- 
Zac Thompson           [mailto:zthompson@mks.com]
Mortice Kern Systems Inc.    [http://www.mks.com]
185 Columbia St. W. Waterloo, ON, Canada, N2L 5Z5

Received on Friday, 24 September 1999 11:20:32 UTC