html5/spec Overview.html,1.2271,1.2272

Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv3004

Modified Files:
	Overview.html 
Log Message:
Include microdata when dragging-and-dropping or copying-and-pasting. (whatwg r3114)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.2271
retrieving revision 1.2272
diff -u -d -r1.2271 -r1.2272
--- Overview.html	18 May 2009 06:20:13 -0000	1.2271
+++ Overview.html	18 May 2009 08:23:21 -0000	1.2272
@@ -39309,17 +39309,16 @@
    that adds the property.</li>
 -->
 
-  </ul><h4 id="json"><span class="secno">5.5.1 </span>JSON</h4><p>Given a node <var title="">node</var> in a <code>Document</code>,
-  a user agent must run the following algorithm to extract that node's
-  microdata into a JSON form:<ol><li><p>Let <var title="">result</var> be an empty object.</li>
+  </ul><h4 id="json"><span class="secno">5.5.1 </span>JSON</h4><p>Given a list of nodes <var title="">nodes</var> in a
+  <code>Document</code>, a user agent must run the following algorithm
+  to <dfn id="extracting-json" title="extracting JSON">extract the microdata from those
+  nodes into a JSON form</dfn>:<ol><li><p>Let <var title="">result</var> be an empty object.</li>
 
    <li><p>Let <var title="">items</var> be an empty array.</li>
 
-   <li><p>For <var title="">node</var> and each element that is a
-   descendant of <var title="">node</var>, check if the element is a
-   <a href="#top-level-microdata-items" title="top-level microdata items">top-level microdata
-   item</a>, and if it is then <a href="#get-the-object">get the object</a> for that
-   element and add it to <var title="">items</var>.</li>
+   <li><p>For each <var title="">node</var> in <var title="">nodes</var>, check if the element is a <a href="#top-level-microdata-items" title="top-level microdata items">top-level microdata item</a>,
+   and if it is then <a href="#get-the-object">get the object</a> for that element and
+   add it to <var title="">items</var>.</li>
 
    <li><p>Add an entry to <var title="">result</var> called "<code title="">items</code>" whose value is the array <var title="">items</var>.</li>
 
@@ -40098,7 +40097,8 @@
   the input does not conform to the rules described for the <code title="md-vcard"><a href="#md-vcard">vcard</a></code> <a href="#predefined-type">predefined type</a> and <a href="#predefined-property-name" title="predefined property name">predefined property
   names</a>.</p><!-- of course since vcard doesn't define error
   handling, this is somewhat problematic. --><h4 id="icalendar"><span class="secno">5.5.4 </span>iCalendar</h4><p>Given a node <var title="">node</var> in a <code>Document</code>,
-  a user agent must run the following algorithm to extract any <code title="md-vevent"><a href="#md-vevent">vevent</a></code> data represented by that node:<ol><li>
+  a user agent must run the following algorithm to <dfn id="extracting-a-vevent" title="extracting a vEvent">extract any <code title="md-vevent">vevent</code> data represented by that
+  node</dfn>:<ol><li>
 
     <p>If <var title="">node</var> is not an element that is an <a href="#concept-item" title="concept-item">item</a> with the type <code title="md-vevent"><a href="#md-vevent">vevent</a></code>, then run these substeps:</p>
 
@@ -40276,9 +40276,9 @@
   and <a href="#predefined-property-name" title="predefined property name">predefined property
   names</a>.</p><!-- of course since icalendar doesn't define
   error handling, this is somewhat problematic. --><h4 id="bibtex-0"><span class="secno">5.5.5 </span>BibTeX</h4><p>Given a node <var title="">node</var> in a <code>Document</code>,
-  a user agent must run the following algorithm to extract any <code title="md-bibtex"><a href="#md-bibtex">bibtex</a></code> data represented by that node into a
+  a user agent must run the following algorithm to <dfn id="extracting-bibtex" title="extracting BibTeX">extract any <code title="md-bibtex">bibtex</code> data represented by that node into a
   form that vaguely resembles the format used by BibTeX
-  processors:<ol><li>
+  processors</dfn>:<ol><li>
 
     <p>If <var title="">node</var> is not an element that is an <a href="#concept-item" title="concept-item">item</a> with the type <code title="md-bibtex"><a href="#md-bibtex">bibtex</a></code>, then run these substeps:</p>
 
@@ -40331,8 +40331,7 @@
 
      <li><p>Append two U+0020 SPACE characters to <var title="">output</var>.</li>
 
-     <li><p>Append <var title="">name</var> to var
-     title=""&gt;output.</li>
+     <li><p>Append <var title="">name</var> to <var title="">output</var>.</li>
 
      <li><p>Append a U+0020 SPACE character, a U+003D EQUALS SIGN
      character (=), and another U+0020 SPACE character to <var title="">output</var>.</li>
@@ -49598,45 +49597,79 @@
 
   <p>If the user agent determines that something can be dragged, a
   <code title="event-dragstart"><a href="#event-dragstart">dragstart</a></code> event must then be
-  fired.</p>
-
-  <p>If it is a selection that is being dragged, then this event must
-  be fired on the node that the user started the drag on (typically
-  the text node that the user originally clicked). If the user did not
-  specify a particular node, for example if the user just told the
-  user agent to begin a drag of "the selection", then the event must
-  be fired on the deepest node that is a common ancestor of all parts
-  of the selection.</p>
-
-  <p class="XXX">We should look into how browsers do other types
-  (e.g. Firefox apparently also adds text/html for internal drag and
-  drop of a selection).</p>
+  fired at the <a href="#source-node">source node</a>.</p>
 
