Add type matching algorithm. Clarify language on the type string
authorGreg Billock <gbillock@google.com>
Fri, 27 Apr 2012 13:13:04 -0700
changeset 12 cfbd8857aa0f
parent 11 a25d2b536de3
child 13 4fa8625abf77
Add type matching algorithm. Clarify language on the type string
for registration.
spec/Overview-respec.html
spec/Overview.html
--- a/spec/Overview-respec.html	Thu Apr 19 12:07:35 2012 -0700
+++ b/spec/Overview-respec.html	Fri Apr 27 13:13:04 2012 -0700
@@ -492,18 +492,13 @@
     <section>
     <h3>Registration Markup</h3>
     <p>
-    Service pages declaratively mark themselves (or other on-domain pages)
+    Service pages declaratively mark themselves (or other same-origin pages)
     as providing handling functionality for particular intent actions and types
     using the <code>&lt;intent&gt;</code> tag.
     A User Agent MUST NOT deliver an Intent to a web app service page which
     does not include markup describing what intents it can handle which matches
-    the intent being delivered. The algorithm for matching intents is that the
-    action string provided in invocation and registration must match exactly,
-    and the type strings must match exactly except for possible [[!RFC2046]]
-    MIME subtype wildcards. MIME parameters specified in the Service page markup
-    will be checked and must match exactly, except for MIME-formatted strings
-    with MIME subtype wildcards. MIME parameters which are included in the
-    intent and which are not specified do not impact delivery.
+    the intent being delivered (See the section on Matching action and type for
+    delivery).
     </p>
     <dl title='interface HTMLIntentElement : HTMLElement' class='idl'>
       <dt>readonly attribute string action</dt>
@@ -513,11 +508,12 @@
       assumed to handle display of the provided type(s) in the <code>type</code>
       attributes.</dd>
       <dt>readonly attribute string type</dt>
-      <dd>An opaque string specifying the type of payload data the service can
-      accept. Should be a comma-separated list of MIME type specifiers.
-      If the <code>type</code> attribute is missing, the intent Service is
-      assumed to be registered specifically for a <code>text/plain</code>
-      type.</dd>
+      <dd>A string specifying the type of payload data the service can
+      accept. Must be a space separated list of type specifiers. If these parse
+      as MIME types, or the MIME wildcard types "*/*" or "*", they will be
+      interpreted as such (see the section on matching action and type for delivery).
+      If not, they will be interpreted as string literal type specifiers. Empty
+      type attributes are not valid registrations.</dd>
       <dt>readonly attribute string href</dt>
       <dd>Should be a fully qualified URI. If the <code>href</code> attribute
       is missing, the service URI will be set to the URI in which the tag is
@@ -731,8 +727,61 @@
       just like for any other visit of the page.
       </p>
       </section>
+
+      <section>
+      <h3>Matching action and types for delivery</h3>
+      <p>
+      When an Intent is delivered, the User Agent must verify that the Service to
+      which the intent is to be delivered (either from an explicit invocation or from
+      the result of a user selection) has a registration record supporting the
+      action and type of the Intent being delivered by following these steps:
+      <ol>
+        <li>Let <i>intent action</i> be the action field of the invoked
+        intent.</li>
+        <li>Let <i>intent type</i> be the type field of the invoked
+        intent.</li>
+        <li>For every distinguishable registration (that is, having unique
+        action/type fields) present for the Service page, follow these steps:
+        <ol>
+          <li>When comparing field values, "different from" means that the strings
+          under comparison represent different sequences of code points.</li>
+          <li>When considering whether a field value is a MIME type, it is
+          considered so if it parses as a valid MIME type [[!RFC2046]], or is
+          equal to the MIME wildcard strings "*" or "*/*".</li>
+          <li>Let <i>service action</i> be the value of the action field of the
+          service registration.</li>
+          <li>Let <i>service type</i> be the value of the type field of the
+          service registration.</li>
+          <li>If the <i>service type</i> or <i>service action</i> is empty,
+          the registration record is invalid. Continue to the next
+          registration record.</li>
+          <li>If the <i>intent action</i> is different from the <i>service
+            action</i>, continue to the next registration record.
+          <li>If the <i>intent type</i> is a MIME type, and the <i>service
+            type</i> is not, continue to the next registration record.
+          <li>If the <i>service type</i> is a MIME type, and the <i>intent
+            type</i> is not, continue to the next registration record.
+          <li>If both <i>service type</i> and <i>action type</i> are MIME types,
+          then check whether the MIME specifiers overlap. This is true if the
+          top-level and sublevel types match exactly, or if one or both are represented
+          by the MIME wild card ("*"). If any MIME parameters are present in the
+          <i>service type</i> or the <i>action type</i>, they must be present in
+          both and match exactly. A MIME parameter present in only one of
+          <i>service type</i> and <i>action type</i> does not disqualify the
+          match. If the MIME types do not overlap, continue fo the next
+          registration record.</li>
+          <li>If neither <i>service type</i> nor <i>action type</i> are MIME types,
+          then if they are different, continue to the next registration
+          record.</li>
+        </ol>
+        <li>If no satisfying match is found in the registrations of the Service
+        page, the Intent MUST NOT be delivered. If any satisfying match is
+        found, the Intent MUST be delivered.</li>
+      </ol>
+      </section>
+
     </section>
