Re: DTD problem, or validator problem?

Tim Bagot wrote:
> <empty/> is terminated in XML by the '>', but in SGML by the '/',
> so that the '>' is interpreted as character data,


ahh.... I see.

So, in an HTML 4.01 document,

    <hr />

*should* be interpreted as a horizontal rule element followed by an
(improperly) unescaped greater than sign?

In that case, shouldn't the validator be giving an error that I've got
unescaped greater than signs in the body of the HTML?

I had originally thought that the bug was in how the validator (or DTD)
dealt with empty containers in the HEAD. Based on your explanation of
that behvavior, it would seem that if it's doing the right thing in the
HEAD, then it isn't doing the right thing in the BODY. If I'm following
you, it sounds like *neither* of my two examples should validate.

...or am I still missing something here? Is the escaping of [<>"&] not a
part of the DTD, but one of those things which is specified in non-DTD
fashion in accompanying text or something, and therefor not something
the validator can conveniently address?

-matt



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html><head><title>This is OK by the Validator</title>
    <meta http-equiv="Keywords" name="Keywords" content="no slash">
</head><body><br /><hr /></body></html>




<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html><head><title>This is *NOT* OK by the Validator</title>
    <meta http-equiv="Keywords" name="Keywords" content="slash" />
</head><body><br /><hr /></body></html>

Received on Thursday, 16 August 2001 08:51:11 UTC