-  <p>If it is not a selection that is being dragged, then the event
-  must be fired on the element that is being dragged.</p>
+  <p>The <dfn id="source-node">source node</dfn> depends on the kind of drag and how it
+  was initiated. If it is a selection that is being dragged, then the
+  <a href="#source-node">source node</a> is the node that the user started the drag
+  on (typically the text node that the user originally clicked). If
+  the user did not specify a particular node, for example if the user
+  just told the user agent to begin a drag of "the selection", then
+  the <a href="#source-node">source node</a> is the deepest node that is a common
+  ancestor of all parts of the selection. If it is not a selection
+  that is being dragged, then the <a href="#source-node">source node</a> is the
+  element that is being dragged.</p>
 
-  <p>The node on which the event is fired is the <dfn id="source-node">source
-  node</dfn>. Multiple events are fired on this node during the course
-  of the drag-and-drop operation.</p>
+  <p>Multiple events are fired on the <a href="#source-node">source node</a> during
+  the course of the drag-and-drop operation.</p>
 
-  <p>If it is a selection that is being dragged, the <code title="dom-DragEvent-dataTransfer"><a href="#dom-dragevent-datatransfer">dataTransfer</a></code> member of the event
+  <hr><p>If it is a selection that is being dragged, the <code title="dom-DragEvent-dataTransfer"><a href="#dom-dragevent-datatransfer">dataTransfer</a></code> member of the event
   must be created with no nodes. Otherwise, it must be created
   containing just the <a href="#source-node">source node</a>. Script can use the
   <code title="dom-DataTransfer-addElement"><a href="#dom-datatransfer-addelement">addElement()</a></code> method
   to add further elements to the list of what is being dragged.</p>
 
-  <p>If it is a selection that is being dragged, the <code title="dom-DragEvent-dataTransfer"><a href="#dom-dragevent-datatransfer">dataTransfer</a></code> member of the
-  event must have the text of the selection added to it as the data
-  associated with the <code title="">text/plain</code>
-  format. Otherwise, if it is an <code><a href="#the-img-element">img</a></code> element being
-  dragged, then the value of the element's <code title="dom-img-src"><a href="#dom-img-src">src</a></code> DOM attribute must be added,
-  associated with the <code title="">text/uri-list</code>
-  format. Otherwise, if it is an <code><a href="#the-a-element">a</a></code> element being dragged,
-  then the value of the element's <code title="dom-a-href"><a href="#dom-a-href">href</a></code>
-  DOM attribute must be added, associated with the <code title="">text/uri-list</code> format. Otherwise, no data is added to
-  the object by the user agent.</p>
+  <p>The <code title="dom-DragEvent-dataTransfer"><a href="#dom-dragevent-datatransfer">dataTransfer</a></code>
+  member of the event must have added to it the following:</p>
 
-  <p>If the event is canceled, then the drag-and-drop operation must
+  <ul><li>If it is a selection that is being dragged, the text of the
+   selection, associated with the <code title="">text/plain</code>
+   format.</li>
+
+   <li>If it is a selection that is being dragged, then the string
+   resulting from making a list of every node that is partially or
+   completely included in the selection and <a href="#extracting-json" title="extracting
+   JSON">extracting the microdata from those nodes into a JSON
+   form</a>, associated with the <code title="">application/microdata+json</code> format.</li> <!-- XXX
+   register -->
+
+   <li>If it is a selection that is being dragged, then the string
+   resulting from making a list of every node that is partially or
+   completely included in the selection and <a href="#extracting-a-vcard" title="extracting a
+   vCard">extracting the vCard data</a> from the first node in that
+   list that is an <a href="#concept-item" title="concept-item">item</a> with the
+   type <code title="md-vcard"><a href="#md-vcard">vcard</a></code>, if any, associated with
+   the <code title="">text/directory;profile=vcard</code> format.</li>
+   <!-- v2 more than one? -->
+
+   <li>If it is a selection that is being dragged, then the string
+   resulting from making a list of every node that is partially or
+   completely included in the selection and <a href="#extracting-a-vevent" title="extracting a
+   vEvent">extracting the vEvent data</a> from the first node in
+   that list that is an <a href="#concept-item" title="concept-item">item</a> with
+   the type <code title="md-vevent"><a href="#md-vevent">vevent</a></code>, if any, associated
+   with the <code title="">text/calendar;component=vevent</code>
+   format.</li> <!-- v2 more than one? -->
+
+   <li>If it is a selection that is being dragged, then the string
+   resulting from making a list of every node that is partially or
+   completely included in the selection and concatenating the strings
+   obtained from <a href="#extracting-bibtex" title="extracting BibTeX">extracting BibTeX
+   data</a> from all the nodes in that list that are <a href="#concept-item" title="concept-item">items</a> with the type <code title="md-bibtex"><a href="#md-bibtex">bibtex</a></code>, if any, associated with the <code title="">application/microdata+bibtex</code> format.</li> <!-- XXX
+   register -->
+
+   <li><p class="XXX">text/html fragment</p>
+
+   <li>If it is an <code><a href="#the-img-element">img</a></code> element being dragged, the value
+   of the element's <code title="dom-img-src"><a href="#dom-img-src">src</a></code> DOM
+   attribute, associated with the <code title="">text/uri-list</code>
+   format.</li>
+
+   <li>If it is an <code><a href="#the-a-element">a</a></code> element being dragged, the value of
+   the element's <code title="dom-a-href"><a href="#dom-a-href">href</a></code> DOM attribute,
+   associated with the <code title="">text/uri-list</code> format.</li>
+
+  </ul><p>If the event is canceled, then the drag-and-drop operation must
   not occur; the user agent must not continue with this algorithm.</p>
 
   <p>If it is not canceled, then the drag-and-drop operation must be

Received on Monday, 18 May 2009 08:23:35 UTC