-    
+
     <section>
       <h2>Use Cases and Requirements</h2>
       <section>
@@ -815,7 +864,7 @@
         </p>
       </section>
     </section>
-    
+
     <section class='appendix'>
       <h2>Acknowledgements</h2>
       <p>
@@ -826,6 +875,7 @@
         more examples and a sample Javascript implementation of Web Intents.
       </p>
     </section>
+
   </body>
 </html>
 
--- a/spec/Overview.html	Thu Apr 19 12:07:35 2012 -0700
+++ b/spec/Overview.html	Fri Apr 27 13:13:04 2012 -0700
@@ -477,7 +477,7 @@
 pre.sh_sourceCode .sh_attribute { color: #006400; }
 
 </style><link href="http://www.w3.org/StyleSheets/TR/W3C-ED" rel="stylesheet" type="text/css" charset="utf-8"></head>
-  <body style="display: inherit; "><div class="head"><p><a href="http://www.w3.org/"><img width="72" height="48" src="http://www.w3.org/Icons/w3c_home" alt="W3C"></a></p><h1 class="title" id="title">Web Intents</h1><h2 id="w3c-editor-s-draft-19-april-2012"><acronym title="World Wide Web Consortium">W3C</acronym> Editor's Draft 19 April 2012</h2><dl><dt>This version:</dt><dd><a href="http://dev.w3.org/2011/webapps/TODO.html">http://dev.w3.org/2011/webapps/TODO.html</a></dd><dt>Latest published version:</dt><dd><a href="http://www.w3.org/TR/web-intents/">http://www.w3.org/TR/web-intents/</a></dd><dt>Latest editor's draft:</dt><dd><a href="http://dev.w3.org/2011/webapps/TODO.html">http://dev.w3.org/2011/webapps/TODO.html</a></dd><dt>Previous version:</dt><dd>none</dd><dt>Editors:</dt><dd><span>Greg Billock</span>, <a href="http://google.com/">Google</a></dd>
+  <body style="display: inherit; "><div class="head"><p><a href="http://www.w3.org/"><img width="72" height="48" src="http://www.w3.org/Icons/w3c_home" alt="W3C"></a></p><h1 class="title" id="title">Web Intents</h1><h2 id="w3c-editor-s-draft-27-april-2012"><acronym title="World Wide Web Consortium">W3C</acronym> Editor's Draft 27 April 2012</h2><dl><dt>This version:</dt><dd><a href="http://dev.w3.org/2011/webapps/TODO.html">http://dev.w3.org/2011/webapps/TODO.html</a></dd><dt>Latest published version:</dt><dd><a href="http://www.w3.org/TR/web-intents/">http://www.w3.org/TR/web-intents/</a></dd><dt>Latest editor's draft:</dt><dd><a href="http://dev.w3.org/2011/webapps/TODO.html">http://dev.w3.org/2011/webapps/TODO.html</a></dd><dt>Previous version:</dt><dd>none</dd><dt>Editors:</dt><dd><span>Greg Billock</span>, <a href="http://google.com/">Google</a></dd>
 <dd><span>James Hawkins</span>, <a href="http://google.com/">Google</a></dd>
 <dd><span>Paul Kinlan</span>, <a href="http://google.com/">Google</a></dd>
 </dl><p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2012 <a href="http://www.w3.org/"><acronym title="World Wide Web Consortium">W3C</acronym></a><sup>®</sup> (<a href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>, <a href="http://www.ercim.eu/"><acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>, <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. <acronym title="World Wide Web Consortium">W3C</acronym> <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> rules apply.</p><hr></div>
@@ -491,7 +491,7 @@
       pages to create, receive, and reply to Web Intents messages, and the
       procedures the User Agent carries out to facilitate that process.
       </p>
-    </div><div id="sotd" class="introductory section"><h2>Status of This Document</h2><p><em>This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current <acronym title="World Wide Web Consortium">W3C</acronym> publications and the latest revision of this technical report can be found in the <a href="http://www.w3.org/TR/"><acronym title="World Wide Web Consortium">W3C</acronym> technical reports index</a> at http://www.w3.org/TR/.</em></p><p>This document was published by the <a href="http://www.w3.org/2008/webapps/">Web Applications (WebApps) Working Group</a> as an Editor's Draft. If you wish to make comments regarding this document, please send them to <a href="mailto:public-web-intents@w3.org">public-web-intents@w3.org</a> (<a href="mailto:public-web-intents-request@w3.org?subject=subscribe">subscribe</a>, <a href="http://lists.w3.org/Archives/Public/public-web-intents/">archives</a>). All feedback is welcome.</p><p>Publication as an Editor's Draft does not imply endorsement by the <acronym title="World Wide Web Consortium">W3C</acronym> Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.</p><p>This document was produced by a group operating under the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 <acronym title="World Wide Web Consortium">W3C</acronym> Patent Policy</a>. <acronym title="World Wide Web Consortium">W3C</acronym> maintains a <a href="TODO" rel="disclosure">public list of any patent disclosures</a> made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential Claim(s)</a> must disclose the information in accordance with <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section 6 of the <acronym title="World Wide Web Consortium">W3C</acronym> Patent Policy</a>.</p></div><div id="toc" class="section"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a href="#introduction" class="tocxref"><span class="secno">1. </span>Introduction</a><ul class="toc"><li class="tocline"><a href="#example" class="tocxref"><span class="secno">1.1 </span>Example</a></li><li class="tocline"><a href="#normative-parts" class="tocxref"><span class="secno">1.2 </span>Normative parts</a></li></ul></li><li class="tocline"><a href="#terminology" class="tocxref"><span class="secno">2. </span>Terminology</a><ul class="toc"><li class="tocline"><a href="#actors" class="tocxref"><span class="secno">2.1 </span>Actors</a></li><li class="tocline"><a href="#life-cycle-of-intents" class="tocxref"><span class="secno">2.2 </span>Life cycle of Intents</a></li></ul></li><li class="tocline"><a href="#api-description" class="tocxref"><span class="secno">3. </span>API Description</a><ul class="toc"><li class="tocline"><a href="#intent-parameters-dictionary" class="tocxref"><span class="secno">3.1 </span>Intent parameters dictionary</a><ul class="toc"><li class="tocline"><a href="#dictionary-intentparameters-members" class="tocxref"><span class="secno">3.1.1 </span>Dictionary <span class="idlType formerLink idlType"><code>IntentParameters</code></span> Members</a></li></ul></li><li class="tocline"><a href="#intent-object" class="tocxref"><span class="secno">3.2 </span>Intent object</a><ul class="toc"><li class="tocline"><a href="#attributes" class="tocxref"><span class="secno">3.2.1 </span>Attributes</a></li><li class="tocline"><a href="#methods" class="tocxref"><span class="secno">3.2.2 </span>Methods</a></li></ul></li><li class="tocline"><a href="#invocation-api" class="tocxref"><span class="secno">3.3 </span>Invocation API</a><ul class="toc"><li class="tocline"><a href="#methods-1" class="tocxref"><span class="secno">3.3.1 </span>Methods</a></li></ul></li><li class="tocline"><a href="#delivery-and-response-api" class="tocxref"><span class="secno">3.4 </span>Delivery and Response API</a><ul class="toc"><li class="tocline"><a href="#attributes-1" class="tocxref"><span class="secno">3.4.1 </span>Attributes</a></li></ul></li><li class="tocline"><a href="#registration-markup" class="tocxref"><span class="secno">3.5 </span>Registration Markup</a><ul class="toc"><li class="tocline"><a href="#attributes-2" class="tocxref"><span class="secno">3.5.1 </span>Attributes</a></li></ul></li></ul></li><li class="tocline"><a href="#user-agent-behavior" class="tocxref"><span class="secno">4. </span>User Agent Behavior</a><ul class="toc"><li class="tocline"><a href="#explicit-intents" class="tocxref"><span class="secno">4.1 </span>Explicit Intents</a></li></ul></li><li class="tocline"><a href="#use-cases-and-requirements" class="tocxref"><span class="secno">5. </span>Use Cases and Requirements</a><ul class="toc"><li class="tocline"><a href="#sharing" class="tocxref"><span class="secno">5.1 </span>Sharing</a></li><li class="tocline"><a href="#integration-with-local-web-apps" class="tocxref"><span class="secno">5.2 </span>Integration with local web apps</a></li><li class="tocline"><a href="#persistent-connections" class="tocxref"><span class="secno">5.3 </span>Persistent connections</a></li><li class="tocline"><a href="#integration-with-external-applications" class="tocxref"><span class="secno">5.4 </span>Integration with external applications</a></li><li class="tocline"><a href="#translating-existing-web-platform-features-to-intents" class="tocxref"><span class="secno">5.5 </span>Translating existing web platform features to intents</a></li><li class="tocline"><a href="#authentication" class="tocxref"><span class="secno">5.6 </span>Authentication</a></li></ul></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">A. </span>Acknowledgements</a></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">B. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">B.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">B.2 </span>Informative references</a></li></ul></li></ul></div>
+    </div><div id="sotd" class="introductory section"><h2>Status of This Document</h2><p><em>This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current <acronym title="World Wide Web Consortium">W3C</acronym> publications and the latest revision of this technical report can be found in the <a href="http://www.w3.org/TR/"><acronym title="World Wide Web Consortium">W3C</acronym> technical reports index</a> at http://www.w3.org/TR/.</em></p><p>This document was published by the <a href="http://www.w3.org/2008/webapps/">Web Applications (WebApps) Working Group</a> as an Editor's Draft. If you wish to make comments regarding this document, please send them to <a href="mailto:public-web-intents@w3.org">public-web-intents@w3.org</a> (<a href="mailto:public-web-intents-request@w3.org?subject=subscribe">subscribe</a>, <a href="http://lists.w3.org/Archives/Public/public-web-intents/">archives</a>). All feedback is welcome.</p><p>Publication as an Editor's Draft does not imply endorsement by the <acronym title="World Wide Web Consortium">W3C</acronym> Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.</p><p>This document was produced by a group operating under the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 <acronym title="World Wide Web Consortium">W3C</acronym> Patent Policy</a>. <acronym title="World Wide Web Consortium">W3C</acronym> maintains a <a href="TODO" rel="disclosure">public list of any patent disclosures</a> made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential Claim(s)</a> must disclose the information in accordance with <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section 6 of the <acronym title="World Wide Web Consortium">W3C</acronym> Patent Policy</a>.</p></div><div id="toc" class="section"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a href="#introduction" class="tocxref"><span class="secno">1. </span>Introduction</a><ul class="toc"><li class="tocline"><a href="#example" class="tocxref"><span class="secno">1.1 </span>Example</a></li><li class="tocline"><a href="#normative-parts" class="tocxref"><span class="secno">1.2 </span>Normative parts</a></li></ul></li><li class="tocline"><a href="#terminology" class="tocxref"><span class="secno">2. </span>Terminology</a><ul class="toc"><li class="tocline"><a href="#actors" class="tocxref"><span class="secno">2.1 </span>Actors</a></li><li class="tocline"><a href="#life-cycle-of-intents" class="tocxref"><span class="secno">2.2 </span>Life cycle of Intents</a></li></ul></li><li class="tocline"><a href="#api-description" class="tocxref"><span class="secno">3. </span>API Description</a><ul class="toc"><li class="tocline"><a href="#intent-parameters-dictionary" class="tocxref"><span class="secno">3.1 </span>Intent parameters dictionary</a><ul class="toc"><li class="tocline"><a href="#dictionary-intentparameters-members" class="tocxref"><span class="secno">3.1.1 </span>Dictionary <span class="idlType formerLink idlType"><code>IntentParameters</code></span> Members</a></li></ul></li><li class="tocline"><a href="#intent-object" class="tocxref"><span class="secno">3.2 </span>Intent object</a><ul class="toc"><li class="tocline"><a href="#attributes" class="tocxref"><span class="secno">3.2.1 </span>Attributes</a></li><li class="tocline"><a href="#methods" class="tocxref"><span class="secno">3.2.2 </span>Methods</a></li></ul></li><li class="tocline"><a href="#invocation-api" class="tocxref"><span class="secno">3.3 </span>Invocation API</a><ul class="toc"><li class="tocline"><a href="#methods-1" class="tocxref"><span class="secno">3.3.1 </span>Methods</a></li></ul></li><li class="tocline"><a href="#delivery-and-response-api" class="tocxref"><span class="secno">3.4 </span>Delivery and Response API</a><ul class="toc"><li class="tocline"><a href="#attributes-1" class="tocxref"><span class="secno">3.4.1 </span>Attributes</a></li></ul></li><li class="tocline"><a href="#registration-markup" class="tocxref"><span class="secno">3.5 </span>Registration Markup</a><ul class="toc"><li class="tocline"><a href="#attributes-2" class="tocxref"><span class="secno">3.5.1 </span>Attributes</a></li></ul></li></ul></li><li class="tocline"><a href="#user-agent-behavior" class="tocxref"><span class="secno">4. </span>User Agent Behavior</a><ul class="toc"><li class="tocline"><a href="#explicit-intents" class="tocxref"><span class="secno">4.1 </span>Explicit Intents</a></li><li class="tocline"><a href="#matching-action-and-types-for-delivery" class="tocxref"><span class="secno">4.2 </span>Matching action and types for delivery</a></li></ul></li><li class="tocline"><a href="#use-cases-and-requirements" class="tocxref"><span class="secno">5. </span>Use Cases and Requirements</a><ul class="toc"><li class="tocline"><a href="#sharing" class="tocxref"><span class="secno">5.1 </span>Sharing</a></li><li class="tocline"><a href="#integration-with-local-web-apps" class="tocxref"><span class="secno">5.2 </span>Integration with local web apps</a></li><li class="tocline"><a href="#persistent-connections" class="tocxref"><span class="secno">5.3 </span>Persistent connections</a></li><li class="tocline"><a href="#integration-with-external-applications" class="tocxref"><span class="secno">5.4 </span>Integration with external applications</a></li><li class="tocline"><a href="#translating-existing-web-platform-features-to-intents" class="tocxref"><span class="secno">5.5 </span>Translating existing web platform features to intents</a></li><li class="tocline"><a href="#authentication" class="tocxref"><span class="secno">5.6 </span>Authentication</a></li></ul></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">A. </span>Acknowledgements</a></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">B. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">B.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">B.2 </span>Informative references</a></li></ul></li></ul></div>
     
     <div id="introduction" class="section">
       <!--OddPage--><h2><span class="secno">1. </span>Introduction</h2>
@@ -877,18 +877,13 @@
     <div id="registration-markup" class="section">
     <h3><span class="secno">3.5 </span>Registration Markup</h3>
     <p>
-    Service pages declaratively mark themselves (or other on-domain pages)
+    Service pages declaratively mark themselves (or other same-origin pages)
     as providing handling functionality for particular intent actions and types
     using the <code>&lt;intent&gt;</code> tag.
     A User Agent <em class="rfc2119" title="must not">must not</em> deliver an Intent to a web app service page which
     does not include markup describing what intents it can handle which matches
-    the intent being delivered. The algorithm for matching intents is that the
-    action string provided in invocation and registration must match exactly,
-    and the type strings must match exactly except for possible [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC2046">RFC2046</a></cite>]
-    MIME subtype wildcards. MIME parameters specified in the Service page markup
-    will be checked and must match exactly, except for MIME-formatted strings
-    with MIME subtype wildcards. MIME parameters which are included in the
-    intent and which are not specified do not impact delivery.
+    the intent being delivered (See the section on Matching action and type for
+    delivery).
     </p>
     <pre class="idl"><span class="idlInterface" id="idl-def-HTMLIntentElement">interface <span class="idlInterfaceID">HTMLIntentElement</span> : <span class="idlSuperclass"><a>HTMLElement</a></span> {
 <span class="idlAttribute">    readonly attribute <span class="idlAttrType"><a>string</a></span> <span class="idlAttrName"><a href="#widl-HTMLIntentElement-action">action</a></span>;</span>
@@ -912,11 +907,12 @@
       is missing, the service URI will be set to the URI in which the tag is
       found.</dd><dt id="widl-HTMLIntentElement-title"><code>title</code> of type <span class="idlAttrType"><a>string</a></span>, readonly</dt><dd>A human-readable title which the User Agent <em class="rfc2119" title="should">should</em> use to indicate the
       service to the user. If the <code>title</code> attribute is missing, the User Agent <em class="rfc2119" title="should">should</em>
-      utilize the title of the registered Service page as the service title.</dd><dt id="widl-HTMLIntentElement-type"><code>type</code> of type <span class="idlAttrType"><a>string</a></span>, readonly</dt><dd>An opaque string specifying the type of payload data the service can
-      accept. Should be a comma-separated list of MIME type specifiers.
-      If the <code>type</code> attribute is missing, the intent Service is
-      assumed to be registered specifically for a <code>text/plain</code>
-      type.</dd></dl></div>
+      utilize the title of the registered Service page as the service title.</dd><dt id="widl-HTMLIntentElement-type"><code>type</code> of type <span class="idlAttrType"><a>string</a></span>, readonly</dt><dd>A string specifying the type of payload data the service can
+      accept. Must be a space separated list of type specifiers. If these parse
+      as MIME types, or the MIME wildcard types "*/*" or "*", they will be
+      interpreted as such (see the section on matching action and type for delivery).
+      If not, they will be interpreted as string literal type specifiers. Empty
+      type attributes are not valid registrations.</dd></dl></div>
     <p>
     <i>This section should not be construed as limiting the ability of the User
     Agent to manage registration of non-web services. That is, the User Agent
@@ -930,10 +926,10 @@
     The User Agent <em class="rfc2119" title="must not">must not</em> obey any registration markup which is not
     same-origin. That is, a page may only register <code>href</code> attributes
     for other service handlers on its same origin. A page may register itself
-    as a Service handler, by leaving the |href| attribute empty.
+    as a Service handler, by leaving the <code>href</code> attribute empty.
     </p>
     <p>
-    For cross-page registration, when the |href| attribute points to a different
+    For cross-page registration, when the <code>href</code> attribute points to a different
     resource, the User Agent <em class="rfc2119" title="should">should</em> interpret intent registrations additively.
     That is, an intent descriptor from the tag would be added to the registry
     if it is not present (if the user approves the addition).
@@ -943,9 +939,10 @@
     The User Agent <em class="rfc2119" title="should">should</em> treat any registration markup which has both
     <code>action</code> and <code>type</code> attributes missing as if the
     markup specified no intent capability on the |href| page. That is, a page may
-    unregister itself quietly by removing all intent tags, or explicitly
-    by keeping the tag present, but empty. This explicit unregistration <em class="rfc2119" title="should">should</em>
-    be supported for same-origin pages as well.
+    unregister itself implicitly by removing all intent tags, or explicitly
+    by keeping the tag present, but without <code>action</code> or
+    <code>type</code> attributes. Such explicit unregistration <em class="rfc2119" title="should">should</em>
+    be honored for any tag with a ame-origin <code>href</code> attribute.
     </p>
     <p>
     The intent tags on the service handler page itself <em class="rfc2119" title="should">should</em> be interpreted by
@@ -1002,7 +999,7 @@
       </p>
       <p>
       For intents invoked by client web applications, the User Agent <em class="rfc2119" title="must">must</em>
-      require that such invocations be directly caused by a user gesture. User
+      require that such invocations be in the context of a user gesture. User
       Agents <em class="rfc2119" title="may">may</em> also dispatch intents invoked through other mechanisms. For
       example, hardware events (i.e. plugging in a USB storage device) or
       software events (i.e. downloading a file).
@@ -1061,7 +1058,7 @@
       other mis-use.
       </p>
       <p>
-      In the same way User Agents <em class="rfc2119" title="may">may</em> dispatch intents caused by non-web
+      In the same way User Agents <em class="rfc2119" title="may">may</em> dispatch Intents triggered by non-web
       mechanisms to web applications, User Agents <em class="rfc2119" title="may">may</em> dispatch intents invoked by
       web applications to handlers which are not web applications. In those
       cases, the User Agent <em class="rfc2119" title="should">should</em> provide a public API mechanism for external
@@ -1111,8 +1108,61 @@
       just like for any other visit of the page.
       </p>
       </div>
+
+      <div id="matching-action-and-types-for-delivery" class="section">
+      <h3><span class="secno">4.2 </span>Matching action and types for delivery</h3>
+      <p>
+      When an Intent is delivered, the User Agent must verify that the Service to
+      which the intent is to be delivered (either from an explicit invocation or from
+      the result of a user selection) has a registration record supporting the
+      action and type of the Intent being delivered by following these steps:
+      </p><ol>
+        <li>Let <i>intent action</i> be the action field of the invoked
+        intent.</li>
+        <li>Let <i>intent type</i> be the type field of the invoked
+        intent.</li>
+        <li>For every distinguishable registration (that is, having unique
+        action/type fields) present for the Service page, follow these steps:
+        <ol>
+          <li>When comparing field values, "different from" means that the strings
+          under comparison represent different sequences of code points.</li>
+          <li>When considering whether a field value is a MIME type, it is
+          considered so if it parses as a valid MIME type [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC2046">RFC2046</a></cite>], or is
+          equal to the MIME wildcard strings "*" or "*/*".</li>
+          <li>Let <i>service action</i> be the value of the action field of the
+          service registration.</li>
+          <li>Let <i>service type</i> be the value of the type field of the
+          service registration.</li>
+          <li>If the <i>service type</i> or <i>service action</i> is empty,
+          the registration record is invalid. Continue to the next
+          registration record.</li>
+          <li>If the <i>intent action</i> is different from the <i>service
+            action</i>, continue to the next registration record.
+          </li><li>If the <i>intent type</i> is a MIME type, and the <i>service
+            type</i> is not, continue to the next registration record.
+          </li><li>If the <i>service type</i> is a MIME type, and the <i>intent
+            type</i> is not, continue to the next registration record.
+          </li><li>If both <i>service type</i> and <i>action type</i> are MIME types,
+          then check whether the MIME specifiers overlap. This is true if the
+          top-level and sublevel types match exactly, or if one or both are represented
+          by the MIME wild card ("*"). If any MIME parameters are present in the
+          <i>service type</i> or the <i>action type</i>, they must be present in
+          both and match exactly. A MIME parameter present in only one of
+          <i>service type</i> and <i>action type</i> does not disqualify the
+          match. If the MIME types do not overlap, continue fo the next
+          registration record.</li>
+          <li>If neither <i>service type</i> nor <i>action type</i> are MIME types,
+          then if they are different, continue to the next registration
+          record.</li>
+        </ol>
+        </li><li>If no satisfying match is found in the registrations of the Service
+        page, the Intent <em class="rfc2119" title="must not">must not</em> be delivered. If any satisfying match is
+        found, the Intent <em class="rfc2119" title="must">must</em> be delivered.</li>
+      </ol>
+      </div>
+
     </div>
-    
+
     <div id="use-cases-and-requirements" class="section">
       <!--OddPage--><h2><span class="secno">5. </span>Use Cases and Requirements</h2>
       <div id="sharing" class="section">
@@ -1195,7 +1245,7 @@
         </p>
       </div>
     </div>
-    
+
     <div class="appendix section" id="acknowledgements">
       <!--OddPage--><h2><span class="secno">A. </span>Acknowledgements</h2>
       <p>
@@ -1206,6 +1256,7 @@
         more examples and a sample Javascript implementation of Web Intents.
       </p>
     </div>
+