[whatwg] namespaces in html5

Ian Hickson ian at hixie.ch
Fri Jan 20 14:09:00 PST 2012


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.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list