W3C home > Mailing lists > Public > www-validator@w3.org > February 2010

Re: Custom attributes in HTML elements

From: Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no>
Date: Fri, 12 Feb 2010 11:31:58 +0100
To: "Jukka K. Korpela" <jkorpela@cs.tut.fi>
Cc: Claudia Murialdo <cmurialdo@gmail.com>, www-validator@w3.org
Message-ID: <20100212113158932937.d15a156f@xn--mlform-iua.no>
Jukka K. Korpela, Fri, 12 Feb 2010 06:17:49 +0200:
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
>   "http://www.w3.org/TR/html4/loose.dtd"
>   [ <!ATTLIST P foo         CDATA     #IMPLIED ]>
> 
> 
> And you document would validate. 

Could you check if you used the correct syntax above? I Don't get the 
above to validate. Did you misplace the first "[", perhaps? Or the last 
one?

  ....
> However (and now I vaguely remember why I haven't used this nicer 
> approach), 
  ...
> The problem here is that browsers don't even _parse_ DOCTYPE 
> declarations properly: they'll take "] >" as document content and 
> display them at the start of the page. This happens even in IE 8 and 
> Firefox 3.5, so it won't ever change.


The only Web browser that is close to revealing what you showed above, 
is Firefox, which places "ATTLIST P foo CDATA #IMPLIED ]" into what I 
think HTML5 calls a "bogus comment" inside the BODY element. I tested 
this in the Live DOM viewer.
-- 
leif halvard silli
Received on Friday, 12 February 2010 10:32:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:39 GMT