[whatwg] <p> elements containing other block-level elements

On Apr 7, 2005, at 04:07, Ian Hickson wrote:

> One thing that XHTML2 does which makes a lot of sense to me is allow
> nesting of certain elements within <p> elements, as in:

I'd agree that would be nice to allow if there was no HTML legacy.

> I'm trying to work out exactly what the rules that describe the above
> actually are, but I'm interested in hearing whether people agree or
> disagree with my "good" and "bad" examples above. I'm especially
> interested in what use cases I may have missed (please don't say "I 
> think
> this should be allowed" without giving a real-world example), and 
> whether
> anyone thinks any of the cases I think should be allowed should not.

The problem with allowing the HTML flavor and XHTML flavor diverge is 
that one could no longer use HTML and XHTML serializations 
interchangeably in apps that do not suffer from the HTML DOM legacy and 
otherwise could treat the HTML-XHTML distinction as something you deal 
with on the IO boundary.

I use Java XML tools for producing HTML. I use XHTML internally and 
serialize as HTML. This works great with XHTML 1.0 and HTML 4.01. If 
the HTML flavor of What WG HTML and the XHTML flavor diverge, I'd need 
to spec that only an HTML-compatible subset of What WG XHTML that 
doesn't nest elements in ways prohibited on the text/html side may be 
put into an app that outputs text/html.

I don't know whether this is a reason enough not to allow the XHTML 
flavor diverge, but I think there is a need to at least specifically 
flag anything that is not text/html-compatible.

-- 
Henri Sivonen
hsivonen at iki.fi
http://hsivonen.iki.fi/

Received on Thursday, 7 April 2005 09:51:13 UTC