[ZPT] Why does this cause a page template to be invalid?(longish)

seb bacon seb@jamkit.com
Mon, 18 Mar 2002 22:03:59 +0000


Hi Geir,

I'm a fan of proper HTML too, but I think there's a bug here because of=20
the inconsistency.

Geir B=E6kholt wrote:
>>Don't know what's going on there, but I reduced it to a simpler test
>>case:
>>
>><p>
>>  <div>
>>
>>  </div>
>></p>

> The parser is behaving correct in this example (no bug), and the HTML
> in the example is broken. This has nothing to do with it being strict o=
r XHTML
> at all. The above is illegal markup , at least for HTML4.0 and later
> (my guess is that it is illegal in all versions of HTML)...

The reason I believe the parser has a bug is because the spec says=20
inline elements can't contain block elements, but:

 >> If you replace the <div>s with inline elements like <span>s,
 >> it works; if you use block elements like <table>, it doesn't.

I wouldn't object if the parser rejected <span><div></div></span> as=20
well as <p><div></div></p>, but it doesn't!

So the question is, is the bug that (a) the parser rejects the <p>=20
formulation, or (b) the parser *doesn't* reject the
<span> formulation?  Evan?

seb