W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2008

[whatwg] Handling <title> inside <body>

From: Simon Pieters <simonp@opera.com>
Date: Mon, 10 Nov 2008 15:43:24 +0100
Message-ID: <op.ukeq6m18idj3kv@zcorpandell.linkoping.osa>
On Mon, 10 Nov 2008 15:31:48 +0100, Tommy Thorsen <tommy at kvaleberg.com>  
wrote:

> Simon Pieters wrote:
>>> The description of the title element in the spec ("4.2.2 The title  
>>> element") says:
>>>
>>>     Contexts in which this element may be used:
>>>         In a head element containing no other title elements.
>>>
>>> I don't care very strongly about whether or not title elements are  
>>> allowed anywhere, but I do think the output of the parsing algorithm  
>>> should be valid html according to the rest of the spec.
>>
>> Why?
>>
> Hmm. Good question. If not, then why do we do foster parenting at all?

For Web compat. It's what browsers do. (IE and Opera don't foster parent  
but have magic <caption>-like elements around non-table content which  
makes it render pretty much the same.)


>  From an implementors point of view, it's good to have clearly defined  
> boundaries between modules. An implementation would typically have one  
> module that tokenises and parses html and one module that renders the  
> resulting dom to the screen. If all the unexpected input is dealt with  
> in the parsing module, then you can make some assumptions in the  
> rendering module which can greatly simplify the implementation. Having  
> to deal with an arbitrary amount of illegal input in either module is,  
> IMHO, not the ideal design.

When you support XHTML you'll have to deal with arbitrary trees anyway.  
And, actually, just with DOM and scripting you can end up with arbitrary  
trees.

-- 
Simon Pieters
Opera Software
Received on Monday, 10 November 2008 06:43:24 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:07 UTC