Date: Sun, 7 Dec 1997 19:40:32 +1100 (EST) From: Alexandre Rafalovitch <email@example.com.EDU.AU> To: firstname.lastname@example.org Message-ID: <Pine.SOL.3.95.971207192903.26097C-100000@sally> Subject: Fun with ignorable whitespace definition. Consider how the following html will be parsed. <html> <title>Title text</title> <meta foo=bar> Now we have the body. </html> In here, we have some whitespace after </title>. It is not quite ignorable, so it should be treated as text. Therefore, it should close the head element and start body element. As a result, 'meta' would go into the body and not the head and will be ignored. That presents IMHO a problem, since the meaning was clearly to ignore all whitespace in the head, but having optional end of head and optional start for body messes it up. On another hand, parser cannot just ignore that whitespace as it does not know (in a generic html parsing world) if content of html (or head) can be displayed and CSS might declare it to have non-collapsable whitespace (like in PRE). It looks to me, that either this requires a heavy special case or html4 draft is missing a section on how a whitespace treated in non-displayable optional start/end elements... :=} I hope I am missing something, because it sure got me thinking. :-} Regards, Alex.