Re: data-* attributes [was: Re: ISSUE-41/ACTION-97 decentralized-extensibility]

On Oct 19, 2009, at 10:11 AM, Tab Atkins Jr. wrote:

>
> Before you can say that data-* is "really not useful for decentralized
> extensibility", you'd have to show how, even with this basic friendly
> practice of "self-namespacing", there were clashes in data-* attribute
> naming in practice with half-significant libraries.  Preferably, you'd
> show how this actually caused some authors some grief, such as through
> bug reports or forum posts complaining.
>
> I'll note that a similar practice is used in jQuery's plugin
> architecture, and it generally works fine.  Even though everyone wants
> their plugin to have a short name, there are just *so many* names to
> choose from that it's pretty easy to find a good unique one.
>
> I suspect that this style of self-policed namespacing is used widely
> in this sort of space.  Have there been any notable failures?

Indeed, I would argue that Namespaces in XML is an example of such  
self-policed namespacing - in practice, nearly every widely known  
namespace has a single prefix that is used almost all of the time (for  
readability and to try to mitigate confusion about whether it's the  
namespace URI or the prefix that is semantically relevant). In some  
cases, content processors even look for a specific prefix. In  
practice, this informal way of assigning well-known prefixes seems to  
work out ok.

Regards,
Maciej

Received on Wednesday, 21 October 2009 09:51:01 UTC