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

Re: Are new void elements really a good idea?

From: Julian Reschke <julian.reschke@gmx.de>
Date: Sun, 31 Aug 2008 12:26:10 +0200
Message-ID: <48BA71C2.8060605@gmx.de>
To: Lachlan Hunt <lachlan.hunt@lachy.id.au>
CC: "public-html@w3.org" <public-html@w3.org>

Lachlan Hunt wrote:
>> How? A concrete proposal please.
> 
> Provide a way in the authoring tool, XSLT in this case, for authors to 
> declare which elements should be serialised as void elements.  This 
> could be done in either XSLT itself, or maybe in some user-editable, 
> implementation specific config file that lists all the elements that 
> need to be serialised as void elements. There are probably other 
> possible solutions too.

So "make it configurable". This can work, but essentially means that 
another, separate piece of information needs to be supplied, which 
people can and will get wrong.

The simpler approach is to declare the library's current output compliant.

>>>> 2) Keep introducing new void elements, but always allow non-void 
>>>> notation, such as
>>>>
>>>> <eventsource source="foo"></eventsource>
>>>
>>> <eventsource src="foo"/> is allowed.  Isn't that sufficient?
>>
>> I only tried Saxon, and it creates a start and an end tag.
> 
> The inability to control how an element is serialised seems like a 
> limitation in XSLT that should probably be fixed in XSLT, rather than 
> maintaining that it should place constraints on HTML5's syntax.

You failed to quote me completely: "As far as I recall, that's the right 
thing to do when producing HTML rather than XML, isn't it?"

It's a *feature* of XSLT that, in the HTML output method, it does know 
how to serialize elements -- so that the author doesn't need to know. 
HTML5 essentially breaks this, so will future void elements.

BR, Julian
Received on Sunday, 31 August 2008 10:26:57 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:38:57 UTC