----- Original Message -----
From: "Lachlan Hunt" <[EMAIL PROTECTED]>
To: "Andrew Fedoniouk" <[EMAIL PROTECTED]>
Cc: "Ian Hickson" <[EMAIL PROTECTED]>; "Anne van Kesteren"
<[EMAIL PROTECTED]>; "WHATWG" <[EMAIL PROTECTED]>
Sent: Monday, August 28, 2006 11:05 PM
Subject: Re: [whatwg] href on any element
Andrew Fedoniouk wrote:
Ian Hickson wrote:
<a href="">
<h2>...</h2>
<p>...</p>
</a>
If we will change model of A from
<!ELEMENT A - - (%inline;)* -(A) -- anchor -->
to something else then it will create implications for parser.
What implications? Changing the formal content model of an element
doesn't change the way a parser needs to work. Ian's example above is
very similar to some real world examples I've seen and browser's already
handle it just fine.
These are non-conformant browsers :)
A simply cannot have content other than inline constructions.
What UA should do in this case is not specified. Using this
is as bad as violation of following:
"The P element represents a paragraph. It cannot
contain block-level elements (including P itself)."
We all can see that browsers that just ignore this rule. And where are we
now?
The DOM looks like this:
A
+-H2
+ P
And what is semantical meaning of that? Some hyperlinked section?
If yes then let it be just :
<section href="...">
<h2>...
<p>...
</section>
Andrew Fedoniouk.
http://terrainformatica.com