W3C home > Mailing lists > Public > public-html@w3.org > December 2008

Re: Void elements in HTML (Was: ZIP-based packages and URI references into them ODF proposal)

From: Robert J Burns <rob@robburns.com>
Date: Tue, 30 Dec 2008 21:07:18 -0600
Cc: "Philip Taylor" <pjt47@cam.ac.uk>, public-html@w3.org
Message-Id: <AF60B651-9FAC-4348-8400-46A8CBDC5262@robburns.com>
To: "Jonas Sicking" <jonas@sicking.cc>

Hi Jonas and Phillip,

On Dec 30, 2008, at 7:08 PM, Jonas Sicking wrote:

>
> On Wed, Dec 31, 2008 at 1:57 AM, Philip Taylor <pjt47@cam.ac.uk>  
> wrote:
>> Jonas Sicking wrote:
>>>
>>> [...]
>>>
>>> I actually think it would be great to support the ending-slash  
>>> syntax
>>> for all elements in HTML5. I have several times ended up writing
>>> things like <div id=foo></div>, and having it consistently supported
>>> in both HTML mode and foreign content mode would actually reduce the
>>> differences between them which I think is a great thing.
>>>
>>> I have heard of some real world pages that would break if the empty
>>> element syntax was supported everywhere, however I wonder if it's  
>>> many
>>> enough that we need to adjust HTML to accommodate them.
>>
>> There's millions - a quick search through some random pages gives  
>> lots of
>> examples of <a ... />...</a>, which would clearly break, like:
>>
>> http://www.haliburtonrealestate.on.ca/ -- <li><a href="http://www.mls.ca 
>> "
>> target="_blank" title="Multiple Listing Service" />MLS</a>
>>
>> http://www.ccitula.ru/ -- <a href="pages/virtv.htm"/> <img
>> src=http://www.ruschamber.net/banner/VEru158x50.jpg border=0></a>
>>
>> http://takasago.shop-pro.jp/ -- <a href="?pid=1912944" /><img
>> src="http://img05.shop-pro.jp/PA01015/854/product/1912944_th.jpg"
>> class="border" /></a>
>>
>> http://www.alternativegreetingcards.com/ -- <a href="products.asp? 
>> id=57"
>> class="submenu" />Wizard of Oz</a>
>
> Ugh, that sucks (i'd be very interested to know how you found this  
> data).
>
> Maybe an alternative "fix" would be to allow the empty-element syntax
> to be supported on all unknown elements. This would allow an author to
> write "<killswitch />" to make down-level implementations create the
> same DOM as implementations that know that <killswitch> is a void
> element. Once enough browsers support the <killswitch> elements that
> the author doesn't care about down-level support the ending '/' can be
> dropped.


Certainly we can find examples. I just don't think the examples  
provide any clear evidence that we shouldn't go ahead an specify the  
new parsing anyway. Certainly there will be some obscure sites that  
break, but they will be easily fixed as well. This is an issue so  
obscure and rare as to not really apply to the design principles of  
the WG. Once we're talking about under 0.01 of a percent of the web, I  
don't think we should apply a design principle in such a draconian way.

These are clearly rare hand coding mistakes or actually intend to be  
empty anchors (we do not know the authors intentions).  To actually  
establish that we'd be breaking the web, we would have to explore the  
intentions of the author, and then compare the relation between that  
authoring intent and 1) the impact of the current parsing, 2) the  
impact of the proposed parsing.

Take care,
Rob
Received on Wednesday, 31 December 2008 03:08:00 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:27 GMT