Re: Possible Compromise solution for namespaces in HTML5

On Sat, 21 Nov 2009 08:11:38 -0600, Shelley Powers wrote:
> On Fri, Nov 20, 2009 at 10:19 PM, Tab Atkins Jr.wrote:
>> On Fri, Nov 20, 2009 at 8:51 PM, Ennals, Robert wrote:
>>> Are you referring to the problem where random company X creates an 
>>> extension which has a big flaw, that extension gets widely adopted, 
>>> and then we are forced to accept a broken feature into the standard 
>>> since we can't change it without breaking stuff?
>> 
>> Nope, I'm referring to the problem where Company X creates a
>> namespaced extension, <foo:element>, and this then works its way up to
>> becoming a standard <element>.
   [...]
>> This is the reasoning behind Maciej's suggestion for doing
>> element-level extensibility in attributes instead.  Instead of
>> <foo:element>, you'd do <div -foo-element> or similar.  Then when the
>> second browser puts out their experimental implementation, you can
>> just change it to <div -foo-element -bar-element>.  When it gets
>> standardized, switch it to <element -foo-element -bar-element>.  This
>> gives you support for both legacy experimental implementation and
>> current standardized implementations.  As an added bonus, it requires
>> no changes to the current parsing rules, as unknown attributes are
>> already dealt with in an appropriate way.  It just prevents you from
>> validating, same as using vendor-specific additions in CSS. 
> 
> First, Maciej's suggestion is not compatible with the use of
> namespaces in the XHTML version of HTML5. Second, the two, elements
> and attributes, are not interchangeable. [...]

Maciej's proposal is effectively a new method for declaring default 
namespaces. For those who have read the parallel thread about Googles 
jotspot namespace on the <body> element:

<body -jotspot-body>
-- 
leif halvard silli

Received on Saturday, 21 November 2009 16:03:32 UTC