Editorial changes to Service Discovery spec
authorRich Tibbett <richt@opera.com>
Tue, 02 Oct 2012 14:51:33 +0200
changeset 23865e14f8dc95d
parent 237 7729986a7295
child 239 7e34654692fc
Editorial changes to Service Discovery spec
discovery-api/Overview.html
discovery-api/Overview.src.html
     1.1 --- a/discovery-api/Overview.html	Mon Oct 01 15:26:54 2012 -0400
     1.2 +++ b/discovery-api/Overview.html	Tue Oct 02 14:51:33 2012 +0200
     1.3 @@ -32,6 +32,11 @@
     1.4        dl.domintro dd p { margin: 0.5em 0; }
     1.5        dl.domintro code {font-size: inherit; font-style: italic; }
     1.6        dl.domintro:before { display: table; margin: -1em -0.5em 0.5em auto; width: auto; content: 'This box is non-normative. Implementation requirements are given below this box.'; color: red; border: solid 2px; background: white; padding: 0 0.25em; }
     1.7 +
     1.8 +      table { border-collapse:collapse; border-style:hidden hidden none hidden }
     1.9 +      table thead { border-bottom:solid }
    1.10 +      table tbody th:first-child { border-left:solid }
    1.11 +      table td, table th { border-left:solid; border-right:solid; border-bottom:solid thin; vertical-align:top; padding:0.2em }
    1.12      </style>
    1.13    <style>/*****************************************************************
    1.14   * ReSpec 3 CSS
    1.15 @@ -204,7 +209,7 @@
    1.16    </p>
    1.17    <h1 class="title" id="title">Networked Service Discovery and Messaging</h1>
    1.18  
    1.19 -  <h2 id="w3c-editor-s-draft-26-september-2012"><abbr title="World Wide Web Consortium">W3C</abbr> Editor's Draft 26 September 2012</h2>
    1.20 +  <h2 id="w3c-editor-s-draft-02-october-2012"><abbr title="World Wide Web Consortium">W3C</abbr> Editor's Draft 02 October 2012</h2>
    1.21    <dl>
    1.22  
    1.23        <dt>This version:</dt>
    1.24 @@ -312,7 +317,7 @@
    1.25  
    1.26  
    1.27  
    1.28 -</section><section id="toc"><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></li><li class="tocline"><a href="#conformance" class="tocxref"><span class="secno">2. </span>Conformance</a><ul class="toc"><li class="tocline"><a href="#dependencies" class="tocxref"><span class="secno">2.1 </span>Dependencies</a></li></ul></li><li class="tocline"><a href="#terminology" class="tocxref"><span class="secno">3. </span>Terminology</a></li><li class="tocline"><a href="#requesting-networked-services" class="tocxref"><span class="secno">4. </span>Requesting networked services</a><ul class="toc"><li class="tocline"><a href="#methods" class="tocxref"><span class="secno">4.1 </span>Methods</a></li><li class="tocline"><a href="#error-handling" class="tocxref"><span class="secno">4.2 </span>Error Handling</a></li></ul></li><li class="tocline"><a href="#obtaining-networked-services" class="tocxref"><span class="secno">5. </span>Obtaining networked services</a><ul class="toc"><li class="tocline"><a href="#attributes" class="tocxref"><span class="secno">5.1 </span>Attributes</a></li><li class="tocline"><a href="#methods-1" class="tocxref"><span class="secno">5.2 </span>Methods</a></li><li class="tocline"><a href="#events" class="tocxref"><span class="secno">5.3 </span>Events</a></li></ul></li><li class="tocline"><a href="#communicating-with-a-networked-service" class="tocxref"><span class="secno">6. </span>Communicating with a networked service</a><ul class="toc"><li class="tocline"><a href="#attributes-1" class="tocxref"><span class="secno">6.1 </span>Attributes</a></li><li class="tocline"><a href="#states" class="tocxref"><span class="secno">6.2 </span>States</a></li><li class="tocline"><a href="#events-1" class="tocxref"><span class="secno">6.3 </span>Events</a></li></ul></li><li class="tocline"><a href="#service-discovery" class="tocxref"><span class="secno">7. </span>Service Discovery</a><ul class="toc"><li class="tocline"><a href="#zeroconf-mdns-dns-sd" class="tocxref"><span class="secno">7.1 </span>Zeroconf (<abbr title="Multicast DNS">mDNS</abbr> + <abbr title="Domain Name System">DNS</abbr>-<abbr title="Service Discovery">SD</abbr>)</a></li><li class="tocline"><a href="#simple-service-discovery-protocol-ssdp" class="tocxref"><span class="secno">7.2 </span>Simple Service Discovery Protocol (<abbr title="Simple Service Discovery Protocol">SSDP</abbr>)</a></li><li class="tocline"><a href="#network-topology-monitoring" class="tocxref"><span class="secno">7.3 </span>Network Topology Monitoring</a></li></ul></li><li class="tocline"><a href="#garbage-collection" class="tocxref"><span class="secno">8. </span>Garbage collection</a></li><li class="tocline"><a href="#use-cases-and-requirements" class="tocxref"><span class="secno">9. </span>Use Cases and Requirements</a></li><li class="tocline"><a href="#examples" class="tocxref"><span class="secno">A. </span>Examples</a></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">B. </span>Acknowledgements</a></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">C. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">C.1 </span>Normative references</a></li></ul></li></ul></section>
    1.29 +</section><section id="toc"><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></li><li class="tocline"><a href="#conformance" class="tocxref"><span class="secno">2. </span>Conformance</a><ul class="toc"><li class="tocline"><a href="#dependencies" class="tocxref"><span class="secno">2.1 </span>Dependencies</a></li></ul></li><li class="tocline"><a href="#terminology" class="tocxref"><span class="secno">3. </span>Terminology</a></li><li class="tocline"><a href="#requesting-networked-services" class="tocxref"><span class="secno">4. </span>Requesting networked services</a><ul class="toc"><li class="tocline"><a href="#methods" class="tocxref"><span class="secno">4.1 </span>Methods</a></li><li class="tocline"><a href="#error-handling" class="tocxref"><span class="secno">4.2 </span>Error Handling</a></li></ul></li><li class="tocline"><a href="#obtaining-networked-services" class="tocxref"><span class="secno">5. </span>Obtaining networked services</a><ul class="toc"><li class="tocline"><a href="#attributes" class="tocxref"><span class="secno">5.1 </span>Attributes</a></li><li class="tocline"><a href="#methods-1" class="tocxref"><span class="secno">5.2 </span>Methods</a></li><li class="tocline"><a href="#events" class="tocxref"><span class="secno">5.3 </span>Events</a></li></ul></li><li class="tocline"><a href="#communicating-with-a-networked-service" class="tocxref"><span class="secno">6. </span>Communicating with a networked service</a><ul class="toc"><li class="tocline"><a href="#attributes-1" class="tocxref"><span class="secno">6.1 </span>Attributes</a></li><li class="tocline"><a href="#states" class="tocxref"><span class="secno">6.2 </span>States</a></li><li class="tocline"><a href="#events-1" class="tocxref"><span class="secno">6.3 </span>Events</a></li></ul></li><li class="tocline"><a href="#service-discovery" class="tocxref"><span class="secno">7. </span>Service Discovery</a><ul class="toc"><li class="tocline"><a href="#zeroconf-mdns-dns-sd" class="tocxref"><span class="secno">7.1 </span>Zeroconf (<abbr title="Multicast DNS">mDNS</abbr> + <abbr title="Domain Name System">DNS</abbr>-<abbr title="Service Discovery">SD</abbr>)</a></li><li class="tocline"><a href="#simple-service-discovery-protocol-ssdp" class="tocxref"><span class="secno">7.2 </span>Simple Service Discovery Protocol (<abbr title="Simple Service Discovery Protocol">SSDP</abbr>)</a></li><li class="tocline"><a href="#network-topology-monitoring" class="tocxref"><span class="secno">7.3 </span>Network Topology Monitoring</a></li></ul></li><li class="tocline"><a href="#events-summary" class="tocxref"><span class="secno">8. </span>Events Summary</a></li><li class="tocline"><a href="#garbage-collection" class="tocxref"><span class="secno">9. </span>Garbage collection</a></li><li class="tocline"><a href="#use-cases-and-requirements" class="tocxref"><span class="secno">10. </span>Use Cases and Requirements</a></li><li class="tocline"><a href="#examples" class="tocxref"><span class="secno">A. </span>Examples</a></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">B. </span>Acknowledgements</a></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">C. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">C.1 </span>Normative references</a></li></ul></li></ul></section>
    1.30  
    1.31  
    1.32  
    1.33 @@ -412,7 +417,7 @@
    1.34       </p>
    1.35  
    1.36       <p>
    1.37 -      Conformance requirements phrased as algorithms or specific steps may be implemented in any manner, so long as the end result is equivalent. (In particular, the algorithms defined in
    1.38 +      Conformance requirements phrased as algorithms or specific steps <em class="ct"><em class="rfc2119" title="may">may</em></em> be implemented in any manner, so long as the end result is equivalent. (In particular, the algorithms defined in
    1.39        this specification are intended to be easy to follow, and not intended to be performant.)
    1.40       </p>
    1.41  
    1.42 @@ -421,12 +426,12 @@
    1.43       </p>
    1.44  
    1.45       <p>
    1.46 -      User agents may impose implementation-specific limits on otherwise unconstrained inputs, e.g. to prevent denial of service attacks, to guard against running out of memory, or to work
    1.47 +      User agents <em class="ct"><em class="rfc2119" title="may">may</em></em> impose implementation-specific limits on otherwise unconstrained inputs, e.g. to prevent denial of service attacks, to guard against running out of memory, or to work
    1.48        around platform-specific limitations.
    1.49       </p>
    1.50  
    1.51       <p>
    1.52 -      When support for a feature is disabled (e.g. as an emergency measure to mitigate a security problem, or to aid in development, or for performance reasons), user agents must act as if
    1.53 +      When support for a feature is disabled (e.g. as an emergency measure to mitigate a security problem, or to aid in development, or for performance reasons), user agents <em class="ct"><em class="rfc2119" title="must">must</em></em> act as if
    1.54        they had no support for the feature whatsoever, and as if the feature was not mentioned in this specification. For example, if a particular feature is accessed via an attribute in a Web
    1.55        IDL interface, the attribute itself would be omitted from the objects that implement that interface - leaving the attribute on the object but making it return null or throw an exception
    1.56        is insufficient.
    1.57 @@ -472,7 +477,7 @@
    1.58        </p>
    1.59  
    1.60        <p>
    1.61 -        A <dfn id="dfn-user-agent-generated-callback-url">user-agent generated callback url</dfn> is a Local-network accessible <abbr title="Uniform Resource Locator">URL</abbr> endpoint that a <a href="#dfn-user-agent" class="internalDFN">user agent</a> must generate and maintain for receiving <abbr title="Hypertext Transfer Protocol">HTTP</abbr> NOTIFY requests from UPnP Event sources. It is only required when the user agent implements UPnP Service Discovery as defined in
    1.62 +        A <dfn id="dfn-user-agent-generated-callback-url">user-agent generated callback url</dfn> is a Local-network accessible <abbr title="Uniform Resource Locator">URL</abbr> endpoint that a <a href="#dfn-user-agent" class="internalDFN">user agent</a> generates and maintains for receiving <abbr title="Hypertext Transfer Protocol">HTTP</abbr> NOTIFY requests from UPnP Event sources. It is only required when the user agent implements UPnP Service Discovery as defined in
    1.63          this specification.
    1.64        </p>
    1.65  
    1.66 @@ -560,7 +565,7 @@
    1.67  
    1.68         <div>
    1.69            <p>
    1.70 -            When the <dfn id="dom-navigator-getnetworkservices" title="dom-navigator-getnetworkservices"><code>getNetworkServices(type, successCallback[, errorCallback])</code></dfn> method is called, the <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="rfc2119" title="must">must</em> run the following steps:
    1.71 +            When the <dfn id="dom-navigator-getnetworkservices" title="dom-navigator-getnetworkservices"><code>getNetworkServices(type, successCallback[, errorCallback])</code></dfn> method is called, the <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="ct"><em class="rfc2119" title="must">must</em></em> run the following steps:
    1.72            </p>
    1.73  
    1.74            <ol class="rule">
    1.75 @@ -578,7 +583,7 @@
    1.76              </li>
    1.77  
    1.78              <li>
    1.79 -               If <var>requested control types</var> is an array that contains at least one or more <a title="valid service type" href="#dfn-valid-service-type" class="internalDFN">valid service type</a> tokens then continue to the step labeled <em>process</em> below. Otherwise, the <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="rfc2119" title="must">must</em> <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">queue a task</a> to invoke <var>errorCallback</var>, if it is provided and is an object of type <code>Function</code>, with a new <a href="#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object whose
    1.80 +               If <var>requested control types</var> is an array that contains at least one or more <a title="valid service type" href="#dfn-valid-service-type" class="internalDFN">valid service type</a> tokens then continue to the step labeled <em>process</em> below. Otherwise, the <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="ct"><em class="rfc2119" title="must">must</em></em> <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">queue a task</a> to invoke <var>errorCallback</var>, if it is provided and is an object of type <code>Function</code>, with a new <a href="#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object whose
    1.81                   <a href="#dom-navigatornetworkserviceerror-code"><code>code</code></a> attribute has the numeric value 2
    1.82                    (<a href="#dom-navigatornetworkserviceerror-unknown_type_prefix"><code>UNKNOWN_TYPE_PREFIX_ERR</code></a>) as its argument,
    1.83                     abort any remaining steps and return.
    1.84 @@ -614,7 +619,7 @@
    1.85              </li>
    1.86  
    1.87              <li>
    1.88 -               If <var>services found</var> is an empty array, then the <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="rfc2119" title="must">must</em> <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">queue a task</a> to invoke <var>errorCallback</var>, if it is provided and is an object of type <code>Function</code>, with a new <a href="#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object whose
    1.89 +               If <var>services found</var> is an empty array, then the <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="ct"><em class="rfc2119" title="must">must</em></em> <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">queue a task</a> to invoke <var>errorCallback</var>, if it is provided and is an object of type <code>Function</code>, with a new <a href="#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object whose
    1.90                   <a href="#dom-navigatornetworkserviceerror-code"><code>code</code></a> attribute has the numeric value 1
    1.91                   (<a href="#dom-navigatornetworkserviceerror-permission_denied"><code>PERMISSION_DENIED_ERR</code></a>) as its argument, abort any remaining steps and return.
    1.92              </li>
    1.93 @@ -624,13 +629,13 @@
    1.94              </li>
    1.95  
    1.96              <li>
    1.97 -               Optionally, e.g. based on a previously-established user preference, for security reasons, or due to platform limitations, the <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="rfc2119" title="may">may</em> <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">queue a task</a> to invoke <var>errorCallback</var>, if it is provided and is an object of type <code>Function</code>, with a new <a href="#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object whose
    1.98 +               Optionally, e.g. based on a previously-established user preference, for security reasons, or due to platform limitations, the <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="ct"><em class="rfc2119" title="may">may</em></em> <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">queue a task</a> to invoke <var>errorCallback</var>, if it is provided and is an object of type <code>Function</code>, with a new <a href="#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object whose
    1.99                   <a href="#dom-navigatornetworkserviceerror-code"><code>code</code></a> attribute has the numeric value 1
   1.100                   (<a href="#dom-navigatornetworkserviceerror-permission_denied"><code>PERMISSION_DENIED_ERR</code></a>) as its argument, abort any remaining steps and return.
   1.101              </li>
   1.102  
   1.103              <li>
   1.104 -                  The <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="rfc2119" title="must">must</em> prompt the user in a user-agent-specific manner for permission to provide the
   1.105 +                  The <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="ct"><em class="rfc2119" title="must">must</em></em> prompt the user in a user-agent-specific manner for permission to provide the
   1.106                    <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/browsers.html#entry-script" class="externalDFN">entry script</a>'s
   1.107                    <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/origin-0.html#origin" class="externalDFN">origin</a> with an array of
   1.108                    <a href="#networkservice"><code>NetworkService</code></a> objects representing the user-authorized subset of <var>services found</var>.
   1.109 @@ -640,7 +645,7 @@
   1.110                    "ongoing local-network communication" indicator.
   1.111                 </p>
   1.112  
   1.113 -               <p>If the user denies permission, then the <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="rfc2119" title="must">must</em> <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">queue a task</a> to invoke <var>errorCallback</var>, if it is provided and is an object of type <code>Function</code>, with a new <a href="#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object whose
   1.114 +               <p>If the user denies permission, then the <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="ct"><em class="rfc2119" title="must">must</em></em> <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">queue a task</a> to invoke <var>errorCallback</var>, if it is provided and is an object of type <code>Function</code>, with a new <a href="#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object whose
   1.115                  <a href="#dom-navigatornetworkserviceerror-code"><code>code</code></a> attribute has the numeric value 1
   1.116                  (<a href="#dom-navigatornetworkserviceerror-permission_denied"><code>PERMISSION_DENIED_ERR</code></a>) as its argument, abort any remaining steps and return.
   1.117                </p>
   1.118 @@ -681,7 +686,7 @@
   1.119              </li>
   1.120  
   1.121              <li>
   1.122 -               The <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="rfc2119" title="must">must</em> <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">queue a task</a> to invoke <var>successCallback</var> with
   1.123 +               The <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="ct"><em class="rfc2119" title="must">must</em></em> <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">queue a task</a> to invoke <var>successCallback</var> with
   1.124                 <var>services manager</var> as its argument.
   1.125              </li>
   1.126  
   1.127 @@ -694,7 +699,7 @@
   1.128            </p>
   1.129  
   1.130            <p>
   1.131 -            When a <a href="#networkservice"><code>NetworkService</code></a> object is provided to a Web page, the <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="rfc2119" title="must">must</em> add the <code>url</code> property
   1.132 +            When a <a href="#networkservice"><code>NetworkService</code></a> object is provided to a Web page, the <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="ct"><em class="rfc2119" title="must">must</em></em> add the <code>url</code> property
   1.133               to the <dfn id="dfn-entry-script-origin-s-url-whitelist">entry script origin's <abbr title="Uniform Resource Locator">URL</abbr> whitelist</dfn>. This list enables the
   1.134              Web page to override and initiate cross-site resource requests towards these URLs, and any sub-resources of these URLs, within the current
   1.135              <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/browsers.html#entry-script" class="externalDFN">entry script</a>'s
   1.136 @@ -703,7 +708,7 @@
   1.137           </p>
   1.138  
   1.139           <p>
   1.140 -            If the user navigates away from the current browsing context, the <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="rfc2119" title="must">must</em> remove all previously whitelisted urls from the <a href="#dfn-entry-script-origin-s-url-whitelist" class="internalDFN">entry script origin's <abbr title="Uniform Resource Locator">URL</abbr> whitelist</a>.
   1.141 +            If the user navigates away from the current browsing context, the <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="ct"><em class="rfc2119" title="must">must</em></em> remove all previously whitelisted urls from the <a href="#dfn-entry-script-origin-s-url-whitelist" class="internalDFN">entry script origin's <abbr title="Uniform Resource Locator">URL</abbr> whitelist</a>.
   1.142              There is no persistence to network service selections provided to a web page. It is not possible to access a previously white-listed networked service without the necessary user authorization in all of the following cases:
   1.143              </p><ul>
   1.144                <li>If the current script is reloaded at any point in the same or different window.</li>
   1.145 @@ -729,7 +734,7 @@
   1.146          </dt>
   1.147          <dd>
   1.148            <p>
   1.149 -            Returns the current error's error code. At the current time, this may be <code>1</code> or <code>2</code>, for which the
   1.150 +            Returns the current error's error code. At the current time, this will be <code>1</code> or <code>2</code>, for which the
   1.151              corresponding error constants
   1.152              <a href="#dom-navigatornetworkserviceerror-permission_denied"><code>PERMISSION_DENIED_ERR</code></a> and
   1.153              <a href="#dom-navigatornetworkserviceerror-unknown_type_prefix"><code>UNKNOWN_TYPE_PREFIX_ERR</code></a> are defined.
   1.154 @@ -739,7 +744,7 @@
   1.155  
   1.156           <p>
   1.157              The <dfn id="dom-navigatornetworkserviceerror-code" title="dom-navigatornetworkserviceerror-code"><code>code</code></dfn> attribute of a
   1.158 -            <a href="#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object <em class="rfc2119" title="must">must</em> return the code for the error, which will be one of the following:
   1.159 +            <a href="#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object <em class="ct"><em class="rfc2119" title="must">must</em></em> return the code for the error, which will be one of the following:
   1.160           </p>
   1.161  
   1.162           <dl>
   1.163 @@ -813,11 +818,11 @@
   1.164  
   1.165          <div>
   1.166             <p>
   1.167 -              The <dfn id="dom-networkservices-length"><code>length</code></dfn> attribute <em class="rfc2119" title="must">must</em> return the number of services represented in the object's corresponding <a href="#dfn-list-of-authorized-service-records" class="internalDFN">list of authorized service records</a> at the time of getting.
   1.168 +              The <dfn id="dom-networkservices-length"><code>length</code></dfn> attribute <em class="ct"><em class="rfc2119" title="must">must</em></em> return the number of services represented in the object's corresponding <a href="#dfn-list-of-authorized-service-records" class="internalDFN">list of authorized service records</a> at the time of getting.
   1.169             </p>
   1.170  
   1.171             <p>
   1.172 -              The <dfn id="dom-networkservices-servicesavailable"><code>servicesAvailable</code></dfn> attribute <em class="rfc2119" title="must">must</em> return the number of services in the <a href="#dfn-list-of-available-service-records" class="internalDFN">list of available service records</a> whose <code>type</code> attribute matches any of the <a href="#dfn-valid-service-type" class="internalDFN">valid service type</a> tokens that was initially used to create the current <a href="#networkservices"><code>NetworkServices</code></a> object.
   1.173 +              The <dfn id="dom-networkservices-servicesavailable"><code>servicesAvailable</code></dfn> attribute <em class="ct"><em class="rfc2119" title="must">must</em></em> return the number of services in the <a href="#dfn-list-of-available-service-records" class="internalDFN">list of available service records</a> whose <code>type</code> attribute matches any of the <a href="#dfn-valid-service-type" class="internalDFN">valid service type</a> tokens that was initially used to create the current <a href="#networkservices"><code>NetworkServices</code></a> object.
   1.174             </p>
   1.175  
   1.176          </div>
   1.177 @@ -873,12 +878,12 @@
   1.178        </p>
   1.179  
   1.180        <p>
   1.181 -        To <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#determine-the-value-of-an-indexed-property" class="externalDFN">determine the value of an indexed property</a> for a given index <var>index</var> in a <a href="#networkservices"><code>NetworkServices</code></a> object's <a href="#dfn-list-of-authorized-service-records" class="internalDFN">list of authorized service records</a>, the user agent <em class="rfc2119" title="must">must</em> return the <a href="#networkservice"><code>NetworkService</code></a> object that represents the <var>index</var>th service in the <a href="#dfn-list-of-authorized-service-records" class="internalDFN">list of authorized service records</a>.
   1.182 +        To <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#determine-the-value-of-an-indexed-property" class="externalDFN">determine the value of an indexed property</a> for a given index <var>index</var> in a <a href="#networkservices"><code>NetworkServices</code></a> object's <a href="#dfn-list-of-authorized-service-records" class="internalDFN">list of authorized service records</a>, the user agent <em class="ct"><em class="rfc2119" title="must">must</em></em> return the <a href="#networkservice"><code>NetworkService</code></a> object that represents the <var>index</var>th service in the <a href="#dfn-list-of-authorized-service-records" class="internalDFN">list of authorized service records</a>.
   1.183        </p>
   1.184  
   1.185        <p>
   1.186 -        The <dfn id="dom-networkservices-getservicebyid"><code>getServiceById(id)</code></dfn> method <em class="rfc2119" title="must">must</em> return the first <a href="#networkservice"><code>NetworkService</code></a> object in the <a href="#dfn-list-of-authorized-service-records" class="internalDFN">list of authorized service records</a> represented by the respective object whose <a href="#dom-networkservice-id"><code>id</code></a> attribute is equal to the value of the <var>id</var> argument.
   1.187 -        When no services in the <a href="#dfn-list-of-authorized-service-records" class="internalDFN">list of authorized service records</a> match the given argument, the method <em class="rfc2119" title="must">must</em> return null.
   1.188 +        The <dfn id="dom-networkservices-getservicebyid"><code>getServiceById(id)</code></dfn> method <em class="ct"><em class="rfc2119" title="must">must</em></em> return the first <a href="#networkservice"><code>NetworkService</code></a> object in the <a href="#dfn-list-of-authorized-service-records" class="internalDFN">list of authorized service records</a> represented by the respective object whose <a href="#dom-networkservice-id"><code>id</code></a> attribute is equal to the value of the <var>id</var> argument.
   1.189 +        When no services in the <a href="#dfn-list-of-authorized-service-records" class="internalDFN">list of authorized service records</a> match the given argument, the method <em class="ct"><em class="rfc2119" title="must">must</em></em> return null.
   1.190        </p>
   1.191  
   1.192        <p>
   1.193 @@ -893,7 +898,7 @@
   1.194        <h3><span class="secno">5.3 </span>Events</h3>
   1.195  
   1.196        <p>
   1.197 -         The following are the event handlers (and their corresponding event handler event types) that must be supported, as IDL attributes, by all objects implementing the <a href="#networkservices"><code>NetworkServices</code></a> interface:
   1.198 +         The following are the event handlers (and their corresponding event handler event types) that <em class="ct"><em class="rfc2119" title="must">must</em></em> be supported, as IDL attributes, by all objects implementing the <a href="#networkservices"><code>NetworkServices</code></a> interface:
   1.199         </p>
   1.200  
   1.201         <table border="1">
   1.202 @@ -915,8 +920,8 @@
   1.203                </dfn>
   1.204              </td>
   1.205              <td>
   1.206 -              <code title="event-serviceavailable">serviceavailable</code>
   1.207 -            </td>
   1.208 +              <a href="#event-serviceavailable"><code>serviceavailable</code>
   1.209 +            </a></td>
   1.210            </tr>
   1.211            <tr>
   1.212              <td>
   1.213 @@ -925,16 +930,12 @@
   1.214                </dfn>
   1.215              </td>
   1.216              <td>
   1.217 -              <code title="event-serviceunavailable">serviceunavailable</code>
   1.218 +              <a href="#event-serviceunavailable"><code>serviceunavailable</code></a>
   1.219              </td>
   1.220            </tr>
   1.221          </tbody>
   1.222        </table>
   1.223  
   1.224 -      <p>
   1.225 -         Events with an event type of <code>serviceavailable</code> or <code>serviceunavailable</code> defined in this specification are simple <code>Event</code> objects.
   1.226 -      </p>
   1.227 -
   1.228        </section>
   1.229  
   1.230      </section>
   1.231 @@ -1032,7 +1033,7 @@
   1.232        </dl>
   1.233  
   1.234            <p>
   1.235 -            The <dfn id="dom-networkservice-id"><code>id</code></dfn> attribute is a unique identifier for the service. The same service provided at different times or on different objects <em class="rfc2119" title="must">must</em> have the same <a href="#dom-networkservice-id"><code>id</code></a> value.
   1.236 +            The <dfn id="dom-networkservice-id"><code>id</code></dfn> attribute is a unique identifier for the service. The same service provided at different times or on different objects <em class="ct"><em class="rfc2119" title="must">must</em></em> have the same <a href="#dom-networkservice-id"><code>id</code></a> value.
   1.237           </p>
   1.238  
   1.239           <p>
   1.240 @@ -1074,7 +1075,7 @@
   1.241  
   1.242        <p>
   1.243          The <dfn id="dom-networkservice-online"><code>online</code></dfn> attribute indicates whether the service is reporting itself as being
   1.244 -        either <var>online</var>, and therefore accessible on the local network, in which case this attribute will return <code>true</code> or, <var>offline</var>, and therefore not accessible on the local network, either temporarily or permanently, in which case this attribute will return <code>false</code>. This attribute <em class="rfc2119" title="must">must</em> default to <code>true</code>.
   1.245 +        either <var>online</var>, and therefore accessible on the local network, in which case this attribute will return <code>true</code> or, <var>offline</var>, and therefore not accessible on the local network, either temporarily or permanently, in which case this attribute will return <code>false</code>. This attribute <em class="ct"><em class="rfc2119" title="must">must</em></em> default to <code>true</code>.
   1.246        </p>
   1.247  
   1.248        </section>
   1.249 @@ -1083,7 +1084,7 @@
   1.250           <h3><span class="secno">6.3 </span>Events</h3>
   1.251  
   1.252        <p>
   1.253 -         The following are the event handlers (and their corresponding event handler event types) that must be supported, as IDL attributes, by all objects implementing the
   1.254 +         The following are the event handlers (and their corresponding event handler event types) that <em class="ct"><em class="rfc2119" title="must">must</em></em> be supported, as IDL attributes, by all objects implementing the
   1.255           <a href="#networkservice"><code>NetworkService</code></a> interface:
   1.256         </p>
   1.257  
   1.258 @@ -1106,7 +1107,7 @@
   1.259                </dfn>
   1.260              </td>
   1.261              <td>
   1.262 -              <code title="event-notify">notify</code>
   1.263 +              <a href="#event-notify"><code>notify</code></a>
   1.264              </td>
   1.265            </tr>
   1.266            <tr>
   1.267 @@ -1116,7 +1117,7 @@
   1.268                </dfn>
   1.269              </td>
   1.270              <td>
   1.271 -              <code title="event-onserviceonline">serviceonline</code>
   1.272 +              <a href="#event-serviceonline"><code>serviceonline</code></a>
   1.273              </td>
   1.274            </tr>
   1.275            <tr>
   1.276 @@ -1126,16 +1127,12 @@
   1.277                </dfn>
   1.278              </td>
   1.279              <td>
   1.280 -              <code title="event-onserviceoffline">serviceoffline</code>
   1.281 +              <a href="#event-serviceoffline"><code>serviceoffline</code></a>
   1.282              </td>
   1.283            </tr>
   1.284          </tbody>
   1.285        </table>
   1.286  
   1.287 -      <p>
   1.288 -         Events with an event type of <code>notify</code>, <code>serviceonline</code> or <code>serviceoffline</code> defined in this specification are simple <code>Event</code> objects.
   1.289 -      </p>
   1.290 -
   1.291        </section>
   1.292     </section>
   1.293  
   1.294 @@ -1143,8 +1140,8 @@
   1.295              <!--OddPage--><h2><span class="secno">7. </span>Service Discovery</h2>
   1.296  
   1.297        <p>
   1.298 -         A <a href="#dfn-user-agent" class="internalDFN">user agent</a> conforming to this specification <em class="rfc2119" title="may">may</em> implement <acronym title="Simple Service Discovery Protocol"><abbr title="Simple Service Discovery Protocol">SSDP</abbr></acronym> [<cite><a class="bibref" href="#bib-UPNP-DEVICEARCH11">UPNP-DEVICEARCH11</a></cite>] and Zeroconf [<cite><a class="bibref" href="#bib-DNS-SD">DNS-SD</a></cite>] + [<cite><a class="bibref" href="#bib-MDNS">MDNS</a></cite>] service discovery mechanisms
   1.299 -         to enable Web pages to request and connect with <abbr title="Hypertext Transfer Protocol">HTTP</abbr> services running on networked devices, discovered via either mechanism, through this <abbr title="Application Programming Interface">API</abbr>. When a <a href="#dfn-user-agent" class="internalDFN">user agent</a> implements either of these service discovery mechanisms, then it <em class="rfc2119" title="must">must</em> conform to the corresponding algorithms provided in this section of the specification.
   1.300 +         A <a href="#dfn-user-agent" class="internalDFN">user agent</a> conforming to this specification <em class="ct"><em class="rfc2119" title="may">may</em></em> implement <acronym title="Simple Service Discovery Protocol"><abbr title="Simple Service Discovery Protocol">SSDP</abbr></acronym> [<cite><a class="bibref" href="#bib-UPNP-DEVICEARCH11">UPNP-DEVICEARCH11</a></cite>] and Zeroconf [<cite><a class="bibref" href="#bib-DNS-SD">DNS-SD</a></cite>] + [<cite><a class="bibref" href="#bib-MDNS">MDNS</a></cite>] service discovery mechanisms
   1.301 +         to enable Web pages to request and connect with <abbr title="Hypertext Transfer Protocol">HTTP</abbr> services running on networked devices, discovered via either mechanism, through this <abbr title="Application Programming Interface">API</abbr>. When a <a href="#dfn-user-agent" class="internalDFN">user agent</a> implements either of these service discovery mechanisms, then it <em class="ct"><em class="rfc2119" title="must">must</em></em> conform to the corresponding algorithms provided in this section of the specification.
   1.302        </p>
   1.303        <p>
   1.304           This section presents how the results of these two service discovery
   1.305 @@ -1160,7 +1157,7 @@
   1.306        <p>
   1.307           The <dfn id="dfn-list-of-available-service-records">list of available service records</dfn> is a single dynamic internal lookup table within user agents that is used to track all the  services that have been discovered and are available in the current network at any given time.
   1.308           At any point during the running of either of the two service discovery mechanisms then existing entries within this table can be updated, entries can be added and entries can be removed as the status of networked
   1.309 -         services changes according to the rules defined in this specification. <!--Each record contained within this table contains the attributes: <code>id</code>, <code>deviceId</code>, <code>name</code>, <code>type</code>, <code>url</code>, <code>config</code> and <code>expiryTimestamp</code>.-->
   1.310 +         services changes according to the rules defined in this specification.
   1.311        </p>
   1.312  
   1.313        <p>
   1.314 @@ -1218,14 +1215,16 @@
   1.315                 If the <var>new service registration flag</var> is set to <code>true</code> then increment the <a href="#dom-networkservices-servicesavailable"><code>servicesAvailable</code></a> attribute of the <var>services manager</var> associated with
   1.316                 the current <var>active service</var>
   1.317                  object by <code>1</code> and then <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">queue a task</a>
   1.318 -                 to dispatch a newly created event with the name <a href="#dom-networkservices-onserviceavailable"><code>serviceavailable</code></a> that uses the <code>Event</code> interface,
   1.319 +                 to dispatch a newly created event with the name <a href="#event-serviceavailable"><code>serviceavailable</code></a> that uses the <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event" class="externalDFN"><code>Event</code></a> interface,
   1.320                   which does not bubble, is not cancellable, and has no default action, at the <var>services manager</var> associated with
   1.321                   the current <var>active service</var> object.
   1.322              </li>
   1.323  
   1.324              <li>
   1.325 -               <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">Queue a task</a>
   1.326 -                to dispatch a newly created event with the name <a href="#dom-networkservice-onserviceonline"><code>serviceonline</code></a> that uses the <code>Event</code> interface, which
   1.327 +               Set <var>active service</var>'s <a href="#dom-networkservice-online"><code>online</code></a> attribute to <code>true</code> and then
   1.328 +               <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">queue a task</a>
   1.329 +                to dispatch a newly created event with the name <a href="#event-serviceonline"><code>serviceonline</code></a> that uses the
   1.330 +                <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event" class="externalDFN"><code>Event</code></a> interface, which
   1.331                   does not bubble, is not cancellable, and has no default action, at the current
   1.332                  <var>active service</var> object.
   1.333              </li>
   1.334 @@ -1273,14 +1272,17 @@
   1.335                      Decrement the <a href="#dom-networkservices-servicesavailable"><code>servicesAvailable</code></a> attribute of the
   1.336                      <var>services manager</var> associated with the current <var>active service</var>
   1.337                       object by <code>1</code> and then <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">queue a task</a>
   1.338 -                      to dispatch a newly created event with the name <a href="#dom-networkservices-onserviceunavailable"><code>serviceunavailable</code></a> that uses the <code>Event</code> interface,
   1.339 +                      to dispatch a newly created event with the name <a href="#event-serviceunavailable"><code>serviceunavailable</code></a> that uses the
   1.340 +                      <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event" class="externalDFN"><code>Event</code></a> interface,
   1.341                        which does not bubble, is not cancellable, and has no default action, at the <var>services manager</var> associated with
   1.342                        the current <var>active service</var> object.
   1.343                   </li>
   1.344  
   1.345                   <li>
   1.346 -                    <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">Queue a task</a>
   1.347 -                     to dispatch a newly created event with the name <a href="#dom-networkservice-onserviceoffline"><code>serviceoffline</code></a> that uses the <code>Event</code> interface, which
   1.348 +                    Set <var>active service</var>'s <a href="#dom-networkservice-online"><code>online</code></a> attribute to <code>false</code> and then
   1.349 +                    <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">queue a task</a>
   1.350 +                     to dispatch a newly created event with the name <a href="#event-serviceoffline"><code>serviceoffline</code></a> that uses the
   1.351 +                     <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event" class="externalDFN"><code>Event</code></a> interface, which
   1.352                        does not bubble, is not cancellable, and has no default action, at the current
   1.353                       <var>active service</var> object.
   1.354                   </li>
   1.355 @@ -1311,7 +1313,7 @@
   1.356  
   1.357           <p>
   1.358              For each <abbr title="Domain Name System">DNS</abbr> response received from a user-agent-initiated Multicast <abbr title="Domain Name System">DNS</abbr> Browse for <abbr title="DNS Pointer Record">PTR</abbr> records with the name <code>_services._dns-sd._udp</code> on the resolved recommended automatic browsing
   1.359 -   domain [<cite><a class="bibref" href="#bib-MDNS">MDNS</a></cite>], the <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="rfc2119" title="must">must</em> run the following steps:
   1.360 +   domain [<cite><a class="bibref" href="#bib-MDNS">MDNS</a></cite>], the <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="ct"><em class="rfc2119" title="must">must</em></em> run the following steps:
   1.361           </p>
   1.362  
   1.363           <ol class="rule">
   1.364 @@ -1364,7 +1366,7 @@
   1.365           <h3><span class="secno">7.2 </span>Simple Service Discovery Protocol (<abbr title="Simple Service Discovery Protocol">SSDP</abbr>)</h3>
   1.366  
   1.367           <p>
   1.368 -          A user agent that implements UPnP service discovery must issue an <dfn id="dfn-advertisement-for-upnp-root-devices">advertisement for UPnP root devices</dfn> against the user's
   1.369 +          A user agent that implements UPnP service discovery <em class="ct"><em class="rfc2119" title="must">must</em></em> issue an <dfn id="dfn-advertisement-for-upnp-root-devices">advertisement for UPnP root devices</dfn> against the user's
   1.370            current local network according to the full normative text and timing provided in 'Section 1.3.2: Search request with M-SEARCH' detailed in [<cite><a class="bibref" href="#bib-UPNP-DEVICEARCH11">UPNP-DEVICEARCH11</a></cite>].
   1.371            </p>
   1.372  
   1.373 @@ -1395,11 +1397,11 @@
   1.374            </li>
   1.375  
   1.376            <li>
   1.377 -            If <var>ssdp device</var> does not contain at least one <var>CACHE-CONTROL</var> entry, at least one <var>USN</var> entry, at least one <var>ST</var> entry and at least one <var>LOCATION</var> entry or the value of its <var>ST</var> entry is not <code>upnp:rootdevice</code>, then the <a href="#dfn-http-response" class="internalDFN"><abbr title="Hypertext Transfer Protocol">HTTP</abbr> Response</a> is invalid and the <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="rfc2119" title="must">must</em> discard this response, abort any remaining steps and return.
   1.378 +            If <var>ssdp device</var> does not contain at least one <var>CACHE-CONTROL</var> entry, at least one <var>USN</var> entry, at least one <var>ST</var> entry and at least one <var>LOCATION</var> entry or the value of its <var>ST</var> entry is not <code>upnp:rootdevice</code>, then the <a href="#dfn-http-response" class="internalDFN"><abbr title="Hypertext Transfer Protocol">HTTP</abbr> Response</a> is invalid and the <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="ct"><em class="rfc2119" title="must">must</em></em> discard this response, abort any remaining steps and return.
   1.379            </li>
   1.380  
   1.381            <li>
   1.382 -            The user agent <em class="ct"><em class="rfc2119" title="must">must</em></em> run the rule for <a href="#dfn-obtaining-a-upnp-device-description-file" class="internalDFN">obtaining a UPnP Device Description File</a> passing in the first occurrence of <var>LOCATION</var> from <var>ssdp device</var> as the <var>device descriptor</var> argument and the first occurrence of <var>USN</var> from <var>ssdp device</var> as the <var>device identifier</var> argument and the first occurrence of <var>CACHE-CONTROL</var> from <var>ssdp device</var> as the <var>device expiry</var> argument.
   1.383 +            The user agent <em class="ct"><em class="rfc2119" title="must">must</em></em> run the rule for <a href="#dfn-obtaining-a-upnp-device-description-file" class="internalDFN">obtaining a UPnP Device Description File</a> passing in the first occurrence of <var>LOCATION</var> from <var>ssdp device</var> as the <var>device descriptor <abbr title="Uniform Resource Locator">URL</abbr></var> argument and the first occurrence of <var>USN</var> from <var>ssdp device</var> as the <var>device identifier</var> argument and the first occurrence of <var>CACHE-CONTROL</var> from <var>ssdp device</var> as the <var>device expiry</var> argument.
   1.384            </li>
   1.385  
   1.386          </ol>
   1.387 @@ -1419,11 +1421,11 @@
   1.388            </li>
   1.389  
   1.390            <li>
   1.391 -            If <var>ssdp device</var> does not contain at least one <var>CACHE-CONTROL</var> entry, at least one <var>USN</var> entry, at least one <var>NT</var> entry, at least one <var>NTS</var> entry and at least one <var>LOCATION</var> entry or the value of its <var>NT</var> entry is not <code>upnp:rootdevice</code>, then the <a href="#dfn-http-request" class="internalDFN"><abbr title="Hypertext Transfer Protocol">HTTP</abbr> Request</a> is a malformed UPnP Request and the <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="rfc2119" title="must">must</em> return a 400 Bad Request response, discard this request, abort any remaining steps and return.
   1.392 +            If <var>ssdp device</var> does not contain at least one <var>CACHE-CONTROL</var> entry, at least one <var>USN</var> entry, at least one <var>NT</var> entry, at least one <var>NTS</var> entry and at least one <var>LOCATION</var> entry or the value of its <var>NT</var> entry is not <code>upnp:rootdevice</code>, then the <a href="#dfn-http-request" class="internalDFN"><abbr title="Hypertext Transfer Protocol">HTTP</abbr> Request</a> is a malformed UPnP Request and the <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="ct"><em class="rfc2119" title="must">must</em></em> return a 400 Bad Request response, discard this request, abort any remaining steps and return.
   1.393            </li>
   1.394  
   1.395            <li>
   1.396 -            If <var>ssdp device</var>'s <var>NTS</var> entry is equal to <code>ssdp:alive</code> or <code>ssdp:update</code> then the user agent <em class="ct"><em class="rfc2119" title="must">must</em></em> run the rule for <a href="#dfn-obtaining-a-upnp-device-description-file" class="internalDFN">obtaining a UPnP Device Description File</a> passing in the first occurrence of <var>LOCATION</var> from <var>ssdp device</var> as the <var>device descriptor</var> argument and the first occurrence of <var>USN</var> from <var>ssdp device</var> as the <var>device identifier</var> argument and the first occurrence of <var>CACHE-CONTROL</var> from <var>ssdp device</var> as the <var>device expiry</var>. <br><br>Otherwise, if <var>ssdp device</var>'s <var>NTS</var> entry is equal to <code>ssdp:byebye</code> then the user agent <em class="ct"><em class="rfc2119" title="must">must</em></em> run the rule for <a href="#dfn-removing-all-services-from-a-registered-upnp-device" class="internalDFN">removing all services from a registered UPnP Device</a> passing in the first occurrence of <var>USN</var> from <var>ssdp device</var> as the <var>device identifier</var> argument.
   1.397 +            If <var>ssdp device</var>'s <var>NTS</var> entry is equal to <code>ssdp:alive</code> or <code>ssdp:update</code> then the user agent <em class="ct"><em class="rfc2119" title="must">must</em></em> run the rule for <a href="#dfn-obtaining-a-upnp-device-description-file" class="internalDFN">obtaining a UPnP Device Description File</a> passing in the first occurrence of <var>LOCATION</var> from <var>ssdp device</var> as the <var>device descriptor <abbr title="Uniform Resource Locator">URL</abbr></var> argument and the first occurrence of <var>USN</var> from <var>ssdp device</var> as the <var>device identifier</var> argument and the first occurrence of <var>CACHE-CONTROL</var> from <var>ssdp device</var> as the <var>device expiry</var>. <br><br>Otherwise, if <var>ssdp device</var>'s <var>NTS</var> entry is equal to <code>ssdp:byebye</code> then the user agent <em class="ct"><em class="rfc2119" title="must">must</em></em> run the rule for <a href="#dfn-removing-all-services-from-a-registered-upnp-device" class="internalDFN">removing all services from a registered UPnP Device</a> passing in the first occurrence of <var>USN</var> from <var>ssdp device</var> as the <var>device identifier</var> argument.
   1.398            </li>
   1.399  
   1.400          </ol>
   1.401 @@ -1440,7 +1442,7 @@
   1.402            </li>
   1.403  
   1.404            <li>
   1.405 -            If the value provided in <var>device descriptor <abbr title="Uniform Resource Locator">URL</abbr></var> cannot be resolved as a reachable <abbr title="Uniform Resource Locator">URL</abbr> on the current network or the <var>root device descriptor file</var> remains empty then it is invalid and the <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="rfc2119" title="must">must</em> abort any remaining steps and return.
   1.406 +            If the value provided in <var>device descriptor <abbr title="Uniform Resource Locator">URL</abbr></var> cannot be resolved as a reachable <abbr title="Uniform Resource Locator">URL</abbr> on the current network or the <var>root device descriptor file</var> remains empty then it is invalid and the <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="ct"><em class="rfc2119" title="must">must</em></em> abort any remaining steps and return.
   1.407            </li>
   1.408  
   1.409            <li>
   1.410 @@ -1448,7 +1450,7 @@
   1.411            </li>
   1.412  
   1.413            <li>
   1.414 -            If the current <var>device descriptor file</var> contains a <code>&lt;deviceList&gt;</code> element then for each <code>&lt;device&gt;</code> element within <code>&lt;deviceList&gt;</code> - herein known as an <var>embedded device descriptor file</var> - the user agent <em class="rfc2119" title="must">must</em>
   1.415 +            If the current <var>device descriptor file</var> contains a <code>&lt;deviceList&gt;</code> element then for each <code>&lt;device&gt;</code> element within <code>&lt;deviceList&gt;</code> - herein known as an <var>embedded device descriptor file</var> - the user agent <em class="ct"><em class="rfc2119" title="must">must</em></em>
   1.416              run the rule for <a href="#dfn-processing-a-upnp-device-description-file" class="internalDFN">processing a UPnP Device Description File</a>, passing in the current <var>embedded device descriptor file</var> as the <var>device descriptor file</var> argument, along with the common <var>device identifier</var> and <var>device expiry</var> arguments.
   1.417            </li>
   1.418  
   1.419 @@ -1547,7 +1549,7 @@
   1.420  
   1.421           <ol class="rule">
   1.422              <li>
   1.423 -               If <var>network service record</var>'s <code>eventsUrl</code> property is empty then the <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="rfc2119" title="must">must</em> abort these steps.
   1.424 +               If <var>network service record</var>'s <code>eventsUrl</code> property is empty then the <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="ct"><em class="rfc2119" title="must">must</em></em> abort these steps.
   1.425              </li>
   1.426  
   1.427              <li>
   1.428 @@ -1560,7 +1562,7 @@
   1.429              </li>
   1.430  
   1.431              <li>
   1.432 -               If a non-200 OK response is received from the <abbr title="Hypertext Transfer Protocol">HTTP</abbr> SUBSCRIBE request then the <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="rfc2119" title="must">must</em> abort these steps.
   1.433 +               If a non-200 OK response is received from the <abbr title="Hypertext Transfer Protocol">HTTP</abbr> SUBSCRIBE request then the <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="ct"><em class="rfc2119" title="must">must</em></em> abort these steps.
   1.434              </li>
   1.435  
   1.436              <li>
   1.437 @@ -1602,10 +1604,12 @@
   1.438  
   1.439                       <ol class="rule">
   1.440                          <li>
   1.441 -                           Let <var>content clone</var> be the result of obtaining the message body of the <abbr title="Hypertext Transfer Protocol">HTTP</abbr> NOTIFY request. If <var>content clone</var> is empty, then the <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="rfc2119" title="must">must</em> abort these steps.
   1.442 +                           Let <var>content clone</var> be the result of obtaining the message body of the <abbr title="Hypertext Transfer Protocol">HTTP</abbr> NOTIFY request. If <var>content clone</var> is empty, then the <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="ct"><em class="rfc2119" title="must">must</em></em> abort these steps.
   1.443                          </li>
   1.444                          <li>
   1.445 -                          Let <var>notification event</var> be a new simple event that uses the <code>Event</code> interface with the name <code>notify</code>,
   1.446 +                          Let <var>notification event</var> be a new simple event that uses the
   1.447 +                          <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event" class="externalDFN"><code>Event</code></a>
   1.448 +                           interface with the name <a href="#event-notify"><code>notify</code></a>,
   1.449                             which does not bubble, is not cancellable, and has no default action.
   1.450                          </li>
   1.451                          <li>
   1.452 @@ -1650,18 +1654,108 @@
   1.453           </section>
   1.454        </section>
   1.455  
   1.456 +  <section id="events-summary">
   1.457 +      <!--OddPage--><h2><span class="secno">8. </span>Events Summary</h2>
   1.458 +
   1.459 +      <p>The following events are dispatched on the <a href="#networkservices"><code>NetworkServices</code></a> and/or <a href="#networkservice"><code>NetworkService</code></a> objects:</p>
   1.460 +
   1.461 +       <table border="1">
   1.462 +        <thead>
   1.463 +          <tr>
   1.464 +            <th>
   1.465 +              <span title="event handlers">Event name</span>
   1.466 +            </th>
   1.467 +            <th>
   1.468 +              <span>Interface</span>
   1.469 +            </th>
   1.470 +            <th>
   1.471 +              <span>Dispatched when...</span>
   1.472 +            </th>
   1.473 +          </tr>
   1.474 +        </thead>
   1.475 +        <tbody>
   1.476 +          <tr>
   1.477 +            <td>
   1.478 +              <dfn id="event-serviceavailable">
   1.479 +                <code>serviceavailable</code>
   1.480 +              </dfn>
   1.481 +            </td>
   1.482 +            <td>
   1.483 +              <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event" class="externalDFN"><code>Event</code></a>
   1.484 +            </td>
   1.485 +            <td>
   1.486 +              When a new service that matches one of the <a>requested type tokens</a> is found in the current network.
   1.487 +            </td>
   1.488 +          </tr>
   1.489 +          <tr>
   1.490 +            <td>
   1.491 +              <dfn id="event-serviceunavailable">
   1.492 +                <code>serviceunavailable</code>
   1.493 +              </dfn>
   1.494 +            </td>
   1.495 +            <td>
   1.496 +              <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event" class="externalDFN"><code>Event</code></a>
   1.497 +            </td>
   1.498 +            <td>
   1.499 +              When an existing service that matches one of the <a>requested type tokens</a> gracefully leaves or expires from the current network.
   1.500 +            </td>
   1.501 +          </tr>
   1.502 +          <tr>
   1.503 +            <td>
   1.504 +              <dfn id="event-serviceonline">
   1.505 +                <code>serviceonline</code>
   1.506 +              </dfn>
   1.507 +            </td>
   1.508 +            <td>
   1.509 +              <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event" class="externalDFN"><code>Event</code></a>
   1.510 +            </td>
   1.511 +            <td>
   1.512 +              When a current service renews its service registration within the current network.
   1.513 +            </td>
   1.514 +          </tr>
   1.515 +          <tr>
   1.516 +            <td>
   1.517 +              <dfn id="event-serviceoffline">
   1.518 +                <code>serviceoffline</code>
   1.519 +              </dfn>
   1.520 +            </td>
   1.521 +            <td>
   1.522 +              <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event" class="externalDFN"><code>Event</code></a>
   1.523 +            </td>
   1.524 +            <td>
   1.525 +              When a current service gracefully leaves or otherwise expires from the current network.
   1.526 +            </td>
   1.527 +          </tr>
   1.528 +          <tr>
   1.529 +            <td>
   1.530 +              <dfn id="event-notify">
   1.531 +                <code>notify</code>
   1.532 +              </dfn>
   1.533 +            </td>
   1.534 +            <td>
   1.535 +              <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event" class="externalDFN"><code>Event</code></a>
   1.536 +            </td>
   1.537 +            <td>
   1.538 +              When a valid UPnP Events Subscription Message is received on a <a href="#dfn-user-agent-generated-callback-url" class="internalDFN">user-agent generated callback url</a> for a current service. This event never fires for Zeroconf-based services.
   1.539 +            </td>
   1.540 +          </tr>
   1.541 +        </tbody>
   1.542 +      </table>
   1.543 +
   1.544 +  </section>
   1.545 +
   1.546     <section id="garbage-collection">
   1.547 -      <!--OddPage--><h2><span class="secno">8. </span>Garbage collection</h2>
   1.548 +      <!--OddPage--><h2><span class="secno">9. </span>Garbage collection</h2>
   1.549  
   1.550        <p>
   1.551 -         Only when the user navigates away from the current browsing context can <a href="#networkservice" class="internalDFN"><code>NetworkService</code></a> objects be garbage-collected, its records in the <a href="#dfn-entry-script-origin-s-url-whitelist" class="internalDFN">entry script origin's <abbr title="Uniform Resource Locator">URL</abbr> whitelist</a> be removed and its corresponding entry in the <a href="#dfn-list-of-authorized-service-records" class="internalDFN">list of authorized service records</a> be removed.
   1.552 +         Only when the user navigates away from the current browsing context can <a href="#networkservice" class="internalDFN"><code>NetworkService</code></a> objects be garbage-collected, its records in the <a href="#dfn-entry-script-origin-s-url-whitelist" class="internalDFN">entry script origin's <abbr title="Uniform Resource Locator">URL</abbr> whitelist</a> be removed and its corresponding entry in the <a href="#dfn-list-of-authorized-service-records" class="internalDFN">list of authorized service records</a> be removed according to passing each expired object identifier through the rule for <a href="#dfn-removing-an-available-service" class="internalDFN">removing an available service</a>.
   1.553        </p>
   1.554  
   1.555     </section>
   1.556  
   1.557  
   1.558      <section id="use-cases-and-requirements">
   1.559 -      <!--OddPage--><h2><span class="secno">9. </span>Use Cases and Requirements</h2>
   1.560 +      <!--OddPage--><h2><span class="secno">10. </span>Use Cases and Requirements</h2>
   1.561  
   1.562        <p>This section covers what the requirements are for this <abbr title="Application Programming Interface">API</abbr>, as well as illustrates some use cases.</p>
   1.563  
     2.1 --- a/discovery-api/Overview.src.html	Mon Oct 01 15:26:54 2012 -0400
     2.2 +++ b/discovery-api/Overview.src.html	Tue Oct 02 14:51:33 2012 +0200
     2.3 @@ -60,6 +60,11 @@
     2.4        dl.domintro dd p { margin: 0.5em 0; }
     2.5        dl.domintro code {font-size: inherit; font-style: italic; }
     2.6        dl.domintro:before { display: table; margin: -1em -0.5em 0.5em auto; width: auto; content: 'This box is non-normative. Implementation requirements are given below this box.'; color: red; border: solid 2px; background: white; padding: 0 0.25em; }
     2.7 +
     2.8 +      table { border-collapse:collapse; border-style:hidden hidden none hidden }
     2.9 +      table thead { border-bottom:solid }
    2.10 +      table tbody th:first-child { border-left:solid }
    2.11 +      table td, table th { border-left:solid; border-right:solid; border-bottom:solid thin; vertical-align:top; padding:0.2em }
    2.12      </style>
    2.13    </head>
    2.14  
    2.15 @@ -165,7 +170,7 @@
    2.16       </p>
    2.17  
    2.18       <p>
    2.19 -      Conformance requirements phrased as algorithms or specific steps may be implemented in any manner, so long as the end result is equivalent. (In particular, the algorithms defined in
    2.20 +      Conformance requirements phrased as algorithms or specific steps <em class="ct">MAY</em> be implemented in any manner, so long as the end result is equivalent. (In particular, the algorithms defined in
    2.21        this specification are intended to be easy to follow, and not intended to be performant.)
    2.22       </p>
    2.23  
    2.24 @@ -174,12 +179,12 @@
    2.25       </p>
    2.26  
    2.27       <p>
    2.28 -      User agents may impose implementation-specific limits on otherwise unconstrained inputs, e.g. to prevent denial of service attacks, to guard against running out of memory, or to work
    2.29 +      User agents <em class="ct">MAY</em> impose implementation-specific limits on otherwise unconstrained inputs, e.g. to prevent denial of service attacks, to guard against running out of memory, or to work
    2.30        around platform-specific limitations.
    2.31       </p>
    2.32  
    2.33       <p>
    2.34 -      When support for a feature is disabled (e.g. as an emergency measure to mitigate a security problem, or to aid in development, or for performance reasons), user agents must act as if
    2.35 +      When support for a feature is disabled (e.g. as an emergency measure to mitigate a security problem, or to aid in development, or for performance reasons), user agents <em class="ct">MUST</em> act as if
    2.36        they had no support for the feature whatsoever, and as if the feature was not mentioned in this specification. For example, if a particular feature is accessed via an attribute in a Web
    2.37        IDL interface, the attribute itself would be omitted from the objects that implement that interface - leaving the attribute on the object but making it return null or throw an exception
    2.38        is insufficient.
    2.39 @@ -225,7 +230,7 @@
    2.40        </p>
    2.41  
    2.42        <p>
    2.43 -        A <dfn>user-agent generated callback url</dfn> is a Local-network accessible URL endpoint that a <a>user agent</a> must generate and maintain for receiving HTTP NOTIFY requests from UPnP Event sources. It is only required when the user agent implements UPnP Service Discovery as defined in
    2.44 +        A <dfn>user-agent generated callback url</dfn> is a Local-network accessible URL endpoint that a <a>user agent</a> generates and maintains for receiving HTTP NOTIFY requests from UPnP Event sources. It is only required when the user agent implements UPnP Service Discovery as defined in
    2.45          this specification.
    2.46        </p>
    2.47  
    2.48 @@ -313,7 +318,7 @@
    2.49  
    2.50         <div>
    2.51            <p>
    2.52 -            When the <dfn id="dom-navigator-getnetworkservices" title="dom-navigator-getnetworkservices"><code>getNetworkServices(type, successCallback[, errorCallback])</code></dfn> method is called, the <a>user agent</a> MUST run the following steps:
    2.53 +            When the <dfn id="dom-navigator-getnetworkservices" title="dom-navigator-getnetworkservices"><code>getNetworkServices(type, successCallback[, errorCallback])</code></dfn> method is called, the <a>user agent</a> <em class="ct">MUST</em> run the following steps:
    2.54            </p>
    2.55  
    2.56            <ol class="rule">
    2.57 @@ -331,7 +336,7 @@
    2.58              </li>
    2.59  
    2.60              <li>
    2.61 -               If <var>requested control types</var> is an array that contains at least one or more <a title="valid service type">valid service type</a> tokens then continue to the step labeled <em>process</em> below. Otherwise, the <a>user agent</a> MUST <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">queue a task</a> to invoke <var>errorCallback</var>, if it is provided and is an object of type <code>Function</code>, with a new <a href="#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object whose
    2.62 +               If <var>requested control types</var> is an array that contains at least one or more <a title="valid service type">valid service type</a> tokens then continue to the step labeled <em>process</em> below. Otherwise, the <a>user agent</a> <em class="ct">MUST</em> <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">queue a task</a> to invoke <var>errorCallback</var>, if it is provided and is an object of type <code>Function</code>, with a new <a href="#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object whose
    2.63                   <a href="#dom-navigatornetworkserviceerror-code"><code>code</code></a> attribute has the numeric value 2
    2.64                    (<a href="#dom-navigatornetworkserviceerror-unknown_type_prefix"><code>UNKNOWN_TYPE_PREFIX_ERR</code></a>) as its argument,
    2.65                     abort any remaining steps and return.
    2.66 @@ -367,7 +372,7 @@
    2.67              </li>
    2.68  
    2.69              <li>
    2.70 -               If <var>services found</var> is an empty array, then the <a>user agent</a> MUST <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">queue a task</a> to invoke <var>errorCallback</var>, if it is provided and is an object of type <code>Function</code>, with a new <a href="#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object whose
    2.71 +               If <var>services found</var> is an empty array, then the <a>user agent</a> <em class="ct">MUST</em> <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">queue a task</a> to invoke <var>errorCallback</var>, if it is provided and is an object of type <code>Function</code>, with a new <a href="#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object whose
    2.72                   <a href="#dom-navigatornetworkserviceerror-code"><code>code</code></a> attribute has the numeric value 1
    2.73                   (<a href="#dom-navigatornetworkserviceerror-permission_denied"><code>PERMISSION_DENIED_ERR</code></a>) as its argument, abort any remaining steps and return.
    2.74              </li>
    2.75 @@ -377,13 +382,13 @@
    2.76              </li>
    2.77  
    2.78              <li>
    2.79 -               Optionally, e.g. based on a previously-established user preference, for security reasons, or due to platform limitations, the <a>user agent</a> MAY <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">queue a task</a> to invoke <var>errorCallback</var>, if it is provided and is an object of type <code>Function</code>, with a new <a href="#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object whose
    2.80 +               Optionally, e.g. based on a previously-established user preference, for security reasons, or due to platform limitations, the <a>user agent</a> <em class="ct">MAY</em> <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">queue a task</a> to invoke <var>errorCallback</var>, if it is provided and is an object of type <code>Function</code>, with a new <a href="#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object whose
    2.81                   <a href="#dom-navigatornetworkserviceerror-code"><code>code</code></a> attribute has the numeric value 1
    2.82                   (<a href="#dom-navigatornetworkserviceerror-permission_denied"><code>PERMISSION_DENIED_ERR</code></a>) as its argument, abort any remaining steps and return.
    2.83              </li>
    2.84  
    2.85              <li>
    2.86 -                  The <a>user agent</a> MUST prompt the user in a user-agent-specific manner for permission to provide the
    2.87 +                  The <a>user agent</a> <em class="ct">MUST</em> prompt the user in a user-agent-specific manner for permission to provide the
    2.88                    <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/browsers.html#entry-script" class="externalDFN">entry script</a>'s
    2.89                    <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/origin-0.html#origin" class="externalDFN">origin</a> with an array of
    2.90                    <a href="#networkservice"><code>NetworkService</code></a> objects representing the user-authorized subset of <var>services found</var>.
    2.91 @@ -393,7 +398,7 @@
    2.92                    "ongoing local-network communication" indicator.
    2.93                 </p>
    2.94  
    2.95 -               <p>If the user denies permission, then the <a>user agent</a> MUST <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">queue a task</a> to invoke <var>errorCallback</var>, if it is provided and is an object of type <code>Function</code>, with a new <a href="#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object whose
    2.96 +               <p>If the user denies permission, then the <a>user agent</a> <em class="ct">MUST</em> <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">queue a task</a> to invoke <var>errorCallback</var>, if it is provided and is an object of type <code>Function</code>, with a new <a href="#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object whose
    2.97                  <a href="#dom-navigatornetworkserviceerror-code"><code>code</code></a> attribute has the numeric value 1
    2.98                  (<a href="#dom-navigatornetworkserviceerror-permission_denied"><code>PERMISSION_DENIED_ERR</code></a>) as its argument, abort any remaining steps and return.
    2.99                </p>
   2.100 @@ -434,7 +439,7 @@
   2.101              </li>
   2.102  
   2.103              <li>
   2.104 -               The <a>user agent</a> MUST <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">queue a task</a> to invoke <var>successCallback</var> with
   2.105 +               The <a>user agent</a> <em class="ct">MUST</em> <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">queue a task</a> to invoke <var>successCallback</var> with
   2.106                 <var>services manager</var> as its argument.
   2.107              </li>
   2.108  
   2.109 @@ -447,7 +452,7 @@
   2.110            </p>
   2.111  
   2.112            <p>
   2.113 -            When a <a href="#networkservice"><code>NetworkService</code></a> object is provided to a Web page, the <a>user agent</a> MUST add the <code>url</code> property
   2.114 +            When a <a href="#networkservice"><code>NetworkService</code></a> object is provided to a Web page, the <a>user agent</a> <em class="ct">MUST</em> add the <code>url</code> property
   2.115               to the <dfn>entry script origin's URL whitelist</dfn>. This list enables the
   2.116              Web page to override and initiate cross-site resource requests towards these URLs, and any sub-resources of these URLs, within the current
   2.117              <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/browsers.html#entry-script" class="externalDFN">entry script</a>'s
   2.118 @@ -456,7 +461,7 @@
   2.119           </p>
   2.120  
   2.121           <p>
   2.122 -            If the user navigates away from the current browsing context, the <a>user agent</a> MUST remove all previously whitelisted urls from the <a>entry script origin's URL whitelist</a>.
   2.123 +            If the user navigates away from the current browsing context, the <a>user agent</a> <em class="ct">MUST</em> remove all previously whitelisted urls from the <a>entry script origin's URL whitelist</a>.
   2.124              There is no persistence to network service selections provided to a web page. It is not possible to access a previously white-listed networked service without the necessary user authorization in all of the following cases:
   2.125              <ul>
   2.126                <li>If the current script is reloaded at any point in the same or different window.</li>
   2.127 @@ -482,7 +487,7 @@
   2.128          </dt>
   2.129          <dd>
   2.130            <p>
   2.131 -            Returns the current error's error code. At the current time, this may be <code>1</code> or <code>2</code>, for which the
   2.132 +            Returns the current error's error code. At the current time, this will be <code>1</code> or <code>2</code>, for which the
   2.133              corresponding error constants
   2.134              <a href="#dom-navigatornetworkserviceerror-permission_denied"><code>PERMISSION_DENIED_ERR</code></a> and
   2.135              <a href="#dom-navigatornetworkserviceerror-unknown_type_prefix"><code>UNKNOWN_TYPE_PREFIX_ERR</code></a> are defined.
   2.136 @@ -492,7 +497,7 @@
   2.137  
   2.138           <p>
   2.139              The <dfn id="dom-navigatornetworkserviceerror-code" title="dom-navigatornetworkserviceerror-code"><code>code</code></dfn> attribute of a
   2.140 -            <a href="#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object MUST return the code for the error, which will be one of the following:
   2.141 +            <a href="#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object <em class="ct">MUST</em> return the code for the error, which will be one of the following:
   2.142           </p>
   2.143  
   2.144           <dl>
   2.145 @@ -567,11 +572,11 @@
   2.146  
   2.147          <div>
   2.148             <p>
   2.149 -              The <dfn id="dom-networkservices-length"><code>length</code></dfn> attribute MUST return the number of services represented in the object's corresponding <a>list of authorized service records</a> at the time of getting.
   2.150 +              The <dfn id="dom-networkservices-length"><code>length</code></dfn> attribute <em class="ct">MUST</em> return the number of services represented in the object's corresponding <a>list of authorized service records</a> at the time of getting.
   2.151             </p>
   2.152  
   2.153             <p>
   2.154 -              The <dfn id="dom-networkservices-servicesavailable"><code>servicesAvailable</code></dfn> attribute MUST return the number of services in the <a>list of available service records</a> whose <code>type</code> attribute matches any of the <a>valid service type</a> tokens that was initially used to create the current <a href="#networkservices"><code>NetworkServices</code></a> object.
   2.155 +              The <dfn id="dom-networkservices-servicesavailable"><code>servicesAvailable</code></dfn> attribute <em class="ct">MUST</em> return the number of services in the <a>list of available service records</a> whose <code>type</code> attribute matches any of the <a>valid service type</a> tokens that was initially used to create the current <a href="#networkservices"><code>NetworkServices</code></a> object.
   2.156             </p>
   2.157  
   2.158          </div>
   2.159 @@ -627,12 +632,12 @@
   2.160        </p>
   2.161  
   2.162        <p>
   2.163 -        To <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#determine-the-value-of-an-indexed-property" class="externalDFN">determine the value of an indexed property</a> for a given index <var>index</var> in a <a href="#networkservices"><code>NetworkServices</code></a> object's <a>list of authorized service records</a>, the user agent MUST return the <a href="#networkservice"><code>NetworkService</code></a> object that represents the <var>index</var>th service in the <a>list of authorized service records</a>.
   2.164 +        To <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#determine-the-value-of-an-indexed-property" class="externalDFN">determine the value of an indexed property</a> for a given index <var>index</var> in a <a href="#networkservices"><code>NetworkServices</code></a> object's <a>list of authorized service records</a>, the user agent <em class="ct">MUST</em> return the <a href="#networkservice"><code>NetworkService</code></a> object that represents the <var>index</var>th service in the <a>list of authorized service records</a>.
   2.165        </p>
   2.166  
   2.167        <p>
   2.168 -        The <dfn id="dom-networkservices-getservicebyid"><code>getServiceById(id)</code></dfn> method MUST return the first <a href="#networkservice"><code>NetworkService</code></a> object in the <a>list of authorized service records</a> represented by the respective object whose <a href="#dom-networkservice-id"><code>id</code></a> attribute is equal to the value of the <var>id</var> argument.
   2.169 -        When no services in the <a>list of authorized service records</a> match the given argument, the method MUST return null.
   2.170 +        The <dfn id="dom-networkservices-getservicebyid"><code>getServiceById(id)</code></dfn> method <em class="ct">MUST</em> return the first <a href="#networkservice"><code>NetworkService</code></a> object in the <a>list of authorized service records</a> represented by the respective object whose <a href="#dom-networkservice-id"><code>id</code></a> attribute is equal to the value of the <var>id</var> argument.
   2.171 +        When no services in the <a>list of authorized service records</a> match the given argument, the method <em class="ct">MUST</em> return null.
   2.172        </p>
   2.173  
   2.174        <p>
   2.175 @@ -647,7 +652,7 @@
   2.176        <h2>Events</h2>
   2.177  
   2.178        <p>
   2.179 -         The following are the event handlers (and their corresponding event handler event types) that must be supported, as IDL attributes, by all objects implementing the <a href="#networkservices"><code>NetworkServices</code></a> interface:
   2.180 +         The following are the event handlers (and their corresponding event handler event types) that <em class="ct">MUST</em> be supported, as IDL attributes, by all objects implementing the <a href="#networkservices"><code>NetworkServices</code></a> interface:
   2.181         </p>
   2.182  
   2.183         <table border="1">
   2.184 @@ -669,7 +674,7 @@
   2.185                </dfn>
   2.186              </td>
   2.187              <td>
   2.188 -              <code title="event-serviceavailable">serviceavailable</code>
   2.189 +              <a href="#event-serviceavailable"><code>serviceavailable</code>
   2.190              </td>
   2.191            </tr>
   2.192            <tr>
   2.193 @@ -679,16 +684,12 @@
   2.194                </dfn>
   2.195              </td>
   2.196              <td>
   2.197 -              <code title="event-serviceunavailable">serviceunavailable</code>
   2.198 +              <a href="#event-serviceunavailable"><code>serviceunavailable</code></a>
   2.199              </td>
   2.200            </tr>
   2.201          </tbody>
   2.202        </table>
   2.203  
   2.204 -      <p>
   2.205 -         Events with an event type of <code>serviceavailable</code> or <code>serviceunavailable</code> defined in this specification are simple <code>Event</code> objects.
   2.206 -      </p>
   2.207 -
   2.208        </section>
   2.209  
   2.210      </section>
   2.211 @@ -787,7 +788,7 @@
   2.212        </dl>
   2.213  
   2.214            <p>
   2.215 -            The <dfn id="dom-networkservice-id"><code>id</code></dfn> attribute is a unique identifier for the service. The same service provided at different times or on different objects MUST have the same <a href="#dom-networkservice-id"><code>id</code></a> value.
   2.216 +            The <dfn id="dom-networkservice-id"><code>id</code></dfn> attribute is a unique identifier for the service. The same service provided at different times or on different objects <em class="ct">MUST</em> have the same <a href="#dom-networkservice-id"><code>id</code></a> value.
   2.217           </p>
   2.218  
   2.219           <p>
   2.220 @@ -829,7 +830,7 @@
   2.221  
   2.222        <p>
   2.223          The <dfn id="dom-networkservice-online"><code>online</code></dfn> attribute indicates whether the service is reporting itself as being
   2.224 -        either <var>online</var>, and therefore accessible on the local network, in which case this attribute will return <code>true</code> or, <var>offline</var>, and therefore not accessible on the local network, either temporarily or permanently, in which case this attribute will return <code>false</code>. This attribute MUST default to <code>true</code>.
   2.225 +        either <var>online</var>, and therefore accessible on the local network, in which case this attribute will return <code>true</code> or, <var>offline</var>, and therefore not accessible on the local network, either temporarily or permanently, in which case this attribute will return <code>false</code>. This attribute <em class="ct">MUST</em> default to <code>true</code>.
   2.226        </p>
   2.227  
   2.228        </section>
   2.229 @@ -838,7 +839,7 @@
   2.230           <h3>Events</h3>
   2.231  
   2.232        <p>
   2.233 -         The following are the event handlers (and their corresponding event handler event types) that must be supported, as IDL attributes, by all objects implementing the
   2.234 +         The following are the event handlers (and their corresponding event handler event types) that <em class="ct">MUST</em> be supported, as IDL attributes, by all objects implementing the
   2.235           <a href="#networkservice"><code>NetworkService</code></a> interface:
   2.236         </p>
   2.237  
   2.238 @@ -861,7 +862,7 @@
   2.239                </dfn>
   2.240              </td>
   2.241              <td>
   2.242 -              <code title="event-notify">notify</code>
   2.243 +              <a href="#event-notify"><code>notify</code></a>
   2.244              </td>
   2.245            </tr>
   2.246            <tr>
   2.247 @@ -871,7 +872,7 @@
   2.248                </dfn>
   2.249              </td>
   2.250              <td>
   2.251 -              <code title="event-onserviceonline">serviceonline</code>
   2.252 +              <a href="#event-serviceonline"><code>serviceonline</code></a>
   2.253              </td>
   2.254            </tr>
   2.255            <tr>
   2.256 @@ -881,16 +882,12 @@
   2.257                </dfn>
   2.258              </td>
   2.259              <td>
   2.260 -              <code title="event-onserviceoffline">serviceoffline</code>
   2.261 +              <a href="#event-serviceoffline"><code>serviceoffline</code></a>
   2.262              </td>
   2.263            </tr>
   2.264          </tbody>
   2.265        </table>
   2.266  
   2.267 -      <p>
   2.268 -         Events with an event type of <code>notify</code>, <code>serviceonline</code> or <code>serviceoffline</code> defined in this specification are simple <code>Event</code> objects.
   2.269 -      </p>
   2.270 -
   2.271        </section>
   2.272     </section>
   2.273  
   2.274 @@ -898,8 +895,8 @@
   2.275              <h2>Service Discovery</h2>
   2.276  
   2.277        <p>
   2.278 -         A <a>user agent</a> conforming to this specification MAY implement <acronym title="Simple Service Discovery Protocol">SSDP</acronym> [[!UPNP-DEVICEARCH11]] and Zeroconf [[!DNS-SD]] + [[!MDNS]] service discovery mechanisms
   2.279 -         to enable Web pages to request and connect with HTTP services running on networked devices, discovered via either mechanism, through this API. When a <a>user agent</a> implements either of these service discovery mechanisms, then it MUST conform to the corresponding algorithms provided in this section of the specification.
   2.280 +         A <a>user agent</a> conforming to this specification <em class="ct">MAY</em> implement <acronym title="Simple Service Discovery Protocol">SSDP</acronym> [[!UPNP-DEVICEARCH11]] and Zeroconf [[!DNS-SD]] + [[!MDNS]] service discovery mechanisms
   2.281 +         to enable Web pages to request and connect with HTTP services running on networked devices, discovered via either mechanism, through this API. When a <a>user agent</a> implements either of these service discovery mechanisms, then it <em class="ct">MUST</em> conform to the corresponding algorithms provided in this section of the specification.
   2.282        </p>
   2.283        <p>
   2.284           This section presents how the results of these two service discovery
   2.285 @@ -915,7 +912,7 @@
   2.286        <p>
   2.287           The <dfn>list of available service records</dfn> is a single dynamic internal lookup table within user agents that is used to track all the  services that have been discovered and are available in the current network at any given time.
   2.288           At any point during the running of either of the two service discovery mechanisms then existing entries within this table can be updated, entries can be added and entries can be removed as the status of networked
   2.289 -         services changes according to the rules defined in this specification. <!--Each record contained within this table contains the attributes: <code>id</code>, <code>deviceId</code>, <code>name</code>, <code>type</code>, <code>url</code>, <code>config</code> and <code>expiryTimestamp</code>.-->
   2.290 +         services changes according to the rules defined in this specification.
   2.291        </p>
   2.292  
   2.293        <p>
   2.294 @@ -973,14 +970,16 @@
   2.295                 If the <var>new service registration flag</var> is set to <code>true</code> then increment the <a href="#dom-networkservices-servicesavailable"><code>servicesAvailable</code></a> attribute of the <var>services manager</var> associated with
   2.296                 the current <var>active service</var>
   2.297                  object by <code>1</code> and then <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">queue a task</a>
   2.298 -                 to dispatch a newly created event with the name <a href="#dom-networkservices-onserviceavailable"><code>serviceavailable</code></a> that uses the <code>Event</code> interface,
   2.299 +                 to dispatch a newly created event with the name <a href="#event-serviceavailable"><code>serviceavailable</code></a> that uses the <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event" class="externalDFN"><code>Event</code></a> interface,
   2.300                   which does not bubble, is not cancellable, and has no default action, at the <var>services manager</var> associated with
   2.301                   the current <var>active service</var> object.
   2.302              </li>
   2.303  
   2.304              <li>
   2.305 -               <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">Queue a task</a>
   2.306 -                to dispatch a newly created event with the name <a href="#dom-networkservice-onserviceonline"><code>serviceonline</code></a> that uses the <code>Event</code> interface, which
   2.307 +               Set <var>active service</var>'s <a href="#dom-networkservice-online"><code>online</code></a> attribute to <code>true</code> and then
   2.308 +               <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">queue a task</a>
   2.309 +                to dispatch a newly created event with the name <a href="#event-serviceonline"><code>serviceonline</code></a> that uses the
   2.310 +                <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event" class="externalDFN"><code>Event</code></a> interface, which
   2.311                   does not bubble, is not cancellable, and has no default action, at the current
   2.312                  <var>active service</var> object.
   2.313              </li>
   2.314 @@ -1028,14 +1027,17 @@
   2.315                      Decrement the <a href="#dom-networkservices-servicesavailable"><code>servicesAvailable</code></a> attribute of the
   2.316                      <var>services manager</var> associated with the current <var>active service</var>
   2.317                       object by <code>1</code> and then <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">queue a task</a>
   2.318 -                      to dispatch a newly created event with the name <a href="#dom-networkservices-onserviceunavailable"><code>serviceunavailable</code></a> that uses the <code>Event</code> interface,
   2.319 +                      to dispatch a newly created event with the name <a href="#event-serviceunavailable"><code>serviceunavailable</code></a> that uses the
   2.320 +                      <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event" class="externalDFN"><code>Event</code></a> interface,
   2.321                        which does not bubble, is not cancellable, and has no default action, at the <var>services manager</var> associated with
   2.322                        the current <var>active service</var> object.
   2.323                   </li>
   2.324  
   2.325                   <li>
   2.326 -                    <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">Queue a task</a>
   2.327 -                     to dispatch a newly created event with the name <a href="#dom-networkservice-onserviceoffline"><code>serviceoffline</code></a> that uses the <code>Event</code> interface, which
   2.328 +                    Set <var>active service</var>'s <a href="#dom-networkservice-online"><code>online</code></a> attribute to <code>false</code> and then
   2.329 +                    <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">queue a task</a>
   2.330 +                     to dispatch a newly created event with the name <a href="#event-serviceoffline"><code>serviceoffline</code></a> that uses the
   2.331 +                     <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event" class="externalDFN"><code>Event</code></a> interface, which
   2.332                        does not bubble, is not cancellable, and has no default action, at the current
   2.333                       <var>active service</var> object.
   2.334                   </li>
   2.335 @@ -1066,7 +1068,7 @@
   2.336  
   2.337           <p>
   2.338              For each DNS response received from a user-agent-initiated Multicast DNS Browse for <abbr title="DNS Pointer Record">PTR</abbr> records with the name <code>_services._dns-sd._udp</code> on the resolved recommended automatic browsing
   2.339 -   domain [[!MDNS]], the <a>user agent</a> MUST run the following steps:
   2.340 +   domain [[!MDNS]], the <a>user agent</a> <em class="ct">MUST</em> run the following steps:
   2.341           </p>
   2.342  
   2.343           <ol class="rule">
   2.344 @@ -1119,7 +1121,7 @@
   2.345           <h5>Simple Service Discovery Protocol (<abbr title="Simple Service Discovery Protocol">SSDP</abbr>)</h5>
   2.346  
   2.347           <p>
   2.348 -          A user agent that implements UPnP service discovery must issue an <dfn>advertisement for UPnP root devices</dfn> against the user's
   2.349 +          A user agent that implements UPnP service discovery <em class="ct">MUST</em> issue an <dfn>advertisement for UPnP root devices</dfn> against the user's
   2.350            current local network according to the full normative text and timing provided in 'Section 1.3.2: Search request with M-SEARCH' detailed in [[!UPNP-DEVICEARCH11]].
   2.351            </p>
   2.352  
   2.353 @@ -1150,11 +1152,11 @@
   2.354            </li>
   2.355  
   2.356            <li>
   2.357 -            If <var>ssdp device</var> does not contain at least one <var>CACHE-CONTROL</var> entry, at least one <var>USN</var> entry, at least one <var>ST</var> entry and at least one <var>LOCATION</var> entry or the value of its <var>ST</var> entry is not <code>upnp:rootdevice</code>, then the <a>HTTP Response</a> is invalid and the <a>user agent</a> MUST discard this response, abort any remaining steps and return.
   2.358 +            If <var>ssdp device</var> does not contain at least one <var>CACHE-CONTROL</var> entry, at least one <var>USN</var> entry, at least one <var>ST</var> entry and at least one <var>LOCATION</var> entry or the value of its <var>ST</var> entry is not <code>upnp:rootdevice</code>, then the <a>HTTP Response</a> is invalid and the <a>user agent</a> <em class="ct">MUST</em> discard this response, abort any remaining steps and return.
   2.359            </li>
   2.360  
   2.361            <li>
   2.362 -            The user agent <em class="ct">MUST</em> run the rule for <a>obtaining a UPnP Device Description File</a> passing in the first occurrence of <var>LOCATION</var> from <var>ssdp device</var> as the <var>device descriptor</var> argument and the first occurrence of <var>USN</var> from <var>ssdp device</var> as the <var>device identifier</var> argument and the first occurrence of <var>CACHE-CONTROL</var> from <var>ssdp device</var> as the <var>device expiry</var> argument.
   2.363 +            The user agent <em class="ct">MUST</em> run the rule for <a>obtaining a UPnP Device Description File</a> passing in the first occurrence of <var>LOCATION</var> from <var>ssdp device</var> as the <var>device descriptor URL</var> argument and the first occurrence of <var>USN</var> from <var>ssdp device</var> as the <var>device identifier</var> argument and the first occurrence of <var>CACHE-CONTROL</var> from <var>ssdp device</var> as the <var>device expiry</var> argument.
   2.364            </li>
   2.365  
   2.366          </ol>
   2.367 @@ -1174,11 +1176,11 @@
   2.368            </li>
   2.369  
   2.370            <li>
   2.371 -            If <var>ssdp device</var> does not contain at least one <var>CACHE-CONTROL</var> entry, at least one <var>USN</var> entry, at least one <var>NT</var> entry, at least one <var>NTS</var> entry and at least one <var>LOCATION</var> entry or the value of its <var>NT</var> entry is not <code>upnp:rootdevice</code>, then the <a>HTTP Request</a> is a malformed UPnP Request and the <a>user agent</a> MUST return a 400 Bad Request response, discard this request, abort any remaining steps and return.
   2.372 +            If <var>ssdp device</var> does not contain at least one <var>CACHE-CONTROL</var> entry, at least one <var>USN</var> entry, at least one <var>NT</var> entry, at least one <var>NTS</var> entry and at least one <var>LOCATION</var> entry or the value of its <var>NT</var> entry is not <code>upnp:rootdevice</code>, then the <a>HTTP Request</a> is a malformed UPnP Request and the <a>user agent</a> <em class="ct">MUST</em> return a 400 Bad Request response, discard this request, abort any remaining steps and return.
   2.373            </li>
   2.374  
   2.375            <li>
   2.376 -            If <var>ssdp device</var>'s <var>NTS</var> entry is equal to <code>ssdp:alive</code> or <code>ssdp:update</code> then the user agent <em class="ct">MUST</em> run the rule for <a>obtaining a UPnP Device Description File</a> passing in the first occurrence of <var>LOCATION</var> from <var>ssdp device</var> as the <var>device descriptor</var> argument and the first occurrence of <var>USN</var> from <var>ssdp device</var> as the <var>device identifier</var> argument and the first occurrence of <var>CACHE-CONTROL</var> from <var>ssdp device</var> as the <var>device expiry</var>. <br/><br/>Otherwise, if <var>ssdp device</var>'s <var>NTS</var> entry is equal to <code>ssdp:byebye</code> then the user agent <em class="ct">MUST</em> run the rule for <a>removing all services from a registered UPnP Device</a> passing in the first occurrence of <var>USN</var> from <var>ssdp device</var> as the <var>device identifier</var> argument.
   2.377 +            If <var>ssdp device</var>'s <var>NTS</var> entry is equal to <code>ssdp:alive</code> or <code>ssdp:update</code> then the user agent <em class="ct">MUST</em> run the rule for <a>obtaining a UPnP Device Description File</a> passing in the first occurrence of <var>LOCATION</var> from <var>ssdp device</var> as the <var>device descriptor URL</var> argument and the first occurrence of <var>USN</var> from <var>ssdp device</var> as the <var>device identifier</var> argument and the first occurrence of <var>CACHE-CONTROL</var> from <var>ssdp device</var> as the <var>device expiry</var>. <br/><br/>Otherwise, if <var>ssdp device</var>'s <var>NTS</var> entry is equal to <code>ssdp:byebye</code> then the user agent <em class="ct">MUST</em> run the rule for <a>removing all services from a registered UPnP Device</a> passing in the first occurrence of <var>USN</var> from <var>ssdp device</var> as the <var>device identifier</var> argument.
   2.378            </li>
   2.379  
   2.380          </ol>
   2.381 @@ -1195,7 +1197,7 @@
   2.382            </li>
   2.383  
   2.384            <li>
   2.385 -            If the value provided in <var>device descriptor URL</var> cannot be resolved as a reachable URL on the current network or the <var>root device descriptor file</var> remains empty then it is invalid and the <a>user agent</a> MUST abort any remaining steps and return.
   2.386 +            If the value provided in <var>device descriptor URL</var> cannot be resolved as a reachable URL on the current network or the <var>root device descriptor file</var> remains empty then it is invalid and the <a>user agent</a> <em class="ct">MUST</em> abort any remaining steps and return.
   2.387            </li>
   2.388  
   2.389            <li>
   2.390 @@ -1203,7 +1205,7 @@
   2.391            </li>
   2.392  
   2.393            <li>
   2.394 -            If the current <var>device descriptor file</var> contains a <code>&lt;deviceList&gt;</code> element then for each <code>&lt;device&gt;</code> element within <code>&lt;deviceList&gt;</code> - herein known as an <var>embedded device descriptor file</var> - the user agent MUST
   2.395 +            If the current <var>device descriptor file</var> contains a <code>&lt;deviceList&gt;</code> element then for each <code>&lt;device&gt;</code> element within <code>&lt;deviceList&gt;</code> - herein known as an <var>embedded device descriptor file</var> - the user agent <em class="ct">MUST</em>
   2.396              run the rule for <a>processing a UPnP Device Description File</a>, passing in the current <var>embedded device descriptor file</var> as the <var>device descriptor file</var> argument, along with the common <var>device identifier</var> and <var>device expiry</var> arguments.
   2.397            </li>
   2.398  
   2.399 @@ -1302,7 +1304,7 @@
   2.400  
   2.401           <ol class="rule">
   2.402              <li>
   2.403 -               If <var>network service record</var>'s <code>eventsUrl</code> property is empty then the <a>user agent</a> MUST abort these steps.
   2.404 +               If <var>network service record</var>'s <code>eventsUrl</code> property is empty then the <a>user agent</a> <em class="ct">MUST</em> abort these steps.
   2.405              </li>
   2.406  
   2.407              <li>
   2.408 @@ -1315,7 +1317,7 @@
   2.409              </li>
   2.410  
   2.411              <li>
   2.412 -               If a non-200 OK response is received from the HTTP SUBSCRIBE request then the <a>user agent</a> MUST abort these steps.
   2.413 +               If a non-200 OK response is received from the HTTP SUBSCRIBE request then the <a>user agent</a> <em class="ct">MUST</em> abort these steps.
   2.414              </li>
   2.415  
   2.416              <li>
   2.417 @@ -1357,10 +1359,12 @@
   2.418  
   2.419                       <ol class="rule">
   2.420                          <li>
   2.421 -                           Let <var>content clone</var> be the result of obtaining the message body of the HTTP NOTIFY request. If <var>content clone</var> is empty, then the <a>user agent</a> MUST abort these steps.
   2.422 +                           Let <var>content clone</var> be the result of obtaining the message body of the HTTP NOTIFY request. If <var>content clone</var> is empty, then the <a>user agent</a> <em class="ct">MUST</em> abort these steps.
   2.423                          </li>
   2.424                          <li>
   2.425 -                          Let <var>notification event</var> be a new simple event that uses the <code>Event</code> interface with the name <code>notify</code>,
   2.426 +                          Let <var>notification event</var> be a new simple event that uses the
   2.427 +                          <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event" class="externalDFN"><code>Event</code></a>
   2.428 +                           interface with the name <a href="#event-notify"><code>notify</code></a>,
   2.429                             which does not bubble, is not cancellable, and has no default action.
   2.430                          </li>
   2.431                          <li>
   2.432 @@ -1405,11 +1409,101 @@
   2.433           </section>
   2.434        </section>
   2.435  
   2.436 +  <section>
   2.437 +      <h3>Events Summary</h3>
   2.438 +
   2.439 +      <p>The following events are dispatched on the <a href="#networkservices"><code>NetworkServices</code></a> and/or <a href="#networkservice"><code>NetworkService</code></a> objects:</p>
   2.440 +
   2.441 +       <table border="1">
   2.442 +        <thead>
   2.443 +          <tr>
   2.444 +            <th>
   2.445 +              <span title="event handlers">Event name</span>
   2.446 +            </th>
   2.447 +            <th>
   2.448 +              <span>Interface</span>
   2.449 +            </th>
   2.450 +            <th>
   2.451 +              <span>Dispatched when...</span>
   2.452 +            </th>
   2.453 +          </tr>
   2.454 +        </thead>
   2.455 +        <tbody>
   2.456 +          <tr>
   2.457 +            <td>
   2.458 +              <dfn id="event-serviceavailable">
   2.459 +                <code>serviceavailable</code>
   2.460 +              </dfn>
   2.461 +            </td>
   2.462 +            <td>
   2.463 +              <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event" class="externalDFN"><code>Event</code></a>
   2.464 +            </td>
   2.465 +            <td>
   2.466 +              When a new service that matches one of the <a>requested type tokens</a> is found in the current network.
   2.467 +            </td>
   2.468 +          </tr>
   2.469 +          <tr>
   2.470 +            <td>
   2.471 +              <dfn id="event-serviceunavailable">
   2.472 +                <code>serviceunavailable</code>
   2.473 +              </dfn>
   2.474 +            </td>
   2.475 +            <td>
   2.476 +              <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event" class="externalDFN"><code>Event</code></a>
   2.477 +            </td>
   2.478 +            <td>
   2.479 +              When an existing service that matches one of the <a>requested type tokens</a> gracefully leaves or expires from the current network.
   2.480 +            </td>
   2.481 +          </tr>
   2.482 +          <tr>
   2.483 +            <td>
   2.484 +              <dfn id="event-serviceonline">
   2.485 +                <code>serviceonline</code>
   2.486 +              </dfn>
   2.487 +            </td>
   2.488 +            <td>
   2.489 +              <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event" class="externalDFN"><code>Event</code></a>
   2.490 +            </td>
   2.491 +            <td>
   2.492 +              When a current service renews its service registration within the current network.
   2.493 +            </td>
   2.494 +          </tr>
   2.495 +          <tr>
   2.496 +            <td>
   2.497 +              <dfn id="event-serviceoffline">
   2.498 +                <code>serviceoffline</code>
   2.499 +              </dfn>
   2.500 +            </td>
   2.501 +            <td>
   2.502 +              <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event" class="externalDFN"><code>Event</code></a>
   2.503 +            </td>
   2.504 +            <td>
   2.505 +              When a current service gracefully leaves or otherwise expires from the current network.
   2.506 +            </td>
   2.507 +          </tr>
   2.508 +          <tr>
   2.509 +            <td>
   2.510 +              <dfn id="event-notify">
   2.511 +                <code>notify</code>
   2.512 +              </dfn>
   2.513 +            </td>
   2.514 +            <td>
   2.515 +              <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event" class="externalDFN"><code>Event</code></a>
   2.516 +            </td>
   2.517 +            <td>
   2.518 +              When a valid UPnP Events Subscription Message is received on a <a>user-agent generated callback url</a> for a current service. This event never fires for Zeroconf-based services.
   2.519 +            </td>
   2.520 +          </tr>
   2.521 +        </tbody>
   2.522 +      </table>
   2.523 +
   2.524 +  </section>
   2.525 +
   2.526     <section>
   2.527        <h3>Garbage collection</h3>
   2.528  
   2.529        <p>
   2.530 -         Only when the user navigates away from the current browsing context can <a><code>NetworkService</code></a> objects be garbage-collected, its records in the <a>entry script origin's URL whitelist</a> be removed and its corresponding entry in the <a>list of authorized service records</a> be removed.
   2.531 +         Only when the user navigates away from the current browsing context can <a><code>NetworkService</code></a> objects be garbage-collected, its records in the <a>entry script origin's URL whitelist</a> be removed and its corresponding entry in the <a>list of authorized service records</a> be removed according to passing each expired object identifier through the rule for <a>removing an available service</a>.
   2.532        </p>
   2.533  
   2.534     </section>