On Fri, 17 Jul 2009 00:29:42 +0200, Ian Hickson <i...@hixie.ch> wrote:
On Thu, 16 Jul 2009, Steven Pemberton wrote:
On Thu, 16 Jul 2009 10:50:52 +0200, Toby Inkster <t...@g5n.co.uk> wrote:
>
> For the same reason, xmlns:foo attributes aren't allowed in HTML4
> either.
Actually, to allow for future changes, the spec says:
"If a user agent encounters an attribute it does not recognize, it
should
ignore the entire attribute specification (i.e., the attribute and its
value)."
http://www.w3.org/TR/html401/appendix/notes.html#notes-invalid-docs
In other words, it should act as if it weren't there. So it is allowed,
but no meaning is defined.
So the following is valid HTML4?
Not valid, but permitted. I was going to say that you were confusing
document and processor, but your comments below indicate you know the
difference.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>Example</title>
</head>
<body marginheight="3">
<p lejhgaes="asflkahjsf">This is valid?</p>
</body>
</html>
(I disagree with your interpretation of that text, by the way; it is a
statement about user agents, not a statement about the conformance of
HTML
documents themselves. Requirements on user agents are not the same as
requirements on documents.)
I agree entirely. In fact one of my main problems with the HTML5 spec is
that it seems to conflate the two, but considering your statement above,
the problem must just be that it entwines the two.
But the HTML4 spec defines a document type, and says the processor for
that document type must accept certain deviations from that in order to
allow for future change. In other words the spec anticipated that other
document types would be sent in the future.
Best wishes,
Steven