W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2012

[whatwg] namespaces in html5

From: Ian Hickson <ian@hixie.ch>
Date: Fri, 20 Jan 2012 22:09:00 +0000 (UTC)
Message-ID: <Pine.LNX.4.64.1201202205220.2081@ps20323.dreamhostps.com>
On Fri, 20 Jan 2012, David Karger wrote:
> 
> However, in our use case, it is in a sense "coincidence" that our tags 
> are being examined by a script.  The _purpose_ of our tags is to provide 
> the same kind of semantic structuring as <img> or <author> or <navbar> 
> tags: specifying that certain elements, such as a map or a facet, should 
> appear on the page. It is conceivable that there might be several 
> different scripts, and perhaps some native extensions, that are all able 
> to interpret these tags and do something useful with them on the page.

Ah, ok. What you're doing then is simply creating a new language. Write a 
spec, and within your community that spec will define what is valid.


> > Just use the format data-exhibit-foo="".
>
> Yes, and what happens when someone else decides that exhibit is a neat 
> name and they want to use it too?  This is the biggest problem I see. 

That's an academic problem. It doesn't happen often enough in practice to 
worry about.


> I agree that they technically solve the first three, although I'm 
> skeptical that was the original intent (if the data- prefix just means 
> "anything we want to add outside the html spec" then why not just allow 
> any tag, without a prefix, which accomplishes the same thing?).

Because then it would limit the space within which the language itself can 
be extended in the future.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Friday, 20 January 2012 14:09:00 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:10 UTC