W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2007

[whatwg] Attribute for holding private data for scripting

From: Anne van Kesteren <annevk@opera.com>
Date: Tue, 10 Apr 2007 21:19:52 +0200
Message-ID: <op.tqk1beli64w2qv@id-c0020>
On Tue, 10 Apr 2007 20:21:27 +0200, Sam Ruby <rubys at intertwingly.net>  
wrote:
>> Or allow any attribute that starts with "x_" or something (to prevent
>> clashing with future revisions of HTML), as private attributes.
>
> Instead of "starts with x_", how about "contains a colon"?
>
> A conformance checker could ensure that there is a corresponding xmlns
> declaration that applies here, and possibly even do additional
> verification if it recognizes the namespace.
>
> An HTML5 parser would, of course, recover from references to
> undeclared namespaces, placing the entire attribute name (including
> the prefix and the colon) into the DOM in such situations.

* That would be confusing to people familiar with XML;
* It would hinder the ability to exchange scripts between HTML and XML;
* It would create more differences between XML and HTML where less seems
   to be desired (trailing slash allowed, etc.).


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>
Received on Tuesday, 10 April 2007 12:19:52 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:34 UTC