spec/Overview.html 1.1865 2695 Add more text about rationale for data-*

Add more text about rationale for data-*='' attributes. (whatwg r2695)

dataset
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1865.html#dom-dataset
data-
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1865.html#attr-data

http://people.w3.org/mike/diffs/html5/spec/Overview.diff.html
http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.1864&r2=1.1865&f=h
http://html5.org/tools/web-apps-tracker?from=2694&to=2695

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.1864
retrieving revision 1.1865
diff -u -d -r1.1864 -r1.1865
--- Overview.html 23 Jan 2009 00:38:20 -0000 1.1864
+++ Overview.html 23 Jan 2009 01:01:10 -0000 1.1865
@@ -5746,12 +5746,34 @@
   starts with the string "<dfn id=attr-data title=attr-data-*><code>data-</code></dfn>", has at least one
   character after the hyphen, is <a href=#xml-compatible>XML-compatible</a>, has no
   namespace, and contains no characters in the range U+0041 .. U+005A
-  (LATIN CAPITAL LETTER A LATIN CAPITAL LETTER Z).<p class=note>All attributes in <a href=#html-documents>HTML documents</a> get
+  (LATIN CAPITAL LETTER A .. LATIN CAPITAL LETTER Z).<p class=note>All attributes in <a href=#html-documents>HTML documents</a> get
   lowercased automatically, so the restriction on uppercase letters
   doesn't affect such documents.<p><a href=#custom-data-attribute title="custom data attribute">Custom data attributes</a>
   are intended to store custom data private to the page or
   application, for which there are no more appropriate attributes or
-  elements.<p>Every <a href=#html-elements title="HTML elements">HTML element</a> may have
+  elements.<p>These attributes are not intended for use by software that is
+  independent of the site that uses the attributes.<div class=example>
+
+   <p>For instance, a site about music could annotate list items
+   representing tracks in an album with custom data attributes
+   containing the length of each track. This information could then be
+   used by the site itself to allow the user to sort the list by track
+   length, or to filter the list for tracks of certain lengths.</p>
+
+   <pre>&lt;ol&gt;
+ &lt;li data-length="2m11s"&gt;Beyond The Sea&lt;/li&gt;
+ ...
+&lt;/ol&gt;</pre>
+
+   <p>It would be inappropriate, however, for the user to use generic
+   software not associated with that music site to search for tracks
+   of a certain length by looking at this data.</p>
+
+   <p>This is because these attributes are intended for use by the
+   site's own scripts, and are not a generic extension mechanism for
+   publicly-usable metadata.</p>
+
+  </div><p>Every <a href=#html-elements title="HTML elements">HTML element</a> may have
   any number of <a href=#custom-data-attribute title="custom data attribute">custom data
   attributes</a> specified, with any value.<p>The <dfn id=dom-dataset title=dom-dataset><code>dataset</code></dfn> DOM
   attribute provides convenient accessors for all the <code title=attr-data-*><a href=#attr-data>data-*</a></code> attributes on an element.  On

Received on Friday, 23 January 2009 01:20:55 UTC