Re: xmlns in HTML5 (was: Telecon Agenda- Thursday 1500 UTC)

On Thu, 16 Jul 2009, Steven Pemberton wrote:
> On Thu, 16 Jul 2009 10:50:52 +0200, Toby Inkster <tai@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?

   <!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>

Why does the HTML validator complain about those attributes, if so?

(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.)

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Thursday, 16 July 2009 22:30:20 UTC