Add WD (29th March 2013) for Network Service Discovery API
authorRich Tibbett <richt@opera.com>
Wed, 27 Mar 2013 06:27:35 +0100
changeset 402a3626e492d27
parent 401 c0015b3387bf
child 403 8bafa5727ae3
Add WD (29th March 2013) for Network Service Discovery API
discovery-api/Overview.html
discovery-api/Overview.src.html
discovery-api/WD.html
discovery-api/WD_20121004.html
discovery-api/WD_20130329.html
discovery-api/css/respec.nsd.css
     1.1 --- a/discovery-api/Overview.html	Mon Mar 25 13:56:06 2013 -0400
     1.2 +++ b/discovery-api/Overview.html	Wed Mar 27 06:27:35 2013 +0100
     1.3 @@ -1,470 +1,383 @@
     1.4  <!DOCTYPE html>
     1.5 -<html lang="en"
     1.6 -      dir="ltr">
     1.7 -  <head>
     1.8 +<html lang="en" dir="ltr">
     1.9 +<head>
    1.10      <title>
    1.11        Network Service Discovery
    1.12      </title>
    1.13 -    <meta http-equiv="Content-Type"
    1.14 -          content="text/html; charset=utf-8">
    1.15 -    <style type="text/css">
    1.16 -/* Custom ReSpec CSS (by Rich Tibbett) */
    1.17 +    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    1.18  
    1.19 -      /* Add better spacing to sections */
    1.20 -      section, .section { margin-bottom: 2em; }
    1.21  
    1.22 -      /* Reduce note & issue render size */
    1.23 -      .note, .issue { font-size:0.8em; }
    1.24 +    <style>
    1.25 +     /* Custom ReSpec CSS (by Rich Tibbett) */
    1.26  
    1.27 -      /* Add addition spacing to <ol> and <ul> for rule definition */
    1.28 -      ol.rule li, ul.rule li { padding:0.6em; }
    1.29 +     /* Add better spacing to sections */
    1.30 +     section, .section { margin-bottom: 2em; }
    1.31  
    1.32 -      pre.widl { border: solid thin; background: #EEEEEE; color: black; padding: 0.5em 1em; position: relative; }
    1.33 -      pre.widl :link, pre.widl :visited { color: #000; background: transparent; }
    1.34 -      pre.widl:before { content: "IDL"; font: bold small sans-serif; padding: 0.5em; background: white; position: absolute; top: 0; margin: -1px 0 0 -4em; width: 1.5em; border: thin solid; border-radius: 0 0 0 0.5em }
    1.35 +     /* Reduce note & issue render size */
    1.36 +     .note, .issue { font-size:0.8em; }
    1.37  
    1.38 -      div.example { border: solid thin red; background: #F7DFE5; color: black; padding: 0.5em 1em; position: relative; margin: 1em 0 1em 4.6em; width: auto; }
    1.39 -      div.example:before { content: "EXAMPLE"; font: bold small sans-serif; padding: 0.5em; background: red; color: white; position: absolute; top: 0; margin: -1px 0 0 -7.6em; width: 5em; border: thin solid red; border-radius: 0 0 0 0.5em }
    1.40 +     /* Add addition spacing to <ol> and <ul> for rule definition */
    1.41 +     ol.rule li, ul.rule li { padding:0.6em; }
    1.42  
    1.43 -      dl.domintro { color: green; margin: 2em 0 2em 2em; padding: 0.5em 1em; border: none; background: #DDFFDD; }
    1.44 -      hr + dl.domintro, div.impl + dl.domintro { margin-top: 2.5em; margin-bottom: 1.5em; }
    1.45 -      dl.domintro dt, dl.domintro dt * { color: black; text-decoration: none; }
    1.46 -      dl.domintro dd { margin: 0.5em 0 1em 2em; padding: 0; }
    1.47 -      dl.domintro dd p { margin: 0.5em 0; }
    1.48 -      dl.domintro code {font-size: inherit; font-style: italic; }
    1.49 -      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.50 +     pre.widl { border: solid thin; background: #EEEEEE; color: black; padding: 0.5em 1em; position: relative; }
    1.51 +     pre.widl :link, pre.widl :visited { color: #000; background: transparent; }
    1.52 +     pre.widl:before { content: "IDL"; font: bold small sans-serif; padding: 0.5em; background: white; position: absolute; top: 0; margin: -1px 0 0 -4em; width: 1.5em; border: thin solid; border-radius: 0 0 0 0.5em }
    1.53  
    1.54 -      table { border-collapse:collapse; border-style:hidden hidden none hidden }
    1.55 -      table thead { border-bottom:solid }
    1.56 -      table tbody th:first-child { border-left:solid }
    1.57 -      table td, table th { border-left:solid; border-right:solid; border-bottom:solid thin; vertical-align:top; padding:0.2em }
    1.58 -    </style>
    1.59 -    <style type="text/css">
    1.60 -/*****************************************************************
    1.61 -    * ReSpec 3 CSS
    1.62 -    * Robin Berjon - http://berjon.com/
    1.63 -    *****************************************************************/
    1.64 +     div.example { border: solid thin black; background: #FFFFF0; color: black; padding: 0.5em 1em; position: relative; margin: 1em 0 1em 4.6em; width: auto; }
    1.65 +     div.example:before { content: "EXAMPLE"; font: bold small sans-serif; padding: 0.5em; background: white; color: black; position: absolute; top: 0; margin: -1px 0 0 -7.6em; width: 5em; border: thin solid black; border-radius: 0 0 0 0.5em }
    1.66  
    1.67 -    /* --- INLINES --- */
    1.68 -    em.rfc2119 {
    1.69 +     dl.domintro { color: green; margin: 2em 0 2em 2em; padding: 0.5em 1em; border: none; background: #DDFFDD; }
    1.70 +     hr + dl.domintro, div.impl + dl.domintro { margin-top: 2.5em; margin-bottom: 1.5em; }
    1.71 +     dl.domintro dt, dl.domintro dt * { color: black; text-decoration: none; }
    1.72 +     dl.domintro dd { margin: 0.5em 0 1em 2em; padding: 0; }
    1.73 +     dl.domintro dd p { margin: 0.5em 0; }
    1.74 +     dl.domintro code {font-size: inherit; font-style: italic; }
    1.75 +     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; font-size:0.8em; }
    1.76 +
    1.77 +     table { border-collapse:collapse; border-style:hidden hidden none hidden }
    1.78 +     table thead { border-bottom:solid }
    1.79 +     table tbody th:first-child { border-left:solid }
    1.80 +     table td, table th { border-left:solid; border-right:solid; border-bottom:solid thin; vertical-align:top; padding:0.2em }
    1.81 +     </style>
    1.82 +  <style>/*****************************************************************
    1.83 + * ReSpec 3 CSS
    1.84 + * Robin Berjon - http://berjon.com/
    1.85 + *****************************************************************/
    1.86 +
    1.87 +/* --- INLINES --- */
    1.88 +em.rfc2119 {
    1.89      text-transform:     lowercase;
    1.90      font-variant:       small-caps;
    1.91      font-style:         normal;
    1.92      color:              #900;
    1.93 -    }
    1.94 +}
    1.95  
    1.96 -    h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
    1.97 -    h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
    1.98 +h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
    1.99 +h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
   1.100      border: none;
   1.101 -    }
   1.102 +}
   1.103  
   1.104 -    dfn {
   1.105 +dfn {
   1.106      font-weight:    bold;
   1.107 -    }
   1.108 +}
   1.109  
   1.110 -    a.internalDFN {
   1.111 +a.internalDFN {
   1.112      color:  inherit;
   1.113      border-bottom:  1px solid #99c;
   1.114      text-decoration:    none;
   1.115 -    }
   1.116 +}
   1.117  
   1.118 -    a.externalDFN {
   1.119 +a.externalDFN {
   1.120      color:  inherit;
   1.121      border-bottom:  1px dotted #ccc;
   1.122      text-decoration:    none;
   1.123 -    }
   1.124 +}
   1.125  
   1.126 -    a.bibref {
   1.127 +a.bibref {
   1.128      text-decoration:    none;
   1.129 -    }
   1.130 +}
   1.131  
   1.132 -    cite .bibref {
   1.133 +cite .bibref {
   1.134      font-style: normal;
   1.135 -    }
   1.136 +}
   1.137  
   1.138 -    code {
   1.139 +code {
   1.140      color:  #ff4500;
   1.141 -    }
   1.142 +}
   1.143  
   1.144  
   1.145 -    /* --- --- */
   1.146 -    ol.algorithm { counter-reset:numsection; list-style-type: none; }
   1.147 -    ol.algorithm li { margin: 0.5em 0; }
   1.148 -    ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
   1.149 +/* --- --- */
   1.150 +ol.algorithm { counter-reset:numsection; list-style-type: none; }
   1.151 +ol.algorithm li { margin: 0.5em 0; }
   1.152 +ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
   1.153  
   1.154 -    /* --- TOC --- */
   1.155 -    .toc a, .tof a {
   1.156 +/* --- TOC --- */
   1.157 +.toc a, .tof a {
   1.158      text-decoration:    none;
   1.159 -    }
   1.160 +}
   1.161  
   1.162 -    a .secno, a .figno {
   1.163 +a .secno, a .figno {
   1.164      color:  #000;
   1.165 -    }
   1.166 +}
   1.167  
   1.168 -    ul.tof, ol.tof {
   1.169 +ul.tof, ol.tof {
   1.170      list-style: none outside none;
   1.171 -    }
   1.172 +}
   1.173  
   1.174 -    .caption {
   1.175 +.caption {
   1.176      margin-top: 0.5em;
   1.177      font-style:   italic;
   1.178 -    }
   1.179 +}
   1.180  
   1.181 -    /* --- TABLE --- */
   1.182 -    table.simple {
   1.183 +/* --- TABLE --- */
   1.184 +table.simple {
   1.185      border-spacing: 0;
   1.186      border-collapse:    collapse;
   1.187      border-bottom:  3px solid #005a9c;
   1.188 -    }
   1.189 +}
   1.190  
   1.191 -    .simple th {
   1.192 +.simple th {
   1.193      background: #005a9c;
   1.194      color:  #fff;
   1.195      padding:    3px 5px;
   1.196      text-align: left;
   1.197 -    }
   1.198 +}
   1.199  
   1.200 -    .simple th[scope="row"] {
   1.201 +.simple th[scope="row"] {
   1.202      background: inherit;
   1.203      color:  inherit;
   1.204      border-top: 1px solid #ddd;
   1.205 -    }
   1.206 +}
   1.207  
   1.208 -    .simple td {
   1.209 +.simple td {
   1.210      padding:    3px 10px;
   1.211      border-top: 1px solid #ddd;
   1.212 -    }
   1.213 +}
   1.214  
   1.215 -    .simple tr:nth-child(even) {
   1.216 +.simple tr:nth-child(even) {
   1.217      background: #f0f6ff;
   1.218 -    }
   1.219 +}
   1.220  
   1.221 -    /* --- DL --- */
   1.222 -    .section dd > p:first-child {
   1.223 +/* --- DL --- */
   1.224 +.section dd > p:first-child {
   1.225      margin-top: 0;
   1.226 -    }
   1.227 +}
   1.228  
   1.229 -    .section dd > p:last-child {
   1.230 +.section dd > p:last-child {
   1.231      margin-bottom: 0;
   1.232 -    }
   1.233 +}
   1.234  
   1.235 -    .section dd {
   1.236 +.section dd {
   1.237      margin-bottom:  1em;
   1.238 -    }
   1.239 +}
   1.240  
   1.241 -    .section dl.attrs dd, .section dl.eldef dd {
   1.242 +.section dl.attrs dd, .section dl.eldef dd {
   1.243      margin-bottom:  0;
   1.244 -    }
   1.245 -    </style>
   1.246 -    <style type="text/css">
   1.247 -/* --- ISSUES/NOTES --- */
   1.248 -    div.issue-title, div.note-title {
   1.249 +}
   1.250 +</style><style>/* --- ISSUES/NOTES --- */
   1.251 +div.issue-title, div.note-title {
   1.252      padding-right:  1em;
   1.253      min-width: 7.5em;
   1.254      color: #b9ab2d;
   1.255 -    }
   1.256 -    div.issue-title { color: #e05252; }
   1.257 -    div.note-title { color: #52e052; }
   1.258 -    div.issue-title span, div.note-title span {
   1.259 +}
   1.260 +div.issue-title { color: #e05252; }
   1.261 +div.note-title { color: #52e052; }
   1.262 +div.issue-title span, div.note-title span {
   1.263      text-transform: uppercase;
   1.264 -    }
   1.265 -    div.note, div.issue {
   1.266 +}
   1.267 +div.note, div.issue {
   1.268      margin-top: 1em;
   1.269      margin-bottom: 1em;
   1.270 -    }
   1.271 -    .note > p:first-child, .issue > p:first-child { margin-top: 0 }
   1.272 -    .issue, .note {
   1.273 +}
   1.274 +.note > p:first-child, .issue > p:first-child { margin-top: 0 }
   1.275 +.issue, .note {
   1.276      padding: .5em;
   1.277      border-left-width: .5em;
   1.278      border-left-style: solid;
   1.279 -    }
   1.280 -    div.issue, div.note {
   1.281 +}
   1.282 +div.issue, div.note {
   1.283      padding: 0.5em;
   1.284      margin: 1em 0;
   1.285      position: relative;
   1.286      clear: both;
   1.287 -    }
   1.288 -    span.note, span.issue { padding: .1em .5em .15em; }
   1.289 +}
   1.290 +span.note, span.issue { padding: .1em .5em .15em; }
   1.291  
   1.292 -    .issue {
   1.293 +.issue {
   1.294      border-color: #e05252;
   1.295      background: #fbe9e9;
   1.296 -    }
   1.297 -    .note {
   1.298 +}
   1.299 +.note {
   1.300      border-color: #52e052;
   1.301      background: #e9fbe9;
   1.302 -    }
   1.303 +}
   1.304  
   1.305  
   1.306 -    </style>
   1.307 -    <style type="text/css">
   1.308 -/* HIGHLIGHTS */
   1.309 -    code.prettyprint {
   1.310 +</style><style>/* HIGHLIGHTS */
   1.311 +code.prettyprint {
   1.312      color:  inherit;
   1.313 -    }
   1.314 +}
   1.315  
   1.316 -    /* this from google-code-prettify */
   1.317 -    .pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}
   1.318 -    </style>
   1.319 -    <link rel="stylesheet"
   1.320 -          href="http://www.w3.org/StyleSheets/TR/W3C-ED"
   1.321 -          type="text/css">
   1.322 -  </head>
   1.323 -  <body>
   1.324 -    <div class="head">
   1.325 -      <p>
   1.326 -        <a href="http://www.w3.org/"><img width="72"
   1.327 -             height="48"
   1.328 -             src="http://www.w3.org/Icons/w3c_home"
   1.329 -             alt="W3C"></a>
   1.330 +/* this from google-code-prettify */
   1.331 +.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}
   1.332 +</style><link href="http://www.w3.org/StyleSheets/TR/W3C-ED" rel="stylesheet"><!--[if lt IE 9]><script src='http://www.w3.org/2008/site/js/html5shiv.js'></script><![endif]--></head>
   1.333 +  <body><div class="head">
   1.334 +  <p>
   1.335 +
   1.336 +      <a href="http://www.w3.org/"><img src="http://www.w3.org/Icons/w3c_home" alt="W3C" height="48" width="72"></a>
   1.337 +
   1.338 +  </p>
   1.339 +  <h1 class="title" id="title">Network Service Discovery</h1>
   1.340 +
   1.341 +  <h2 id="w3c-editor-s-draft-27-march-2013"><abbr title="World Wide Web Consortium">W3C</abbr> Editor's Draft 27 March 2013</h2>
   1.342 +  <dl>
   1.343 +
   1.344 +      <dt>This version:</dt>
   1.345 +      <dd><a href="http://dvcs.w3.org/hg/dap/raw-file/tip/discovery-api/Overview.html">http://dvcs.w3.org/hg/dap/raw-file/tip/discovery-api/Overview.html</a></dd>
   1.346 +      <dt>Latest published version:</dt>
   1.347 +      <dd><a href="http://www.w3.org/TR/discovery-api/">http://www.w3.org/TR/discovery-api/</a></dd>
   1.348 +
   1.349 +
   1.350 +      <dt>Latest editor's draft:</dt>
   1.351 +      <dd><a href="http://dvcs.w3.org/hg/dap/raw-file/tip/discovery-api/Overview.html">http://dvcs.w3.org/hg/dap/raw-file/tip/discovery-api/Overview.html</a></dd>
   1.352 +
   1.353 +
   1.354 +
   1.355 +
   1.356 +
   1.357 +
   1.358 +
   1.359 +
   1.360 +    <dt>Editors:</dt>
   1.361 +    <dd><span>Rich Tibbett</span>, <a href="http://opera.com/">Opera Software ASA</a></dd>
   1.362 +<dd><span>Clarke Stevens</span>, <a href="http://cablelabs.com/">CableLabs</a></dd>
   1.363 +
   1.364 +
   1.365 +  </dl>
   1.366 +
   1.367 +
   1.368 +
   1.369 +
   1.370 +
   1.371 +      <p class="copyright">
   1.372 +        <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> ©
   1.373 +        2013
   1.374 +
   1.375 +        <a href="http://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup>
   1.376 +        (<a href="http://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>,
   1.377 +        <a href="http://www.ercim.eu/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>,
   1.378 +        <a href="http://www.keio.ac.jp/">Keio</a>, <a href="http://ev.buaa.edu.cn/">Beihang</a>), All Rights Reserved.
   1.379 +        <abbr title="World Wide Web Consortium">W3C</abbr> <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
   1.380 +        <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and
   1.381 +        <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> rules apply.
   1.382        </p>
   1.383 -      <h1 class="title"
   1.384 -          id="title">
   1.385 -        Network Service Discovery
   1.386 -      </h1>
   1.387 -      <h2 id="w3c-editor-s-draft-08-february-2013">
   1.388 -        <abbr title="World Wide Web Consortium">W3C</abbr> Editor's Draft 08 February 2013
   1.389 -      </h2>
   1.390 -      <dl>
   1.391 -        <dt>
   1.392 -          This version:
   1.393 -        </dt>
   1.394 -        <dd>
   1.395 -          <a href=
   1.396 -          "http://dvcs.w3.org/hg/dap/raw-file/tip/discovery-api/Overview.html">http://dvcs.w3.org/hg/dap/raw-file/tip/discovery-api/Overview.html</a>
   1.397 -        </dd>
   1.398 -        <dt>
   1.399 -          Latest published version:
   1.400 -        </dt>
   1.401 -        <dd>
   1.402 -          <a href="http://www.w3.org/TR/discovery-api/">http://www.w3.org/TR/discovery-api/</a>
   1.403 -        </dd>
   1.404 -        <dt>
   1.405 -          Latest editor's draft:
   1.406 -        </dt>
   1.407 -        <dd>
   1.408 -          <a href=
   1.409 -          "http://dvcs.w3.org/hg/dap/raw-file/tip/discovery-api/Overview.html">http://dvcs.w3.org/hg/dap/raw-file/tip/discovery-api/Overview.html</a>
   1.410 -        </dd>
   1.411 -        <dt>
   1.412 -          Editors:
   1.413 -        </dt>
   1.414 -        <dd>
   1.415 -          <span>Rich Tibbett</span>, <a href="http://opera.com/">Opera Software ASA</a>
   1.416 -        </dd>
   1.417 -        <dd>
   1.418 -          <span>Clarke Stevens</span>, <a href="http://cablelabs.com/">CableLabs</a>
   1.419 -        </dd>
   1.420 -      </dl>
   1.421 -      <p class="copyright">
   1.422 -        <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2013 <a href=
   1.423 -        "http://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a href=
   1.424 -        "http://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>, <a href=
   1.425 -        "http://www.ercim.eu/"><abbr title=
   1.426 -        "European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>, <a href=
   1.427 -        "http://www.keio.ac.jp/">Keio</a>, <a href="http://ev.buaa.edu.cn/">Beihang</a>), All Rights Reserved.
   1.428 -        <abbr title="World Wide Web Consortium">W3C</abbr> <a href=
   1.429 -        "http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href=
   1.430 -        "http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href=
   1.431 -        "http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> rules apply.
   1.432 -      </p>
   1.433 -      <hr>
   1.434 -    </div>
   1.435 -    <section id="abstract"
   1.436 -             class="introductory">
   1.437 -      <h2>
   1.438 -        Abstract
   1.439 -      </h2>
   1.440 +
   1.441 +
   1.442 +  <hr>
   1.443 +</div>
   1.444 +    <section class="introductory" id="abstract"><h2>Abstract</h2>
   1.445        <p>
   1.446          This specification defines a mechanism for an HTML document to discover and subsequently communicate with
   1.447          <abbr title="Hypertext Transfer Protocol">HTTP</abbr>-based services advertised via common discovery protocols
   1.448          within the current network.
   1.449        </p>
   1.450 -    </section>
   1.451 -    <section id="sotd"
   1.452 -             class="introductory">
   1.453 -      <h2>
   1.454 -        Status of This Document
   1.455 -      </h2>
   1.456 +    </section><section id="sotd" class="introductory"><h2>Status of This Document</h2>
   1.457 +
   1.458 +
   1.459 +
   1.460 +        <p>
   1.461 +          <em>This section describes the status of this document at the time of its publication. Other
   1.462 +          documents may supersede this document. A list of current <abbr title="World Wide Web Consortium">W3C</abbr> publications and the latest revision
   1.463 +          of this technical report can be found in the <a href="http://www.w3.org/TR/"><abbr title="World Wide Web Consortium">W3C</abbr> technical reports
   1.464 +          index</a> at http://www.w3.org/TR/.</em>
   1.465 +        </p>
   1.466 +
   1.467        <p>
   1.468 -        <em>This section describes the status of this document at the time of its publication. Other documents may
   1.469 -        supersede this document. A list of current <abbr title="World Wide Web Consortium">W3C</abbr> publications and
   1.470 -        the latest revision of this technical report can be found in the <a href="http://www.w3.org/TR/"><abbr title=
   1.471 -        "World Wide Web Consortium">W3C</abbr> technical reports index</a> at http://www.w3.org/TR/.</em>
   1.472 +        This document represents the early consensus of the group on the scope and features of the proposed <abbr title="Application Programming Interface">API</abbr>.
   1.473        </p>
   1.474 +
   1.475 +        <p>
   1.476 +          This document was published by the <a href="http://www.w3.org/2009/dap/">Device APIs Working Group</a> as an Editor's Draft.
   1.477 +
   1.478 +
   1.479 +          If you wish to make comments regarding this document, please send them to
   1.480 +          <a href="mailto:public-device-apis@w3.org">public-device-apis@w3.org</a>
   1.481 +          (<a href="mailto:public-device-apis-request@w3.org?subject=subscribe">subscribe</a>,
   1.482 +          <a href="http://lists.w3.org/Archives/Public/public-device-apis/">archives</a>).
   1.483 +
   1.484 +
   1.485 +
   1.486 +
   1.487 +        All comments are welcome.
   1.488 +
   1.489 +
   1.490 +          </p><p>
   1.491 +            Publication as an Editor's Draft does not imply endorsement by the <abbr title="World Wide Web Consortium">W3C</abbr> Membership.
   1.492 +            This is a draft document and may be updated, replaced or obsoleted by other documents at
   1.493 +            any time. It is inappropriate to cite this document as other than work in progress.
   1.494 +          </p>
   1.495 +
   1.496 +
   1.497 +        <p>
   1.498 +
   1.499 +            This document was produced by a group operating under the
   1.500 +            <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 <abbr title="World Wide Web Consortium">W3C</abbr> Patent Policy</a>.
   1.501 +
   1.502 +
   1.503 +
   1.504 +
   1.505 +              <abbr title="World Wide Web Consortium">W3C</abbr> maintains a <a href="http://www.w3.org/2004/01/pp-impl/43696/status" rel="disclosure">public list of any patent disclosures</a>
   1.506 +
   1.507 +            made in connection with the deliverables of the group; that page also includes instructions for
   1.508 +            disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains
   1.509 +            <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential Claim(s)</a> must disclose the
   1.510 +            information in accordance with <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section
   1.511 +            6 of the <abbr title="World Wide Web Consortium">W3C</abbr> Patent Policy</a>.
   1.512 +
   1.513 +
   1.514 +        </p>
   1.515 +
   1.516 +
   1.517 +
   1.518 +
   1.519 +</section><section id="toc"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a class="tocxref" href="#introduction"><span class="secno">1. </span>
   1.520 +        Introduction
   1.521 +      </a></li><li class="tocline"><a class="tocxref" href="#conformance"><span class="secno">2. </span>Conformance</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#dependencies"><span class="secno">2.1 </span>
   1.522 +          Dependencies
   1.523 +        </a></li></ul></li><li class="tocline"><a class="tocxref" href="#terminology"><span class="secno">3. </span>
   1.524 +        Terminology
   1.525 +      </a></li><li class="tocline"><a class="tocxref" href="#requesting-networked-services"><span class="secno">4. </span>
   1.526 +        Requesting networked services
   1.527 +      </a><ul class="toc"><li class="tocline"><a class="tocxref" href="#methods"><span class="secno">4.1 </span>
   1.528 +          Methods
   1.529 +        </a></li><li class="tocline"><a class="tocxref" href="#error-handling"><span class="secno">4.2 </span>
   1.530 +          Error Handling
   1.531 +        </a></li></ul></li><li class="tocline"><a class="tocxref" href="#obtaining-networked-services"><span class="secno">5. </span>
   1.532 +        Obtaining networked services
   1.533 +      </a><ul class="toc"><li class="tocline"><a class="tocxref" href="#attributes"><span class="secno">5.1 </span>
   1.534 +          Attributes
   1.535 +        </a></li><li class="tocline"><a class="tocxref" href="#methods-1"><span class="secno">5.2 </span>
   1.536 +          Methods
   1.537 +        </a></li><li class="tocline"><a class="tocxref" href="#events"><span class="secno">5.3 </span>
   1.538 +          Events
   1.539 +        </a></li></ul></li><li class="tocline"><a class="tocxref" href="#communicating-with-a-networked-service"><span class="secno">6. </span>
   1.540 +        Communicating with a networked service
   1.541 +      </a><ul class="toc"><li class="tocline"><a class="tocxref" href="#attributes-1"><span class="secno">6.1 </span>
   1.542 +          Attributes
   1.543 +        </a></li><li class="tocline"><a class="tocxref" href="#states"><span class="secno">6.2 </span>
   1.544 +          States
   1.545 +        </a></li><li class="tocline"><a class="tocxref" href="#events-1"><span class="secno">6.3 </span>
   1.546 +          Events
   1.547 +        </a></li></ul></li><li class="tocline"><a class="tocxref" href="#service-discovery"><span class="secno">7. </span>
   1.548 +        Service Discovery
   1.549 +      </a><ul class="toc"><li class="tocline"><a class="tocxref" href="#zeroconf-mdns-dns-sd"><span class="secno">7.1 </span>
   1.550 +          Zeroconf (<abbr title="Multicast DNS">mDNS</abbr> + <abbr title="Domain Name System">DNS</abbr>-<abbr title="Service Discovery">SD</abbr>)
   1.551 +        </a></li><li class="tocline"><a class="tocxref" href="#simple-service-discovery-protocol-ssdp"><span class="secno">7.2 </span>
   1.552 +          Simple Service Discovery Protocol (<abbr title="Simple Service Discovery Protocol">SSDP</abbr>)
   1.553 +        </a></li><li class="tocline"><a class="tocxref" href="#discovery-and-launch-protocol-dial"><span class="secno">7.3 </span>
   1.554 +          Discovery and Launch Protocol (<abbr title="Discovery and Launch Protocol">DIAL</abbr>)
   1.555 +        </a></li><li class="tocline"><a class="tocxref" href="#network-topology-monitoring"><span class="secno">7.4 </span>
   1.556 +          Network Topology Monitoring
   1.557 +        </a></li></ul></li><li class="tocline"><a class="tocxref" href="#events-summary"><span class="secno">8. </span>
   1.558 +        Events Summary
   1.559 +      </a></li><li class="tocline"><a class="tocxref" href="#garbage-collection"><span class="secno">9. </span>
   1.560 +        Garbage collection
   1.561 +      </a></li><li class="tocline"><a class="tocxref" href="#use-cases-and-requirements"><span class="secno">10. </span>
   1.562 +        Use Cases and Requirements
   1.563 +      </a></li><li class="tocline"><a class="tocxref" href="#examples"><span class="secno">A. </span>
   1.564 +        Examples
   1.565 +      </a></li><li class="tocline"><a class="tocxref" href="#acknowledgements"><span class="secno">B. </span>
   1.566 +        Acknowledgements
   1.567 +      </a></li><li class="tocline"><a class="tocxref" href="#references"><span class="secno">C. </span>References</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#normative-references"><span class="secno">C.1 </span>Normative references</a></li></ul></li></ul></section>
   1.568 +
   1.569 +    <section id="introduction" class="informative">
   1.570 +      <!--OddPage--><h2><span class="secno">1. </span>
   1.571 +        Introduction
   1.572 +      </h2><p><em>This section is non-normative.</em></p>
   1.573        <p>
   1.574 -        This document represents the early consensus of the group on the scope and features of the proposed
   1.575 -        <abbr title="Application Programming Interface">API</abbr>.
   1.576 -      </p>
   1.577 -      <p>
   1.578 -        This document was published by the <a href="http://www.w3.org/2009/dap/">Device APIs Working Group</a> as an
   1.579 -        Editor's Draft. If you wish to make comments regarding this document, please send them to <a href=
   1.580 -        "mailto:public-device-apis@w3.org">public-device-apis@w3.org</a> (<a href=
   1.581 -        "mailto:public-device-apis-request@w3.org?subject=subscribe">subscribe</a>, <a href=
   1.582 -        "http://lists.w3.org/Archives/Public/public-device-apis/">archives</a>). All comments are welcome.
   1.583 -      </p>
   1.584 -      <p>
   1.585 -        Publication as an Editor's Draft does not imply endorsement by the <abbr title=
   1.586 -        "World Wide Web Consortium">W3C</abbr> Membership. This is a draft document and may be updated, replaced or
   1.587 -        obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in
   1.588 -        progress.
   1.589 -      </p>
   1.590 -      <p>
   1.591 -        This document was produced by a group operating under the <a href=
   1.592 -        "http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 <abbr title=
   1.593 -        "World Wide Web Consortium">W3C</abbr> Patent Policy</a>. <abbr title="World Wide Web Consortium">W3C</abbr>
   1.594 -        maintains a <a href="http://www.w3.org/2004/01/pp-impl/43696/status"
   1.595 -           rel="disclosure">public list of any patent disclosures</a> made in connection with the deliverables of the
   1.596 -           group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge
   1.597 -           of a patent which the individual believes contains <a href=
   1.598 -           "http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential Claim(s)</a> must disclose
   1.599 -           the information in accordance with <a href=
   1.600 -           "http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section 6 of the <abbr title=
   1.601 -           "World Wide Web Consortium">W3C</abbr> Patent Policy</a>.
   1.602 -      </p>
   1.603 -    </section>
   1.604 -    <section id="toc">
   1.605 -      <h2 class="introductory">
   1.606 -        Table of Contents
   1.607 -      </h2>
   1.608 -      <ul class="toc">
   1.609 -        <li class="tocline">
   1.610 -          <a href="#introduction"
   1.611 -              class="tocxref"><span class="secno">1.</span> Introduction</a>
   1.612 -        </li>
   1.613 -        <li class="tocline">
   1.614 -          <a href="#conformance"
   1.615 -              class="tocxref"><span class="secno">2.</span> Conformance</a>
   1.616 -          <ul class="toc">
   1.617 -            <li class="tocline">
   1.618 -              <a href="#dependencies"
   1.619 -                  class="tocxref"><span class="secno">2.1</span> Dependencies</a>
   1.620 -            </li>
   1.621 -          </ul>
   1.622 -        </li>
   1.623 -        <li class="tocline">
   1.624 -          <a href="#terminology"
   1.625 -              class="tocxref"><span class="secno">3.</span> Terminology</a>
   1.626 -        </li>
   1.627 -        <li class="tocline">
   1.628 -          <a href="#requesting-networked-services"
   1.629 -              class="tocxref"><span class="secno">4.</span> Requesting networked services</a>
   1.630 -          <ul class="toc">
   1.631 -            <li class="tocline">
   1.632 -              <a href="#methods"
   1.633 -                  class="tocxref"><span class="secno">4.1</span> Methods</a>
   1.634 -            </li>
   1.635 -            <li class="tocline">
   1.636 -              <a href="#error-handling"
   1.637 -                  class="tocxref"><span class="secno">4.2</span> Error Handling</a>
   1.638 -            </li>
   1.639 -          </ul>
   1.640 -        </li>
   1.641 -        <li class="tocline">
   1.642 -          <a href="#obtaining-networked-services"
   1.643 -              class="tocxref"><span class="secno">5.</span> Obtaining networked services</a>
   1.644 -          <ul class="toc">
   1.645 -            <li class="tocline">
   1.646 -              <a href="#attributes"
   1.647 -                  class="tocxref"><span class="secno">5.1</span> Attributes</a>
   1.648 -            </li>
   1.649 -            <li class="tocline">
   1.650 -              <a href="#methods-1"
   1.651 -                  class="tocxref"><span class="secno">5.2</span> Methods</a>
   1.652 -            </li>
   1.653 -            <li class="tocline">
   1.654 -              <a href="#events"
   1.655 -                  class="tocxref"><span class="secno">5.3</span> Events</a>
   1.656 -            </li>
   1.657 -          </ul>
   1.658 -        </li>
   1.659 -        <li class="tocline">
   1.660 -          <a href="#communicating-with-a-networked-service"
   1.661 -              class="tocxref"><span class="secno">6.</span> Communicating with a networked service</a>
   1.662 -          <ul class="toc">
   1.663 -            <li class="tocline">
   1.664 -              <a href="#attributes-1"
   1.665 -                  class="tocxref"><span class="secno">6.1</span> Attributes</a>
   1.666 -            </li>
   1.667 -            <li class="tocline">
   1.668 -              <a href="#states"
   1.669 -                  class="tocxref"><span class="secno">6.2</span> States</a>
   1.670 -            </li>
   1.671 -            <li class="tocline">
   1.672 -              <a href="#events-1"
   1.673 -                  class="tocxref"><span class="secno">6.3</span> Events</a>
   1.674 -            </li>
   1.675 -          </ul>
   1.676 -        </li>
   1.677 -        <li class="tocline">
   1.678 -          <a href="#service-discovery"
   1.679 -              class="tocxref"><span class="secno">7.</span> Service Discovery</a>
   1.680 -          <ul class="toc">
   1.681 -            <li class="tocline">
   1.682 -              <a href="#zeroconf-mdns-dns-sd"
   1.683 -                  class="tocxref"><span class="secno">7.1</span> Zeroconf (<abbr title="Multicast DNS">mDNS</abbr> +
   1.684 -                  <abbr title="Domain Name System">DNS</abbr>-<abbr title="Service Discovery">SD</abbr>)</a>
   1.685 -            </li>
   1.686 -            <li class="tocline">
   1.687 -              <a href="#simple-service-discovery-protocol-ssdp"
   1.688 -                  class="tocxref"><span class="secno">7.2</span> Simple Service Discovery Protocol (<abbr title=
   1.689 -                  "Simple Service Discovery Protocol">SSDP</abbr>)</a>
   1.690 -            </li>
   1.691 -            <li class="tocline">
   1.692 -              <a href="#discovery-and-launch-protocol-dial"
   1.693 -                  class="tocxref"><span class="secno">7.3</span> Discovery and Launch Protocol (<abbr title=
   1.694 -                  "Discovery and Launch Protocol">DIAL</abbr>)</a>
   1.695 -            </li>
   1.696 -            <li class="tocline">
   1.697 -              <a href="#network-topology-monitoring"
   1.698 -                  class="tocxref"><span class="secno">7.4</span> Network Topology Monitoring</a>
   1.699 -            </li>
   1.700 -          </ul>
   1.701 -        </li>
   1.702 -        <li class="tocline">
   1.703 -          <a href="#events-summary"
   1.704 -              class="tocxref"><span class="secno">8.</span> Events Summary</a>
   1.705 -        </li>
   1.706 -        <li class="tocline">
   1.707 -          <a href="#garbage-collection"
   1.708 -              class="tocxref"><span class="secno">9.</span> Garbage collection</a>
   1.709 -        </li>
   1.710 -        <li class="tocline">
   1.711 -          <a href="#use-cases-and-requirements"
   1.712 -              class="tocxref"><span class="secno">10.</span> Use Cases and Requirements</a>
   1.713 -        </li>
   1.714 -        <li class="tocline">
   1.715 -          <a href="#examples"
   1.716 -              class="tocxref"><span class="secno">A.</span> Examples</a>
   1.717 -        </li>
   1.718 -        <li class="tocline">
   1.719 -          <a href="#acknowledgements"
   1.720 -              class="tocxref"><span class="secno">B.</span> Acknowledgements</a>
   1.721 -        </li>
   1.722 -        <li class="tocline">
   1.723 -          <a href="#references"
   1.724 -              class="tocxref"><span class="secno">C.</span> References</a>
   1.725 -          <ul class="toc">
   1.726 -            <li class="tocline">
   1.727 -              <a href="#normative-references"
   1.728 -                  class="tocxref"><span class="secno">C.1</span> Normative references</a>
   1.729 -            </li>
   1.730 -          </ul>
   1.731 -        </li>
   1.732 -      </ul>
   1.733 -    </section>
   1.734 -    <section class="informative"
   1.735 -             id="introduction">
   1.736 -      <h2>
   1.737 -        <span class="secno">1.</span> Introduction
   1.738 -      </h2>
   1.739 -      <p>
   1.740 -        <em>This section is non-normative.</em>
   1.741 -      </p>
   1.742 -      <p>
   1.743 -        To enable Web pages to connect and communicate with Local-networked Services provided over <abbr title=
   1.744 -        "Hypertext Transfer Protocol">HTTP</abbr>, this specification introduces the <a href=
   1.745 -        "#navigatornetworkservice"><code>NavigatorNetworkService</code></a> interface.
   1.746 +        To enable Web pages to connect and communicate with Local-networked Services provided over <abbr title="Hypertext Transfer Protocol">HTTP</abbr>, this
   1.747 +        specification introduces the <a href="#navigatornetworkservice"><code>NavigatorNetworkService</code></a>
   1.748 +        interface.
   1.749        </p>
   1.750        <p>
   1.751          Using this <abbr title="Application Programming Interface">API</abbr> consists of requesting a well-known
   1.752 @@ -477,10 +390,9 @@
   1.753          well-known discovery service type that it wishes to interact with.
   1.754        </p>
   1.755        <p>
   1.756 -        The user agent, having captured all advertised services on the network from the <a href=
   1.757 -        "#dfn-service-discovery-mechanisms"
   1.758 -           class="internalDFN">service discovery mechanisms</a> included in this recommendation, attempts to match the
   1.759 -           requested service type to a discovered service according to the processing described herein.
   1.760 +        The user agent, having captured all advertised services on the network from the <a class="internalDFN" href="#dfn-service-discovery-mechanisms">service discovery
   1.761 +        mechanisms</a> included in this recommendation, attempts to match the requested service type to a discovered
   1.762 +        service according to the processing described herein.
   1.763        </p>
   1.764        <p>
   1.765          If a service connectivity request is successful then the Web page is provided with the necessary information to
   1.766 @@ -490,125 +402,72 @@
   1.767        <p>
   1.768          Once connected to a Local-networked Service the Web page can send requests and receive responses to the
   1.769          Local-networked Service via the messaging format and appropriate channel inferred from the service type
   1.770 -        authorized via the provided <abbr title="Application Programming Interface">API</abbr>. The Web page, once
   1.771 -        connected, can also receive service-pushed events, in the messaging format supported by the Local-networked
   1.772 -        Device, if such event subscription functionality is provided by the connected Local-networked Service.
   1.773 +        authorized via the provided <abbr title="Application Programming Interface">API</abbr>. The Web page, once connected, can also receive service-pushed events, in the
   1.774 +        messaging format supported by the Local-networked Device, if such event subscription functionality is provided
   1.775 +        by the connected Local-networked Service.
   1.776 +      </p>
   1.777 +      <p>
   1.778 +        Services available within the local network can connect and disconnect at different times during the execution of a web page. The user agent can inform a web page when the state of networked services matching any of the requested valid service types change. Web pages can use this information to enable in-page experiences for communicating the state of networked services with the ability to change the particular service or set of services the page is connected to (by re-invoking the <a href="#dom-navigator-getnetworkservices"><code>getNetworkServices()</code></a> method defined herein).
   1.779        </p>
   1.780        <div class="example">
   1.781          <p>
   1.782 -          Example of requesting a <abbr title="Domain Name System">DNS</abbr>-<abbr title="Service Discovery">SD</abbr>
   1.783 -          advertised service:
   1.784 +          Example of requesting a <abbr title="Domain Name System">DNS</abbr>-<abbr title="Service Discovery">SD</abbr> advertised service:
   1.785          </p>
   1.786          <hr>
   1.787 -        <pre class="highlight prettyprint">
   1.788 -<span class="kwd">function</span><span class="pln"> showServices</span><span class="pun">(</span><span class=
   1.789 -"pln"> services </span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
   1.790 +        <pre class="highlight prettyprint"><span class="kwd">function</span><span class="pln"> showServices</span><span class="pun">(</span><span class="pln"> services </span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
   1.791    </span><span class="com">// Show a list of all the services provided to the web page</span><span class="pln">
   1.792 -  </span><span class="kwd">for</span><span class="pun">(</span><span class="kwd">var</span><span class=
   1.793 -"pln"> i </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class=
   1.794 -"pun">,</span><span class="pln"> l </span><span class="pun">=</span><span class="pln"> services</span><span class=
   1.795 -"pun">.</span><span class="pln">length</span><span class="pun">;</span><span class="pln"> i </span><span class=
   1.796 -"pun">&lt;</span><span class="pln"> l</span><span class="pun">;</span><span class="pln"> i</span><span class=
   1.797 -"pun">++)</span><span class="pln"> console</span><span class="pun">.</span><span class="pln">log</span><span class=
   1.798 -"pun">(</span><span class="pln"> services</span><span class="pun">[</span><span class="pln">i</span><span class=
   1.799 -"pun">].</span><span class="pln">name </span><span class="pun">);</span><span class="pln">
   1.800 +  </span><span class="kwd">for</span><span class="pun">(</span><span class="kwd">var</span><span class="pln"> i </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class="pun">,</span><span class="pln"> l </span><span class="pun">=</span><span class="pln"> services</span><span class="pun">.</span><span class="pln">length</span><span class="pun">;</span><span class="pln"> i </span><span class="pun">&lt;</span><span class="pln"> l</span><span class="pun">;</span><span class="pln"> i</span><span class="pun">++)</span><span class="pln"> console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln"> services</span><span class="pun">[</span><span class="pln">i</span><span class="pun">].</span><span class="pln">name </span><span class="pun">);</span><span class="pln">
   1.801  </span><span class="pun">}</span><span class="pln">
   1.802  
   1.803 -navigator</span><span class="pun">.</span><span class="pln">getNetworkServices</span><span class=
   1.804 -"pun">(</span><span class="str">'zeroconf:_boxee-jsonrpc._tcp'</span><span class="pun">,</span><span class=
   1.805 -"pln"> showServices</span><span class="pun">);</span>
   1.806 -</pre>
   1.807 +navigator</span><span class="pun">.</span><span class="pln">getNetworkServices</span><span class="pun">(</span><span class="str">'zeroconf:_boxee-jsonrpc._tcp'</span><span class="pun">,</span><span class="pln"> showServices</span><span class="pun">);</span></pre>
   1.808        </div>
   1.809        <div class="example">
   1.810          <p>
   1.811            Example of requesting a UPnP advertised service, also handling error conditions:
   1.812          </p>
   1.813          <hr>
   1.814 -        <pre class="highlight prettyprint">
   1.815 -<span class="kwd">function</span><span class="pln"> showServices</span><span class="pun">(</span><span class=
   1.816 -"pln"> services </span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
   1.817 +        <pre class="highlight prettyprint"><span class="kwd">function</span><span class="pln"> showServices</span><span class="pun">(</span><span class="pln"> services </span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
   1.818    </span><span class="com">// Show a list of all the services provided to the web page</span><span class="pln">
   1.819 -  </span><span class="kwd">for</span><span class="pun">(</span><span class="kwd">var</span><span class=
   1.820 -"pln"> i </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class=
   1.821 -"pun">,</span><span class="pln"> l </span><span class="pun">=</span><span class="pln"> services</span><span class=
   1.822 -"pun">.</span><span class="pln">length</span><span class="pun">;</span><span class="pln"> i </span><span class=
   1.823 -"pun">&lt;</span><span class="pln"> l</span><span class="pun">;</span><span class="pln"> i</span><span class=
   1.824 -"pun">++)</span><span class="pln"> console</span><span class="pun">.</span><span class="pln">log</span><span class=
   1.825 -"pun">(</span><span class="pln"> services</span><span class="pun">[</span><span class="pln">i</span><span class=
   1.826 -"pun">].</span><span class="pln">name </span><span class="pun">);</span><span class="pln">
   1.827 +  </span><span class="kwd">for</span><span class="pun">(</span><span class="kwd">var</span><span class="pln"> i </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class="pun">,</span><span class="pln"> l </span><span class="pun">=</span><span class="pln"> services</span><span class="pun">.</span><span class="pln">length</span><span class="pun">;</span><span class="pln"> i </span><span class="pun">&lt;</span><span class="pln"> l</span><span class="pun">;</span><span class="pln"> i</span><span class="pun">++)</span><span class="pln"> console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln"> services</span><span class="pun">[</span><span class="pln">i</span><span class="pun">].</span><span class="pln">name </span><span class="pun">);</span><span class="pln">
   1.828  </span><span class="pun">}</span><span class="pln">
   1.829  
   1.830 -</span><span class="kwd">function</span><span class="pln"> error</span><span class="pun">(</span><span class=
   1.831 -"pln"> e </span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
   1.832 -  console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class=
   1.833 -"pln"> </span><span class="str">"Error occurred: "</span><span class="pln"> </span><span class=
   1.834 -"pun">+</span><span class="pln"> e</span><span class="pun">.</span><span class="pln">code </span><span class=
   1.835 -"pun">);</span><span class="pln">
   1.836 +</span><span class="kwd">function</span><span class="pln"> error</span><span class="pun">(</span><span class="pln"> e </span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
   1.837 +  console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln"> </span><span class="str">"Error occurred: "</span><span class="pln"> </span><span class="pun">+</span><span class="pln"> e</span><span class="pun">.</span><span class="pln">code </span><span class="pun">);</span><span class="pln">
   1.838  </span><span class="pun">}</span><span class="pln">
   1.839  
   1.840 -navigator</span><span class="pun">.</span><span class="pln">getNetworkServices</span><span class=
   1.841 -"pun">(</span><span class="str">'upnp:urn:schemas-upnp-org:service:ContentDirectory:1'</span><span class=
   1.842 -"pun">,</span><span class="pln"> showServices</span><span class="pun">,</span><span class=
   1.843 -"pln"> error</span><span class="pun">);</span>
   1.844 -</pre>
   1.845 +navigator</span><span class="pun">.</span><span class="pln">getNetworkServices</span><span class="pun">(</span><span class="str">'upnp:urn:schemas-upnp-org:service:ContentDirectory:1'</span><span class="pun">,</span><span class="pln"> showServices</span><span class="pun">,</span><span class="pln"> error</span><span class="pun">);</span></pre>
   1.846        </div>
   1.847        <div class="example">
   1.848          <p>
   1.849 -          Example of requesting either a <abbr title="Domain Name System">DNS</abbr>-<abbr title=
   1.850 -          "Service Discovery">SD</abbr> or UPnP advertised service:
   1.851 +          Example of requesting either a <abbr title="Domain Name System">DNS</abbr>-<abbr title="Service Discovery">SD</abbr> or UPnP advertised service:
   1.852          </p>
   1.853          <hr>
   1.854 -        <pre class="highlight prettyprint">
   1.855 -<span class="kwd">function</span><span class="pln"> showServices</span><span class="pun">(</span><span class=
   1.856 -"pln"> services </span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
   1.857 -  </span><span class=
   1.858 -"com">// Show a list of all the services provided to the web page (+ service type)</span><span class="pln">
   1.859 -  </span><span class="kwd">for</span><span class="pun">(</span><span class="kwd">var</span><span class=
   1.860 -"pln"> i </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class=
   1.861 -"pun">,</span><span class="pln"> l </span><span class="pun">=</span><span class="pln"> services</span><span class=
   1.862 -"pun">.</span><span class="pln">length</span><span class="pun">;</span><span class="pln"> i </span><span class=
   1.863 -"pun">&lt;</span><span class="pln"> l</span><span class="pun">;</span><span class="pln"> i</span><span class=
   1.864 -"pun">++)</span><span class="pln">
   1.865 -     console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class=
   1.866 -"pln"> services</span><span class="pun">[</span><span class="pln">i</span><span class="pun">].</span><span class=
   1.867 -"pln">name </span><span class="pun">+</span><span class="pln"> </span><span class="str">'('</span><span class=
   1.868 -"pln"> </span><span class="pun">+</span><span class="pln"> services</span><span class="pun">[</span><span class=
   1.869 -"pln">i</span><span class="pun">].</span><span class="pln">type </span><span class="pun">+</span><span class=
   1.870 -"pln"> </span><span class="str">')'</span><span class="pln"> </span><span class="pun">);</span><span class="pln">
   1.871 +        <pre class="highlight prettyprint"><span class="kwd">function</span><span class="pln"> showServices</span><span class="pun">(</span><span class="pln"> services </span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
   1.872 +  </span><span class="com">// Show a list of all the services provided to the web page (+ service type)</span><span class="pln">
   1.873 +  </span><span class="kwd">for</span><span class="pun">(</span><span class="kwd">var</span><span class="pln"> i </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class="pun">,</span><span class="pln"> l </span><span class="pun">=</span><span class="pln"> services</span><span class="pun">.</span><span class="pln">length</span><span class="pun">;</span><span class="pln"> i </span><span class="pun">&lt;</span><span class="pln"> l</span><span class="pun">;</span><span class="pln"> i</span><span class="pun">++)</span><span class="pln">
   1.874 +     console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln"> services</span><span class="pun">[</span><span class="pln">i</span><span class="pun">].</span><span class="pln">name </span><span class="pun">+</span><span class="pln"> </span><span class="str">'('</span><span class="pln"> </span><span class="pun">+</span><span class="pln"> services</span><span class="pun">[</span><span class="pln">i</span><span class="pun">].</span><span class="pln">type </span><span class="pun">+</span><span class="pln"> </span><span class="str">')'</span><span class="pln"> </span><span class="pun">);</span><span class="pln">
   1.875  </span><span class="pun">}</span><span class="pln">
   1.876  
   1.877 -navigator</span><span class="pun">.</span><span class="pln">getNetworkServices</span><span class=
   1.878 -"pun">([</span><span class="pln">
   1.879 +navigator</span><span class="pun">.</span><span class="pln">getNetworkServices</span><span class="pun">([</span><span class="pln">
   1.880    </span><span class="str">'zeroconf:_boxee-jsonrpc._tcp'</span><span class="pun">,</span><span class="pln">
   1.881    </span><span class="str">'upnp:urn:schemas-upnp-org:service:ContentDirectory:1'</span><span class="pln">
   1.882 -</span><span class="pun">],</span><span class="pln"> showServices</span><span class="pun">);</span>
   1.883 -</pre>
   1.884 +</span><span class="pun">],</span><span class="pln"> showServices</span><span class="pun">);</span></pre>
   1.885        </div>
   1.886        <p>
   1.887          For more detailed examples see the <a href="#examples">Examples</a> section.
   1.888        </p>
   1.889      </section>
   1.890 -    <section id="conformance">
   1.891 -      <h2>
   1.892 -        <span class="secno">2.</span> Conformance
   1.893 -      </h2>
   1.894 -      <p>
   1.895 -        As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this
   1.896 -        specification are non-normative. Everything else in this specification is normative.
   1.897 -      </p>
   1.898 -      <p>
   1.899 -        The key words <em class="rfc2119"
   1.900 -           title="must">must</em>, <em class="rfc2119"
   1.901 -           title="must not">must not</em>, <em class="rfc2119"
   1.902 -           title="required">required</em>, <em class="rfc2119"
   1.903 -           title="should">should</em>, <em class="rfc2119"
   1.904 -           title="should not">should not</em>, <em class="rfc2119"
   1.905 -           title="recommended">recommended</em>, <em class="rfc2119"
   1.906 -           title="may">may</em>, and <em class="rfc2119"
   1.907 -           title="optional">optional</em> in this specification are to be interpreted as described in [<cite><a class=
   1.908 -           "bibref"
   1.909 -           href="#bib-RFC2119">RFC2119</a></cite>].
   1.910 -      </p>
   1.911 +    <section id="conformance"><!--OddPage--><h2><span class="secno">2. </span>Conformance</h2>
   1.912 +<p>
   1.913 +  As well as sections marked as non-normative, all authoring guidelines, diagrams, examples,
   1.914 +  and notes in this specification are non-normative. Everything else in this specification is
   1.915 +  normative.
   1.916 +</p>
   1.917 +<p>
   1.918 +  The key words <em title="MUST" class="rfc2119">MUST</em>, <em title="MUST NOT" class="rfc2119">MUST NOT</em>, <em title="REQUIRED" class="rfc2119">REQUIRED</em>, <em title="SHOULD" class="rfc2119">SHOULD</em>, <em title="SHOULD NOT" class="rfc2119">SHOULD NOT</em>, <em title="RECOMMENDED" class="rfc2119">RECOMMENDED</em>, <em title="MAY" class="rfc2119">MAY</em>,
   1.919 +  and <em title="OPTIONAL" class="rfc2119">OPTIONAL</em> in this specification are to be interpreted as described in [<cite><a href="#bib-RFC2119" class="bibref">RFC2119</a></cite>].
   1.920 +</p>
   1.921 +
   1.922        <p>
   1.923          Requirements phrased in the imperative as part of algorithms (such as "strip any leading space characters" or
   1.924          "return false and abort these steps") are to be interpreted with the meaning of the key word ("must", "should",
   1.925 @@ -619,65 +478,57 @@
   1.926          are to be interpreted as requirements on user agents.
   1.927        </p>
   1.928        <p>
   1.929 -        Conformance requirements phrased as algorithms or specific steps <em class="rfc2119"
   1.930 -           title="may">may</em> be implemented in any manner, so long as the end result is equivalent. (In particular,
   1.931 -           the algorithms defined in this specification are intended to be easy to follow, and not intended to be
   1.932 -           performant.)
   1.933 +        Conformance requirements phrased as algorithms or specific steps <em title="MAY" class="rfc2119">MAY</em> be implemented in any manner, so long as
   1.934 +        the end result is equivalent. (In particular, the algorithms defined in this specification are intended to be
   1.935 +        easy to follow, and not intended to be performant.)
   1.936        </p>
   1.937        <p>
   1.938          The only conformance class defined by this specification is a <dfn id="dfn-user-agent">user agent</dfn>.
   1.939        </p>
   1.940        <p>
   1.941 -        User agents <em class="rfc2119"
   1.942 -           title="may">may</em> impose implementation-specific limits on otherwise unconstrained inputs, e.g. to
   1.943 -           prevent denial of service attacks, to guard against running out of memory, or to work around
   1.944 -           platform-specific limitations.
   1.945 +        User agents <em title="MAY" class="rfc2119">MAY</em> impose implementation-specific limits on otherwise unconstrained inputs, e.g. to prevent denial
   1.946 +        of service attacks, to guard against running out of memory, or to work around platform-specific limitations.
   1.947        </p>
   1.948        <p>
   1.949          When support for a feature is disabled (e.g. as an emergency measure to mitigate a security problem, or to aid
   1.950 -        in development, or for performance reasons), user agents <em class="rfc2119"
   1.951 -           title="must">must</em> act as if they had no support for the feature whatsoever, and as if the feature was
   1.952 -           not mentioned in this specification. For example, if a particular feature is accessed via an attribute in a
   1.953 -           Web IDL interface, the attribute itself would be omitted from the objects that implement that interface -
   1.954 -           leaving the attribute on the object but making it return null or throw an exception is insufficient.
   1.955 +        in development, or for performance reasons), user agents <em title="MUST" class="rfc2119">MUST</em> act as if they had no support for the feature
   1.956 +        whatsoever, and as if the feature was not mentioned in this specification. For example, if a particular feature
   1.957 +        is accessed via an attribute in a Web IDL interface, the attribute itself would be omitted from the objects
   1.958 +        that implement that interface - leaving the attribute on the object but making it return null or throw an
   1.959 +        exception is insufficient.
   1.960        </p>
   1.961        <section id="dependencies">
   1.962 -        <h3>
   1.963 -          <span class="secno">2.1</span> Dependencies
   1.964 +        <h3><span class="secno">2.1 </span>
   1.965 +          Dependencies
   1.966          </h3>This specification relies on several other underlying specifications.
   1.967          <dl>
   1.968            <dt>
   1.969              HTML
   1.970            </dt>
   1.971            <dd>
   1.972 -            Many fundamental concepts from HTML are used by this specification. [<cite><a class="bibref"
   1.973 -               href="#bib-HTML5">HTML5</a></cite>]
   1.974 +            Many fundamental concepts from HTML are used by this specification. [<cite><a href="#bib-HTML5" class="bibref">HTML5</a></cite>]
   1.975            </dd>
   1.976            <dt>
   1.977              WebIDL
   1.978            </dt>
   1.979            <dd>
   1.980 -            The IDL blocks in this specification use the semantics of the WebIDL specification. [<cite><a class=
   1.981 -            "bibref"
   1.982 -               href="#bib-WEBIDL">WEBIDL</a></cite>]
   1.983 +            The IDL blocks in this specification use the semantics of the WebIDL specification. [<cite><a href="#bib-WEBIDL" class="bibref">WEBIDL</a></cite>]
   1.984            </dd>
   1.985          </dl>
   1.986        </section>
   1.987      </section>
   1.988      <section id="terminology">
   1.989 -      <h2>
   1.990 -        <span class="secno">3.</span> Terminology
   1.991 +      <!--OddPage--><h2><span class="secno">3. </span>
   1.992 +        Terminology
   1.993        </h2>
   1.994        <p>
   1.995          The construction "a <code>Foo</code> object", where <code>Foo</code> is actually an interface, is sometimes
   1.996          used instead of the more accurate "an object implementing the interface <code>Foo</code>".
   1.997        </p>
   1.998        <p>
   1.999 -        The term DOM is used to refer to the <abbr title="Application Programming Interface">API</abbr> set made
  1.1000 -        available to scripts in Web applications, and does not necessarily imply the existence of an actual
  1.1001 -        <code>Document</code> object or of any other <code>Node</code> objects as defined in the DOM Core
  1.1002 -        specifications. [<cite><a class="bibref"
  1.1003 -           href="#bib-DOM4">DOM4</a></cite>]
  1.1004 +        The term DOM is used to refer to the <abbr title="Application Programming Interface">API</abbr> set made available to scripts in Web applications, and does not
  1.1005 +        necessarily imply the existence of an actual <code>Document</code> object or of any other <code>Node</code>
  1.1006 +        objects as defined in the DOM Core specifications. [<cite><a href="#bib-DOM4" class="bibref">DOM4</a></cite>]
  1.1007        </p>
  1.1008        <p>
  1.1009          An IDL attribute is said to be <em>getting</em> when its value is being retrieved (e.g. by author script), and
  1.1010 @@ -695,59 +546,44 @@
  1.1011          </li>
  1.1012        </ul>
  1.1013        <p>
  1.1014 -        A <a href="#dfn-valid-service-type"
  1.1015 -           class="internalDFN">valid service type</a> provided in the <code>type</code> attribute of the <a href=
  1.1016 -           "#dom-navigator-getnetworkservices"><code>getNetworkServices()</code></a> method will be matched against the
  1.1017 -           services currently contained in the <a href="#dfn-list-of-available-service-records"
  1.1018 -           class="internalDFN">list of available service records</a> according to the algorithms defined in this
  1.1019 -           specification.
  1.1020 +        A <a class="internalDFN" href="#dfn-valid-service-type">valid service type</a> provided in the <code>type</code> attribute of the <a href="#dom-navigator-getnetworkservices"><code>getNetworkServices()</code></a> method will be matched against the
  1.1021 +        services currently contained in the <a class="internalDFN" href="#dfn-list-of-available-service-records">list of available service records</a> according to the algorithms
  1.1022 +        defined in this specification.
  1.1023        </p>
  1.1024        <p>
  1.1025 -        A <dfn id="dfn-user-agent-generated-callback-url">user-agent generated callback url</dfn> is a Local-network
  1.1026 -        accessible <abbr title="Uniform Resource Locator">URL</abbr> endpoint that a <a href="#dfn-user-agent"
  1.1027 -           class="internalDFN">user agent</a> generates and maintains for receiving <abbr title=
  1.1028 -           "Hypertext Transfer Protocol">HTTP</abbr> NOTIFY requests from UPnP Event sources. It is only required when
  1.1029 -           the user agent implements UPnP Service Discovery as defined in this specification.
  1.1030 +        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 class="internalDFN" href="#dfn-user-agent">user
  1.1031 +        agent</a> generates and maintains for receiving <abbr title="Hypertext Transfer Protocol">HTTP</abbr> NOTIFY requests from UPnP Event sources. It is only
  1.1032 +        required when the user agent implements UPnP Service Discovery as defined in this specification.
  1.1033        </p>
  1.1034        <p>
  1.1035          In this specification we use the following terms to describe the processes required for Local-networked
  1.1036          Services management:
  1.1037        </p>
  1.1038        <ul>
  1.1039 -        <li>A <dfn id="dfn-new-service">new service</dfn> is a Local-networked Service that has not previously been
  1.1040 -        discovered or registered in the <a href="#dfn-list-of-available-service-records"
  1.1041 -              class="internalDFN">list of available service records</a>.
  1.1042 +        <li>A <dfn id="dfn-new-service">new service</dfn> is a Local-networked Service that has not previously been discovered or registered
  1.1043 +        in the <a class="internalDFN" href="#dfn-list-of-available-service-records">list of available service records</a>.
  1.1044          </li>
  1.1045 -        <li>An <dfn id="dfn-existing-service">existing service</dfn> is a Local-networked Service that has previously
  1.1046 -        been discovered and is registered in the <a href="#dfn-list-of-available-service-records"
  1.1047 -              class="internalDFN">list of available service records</a>.
  1.1048 +        <li>An <dfn id="dfn-existing-service">existing service</dfn> is a Local-networked Service that has previously been discovered and is
  1.1049 +        registered in the <a class="internalDFN" href="#dfn-list-of-available-service-records">list of available service records</a>.
  1.1050          </li>
  1.1051 -        <li>A <dfn id="dfn-current-service">current service</dfn> is a Local-networked Service, represented by a
  1.1052 -        <a href="#networkservice"><code>NetworkService</code></a> object, that is currently being shared with a web
  1.1053 -        page via a <a href="#networkservices"><code>NetworkServices</code></a> object registered in the <a href=
  1.1054 -        "#dfn-list-of-active-service-managers"
  1.1055 -              class="internalDFN">list of active service managers</a>.
  1.1056 +        <li>A <dfn id="dfn-current-service">current service</dfn> is a Local-networked Service, represented by a <a href="#networkservice"><code>NetworkService</code></a> object, that is currently being shared with a web page via a
  1.1057 +        <a href="#networkservices"><code>NetworkServices</code></a> object registered in the <a class="internalDFN" href="#dfn-list-of-active-service-managers">list of active service
  1.1058 +        managers</a>.
  1.1059          </li>
  1.1060        </ul>
  1.1061      </section>
  1.1062      <section id="requesting-networked-services">
  1.1063 -      <h2>
  1.1064 -        <span class="secno">4.</span> Requesting networked services
  1.1065 +      <!--OddPage--><h2><span class="secno">4. </span>
  1.1066 +        Requesting networked services
  1.1067        </h2>
  1.1068 -      <pre class="widl">
  1.1069 -[Supplemental, NoInterfaceObject]
  1.1070 +      <pre class="widl">[Supplemental, NoInterfaceObject]
  1.1071  interface <dfn id="navigatornetworkservice">NavigatorNetworkService</dfn> {
  1.1072    // Obtain a Local-networked Service
  1.1073    void <a href="#dom-navigator-getnetworkservices">getNetworkServices</a>( in any type,
  1.1074 -                           in <a href=
  1.1075 -"#navigatornetworkservicesuccesscallback">NavigatorNetworkServiceSuccessCallback</a> successCallback,
  1.1076 -                           in optional <a href=
  1.1077 -"#navigatornetworkserviceerrorcallback">NavigatorNetworkServiceErrorCallback</a> errorCallback );
  1.1078 +                           in <a href="#navigatornetworkservicesuccesscallback">NavigatorNetworkServiceSuccessCallback</a> successCallback,
  1.1079 +                           in optional <a href="#navigatornetworkserviceerrorcallback">NavigatorNetworkServiceErrorCallback</a> errorCallback );
  1.1080  };
  1.1081 -<a class="externalDFN"
  1.1082 -     href=
  1.1083 -     "http://www.whatwg.org/specs/web-apps/current-work/complete/timers.html#navigator">Navigator</a> implements <a href=
  1.1084 -     "#navigatornetworkservice">NavigatorNetworkService</a>;
  1.1085 +<a class="externalDFN" href="http://www.whatwg.org/specs/web-apps/current-work/complete/timers.html#navigator">Navigator</a> implements <a href="#navigatornetworkservice">NavigatorNetworkService</a>;
  1.1086  
  1.1087  [Callback=FunctionOnly, NoInterfaceObject]
  1.1088  interface <dfn id="navigatornetworkservicesuccesscallback">NavigatorNetworkServiceSuccessCallback</dfn> {
  1.1089 @@ -767,16 +603,13 @@
  1.1090  };
  1.1091  </pre>
  1.1092        <section id="methods">
  1.1093 -        <h3>
  1.1094 -          <span class="secno">4.1</span> Methods
  1.1095 +        <h3><span class="secno">4.1 </span>
  1.1096 +          Methods
  1.1097          </h3>
  1.1098          <dl class="domintro">
  1.1099            <dt>
  1.1100 -            <var title="">window</var> . <code title="dom-navigator"><a href=
  1.1101 -            "http://www.whatwg.org/specs/web-apps/current-work/complete/timers.html#navigator">navigator</a></code> .
  1.1102 -            <code title="dom-navigator-getNetworkServices"><a href=
  1.1103 -            "#dom-navigator-getnetworkservices">getNetworkServices</a></code> ( <var title="">type</var> , <var title=
  1.1104 -            "">successCallback</var> [, <var title="">errorCallback</var> ] )
  1.1105 +            <var title="">window</var> . <code title="dom-navigator"><a href="http://www.whatwg.org/specs/web-apps/current-work/complete/timers.html#navigator">navigator</a></code> .
  1.1106 +            <code title="dom-navigator-getNetworkServices"><a href="#dom-navigator-getnetworkservices">getNetworkServices</a></code> ( <var title="">type</var> , <var title="">successCallback</var> [, <var title="">errorCallback</var> ] )
  1.1107            </dt>
  1.1108            <dd>
  1.1109              <p>
  1.1110 @@ -784,12 +617,11 @@
  1.1111                service type.
  1.1112              </p>
  1.1113              <p>
  1.1114 -              The <var title="">type</var> argument contains one or more <a href="#dfn-valid-service-type"
  1.1115 -                 class="internalDFN">valid service type</a> tokens that the web page would like to interact with.
  1.1116 +              The <var title="">type</var> argument contains one or more <a class="internalDFN" href="#dfn-valid-service-type">valid service type</a> tokens that the web
  1.1117 +              page would like to interact with.
  1.1118              </p>
  1.1119              <p>
  1.1120 -              If the user accepts, the <var title="">successCallback</var> is invoked, with zero or more <a href=
  1.1121 -              "#networkservice"><code>NetworkService</code></a> objects as its argument.
  1.1122 +              If the user accepts, the <var title="">successCallback</var> is invoked, with zero or more <a href="#networkservice"><code>NetworkService</code></a> objects as its argument.
  1.1123              </p>
  1.1124              <p>
  1.1125                If the user declines, the <var title="">errorCallback</var> (if any) is invoked.
  1.1126 @@ -798,45 +630,30 @@
  1.1127          </dl>
  1.1128          <div>
  1.1129            <p>
  1.1130 -            When the <dfn id="dom-navigator-getnetworkservices"
  1.1131 -               title="dom-navigator-getnetworkservices"><code>getNetworkServices(type, successCallback[,
  1.1132 -               errorCallback])</code></dfn> method is called, the <a href="#dfn-user-agent"
  1.1133 -               class="internalDFN">user agent</a> <em class="rfc2119"
  1.1134 -               title="must">must</em> run the following steps:
  1.1135 +            When the <dfn id="dom-navigator-getnetworkservices" title="dom-navigator-getnetworkservices"><code>getNetworkServices(type, successCallback[,
  1.1136 +               errorCallback])</code></dfn> method is called, the <a class="internalDFN" href="#dfn-user-agent">user agent</a> <em title="MUST" class="rfc2119">MUST</em> run the following steps:
  1.1137            </p>
  1.1138            <ol class="rule">
  1.1139              <li>Let <var>requested control types</var> be initially set to an empty array.
  1.1140              </li>
  1.1141 -            <li>If <var>type</var> is an array consisting of one or more <a href="#dfn-valid-service-type"
  1.1142 -                  class="internalDFN">valid service type</a> tokens, then let <var>requested control types</var> by the
  1.1143 -                  value of <var>type</var>, removing any non-<a href="#dfn-valid-service-type"
  1.1144 -                  class="internalDFN">valid service type</a> tokens from the resulting array.
  1.1145 +            <li>If <var>type</var> is an array consisting of one or more <a class="internalDFN" href="#dfn-valid-service-type">valid service type</a> tokens, then let
  1.1146 +            <var>requested control types</var> by the value of <var>type</var>, removing any non-<a class="internalDFN" href="#dfn-valid-service-type">valid service
  1.1147 +            type</a> tokens from the resulting array.
  1.1148              </li>
  1.1149 -            <li>If <var>type</var> is a string consisting of one <a href="#dfn-valid-service-type"
  1.1150 -                  class="internalDFN">valid service type</a> token, then let <var>requested control types</var> be an
  1.1151 -                  array containing one item with a value of <var>type</var>.
  1.1152 +            <li>If <var>type</var> is a string consisting of one <a class="internalDFN" href="#dfn-valid-service-type">valid service type</a> token, then let
  1.1153 +            <var>requested control types</var> be an array containing one item with a value of <var>type</var>.
  1.1154              </li>
  1.1155 -            <li>If <var>requested control types</var> is an array that contains at least one or more <a title=
  1.1156 -            "valid service type"
  1.1157 -                  href="#dfn-valid-service-type"
  1.1158 -                  class="internalDFN">valid service type</a> tokens then continue to the step labeled <em>process</em>
  1.1159 -                  below. Otherwise, the <a href="#dfn-user-agent"
  1.1160 -                  class="internalDFN">user agent</a> <em class="rfc2119"
  1.1161 -                  title="must">must</em> <a href=
  1.1162 -                  "http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task"
  1.1163 -                  class="externalDFN">queue a task</a> to invoke <var>errorCallback</var>, if it is provided and is an
  1.1164 -                  object of type <code>Function</code>, with a new <a href=
  1.1165 -                  "#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object whose <a href=
  1.1166 -                  "#dom-navigatornetworkserviceerror-code"><code>code</code></a> attribute has the numeric value 2
  1.1167 -                  (<a href=
  1.1168 -                  "#dom-navigatornetworkserviceerror-unknown_type_prefix"><code>UNKNOWN_TYPE_PREFIX_ERR</code></a>) as
  1.1169 +            <li>If <var>requested control types</var> is an array that contains at least one or more <a class="internalDFN" href="#dfn-valid-service-type" title="valid service type">valid service type</a> tokens then continue to the step labeled <em>process</em>
  1.1170 +            below. Otherwise, the <a class="internalDFN" href="#dfn-user-agent">user agent</a> <em title="MUST" class="rfc2119">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
  1.1171 +                  object of type <code>Function</code>, with a new <a href="#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object whose <a href="#dom-navigatornetworkserviceerror-code"><code>code</code></a> attribute has the numeric value 2
  1.1172 +                  (<a href="#dom-navigatornetworkserviceerror-unknown_type_prefix"><code>UNKNOWN_TYPE_PREFIX_ERR</code></a>) as
  1.1173                    its argument, abort any remaining steps and return.
  1.1174              </li>
  1.1175              <li>
  1.1176                <em>Process</em>: Let <var>services found</var> be an empty array.
  1.1177              </li>
  1.1178 -            <li>For each <var>available service</var> in the <a href="#dfn-list-of-available-service-records"
  1.1179 -                  class="internalDFN">list of available service records</a> run the following steps:
  1.1180 +            <li>For each <var>available service</var> in the <a class="internalDFN" href="#dfn-list-of-available-service-records">list of available service records</a> run the following
  1.1181 +            steps:
  1.1182                <ol class="rule">
  1.1183                  <li>For each <var>requested control type</var> in <var>requested control types</var>: If <var>available
  1.1184                  service</var>'s <code>type</code> attribute equals the <var>requested control type</var> then let <var>
  1.1185 @@ -848,8 +665,7 @@
  1.1186                  <li>
  1.1187                    <em>Attach</em>: If <var>matched service</var> is not empty then run the following steps:
  1.1188                    <ol class="rule">
  1.1189 -                    <li>Let <var>new service object</var> be a new <a href=
  1.1190 -                    "#networkservice"><code>NetworkService</code></a> object, mapping the parameters of <var>matched
  1.1191 +                    <li>Let <var>new service object</var> be a new <a href="#networkservice"><code>NetworkService</code></a> object, mapping the parameters of <var>matched
  1.1192                      service</var> to this new object where possible.
  1.1193                      </li>
  1.1194                      <li>Append <var>new service object</var> to the <var>services found</var> array.
  1.1195 @@ -861,62 +677,33 @@
  1.1196              <li>Return, and run the remaining steps asynchronously.
  1.1197              </li>
  1.1198              <li>Optionally, e.g. based on a previously-established user preference, for security reasons, or due to
  1.1199 -            platform limitations, the <a href="#dfn-user-agent"
  1.1200 -                  class="internalDFN">user agent</a> <em class="rfc2119"
  1.1201 -                  title="may">may</em> <a href=
  1.1202 -                  "http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task"
  1.1203 -                  class="externalDFN">queue a task</a> to invoke <var>errorCallback</var>, if it is provided and is an
  1.1204 -                  object of type <code>Function</code>, with a new <a href=
  1.1205 -                  "#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object whose <a href=
  1.1206 -                  "#dom-navigatornetworkserviceerror-code"><code>code</code></a> attribute has the numeric value 1
  1.1207 -                  (<a href=
  1.1208 -                  "#dom-navigatornetworkserviceerror-permission_denied"><code>PERMISSION_DENIED_ERR</code></a>) as its
  1.1209 +            platform limitations, the <a class="internalDFN" href="#dfn-user-agent">user agent</a> <em title="MAY" class="rfc2119">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
  1.1210 +                  object of type <code>Function</code>, with a new <a href="#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object whose <a href="#dom-navigatornetworkserviceerror-code"><code>code</code></a> attribute has the numeric value 1
  1.1211 +                  (<a href="#dom-navigatornetworkserviceerror-permission_denied"><code>PERMISSION_DENIED_ERR</code></a>) as its
  1.1212                    argument, abort any remaining steps and return.
  1.1213              </li>
  1.1214 -            <li>The user agent <em class="rfc2119"
  1.1215 -                  title="must not">must not</em> provide the entry script's origin with a <a href=
  1.1216 -                  "#networkservices"><code>NetworkServices</code></a> object without prior permission given by the
  1.1217 -                  user.
  1.1218 +            <li>The user agent <em title="MUST NOT" class="rfc2119">MUST NOT</em> provide the entry script's origin with a <a href="#networkservices"><code>NetworkServices</code></a> object without prior permission given by the user.
  1.1219                <p>
  1.1220 -                If <var>services found</var> is not an empty array then the <a href="#dfn-user-agent"
  1.1221 -                   class="internalDFN">user agent</a> <em class="rfc2119"
  1.1222 -                   title="may">may</em> choose to prompt the user in a user-agent-specific manner for permission to
  1.1223 -                   provide the <a href=
  1.1224 -                   "http://www.whatwg.org/specs/web-apps/current-work/complete/browsers.html#entry-script"
  1.1225 -                   class="externalDFN">entry script</a>'s <a href=
  1.1226 -                   "http://www.whatwg.org/specs/web-apps/current-work/complete/origin-0.html#origin"
  1.1227 -                   class="externalDFN">origin</a> with a <a href="#networkservices"><code>NetworkServices</code></a>
  1.1228 -                   object representing the <a href="#dfn-user-authorized"
  1.1229 -                   class="internalDFN">user-authorized</a> subset of <var>services found</var>.
  1.1230 +                If <var>services found</var> is not an empty array then the <a class="internalDFN" href="#dfn-user-agent">user agent</a> <em title="MAY" class="rfc2119">MAY</em> choose to prompt the
  1.1231 +                user in a user-agent-specific manner for permission to provide the <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/browsers.html#entry-script" class="externalDFN">entry script</a>'s <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/origin-0.html#origin" class="externalDFN">origin</a> with a <a href="#networkservices"><code>NetworkServices</code></a>
  1.1232 +                   object representing the <a class="internalDFN" href="#dfn-user-authorized">user-authorized</a> subset of <var>services found</var>.
  1.1233                </p>
  1.1234                <p>
  1.1235 -                Alternatively, the user agent <em class="rfc2119"
  1.1236 -                   title="may">may</em> choose to queue a task to invoke <var>successCallback</var> or
  1.1237 -                   <var>errorCallback</var> immediately based on a previously-established user preference, for security
  1.1238 -                   reasons, or due to platform limitations. In such an implementation, if <var>successCallback</var> is
  1.1239 -                   to be fired as a result of a previously-established user preference then the <a href=
  1.1240 -                   "#dfn-user-agent"
  1.1241 -                   class="internalDFN">user agent</a> <em class="rfc2119"
  1.1242 -                   title="must">must</em> continue at the next step of this algorithm.
  1.1243 +                Alternatively, the user agent <em title="MAY" class="rfc2119">MAY</em> choose to queue a task to invoke <var>successCallback</var> or
  1.1244 +                <var>errorCallback</var> immediately based on a previously-established user previously, for security
  1.1245 +                reasons, or due to platform limitations. In such an implementation, if <var>successCallback</var> is to
  1.1246 +                be fired as a result of a previously-established user preference then the <a class="internalDFN" href="#dfn-user-agent">user agent</a> <em title="MUST" class="rfc2119">MUST</em>
  1.1247 +                continue at the next step of this algorithm.
  1.1248                </p>
  1.1249                <p>
  1.1250 -                If permission has been granted by the user to access one or more networked services then the <a href=
  1.1251 -                "#dfn-user-agent"
  1.1252 -                   class="internalDFN">user agent</a> <em class="rfc2119"
  1.1253 -                   title="should">should</em> include an "ongoing local-network communication" indicator.
  1.1254 +                If permission has been granted by the user to access one or more networked services then the <a class="internalDFN" href="#dfn-user-agent">user
  1.1255 +                agent</a> <em title="SHOULD" class="rfc2119">SHOULD</em> include an "ongoing local-network communication" indicator.
  1.1256                </p>
  1.1257                <p>
  1.1258 -                If permission has been denied by the user, <a href="#dfn-user-agent"
  1.1259 -                   class="internalDFN">user agent</a> or platform, then the <a href="#dfn-user-agent"
  1.1260 -                   class="internalDFN">user agent</a> <em class="rfc2119"
  1.1261 -                   title="must">must</em> <a href=
  1.1262 -                   "http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task"
  1.1263 -                   class="externalDFN">queue a task</a> to invoke <var>errorCallback</var>, if it is provided and is an
  1.1264 -                   object of type <code>Function</code>, with a new <a href=
  1.1265 -                   "#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object whose <a href=
  1.1266 -                   "#dom-navigatornetworkserviceerror-code"><code>code</code></a> attribute has the numeric value 1
  1.1267 -                   (<a href=
  1.1268 -                   "#dom-navigatornetworkserviceerror-permission_denied"><code>PERMISSION_DENIED_ERR</code></a>) as its
  1.1269 +                If permission has been denied by the user, <a class="internalDFN" href="#dfn-user-agent">user agent</a> or platform, then the <a class="internalDFN" href="#dfn-user-agent">user agent</a>
  1.1270 +                <em title="MUST" class="rfc2119">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
  1.1271 +                   object of type <code>Function</code>, with a new <a href="#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object whose <a href="#dom-navigatornetworkserviceerror-code"><code>code</code></a> attribute has the numeric value 1
  1.1272 +                   (<a href="#dom-navigatornetworkserviceerror-permission_denied"><code>PERMISSION_DENIED_ERR</code></a>) as its
  1.1273                     argument, abort any remaining steps and return.
  1.1274                </p>
  1.1275                <p>
  1.1276 @@ -928,28 +715,19 @@
  1.1277              </li>
  1.1278              <li>If <var>services found</var> is not an empty array then set <var>services</var> to be an array of one
  1.1279              or more <a href="#networkservice"><code>NetworkService</code></a> objects for which the user granted
  1.1280 -            permission above - known as the current objects <dfn id="dfn-user-authorized">user-authorized</dfn>
  1.1281 -            services.
  1.1282 +            permission above - known as the current objects <dfn id="dfn-user-authorized">user-authorized</dfn> services.
  1.1283              </li>
  1.1284 -            <li>Remove all previously whitelisted urls from the <a href="#dfn-entry-script-origin-s-url-whitelist"
  1.1285 -                  class="internalDFN">entry script origin's <abbr title="Uniform Resource Locator">URL</abbr>
  1.1286 -                  whitelist</a> granted in the current <a href=
  1.1287 -                  "http://www.whatwg.org/specs/web-apps/current-work/complete/browsers.html#entry-script"
  1.1288 -                  class="externalDFN">entry script</a>'s <a href=
  1.1289 -                  "http://www.whatwg.org/specs/web-apps/current-work/complete/origin-0.html#origin"
  1.1290 -                  class="externalDFN">origin</a>.
  1.1291 +            <li>Remove all previously whitelisted urls from the <a class="internalDFN" href="#dfn-entry-script-origin-s-url-whitelist">entry script origin's <abbr title="Uniform Resource Locator">URL</abbr> whitelist</a> granted in
  1.1292 +            the current <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/browsers.html#entry-script" class="externalDFN">entry script</a>'s <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/origin-0.html#origin" class="externalDFN">origin</a>.
  1.1293              </li>
  1.1294              <li>For each Object <var>service</var> in <var>services</var>, if any, run the following sub-steps:
  1.1295                <ol class="rule">
  1.1296 -                <li>Add the <var>service</var>'s <code>url</code> parameter to the <a href=
  1.1297 -                "#dfn-entry-script-origin-s-url-whitelist"
  1.1298 -                      class="internalDFN">entry script origin's <abbr title="Uniform Resource Locator">URL</abbr>
  1.1299 -                      whitelist</a>.
  1.1300 +                <li>Add the <var>service</var>'s <code>url</code> parameter to the <a class="internalDFN" href="#dfn-entry-script-origin-s-url-whitelist">entry script origin's
  1.1301 +                  <abbr title="Uniform Resource Locator">URL</abbr> whitelist</a>.
  1.1302                  </li>
  1.1303                  <li>If <var>service</var>'s <code>type</code> parameter begins with the DOMString "<code>upnp:</code>"
  1.1304 -                and the <var>service</var>'s <code>eventsUrl</code> parameter is not empty then <a href=
  1.1305 -                "#dfn-setup-a-upnp-events-subscription"
  1.1306 -                      class="internalDFN">setup a UPnP Events Subscription</a> for <var>service</var>.
  1.1307 +                and the <var>service</var>'s <code>eventsUrl</code> parameter is not empty then <a class="internalDFN" href="#dfn-setup-a-upnp-events-subscription">setup a UPnP Events
  1.1308 +                Subscription</a> for <var>service</var>.
  1.1309                  </li>
  1.1310                </ol>
  1.1311              </li>
  1.1312 @@ -958,73 +736,43 @@
  1.1313              </li>
  1.1314              <li>Store <var>requested control types</var> against <var>services manager</var> as an internal variable.
  1.1315              </li>
  1.1316 -            <li>Set <var>services manager</var>'s <a href=
  1.1317 -            "#dom-networkservices-servicesavailable"><code>servicesAvailable</code></a> attribute to the number of
  1.1318 -            items currently found in the <a href="#dfn-list-of-available-service-records"
  1.1319 -                  class="internalDFN">list of available service records</a> whose <code>type</code> property matches
  1.1320 -                  any of the tokens requested in <var>requested control types</var>.
  1.1321 +            <li>Set <var>services manager</var>'s <a href="#dom-networkservices-servicesavailable"><code>servicesAvailable</code></a> attribute to the number of
  1.1322 +            items currently found in the <a class="internalDFN" href="#dfn-list-of-available-service-records">list of available service records</a> whose <code>type</code> property
  1.1323 +            matches any of the tokens requested in <var>requested control types</var>.
  1.1324              </li>
  1.1325              <li>Add <var>services</var>, if any, to the <var>services manager</var> object as its collection of
  1.1326 -              <a href="#dfn-indexed-properties-1"
  1.1327 -                  class="internalDFN">indexed properties</a>. If <var>services</var> is an empty array then the
  1.1328 -                  <var>services manager</var> does not have any <var>indexed properties</var>.
  1.1329 +            <a class="internalDFN" href="#dfn-indexed-properties-1">indexed properties</a>. If <var>services</var> is an empty array then the <var>services manager</var>
  1.1330 +            does not have any <var>indexed properties</var>.
  1.1331              </li>
  1.1332              <li>Set <var>services manager</var>'s <a href="#dom-networkservices-length"><code>length</code></a>
  1.1333              attribute to the number of items in <var>services</var>.
  1.1334              </li>
  1.1335 -            <li>Add <var>services manager</var> to the <a href="#dfn-list-of-active-service-managers"
  1.1336 -                  class="internalDFN">list of active service managers</a>.
  1.1337 +            <li>Add <var>services manager</var> to the <a class="internalDFN" href="#dfn-list-of-active-service-managers">list of active service managers</a>.
  1.1338              </li>
  1.1339 -            <li>The <a href="#dfn-user-agent"
  1.1340 -                  class="internalDFN">user agent</a> <em class="rfc2119"
  1.1341 -                  title="must">must</em> <a href=
  1.1342 -                  "http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task"
  1.1343 -                  class="externalDFN">queue a task</a> to invoke <var>successCallback</var> with <var>services
  1.1344 +            <li>The <a class="internalDFN" href="#dfn-user-agent">user agent</a> <em title="MUST" class="rfc2119">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 <var>services
  1.1345                    manager</var> as its argument.
  1.1346              </li>
  1.1347            </ol>
  1.1348            <p>
  1.1349 -            The <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#task-source"
  1.1350 -               class="externalDFN">task source</a> for these <a href=
  1.1351 -               "http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#concept-task"
  1.1352 -               class="externalDFN">tasks</a> is the <a href=
  1.1353 -               "http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#user-interaction-task-source"
  1.1354 -               class="externalDFN">user interaction task source</a>.
  1.1355 +            The <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#task-source" class="externalDFN">task source</a> for these <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#concept-task" class="externalDFN">tasks</a> is the <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#user-interaction-task-source" class="externalDFN">user interaction task source</a>.
  1.1356            </p>
  1.1357            <p>
  1.1358              When a <a href="#networkservice"><code>NetworkService</code></a> object is provided to a Web page, the
  1.1359 -            <a href="#dfn-user-agent"
  1.1360 -               class="internalDFN">user agent</a> <em class="rfc2119"
  1.1361 -               title="must">must</em> add the <code>url</code> property to the <dfn id=
  1.1362 -               "dfn-entry-script-origin-s-url-whitelist">entry script origin's <abbr title=
  1.1363 -               "Uniform Resource Locator">URL</abbr> whitelist</dfn>. This list enables the Web page to override and
  1.1364 -               initiate cross-site resource requests towards these URLs, and any sub-resources of these URLs, within
  1.1365 -               the current <a href=
  1.1366 -               "http://www.whatwg.org/specs/web-apps/current-work/complete/browsers.html#entry-script"
  1.1367 -               class="externalDFN">entry script</a>'s <a href=
  1.1368 -               "http://www.whatwg.org/specs/web-apps/current-work/complete/origin-0.html#origin"
  1.1369 -               class="externalDFN">origin</a> via various existing mechanisms (e.g. Web Sockets, Server-Sent Events,
  1.1370 +            <a class="internalDFN" href="#dfn-user-agent">user agent</a> <em title="MUST" class="rfc2119">MUST</em> add the <code>url</code> property to the <dfn id="dfn-entry-script-origin-s-url-whitelist">entry script origin's <abbr title="Uniform Resource Locator">URL</abbr>
  1.1371 +            whitelist</dfn>. This list enables the Web page to override and initiate cross-site resource requests
  1.1372 +            towards these URLs, and any sub-resources of these URLs, within the current <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/browsers.html#entry-script" class="externalDFN">entry script</a>'s <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/origin-0.html#origin" class="externalDFN">origin</a> via various existing mechanisms (e.g. Web Sockets, Server-Sent Events,
  1.1373                 Web Messaging, XMLHttpRequest).
  1.1374            </p>
  1.1375            <p>
  1.1376 -            If the user navigates away from the <a href=
  1.1377 -            "http://www.whatwg.org/specs/web-apps/current-work/complete/browsers.html#entry-script"
  1.1378 -               class="externalDFN">entry script</a>'s <a href=
  1.1379 -               "http://www.whatwg.org/specs/web-apps/current-work/complete/origin-0.html#origin"
  1.1380 -               class="externalDFN">origin</a> then the <a href="#dfn-user-agent"
  1.1381 -               class="internalDFN">user agent</a> <em class="ct"><em class="rfc2119"
  1.1382 -                title="must">must</em></em> remove all previously whitelisted urls from the <a href=
  1.1383 -                "#dfn-entry-script-origin-s-url-whitelist"
  1.1384 -               class="internalDFN">entry script origin's <abbr title="Uniform Resource Locator">URL</abbr>
  1.1385 -               whitelist</a>. There is no persistence to network service selections provided to a web page. It is not
  1.1386 -               possible to access a previously white-listed networked service without the necessary user authorization
  1.1387 -               in all of the following cases:
  1.1388 +            If the user navigates away from the <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/browsers.html#entry-script" class="externalDFN">entry script</a>'s <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/origin-0.html#origin" class="externalDFN">origin</a> then the <a class="internalDFN" href="#dfn-user-agent">user agent</a> <em class="ct"><em title="MUST" class="rfc2119">MUST</em></em> remove all previously
  1.1389 +               whitelisted urls from the <a class="internalDFN" href="#dfn-entry-script-origin-s-url-whitelist">entry script origin's <abbr title="Uniform Resource Locator">URL</abbr> whitelist</a>. There is no persistence to network
  1.1390 +               service selections provided to a web page. It is not possible to access a previously white-listed
  1.1391 +               networked service without the necessary user authorization in all of the following cases:
  1.1392            </p>
  1.1393            <ul>
  1.1394              <li>If the current script is reloaded at any point in the same or different window.
  1.1395              </li>
  1.1396 -            <li>if the current script reinvokes the <a href=
  1.1397 -            "#dom-navigator-getnetworkservices"><code>getNetworkServices()</code></a> method at any point in its
  1.1398 +            <li>if the current script reinvokes the <a href="#dom-navigator-getnetworkservices"><code>getNetworkServices()</code></a> method at any point in its
  1.1399              execution.
  1.1400              </li>
  1.1401              <li>If the user navigates forward or back in their history to reload the current page.
  1.1402 @@ -1035,91 +783,74 @@
  1.1403          </div>
  1.1404        </section>
  1.1405        <section id="error-handling">
  1.1406 -        <h3>
  1.1407 -          <span class="secno">4.2</span> Error Handling
  1.1408 +        <h3><span class="secno">4.2 </span>
  1.1409 +          Error Handling
  1.1410          </h3>
  1.1411          <dl class="domintro">
  1.1412            <dt>
  1.1413 -            <var title="">error</var> . <code title="dom-NavigatorNetworkServiceError-code"><a href=
  1.1414 -            "#dom-navigatornetworkserviceerror-code">code</a></code>
  1.1415 +            <var title="">error</var> . <code title="dom-NavigatorNetworkServiceError-code"><a href="#dom-navigatornetworkserviceerror-code">code</a></code>
  1.1416            </dt>
  1.1417            <dd>
  1.1418              <p>
  1.1419                Returns the current error's error code. At the current time, this will be <code>1</code> or
  1.1420 -              <code>2</code>, for which the corresponding error constants <a href=
  1.1421 -              "#dom-navigatornetworkserviceerror-permission_denied"><code>PERMISSION_DENIED_ERR</code></a> and <a href=
  1.1422 -              "#dom-navigatornetworkserviceerror-unknown_type_prefix"><code>UNKNOWN_TYPE_PREFIX_ERR</code></a> are
  1.1423 +              <code>2</code>, for which the corresponding error constants <a href="#dom-navigatornetworkserviceerror-permission_denied"><code>PERMISSION_DENIED_ERR</code></a> and <a href="#dom-navigatornetworkserviceerror-unknown_type_prefix"><code>UNKNOWN_TYPE_PREFIX_ERR</code></a> are
  1.1424                defined.
  1.1425              </p>
  1.1426            </dd>
  1.1427          </dl>
  1.1428          <p>
  1.1429 -          The <dfn id="dom-navigatornetworkserviceerror-code"
  1.1430 -             title="dom-navigatornetworkserviceerror-code"><code>code</code></dfn> attribute of a <a href=
  1.1431 -             "#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object <em class=
  1.1432 -             "ct"><em class="rfc2119"
  1.1433 -              title="must">must</em></em> return the code for the error, which will be one of the following:
  1.1434 +          The <dfn id="dom-navigatornetworkserviceerror-code" title="dom-navigatornetworkserviceerror-code"><code>code</code></dfn> attribute of a <a href="#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object <em class="ct"><em title="MUST" class="rfc2119">MUST</em></em> return the code for the error, which will be one of the following:
  1.1435          </p>
  1.1436          <dl>
  1.1437            <dt>
  1.1438 -            <dfn id="dom-navigatornetworkserviceerror-permission_denied"
  1.1439 -                title="dom-navigatornetworkserviceerror-permission_denied"><code>PERMISSION_DENIED_ERR</code></dfn>
  1.1440 +            <dfn id="dom-navigatornetworkserviceerror-permission_denied" title="dom-navigatornetworkserviceerror-permission_denied"><code>PERMISSION_DENIED_ERR</code></dfn>
  1.1441                  (numeric value 1)
  1.1442            </dt>
  1.1443            <dd>
  1.1444              The user or user agent denied the page permission to access any services.
  1.1445            </dd>
  1.1446            <dt>
  1.1447 -            <dfn id="dom-navigatornetworkserviceerror-unknown_type_prefix"
  1.1448 -                title="dom-navigatornetworkserviceerror-unknown_type_prefix"><code>UNKNOWN_TYPE_PREFIX_ERR</code></dfn>
  1.1449 +            <dfn id="dom-navigatornetworkserviceerror-unknown_type_prefix" title="dom-navigatornetworkserviceerror-unknown_type_prefix"><code>UNKNOWN_TYPE_PREFIX_ERR</code></dfn>
  1.1450                  (numeric value 2)
  1.1451            </dt>
  1.1452            <dd>
  1.1453 -            No <a href="#dfn-valid-service-type"
  1.1454 -                class="internalDFN">valid service type</a> tokens were provided in the method invocation.
  1.1455 +            No <a class="internalDFN" href="#dfn-valid-service-type">valid service type</a> tokens were provided in the method invocation.
  1.1456            </dd>
  1.1457          </dl>
  1.1458        </section>
  1.1459      </section>
  1.1460      <section id="obtaining-networked-services">
  1.1461 -      <h2>
  1.1462 -        <span class="secno">5.</span> Obtaining networked services
  1.1463 +      <!--OddPage--><h2><span class="secno">5. </span>
  1.1464 +        Obtaining networked services
  1.1465        </h2>
  1.1466        <p>
  1.1467          The <a href="#networkservices"><code>NetworkServices</code></a> interface represents a collection of zero or
  1.1468 -        more <dfn id="dfn-indexed-properties">indexed properties</dfn> that are each a <a href="#dfn-user-authorized"
  1.1469 -           class="internalDFN">user-authorized</a> <a href="#networkservice"><code>NetworkService</code></a> object.
  1.1470 +        more <dfn id="dfn-indexed-properties">indexed properties</dfn> that are each a <a class="internalDFN" href="#dfn-user-authorized">user-authorized</a> <a href="#networkservice"><code>NetworkService</code></a> object.
  1.1471        </p>
  1.1472        <p>
  1.1473          A <a href="#networkservices"><code>NetworkServices</code></a> object is the top level success callback
  1.1474          parameter from a call to <a href="#dom-navigator-getnetworkservices"><code>getNetworkServices()</code></a>.
  1.1475        </p>
  1.1476 -      <pre class="widl">
  1.1477 -[NoInterfaceObject]
  1.1478 +      <pre class="widl">[NoInterfaceObject]
  1.1479  interface <dfn id="networkservices">NetworkServices</dfn> {
  1.1480    readonly attribute unsigned long    <a href="#dom-networkservices-length">length</a>;
  1.1481    getter <a href="#networkservice">NetworkService</a> (unsigned long index);
  1.1482 -  <a href="#networkservice">NetworkService</a>? <a href=
  1.1483 -"#dom-networkservices-getservicebyid">getServiceById</a>(DOMString id);
  1.1484 +  <a href="#networkservice">NetworkService</a>? <a href="#dom-networkservices-getservicebyid">getServiceById</a>(DOMString id);
  1.1485  
  1.1486    readonly attribute unsigned long    <a href="#dom-networkservices-servicesavailable">servicesAvailable</a>;
  1.1487  
  1.1488    // event handler attributes
  1.1489 -           attribute <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#eventhandler"
  1.1490 -     class="externalDFN">EventHandler</a>     <a href="#dom-networkservices-onserviceavailable">onserviceavailable</a>;
  1.1491 -           attribute <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#eventhandler"
  1.1492 -     class="externalDFN">EventHandler</a>     <a href=
  1.1493 -     "#dom-networkservices-onserviceunavailable">onserviceunavailable</a>;
  1.1494 +           attribute <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#eventhandler" class="externalDFN">EventHandler</a>     <a href="#dom-networkservices-onserviceavailable">onserviceavailable</a>;
  1.1495 +           attribute <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#eventhandler" class="externalDFN">EventHandler</a>     <a href="#dom-networkservices-onserviceunavailable">onserviceunavailable</a>;
  1.1496  
  1.1497  };
  1.1498  
  1.1499 -<a href="#networkservices">NetworkServices</a> implements <a href=
  1.1500 -"http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#interface-eventtarget"
  1.1501 -     class="externalDFN">EventTarget</a>;
  1.1502 +<a href="#networkservices">NetworkServices</a> implements <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#interface-eventtarget" class="externalDFN">EventTarget</a>;
  1.1503  </pre>
  1.1504 +
  1.1505        <section id="attributes">
  1.1506 -        <h3>
  1.1507 -          <span class="secno">5.1</span> Attributes
  1.1508 +        <h3><span class="secno">5.1 </span>
  1.1509 +          Attributes
  1.1510          </h3>
  1.1511          <dl class="domintro">
  1.1512            <dt>
  1.1513 @@ -1127,49 +858,39 @@
  1.1514            </dt>
  1.1515            <dd>
  1.1516              <p>
  1.1517 -              Returns the current number of items in the current object's collection of <a href=
  1.1518 -              "#networkservice"><code>NetworkService</code></a> objects.
  1.1519 +              Returns the current number of <a class="internalDFN" href="#dfn-indexed-properties-1">indexed properties</a> in the current object's collection.
  1.1520              </p>
  1.1521            </dd>
  1.1522            <dt>
  1.1523 -            <code title="dom-networkservices-servicesavailable"><a href=
  1.1524 -            "#dom-networkservices-servicesavailable">servicesAvailable</a></code>
  1.1525 +            <code title="dom-networkservices-servicesavailable"><a href="#dom-networkservices-servicesavailable">servicesAvailable</a></code>
  1.1526            </dt>
  1.1527            <dd>
  1.1528              <p>
  1.1529 -              Returns the current number of items matching one of the app-requested <a href="#dfn-valid-service-type"
  1.1530 -                 class="internalDFN">valid service type</a> tokens in the <a href=
  1.1531 -                 "#dfn-list-of-available-service-records"
  1.1532 -                 class="internalDFN">list of available service records</a>.
  1.1533 +              Returns the current number of items matching one of the app-requested <a class="internalDFN" href="#dfn-valid-service-type">valid service type</a> tokens in
  1.1534 +              the <a class="internalDFN" href="#dfn-list-of-available-service-records">list of available service records</a>.
  1.1535              </p>
  1.1536            </dd>
  1.1537          </dl>
  1.1538          <div>
  1.1539            <p>
  1.1540 -            The <dfn id="dom-networkservices-length"><code>length</code></dfn> attribute <em class="rfc2119"
  1.1541 -               title="must">must</em> return the number of <a href="#networkservice"><code>NetworkService</code></a>
  1.1542 -               objects represented by the collection.
  1.1543 +            The <dfn id="dom-networkservices-length"><code>length</code></dfn> attribute <em title="MUST" class="rfc2119">MUST</em> return the number of
  1.1544 +            <a href="#networkservice"><code>NetworkService</code></a> objects represented by the collection.
  1.1545            </p>
  1.1546            <p>
  1.1547 -            The <dfn id="dom-networkservices-servicesavailable"><code>servicesAvailable</code></dfn> attribute
  1.1548 -            <em class="rfc2119"
  1.1549 -               title="must">must</em> return the number of services in the <a href=
  1.1550 -               "#dfn-list-of-available-service-records"
  1.1551 -               class="internalDFN">list of available service records</a> whose <code>type</code> attribute matches any
  1.1552 -               of the <a href="#dfn-valid-service-type"
  1.1553 -               class="internalDFN">valid service type</a> tokens that was initially used to create the current <a href=
  1.1554 -               "#networkservices"><code>NetworkServices</code></a> object.
  1.1555 +            The <dfn id="dom-networkservices-servicesavailable"><code>servicesAvailable</code></dfn> attribute <em title="MUST" class="rfc2119">MUST</em>
  1.1556 +            return the number of services in the <a class="internalDFN" href="#dfn-list-of-available-service-records">list of available service records</a> whose <code>type</code>
  1.1557 +            attribute matches any of the <a class="internalDFN" href="#dfn-valid-service-type">valid service type</a> tokens that were initially used to create the current
  1.1558 +            <a href="#networkservices"><code>NetworkServices</code></a> object.
  1.1559            </p>
  1.1560          </div>
  1.1561        </section>
  1.1562        <section id="methods-1">
  1.1563 -        <h3>
  1.1564 -          <span class="secno">5.2</span> Methods
  1.1565 +        <h3><span class="secno">5.2 </span>
  1.1566 +          Methods
  1.1567          </h3>
  1.1568          <dl class="domintro">
  1.1569            <dt>
  1.1570 -            <code title="networkservices-getter"><a href="#networkservices">services</a></code> [ <var title=
  1.1571 -            "">index</var> ]
  1.1572 +            <code title="networkservices-getter"><a href="#networkservices">services</a></code> [ <var title="">index</var> ]
  1.1573            </dt>
  1.1574            <dd>
  1.1575              <p>
  1.1576 @@ -1177,9 +898,7 @@
  1.1577              </p>
  1.1578            </dd>
  1.1579            <dt>
  1.1580 -            <code title="networkservices-getter"><a href="#networkservices">services</a></code> . <code title=
  1.1581 -            "dom-networkservices-getservicebyid"><a href=
  1.1582 -            "#dom-networkservices-getservicebyid">getServiceById</a></code> ( <var title="">id</var> )
  1.1583 +            <code title="networkservices-getter"><a href="#networkservices">services</a></code> . <code title="dom-networkservices-getservicebyid"><a href="#dom-networkservices-getservicebyid">getServiceById</a></code> ( <var title="">id</var> )
  1.1584            </dt>
  1.1585            <dd>
  1.1586              <p>
  1.1587 @@ -1190,71 +909,37 @@
  1.1588          </dl>
  1.1589          <p>
  1.1590            A <a href="#networkservices"><code>NetworkServices</code></a> object represents the current collection of
  1.1591 -          zero or more <a href="#networkservice"><code>NetworkService</code></a> objects - its <a href=
  1.1592 -          "#dfn-indexed-properties-1"
  1.1593 -             class="internalDFN">indexed properties</a>. The <a href="#dfn-indexed-properties-1"
  1.1594 -             class="internalDFN">indexed properties</a> of a <a href=
  1.1595 -             "#networkservices"><code>NetworkServices</code></a> object are <span>immutable</span> meaning that <a href=
  1.1596 -             "#dfn-indexed-properties-1"
  1.1597 -             class="internalDFN">indexed properties</a> cannot be added and <a href="#dfn-indexed-properties-1"
  1.1598 -             class="internalDFN">indexed properties</a> cannot be removed for the lifetime of a <a href=
  1.1599 -             "#networkservices"><code>NetworkServices</code></a> object.
  1.1600 +          zero or more <a href="#networkservice"><code>NetworkService</code></a> objects - its <a class="internalDFN" href="#dfn-indexed-properties-1">indexed
  1.1601 +          properties</a>. The <a class="internalDFN" href="#dfn-indexed-properties-1">indexed properties</a> of a <a href="#networkservices"><code>NetworkServices</code></a> object are <span>immutable</span> meaning that <a class="internalDFN" href="#dfn-indexed-properties-1">indexed
  1.1602 +          properties</a> cannot be added and <a class="internalDFN" href="#dfn-indexed-properties-1">indexed properties</a> cannot be removed for the lifetime of a <a href="#networkservices"><code>NetworkServices</code></a> object.
  1.1603          </p>
  1.1604 -        <div class="note">
  1.1605 -          <div class="note-title">
  1.1606 -            <span>Note</span>
  1.1607 -          </div>
  1.1608 -          <p class="">
  1.1609 -            Each service in a <a href="#networkservices"><code>NetworkServices</code></a> object thus has an index; the
  1.1610 -            first has the index 0, and each subsequent service is numbered one higher than the previous one.
  1.1611 -          </p>
  1.1612 -        </div>
  1.1613          <p>
  1.1614 -          The <a href=
  1.1615 -          "http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#supported-property-indices"
  1.1616 -             class="externalDFN">supported property indices</a> of <a href=
  1.1617 -             "#networkservices"><code>NetworkServices</code></a> objects at any instant are the numbers from zero to
  1.1618 +          The <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#supported-property-indices" class="externalDFN">supported property indices</a> of <a href="#networkservices"><code>NetworkServices</code></a> objects at any instant are the numbers from zero to
  1.1619               the number of the <a href="#networkservice"><code>NetworkService</code></a> objects in the collection
  1.1620               minus one.
  1.1621          </p>
  1.1622 +        <div class="note"><div class="note-title"><span>Note</span></div><p class="">
  1.1623 +          Each service in a <a href="#networkservices"><code>NetworkServices</code></a> object thus has an index; the
  1.1624 +          first has the index 0, and each subsequent service is numbered one higher than the previous one.
  1.1625 +        </p></div>
  1.1626          <p>
  1.1627 -          To <a href=
  1.1628 -          "http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#determine-the-value-of-an-indexed-property"
  1.1629 -             class="externalDFN">determine the value of an indexed property</a> for a given index <var>index</var> in a
  1.1630 -             <a href="#networkservices"><code>NetworkServices</code></a> object the user agent <em class="rfc2119"
  1.1631 -             title="must">must</em> return the <a href="#networkservice"><code>NetworkService</code></a> object that
  1.1632 -             represents the <var>index</var>th item in the collection.
  1.1633 +          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
  1.1634 +             <a href="#networkservices"><code>NetworkServices</code></a> object the user agent <em title="MUST" class="rfc2119">MUST</em> return the <a href="#networkservice"><code>NetworkService</code></a> object that represents the <var>index</var>th item in
  1.1635 +             the collection.
  1.1636          </p>
  1.1637          <p>
  1.1638 -          The <dfn id="dom-networkservices-getservicebyid"><code>getServiceById(id)</code></dfn> method <em class=
  1.1639 -          "ct"><em class="rfc2119"
  1.1640 -              title="must">must</em></em> return the first <a href="#networkservice"><code>NetworkService</code></a>
  1.1641 -              object in the collection whose <a href="#dom-networkservice-id"><code>id</code></a> attribute is equal to
  1.1642 -              the value of the <var>id</var> argument provided. When no <a href=
  1.1643 -              "#networkservice"><code>NetworkService</code></a> objects match the given argument, the method <em class=
  1.1644 -              "rfc2119"
  1.1645 -             title="must">must</em> return null.
  1.1646 -        </p>
  1.1647 -        <p>
  1.1648 -          Services available within the local network can connect and disconnect at different times during the
  1.1649 -          execution of a web page. A <a href="#dfn-user-agent"
  1.1650 -             class="internalDFN">user agent</a> can inform a web page when the state of networked services matching the
  1.1651 -             requested <a href="#dfn-valid-service-type"
  1.1652 -             class="internalDFN">valid service type</a> change. Web pages can use this information to enable in-page
  1.1653 -             experiences for communicating the state of networked services with the ability to change the particular
  1.1654 -             service or set of services the page is connected to by re-invoking the <a href=
  1.1655 -             "#dom-navigator-getnetworkservices"><code>getNetworkServices()</code></a> method.
  1.1656 +          The <dfn id="dom-networkservices-getservicebyid"><code>getServiceById(id)</code></dfn> method <em class="ct"><em title="MUST" class="rfc2119">MUST</em></em> return the first <a href="#networkservice"><code>NetworkService</code></a> object in the
  1.1657 +          collection whose <a href="#dom-networkservice-id"><code>id</code></a> attribute is equal to the value of the
  1.1658 +          <var>id</var> argument provided. When no <a href="#networkservice"><code>NetworkService</code></a> objects
  1.1659 +          match the given argument, the method <em title="MUST" class="rfc2119">MUST</em> return null.
  1.1660          </p>
  1.1661        </section>
  1.1662        <section id="events">
  1.1663 -        <h3>
  1.1664 -          <span class="secno">5.3</span> Events
  1.1665 +        <h3><span class="secno">5.3 </span>
  1.1666 +          Events
  1.1667          </h3>
  1.1668          <p>
  1.1669 -          The following are the event handlers (and their corresponding event handler event types) that <em class=
  1.1670 -          "ct"><em class="rfc2119"
  1.1671 -              title="must">must</em></em> be supported, as IDL attributes, by all objects implementing the <a href=
  1.1672 -              "#networkservices"><code>NetworkServices</code></a> interface:
  1.1673 +          The following are the event handlers (and their corresponding event handler event types) that <em class="ct"><em title="MUST" class="rfc2119">MUST</em></em> be supported, as IDL attributes, by all objects implementing the <a href="#networkservices"><code>NetworkServices</code></a> interface:
  1.1674          </p>
  1.1675          <table border="1">
  1.1676            <thead>
  1.1677 @@ -1270,8 +955,7 @@
  1.1678            <tbody>
  1.1679              <tr>
  1.1680                <td>
  1.1681 -                <dfn id="dom-networkservices-onserviceavailable"
  1.1682 -                    title="dom-NetworkServices-onserviceavailable"><code>onserviceavailable</code></dfn>
  1.1683 +                <dfn id="dom-networkservices-onserviceavailable" title="dom-NetworkServices-onserviceavailable"><code>onserviceavailable</code></dfn>
  1.1684                </td>
  1.1685                <td>
  1.1686                  <a href="#event-serviceavailable"><code>serviceavailable</code></a>
  1.1687 @@ -1279,8 +963,7 @@
  1.1688              </tr>
  1.1689              <tr>
  1.1690                <td>
  1.1691 -                <dfn id="dom-networkservices-onserviceunavailable"
  1.1692 -                    title="dom-NetworkServices-onserviceunavailable"><code>onserviceunavailable</code></dfn>
  1.1693 +                <dfn id="dom-networkservices-onserviceunavailable" title="dom-NetworkServices-onserviceunavailable"><code>onserviceunavailable</code></dfn>
  1.1694                </td>
  1.1695                <td>
  1.1696                  <a href="#event-serviceunavailable"><code>serviceunavailable</code></a>
  1.1697 @@ -1291,16 +974,14 @@
  1.1698        </section>
  1.1699      </section>
  1.1700      <section id="communicating-with-a-networked-service">
  1.1701 -      <h2>
  1.1702 -        <span class="secno">6.</span> Communicating with a networked service
  1.1703 +      <!--OddPage--><h2><span class="secno">6. </span>
  1.1704 +        Communicating with a networked service
  1.1705        </h2>
  1.1706        <p>
  1.1707          The <a href="#networkservice"><code>NetworkService</code></a> interface is used to provide a set of connection
  1.1708 -        information for an <abbr title="Hypertext Transfer Protocol">HTTP</abbr> service endpoint and if available,
  1.1709 -        service events, running on a networked device.
  1.1710 +        information for an <abbr title="Hypertext Transfer Protocol">HTTP</abbr> service endpoint and if available, service events, running on a networked device.
  1.1711        </p>
  1.1712 -      <pre class="widl">
  1.1713 -[NoInterfaceObject]
  1.1714 +      <pre class="widl">[NoInterfaceObject]
  1.1715  interface <dfn id="networkservice">NetworkService</dfn> {
  1.1716    readonly attribute DOMString        <a href="#dom-networkservice-id">id</a>;
  1.1717    readonly attribute DOMString        <a href="#dom-networkservice-name">name</a>;
  1.1718 @@ -1311,27 +992,21 @@
  1.1719    readonly attribute boolean          <a href="#dom-networkservice-online">online</a>;
  1.1720  
  1.1721    // event handler attributes
  1.1722 -           attribute <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#eventhandler"
  1.1723 -     class="externalDFN">EventHandler</a>     <a href="#dom-networkservice-onserviceonline">onserviceonline</a>;
  1.1724 -           attribute <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#eventhandler"
  1.1725 -     class="externalDFN">EventHandler</a>     <a href="#dom-networkservice-onserviceoffline">onserviceoffline</a>;
  1.1726 +           attribute <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#eventhandler" class="externalDFN">EventHandler</a>     <a href="#dom-networkservice-onserviceonline">onserviceonline</a>;
  1.1727 +           attribute <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#eventhandler" class="externalDFN">EventHandler</a>     <a href="#dom-networkservice-onserviceoffline">onserviceoffline</a>;
  1.1728  
  1.1729 -           attribute <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#eventhandler"
  1.1730 -     class="externalDFN">EventHandler</a>     <a href="#dom-networkservice-onnotify">onnotify</a>;
  1.1731 +           attribute <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#eventhandler" class="externalDFN">EventHandler</a>     <a href="#dom-networkservice-onnotify">onnotify</a>;
  1.1732  };
  1.1733  
  1.1734 -<a href="#networkservice">NetworkService</a> implements <a href=
  1.1735 -"http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#interface-eventtarget"
  1.1736 -     class="externalDFN">EventTarget</a>;
  1.1737 +<a href="#networkservice">NetworkService</a> implements <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#interface-eventtarget" class="externalDFN">EventTarget</a>;
  1.1738  </pre>
  1.1739        <section id="attributes-1">
  1.1740 -        <h3>
  1.1741 -          <span class="secno">6.1</span> Attributes
  1.1742 +        <h3><span class="secno">6.1 </span>
  1.1743 +          Attributes
  1.1744          </h3>
  1.1745          <dl class="domintro">
  1.1746            <dt>
  1.1747 -            <var title="">service</var> . <code title="dom-networkservice-id"><a href=
  1.1748 -            "#dom-networkservice-id">id</a></code>
  1.1749 +            <var title="">service</var> . <code title="dom-networkservice-id"><a href="#dom-networkservice-id">id</a></code>
  1.1750            </dt>
  1.1751            <dd>
  1.1752              <p>
  1.1753 @@ -1339,8 +1014,7 @@
  1.1754              </p>
  1.1755            </dd>
  1.1756            <dt>
  1.1757 -            <var title="">service</var> . <code title="dom-networkservice-name"><a href=
  1.1758 -            "#dom-networkservice-name">name</a></code>
  1.1759 +            <var title="">service</var> . <code title="dom-networkservice-name"><a href="#dom-networkservice-name">name</a></code>
  1.1760            </dt>
  1.1761            <dd>
  1.1762              <p>
  1.1763 @@ -1348,31 +1022,24 @@
  1.1764              </p>
  1.1765            </dd>
  1.1766            <dt>
  1.1767 -            <var title="">service</var> . <code title="dom-networkservice-type"><a href=
  1.1768 -            "#dom-networkservice-type">type</a></code>
  1.1769 +            <var title="">service</var> . <code title="dom-networkservice-type"><a href="#dom-networkservice-type">type</a></code>
  1.1770            </dt>
  1.1771            <dd>
  1.1772              <p>
  1.1773 -              The <a href="#dfn-valid-service-type"
  1.1774 -                 class="internalDFN">valid service type</a> token value of the user-selected service.
  1.1775 +              The <a class="internalDFN" href="#dfn-valid-service-type">valid service type</a> token value of the user-selected service.
  1.1776              </p>
  1.1777            </dd>
  1.1778            <dt>
  1.1779 -            <var title="">service</var> . <code title="dom-networkservice-url"><a href=
  1.1780 -            "#dom-networkservice-url">url</a></code>
  1.1781 +            <var title="">service</var> . <code title="dom-networkservice-url"><a href="#dom-networkservice-url">url</a></code>
  1.1782            </dt>
  1.1783            <dd>
  1.1784              <p>
  1.1785 -              The control <abbr title="Uniform Resource Locator">URL</abbr> endpoint (including any required port
  1.1786 -              information) of the user-selected control service that has been added to the <a href=
  1.1787 -              "#dfn-entry-script-origin-s-url-whitelist"
  1.1788 -                 class="internalDFN">entry script origin's <abbr title="Uniform Resource Locator">URL</abbr>
  1.1789 -                 whitelist</a>.
  1.1790 +              The control <abbr title="Uniform Resource Locator">URL</abbr> endpoint (including any required port information) of the user-selected control service
  1.1791 +              that has been added to the <a class="internalDFN" href="#dfn-entry-script-origin-s-url-whitelist">entry script origin's <abbr title="Uniform Resource Locator">URL</abbr> whitelist</a>.
  1.1792              </p>
  1.1793            </dd>
  1.1794            <dt>
  1.1795 -            <var title="">service</var> . <code title="dom-networkservice-config"><a href=
  1.1796 -            "#dom-networkservice-config">config</a></code>
  1.1797 +            <var title="">service</var> . <code title="dom-networkservice-config"><a href="#dom-networkservice-config">config</a></code>
  1.1798            </dt>
  1.1799            <dd>
  1.1800              <p>
  1.1801 @@ -1382,27 +1049,21 @@
  1.1802          </dl>
  1.1803          <p>
  1.1804            The <dfn id="dom-networkservice-id"><code>id</code></dfn> attribute is a unique identifier for the service.
  1.1805 -          The same service provided at different times or on different objects <em class="rfc2119"
  1.1806 -             title="must">must</em> have the same <a href="#dom-networkservice-id"><code>id</code></a> value.
  1.1807 +          The same service provided at different times or on different objects <em title="MUST" class="rfc2119">MUST</em> have the same <a href="#dom-networkservice-id"><code>id</code></a> value.
  1.1808          </p>
  1.1809          <p>
  1.1810            The <dfn id="dom-networkservice-name"><code>name</code></dfn> attribute represents a human-readable title for
  1.1811            the service.
  1.1812          </p>
  1.1813          <p>
  1.1814 -          The <dfn id="dom-networkservice-type"><code>type</code></dfn> attribute reflects the value of the <a href=
  1.1815 -          "#dfn-valid-service-type"
  1.1816 -             class="internalDFN">valid service type</a> of the service.
  1.1817 +          The <dfn id="dom-networkservice-type"><code>type</code></dfn> attribute reflects the value of the <a class="internalDFN" href="#dfn-valid-service-type">valid
  1.1818 +          service type</a> of the service.
  1.1819          </p>
  1.1820          <p>
  1.1821 -          The <dfn id="dom-networkservice-url"><code>url</code></dfn> attribute is an <a href=
  1.1822 -          "http://www.w3.org/TR/html5/urls.html#absolute-url"
  1.1823 -             class="externalDFN">absolute <abbr title="Uniform Resource Locator">URL</abbr></a> pointing to the root
  1.1824 -             <abbr title="Hypertext Transfer Protocol">HTTP</abbr> endpoint for the service that has been added to the
  1.1825 -             <a href="#dfn-entry-script-origin-s-url-whitelist"
  1.1826 -             class="internalDFN">entry script origin's <abbr title="Uniform Resource Locator">URL</abbr> whitelist</a>.
  1.1827 -             Web pages can subsequently use this value for implicit cross-document messaging via various existing
  1.1828 -             mechanisms (e.g. Web Sockets, Server-Sent Events, Web Messaging, XMLHttpRequest).
  1.1829 +          The <dfn id="dom-networkservice-url"><code>url</code></dfn> attribute is an <a href="http://www.w3.org/TR/html5/urls.html#absolute-url" class="externalDFN">absolute <abbr title="Uniform Resource Locator">URL</abbr></a> pointing to the root <abbr title="Hypertext Transfer Protocol">HTTP</abbr> endpoint for the service that has been
  1.1830 +             added to the <a class="internalDFN" href="#dfn-entry-script-origin-s-url-whitelist">entry script origin's <abbr title="Uniform Resource Locator">URL</abbr> whitelist</a>. Web pages can subsequently use this value for
  1.1831 +             implicit cross-document messaging via various existing mechanisms (e.g. Web Sockets, Server-Sent Events,
  1.1832 +             Web Messaging, XMLHttpRequest).
  1.1833          </p>
  1.1834          <p>
  1.1835            The <dfn id="dom-networkservice-config"><code>config</code></dfn> attribute provides the raw configuration
  1.1836 @@ -1410,13 +1071,12 @@
  1.1837          </p>
  1.1838        </section>
  1.1839        <section id="states">
  1.1840 -        <h3>
  1.1841 -          <span class="secno">6.2</span> States
  1.1842 +        <h3><span class="secno">6.2 </span>
  1.1843 +          States
  1.1844          </h3>
  1.1845          <dl class="domintro">
  1.1846            <dt>
  1.1847 -            <var title="">service</var> . <code title="dom-networkservice-online"><a href=
  1.1848 -            "#dom-networkservice-online">online</a></code>
  1.1849 +            <var title="">service</var> . <code title="dom-networkservice-online"><a href="#dom-networkservice-online">online</a></code>
  1.1850            </dt>
  1.1851            <dd>
  1.1852              <p>
  1.1853 @@ -1430,20 +1090,16 @@
  1.1854            The <dfn id="dom-networkservice-online"><code>online</code></dfn> attribute indicates whether the service is
  1.1855            either <var>online</var>, and therefore accessible on the local network, in which case this attribute will
  1.1856            return <code>true</code> or, <var>offline</var>, and therefore not accessible on the local network, either
  1.1857 -          temporarily or permanently, in which case this attribute will return <code>false</code>. This attribute
  1.1858 -          <em class="rfc2119"
  1.1859 -             title="must">must</em> default to <code>true</code>.
  1.1860 +          temporarily or permanently, in which case this attribute will return <code>false</code>. This attribute <em title="MUST" class="rfc2119">MUST</em>
  1.1861 +          default to <code>true</code>.
  1.1862          </p>
  1.1863        </section>
  1.1864        <section id="events-1">
  1.1865 -        <h3>
  1.1866 -          <span class="secno">6.3</span> Events
  1.1867 +        <h3><span class="secno">6.3 </span>
  1.1868 +          Events
  1.1869          </h3>
  1.1870          <p>
  1.1871 -          The following are the event handlers (and their corresponding event handler event types) that <em class=
  1.1872 -          "ct"><em class="rfc2119"
  1.1873 -              title="must">must</em></em> be supported, as IDL attributes, by all objects implementing the <a href=
  1.1874 -              "#networkservice"><code>NetworkService</code></a> interface:
  1.1875 +          The following are the event handlers (and their corresponding event handler event types) that <em class="ct"><em title="MUST" class="rfc2119">MUST</em></em> be supported, as IDL attributes, by all objects implementing the <a href="#networkservice"><code>NetworkService</code></a> interface:
  1.1876          </p>
  1.1877          <table border="1">
  1.1878            <thead>
  1.1879 @@ -1459,8 +1115,7 @@
  1.1880            <tbody>
  1.1881              <tr>
  1.1882                <td>
  1.1883 -                <dfn id="dom-networkservice-onnotify"
  1.1884 -                    title="dom-NetworkService-onnotify"><code>onnotify</code></dfn>
  1.1885 +                <dfn id="dom-networkservice-onnotify" title="dom-NetworkService-onnotify"><code>onnotify</code></dfn>
  1.1886                </td>
  1.1887                <td>
  1.1888                  <a href="#event-notify"><code>notify</code></a>
  1.1889 @@ -1468,8 +1123,7 @@
  1.1890              </tr>
  1.1891              <tr>
  1.1892                <td>
  1.1893 -                <dfn id="dom-networkservice-onserviceonline"
  1.1894 -                    title="dom-NetworkService-onserviceonline"><code>onserviceonline</code></dfn>
  1.1895 +                <dfn id="dom-networkservice-onserviceonline" title="dom-NetworkService-onserviceonline"><code>onserviceonline</code></dfn>
  1.1896                </td>
  1.1897                <td>
  1.1898                  <a href="#event-serviceonline"><code>serviceonline</code></a>
  1.1899 @@ -1477,8 +1131,7 @@
  1.1900              </tr>
  1.1901              <tr>
  1.1902                <td>
  1.1903 -                <dfn id="dom-networkservice-onserviceoffline"
  1.1904 -                    title="dom-NetworkService-onserviceoffline"><code>onserviceoffline</code></dfn>
  1.1905 +                <dfn id="dom-networkservice-onserviceoffline" title="dom-NetworkService-onserviceoffline"><code>onserviceoffline</code></dfn>
  1.1906                </td>
  1.1907                <td>
  1.1908                  <a href="#event-serviceoffline"><code>serviceoffline</code></a>
  1.1909 @@ -1489,109 +1142,73 @@
  1.1910        </section>
  1.1911      </section>
  1.1912      <section id="service-discovery">
  1.1913 -      <h2>
  1.1914 -        <span class="secno">7.</span> Service Discovery
  1.1915 +      <!--OddPage--><h2><span class="secno">7. </span>
  1.1916 +        Service Discovery
  1.1917        </h2>
  1.1918        <p>
  1.1919 -        A <a href="#dfn-user-agent"
  1.1920 -           class="internalDFN">user agent</a> conforming to this specification <em class="rfc2119"
  1.1921 -           title="may">may</em> implement <abbr title="Simple Service Discovery Protocol">SSDP</abbr> [<cite><a class=
  1.1922 -           "bibref"
  1.1923 -           href="#bib-UPNP-DEVICEARCH11">UPNP-DEVICEARCH11</a></cite>], Zeroconf [<cite><a class="bibref"
  1.1924 -           href="#bib-DNS-SD">DNS-SD</a></cite>] + [<cite><a class="bibref"
  1.1925 -           href="#bib-MDNS">MDNS</a></cite>] and/or <abbr title="Discovery and Launch Protocol">DIAL</abbr> [<a href=
  1.1926 -           "https://sites.google.com/a/dial-multiscreen.org/dial/dial-protocol-specification"><abbr title=
  1.1927 -           "Discovery and Launch Protocol">DIAL</abbr></a>] <dfn id="dfn-service-discovery-mechanisms">service
  1.1928 -           discovery mechanisms</dfn> - the requirements detailed in this section of the specification - to enable Web
  1.1929 -           pages to request and connect with <abbr title="Hypertext Transfer Protocol">HTTP</abbr> services running on
  1.1930 -           networked devices, discovered via any of these mechanisms, through this <abbr title=
  1.1931 -           "Application Programming Interface">API</abbr>. When a <a href="#dfn-user-agent"
  1.1932 -           class="internalDFN">user agent</a> implements any of these <a href="#dfn-service-discovery-mechanisms"
  1.1933 -           class="internalDFN">service discovery mechanisms</a>, then it <em class="rfc2119"
  1.1934 -           title="must">must</em> conform to the corresponding algorithms provided in this section of the
  1.1935 -           specification.
  1.1936 +        A <a class="internalDFN" href="#dfn-user-agent">user agent</a> conforming to this specification <em title="MAY" class="rfc2119">MAY</em> implement <abbr title="Simple Service Discovery Protocol">SSDP</abbr> [<cite><a href="#bib-UPNP-DEVICEARCH11" class="bibref">UPNP-DEVICEARCH11</a></cite>], Zeroconf [<cite><a href="#bib-DNS-SD" class="bibref">DNS-SD</a></cite>] + [<cite><a href="#bib-MDNS" class="bibref">MDNS</a></cite>] and/or
  1.1937 +        <abbr title="Discovery and Launch Protocol">DIAL</abbr> [<a href="https://sites.google.com/a/dial-multiscreen.org/dial/dial-protocol-specification"><abbr title="Discovery and Launch Protocol">DIAL</abbr></a>] <dfn id="dfn-service-discovery-mechanisms">service
  1.1938 +        discovery mechanisms</dfn> - the requirements detailed in this section of the specification - to enable Web
  1.1939 +        pages to request and connect with <abbr title="Hypertext Transfer Protocol">HTTP</abbr> services running on networked devices, discovered via any of these
  1.1940 +        mechanisms, through this <abbr title="Application Programming Interface">API</abbr>. When a <a class="internalDFN" href="#dfn-user-agent">user agent</a> implements any of these <a class="internalDFN" href="#dfn-service-discovery-mechanisms">service discovery
  1.1941 +        mechanisms</a>, then it <em title="MUST" class="rfc2119">MUST</em> conform to the corresponding algorithms provided in this section of the
  1.1942 +        specification.
  1.1943        </p>
  1.1944        <p>
  1.1945 -        This section presents how the results of these <a href="#dfn-service-discovery-mechanisms"
  1.1946 -           class="internalDFN">service discovery mechanisms</a> will be matched to requested service types, how the
  1.1947 -           user agent stores available and active services and how their properties are applied to any resulting
  1.1948 -           <a href="#networkservice"><code>NetworkService</code></a> objects.
  1.1949 +        This section presents how the results of these <a class="internalDFN" href="#dfn-service-discovery-mechanisms">service discovery mechanisms</a> will be matched to requested
  1.1950 +        service types, how the user agent stores available and active services and how their properties are applied to
  1.1951 +        any resulting <a href="#networkservice"><code>NetworkService</code></a> objects.
  1.1952        </p>
  1.1953        <p>
  1.1954 -        It is expected that user agents will perform these <a href="#dfn-service-discovery-mechanisms"
  1.1955 -           class="internalDFN">service discovery mechanisms</a> asynchronously and periodically update the <a href=
  1.1956 -           "#dfn-list-of-available-service-records"
  1.1957 -           class="internalDFN">list of available service records</a> as required. The timing of any <a href=
  1.1958 -           "#dfn-service-discovery-mechanisms"
  1.1959 -           class="internalDFN">service discovery mechanisms</a> is an implementation detail left to the discretion of
  1.1960 -           the implementer (e.g. by continuously monitoring the network as a background process or on invocation of
  1.1961 -           this <abbr title="Application Programming Interface">API</abbr> from a Web page).
  1.1962 +        It is expected that user agents will perform these <a class="internalDFN" href="#dfn-service-discovery-mechanisms">service discovery mechanisms</a> asynchronously and
  1.1963 +        periodically update the <a class="internalDFN" href="#dfn-list-of-available-service-records">list of available service records</a> as required. The timing of any <a class="internalDFN" href="#dfn-service-discovery-mechanisms">service
  1.1964 +        discovery mechanisms</a> is an implementation detail left to the discretion of the implementer (e.g. by
  1.1965 +        continuously monitoring the network as a background process or on invocation of this <abbr title="Application Programming Interface">API</abbr> from a Web page).
  1.1966        </p>
  1.1967        <p>
  1.1968 -        The <dfn id="dfn-list-of-available-service-records">list of available service records</dfn> is a single dynamic
  1.1969 -        internal lookup table within user agents that is used to track all the services that have been discovered and
  1.1970 -        are available in the current network at the current time. At any point during the running of either of the two
  1.1971 -        <a href="#dfn-service-discovery-mechanisms"
  1.1972 -           class="internalDFN">service discovery mechanisms</a> then existing entries within this table can be updated,
  1.1973 -           entries can be added and entries can be removed as the status of networked services changes according to the
  1.1974 -           rules defined in this specification.
  1.1975 +        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
  1.1976 +        that is used to track all the services that have been discovered and are available in the current network at
  1.1977 +        the current time. At any point during the running of either of the two <a class="internalDFN" href="#dfn-service-discovery-mechanisms">service discovery mechanisms</a> then
  1.1978 +        existing entries within this table can be updated, entries can be added and entries can be removed as the
  1.1979 +        status of networked services changes according to the rules defined in this specification.
  1.1980        </p>
  1.1981        <p>
  1.1982 -        The <dfn id="dfn-list-of-active-service-managers">list of active service managers</dfn> is an internal list
  1.1983 -        within user agents that is used to track all <a href="#networkservices"><code>NetworkServices</code></a>
  1.1984 -        objects currently being shared with any web pages at the current time within the user agent. Each <a href=
  1.1985 -        "#networkservices"><code>NetworkServices</code></a> object in the <a href=
  1.1986 -        "#dfn-list-of-active-service-managers"
  1.1987 -           class="internalDFN">list of active service managers</a> represents a collection of zero or more <a href=
  1.1988 -           "#networkservice"><code>NetworkService</code></a> objects - known as its <dfn id=
  1.1989 -           "dfn-indexed-properties-1">indexed properties</dfn>. <a href=
  1.1990 -           "#networkservice"><code>NetworkService</code></a> objects are attached as the <a href=
  1.1991 -           "#dfn-indexed-properties-1"
  1.1992 -           class="internalDFN">indexed properties</a> of a <a href="#networkservices"><code>NetworkServices</code></a>
  1.1993 -           object as part of the <a href="#dom-navigator-getnetworkservices"><code>getNetworkServices()</code></a>
  1.1994 -           algorithm.
  1.1995 +        The <dfn id="dfn-list-of-active-service-managers">list of active service managers</dfn> is an internal list within user agents that is used to track all
  1.1996 +        <a href="#networkservices"><code>NetworkServices</code></a> objects currently being shared with any web pages
  1.1997 +        at the current time within the user agent. Each <a href="#networkservices"><code>NetworkServices</code></a>
  1.1998 +        object in the <a class="internalDFN" href="#dfn-list-of-active-service-managers">list of active service managers</a> represents a collection of zero or more <a href="#networkservice"><code>NetworkService</code></a> objects - known as its <dfn id="dfn-indexed-properties-1">indexed properties</dfn>.
  1.1999 +        <a href="#networkservice"><code>NetworkService</code></a> objects are attached as the <a class="internalDFN" href="#dfn-indexed-properties-1">indexed properties</a>
  1.2000 +        of a <a href="#networkservices"><code>NetworkServices</code></a> object as part of the <a href="#dom-navigator-getnetworkservices"><code>getNetworkServices()</code></a> algorithm.
  1.2001        </p>
  1.2002        <p>
  1.2003 -        The rule for <dfn id="dfn-adding-an-available-service">adding an available service</dfn> is the process of
  1.2004 -        adding a <a href="#dfn-new-service"
  1.2005 -           class="internalDFN">new service</a> or updating an <a href="#dfn-existing-service"
  1.2006 -           class="internalDFN">existing service</a> that is generally available on the user's current network in the
  1.2007 -           <a href="#dfn-list-of-available-service-records"
  1.2008 -           class="internalDFN">list of available service records</a>. This rule takes one argument, <var>network
  1.2009 -           service record</var>, and consists of running the following steps:
  1.2010 +        The rule for <dfn id="dfn-adding-an-available-service">adding an available service</dfn> is the process of adding a <a class="internalDFN" href="#dfn-new-service">new service</a> or updating
  1.2011 +        an <a class="internalDFN" href="#dfn-existing-service">existing service</a> that is generally available on the user's current network in the <a class="internalDFN" href="#dfn-list-of-available-service-records">list of
  1.2012 +        available service records</a>. This rule takes one argument, <var>network service record</var>, and consists of
  1.2013 +        running the following steps:
  1.2014        </p>
  1.2015        <ol class="rule">
  1.2016 -        <li>For each <var>existing service record</var> in the current <a href="#dfn-list-of-available-service-records"
  1.2017 -              class="internalDFN">list of available service records</a>, run the following sub-steps:
  1.2018 +        <li>For each <var>existing service record</var> in the current <a class="internalDFN" href="#dfn-list-of-available-service-records">list of available service records</a>, run
  1.2019 +        the following sub-steps:
  1.2020            <ol class="rule">
  1.2021              <li>If the <var>existing service record</var>'s <code>id</code> property does not equal <var>network
  1.2022              service record</var>'s <code>id</code> property then abort any remaining sub-steps and continue at the next
  1.2023              available <var>existing service record</var>.
  1.2024              </li>
  1.2025 -            <li>Replace the value of <var>existing service record</var> in the current <a href=
  1.2026 -            "#dfn-list-of-available-service-records"
  1.2027 -                  class="internalDFN">list of available service records</a> with the value of <var>network service
  1.2028 -                  record</var>, aborting any remaining steps in this algorithm and return.
  1.2029 +            <li>Replace the value of <var>existing service record</var> in the current <a class="internalDFN" href="#dfn-list-of-available-service-records">list of available service
  1.2030 +            records</a> with the value of <var>network service record</var>, aborting any remaining steps in this
  1.2031 +            algorithm and return.
  1.2032              </li>
  1.2033            </ol>
  1.2034          </li>
  1.2035 -        <li>Add <var>network service record</var> to the <a href="#dfn-list-of-available-service-records"
  1.2036 -              class="internalDFN">list of available service records</a> as a new item.
  1.2037 +        <li>Add <var>network service record</var> to the <a class="internalDFN" href="#dfn-list-of-available-service-records">list of available service records</a> as a new item.
  1.2038          </li>
  1.2039 -        <li>For each <var>service manager</var> in the <a href="#dfn-list-of-active-service-managers"
  1.2040 -              class="internalDFN">list of active service managers</a> run the following steps:
  1.2041 +        <li>For each <var>service manager</var> in the <a class="internalDFN" href="#dfn-list-of-active-service-managers">list of active service managers</a> run the following steps:
  1.2042            <ol class="rule">
  1.2043              <li>For each <var>active service</var> in <var>service manager</var> run the following steps:
  1.2044                <ol class="rule">
  1.2045                  <li>If the <var>network service record</var>'s <code>id</code> property equals the <var>active
  1.2046                  service</var>'s <code>id</code> attribute and <var>active service</var>'s <code>online</code> attribute
  1.2047 -                is currently set to <code>false</code> then set <var>active service</var>'s <a href=
  1.2048 -                "#dom-networkservice-online"><code>online</code></a> attribute to <code>true</code> and then <a href=
  1.2049 -                "http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task"
  1.2050 -                      class="externalDFN">queue a task</a> to dispatch a newly created event with the name <a href=
  1.2051 -                      "#event-serviceonline"><code>serviceonline</code></a> that uses the <a href=
  1.2052 -                      "http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event"
  1.2053 -                      class="externalDFN"><code>Event</code></a> interface, which does not bubble, is not cancellable,
  1.2054 +                is currently set to <code>false</code> then set <var>active service</var>'s <a href="#dom-networkservice-online"><code>online</code></a> attribute to <code>true</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> to dispatch a newly created event with the name <a href="#event-serviceonline"><code>serviceonline</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, which does not bubble, is not cancellable,
  1.2055                        and has no default action, at the current <var>active service</var> object.
  1.2056                  </li>
  1.2057                </ol>
  1.2058 @@ -1611,29 +1228,22 @@
  1.2059                </ol>
  1.2060              </li>
  1.2061              <li>If the <var>'service type in current service manager' flag</var> is set to <code>true</code> then
  1.2062 -            increment <var>service manager</var>'s <a href=
  1.2063 -            "#dom-networkservices-servicesavailable"><code>servicesAvailable</code></a> attribute by <code>1</code> and
  1.2064 -            then <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task"
  1.2065 -                  class="externalDFN">queue a task</a> to dispatch a newly created event with the name <a href=
  1.2066 -                  "#event-serviceavailable"><code>serviceavailable</code></a> that uses the <a href=
  1.2067 -                  "http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event"
  1.2068 -                  class="externalDFN"><code>Event</code></a> interface, which does not bubble, is not cancellable, and
  1.2069 +            increment <var>service manager</var>'s <a href="#dom-networkservices-servicesavailable"><code>servicesAvailable</code></a> attribute by <code>1</code> and
  1.2070 +            then <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">queue a task</a> 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, which does not bubble, is not cancellable, and
  1.2071                    has no default action, at the current <var>service manager</var> object.
  1.2072              </li>
  1.2073            </ol>
  1.2074          </li>
  1.2075        </ol>
  1.2076        <p>
  1.2077 -        The rule for <dfn id="dfn-removing-an-available-service">removing an available service</dfn> is the general
  1.2078 -        process of removing an <a href="#dfn-existing-service"
  1.2079 -           class="internalDFN">existing service</a> from the <a href="#dfn-list-of-available-service-records"
  1.2080 -           class="internalDFN">list of available service records</a> that has left the user's current network or has
  1.2081 -           otherwise expired. This rule takes one argument, <var>service identifier</var>, and consists of running the
  1.2082 -           following steps:
  1.2083 +        The rule for <dfn id="dfn-removing-an-available-service">removing an available service</dfn> is the general process of removing an <a class="internalDFN" href="#dfn-existing-service">existing
  1.2084 +        service</a> from the <a class="internalDFN" href="#dfn-list-of-available-service-records">list of available service records</a> that has left the user's current network or has
  1.2085 +        otherwise expired. This rule takes one argument, <var>service identifier</var>, and consists of running the
  1.2086 +        following steps:
  1.2087        </p>
  1.2088        <ol class="rule">
  1.2089 -        <li>For each <var>existing service record</var> in the current <a href="#dfn-list-of-available-service-records"
  1.2090 -              class="internalDFN">list of available service records</a>, run the following sub-steps:
  1.2091 +        <li>For each <var>existing service record</var> in the current <a class="internalDFN" href="#dfn-list-of-available-service-records">list of available service records</a>, run
  1.2092 +        the following sub-steps:
  1.2093            <ol class="rule">
  1.2094              <li>If the <var>existing service record</var>'s <code>id</code> property does not match <var>service
  1.2095              identifier</var> then skip any remaining sub-steps for the current <var>existing service record</var> and
  1.2096 @@ -1641,23 +1251,17 @@
  1.2097              </li>
  1.2098              <li>Let <var>'service type in use' flag</var> be <code>false</code>.
  1.2099              </li>
  1.2100 -            <li>For each <var>service manager</var> in the <a href="#dfn-list-of-active-service-managers"
  1.2101 -                  class="internalDFN">list of active service managers</a> run the following steps:
  1.2102 +            <li>For each <var>service manager</var> in the <a class="internalDFN" href="#dfn-list-of-active-service-managers">list of active service managers</a> run the following
  1.2103 +            steps:
  1.2104                <ol class="rule">
  1.2105                  <li>Let <var>'service type in current service manager' flag</var> be <code>false</code>.
  1.2106                  </li>
  1.2107                  <li>For each <var>active service</var> in <var>service manager</var> run the following steps:
  1.2108                    <ol class="rule">
  1.2109                      <li>If <var>existing service record</var>'s <code>id</code> property equals the <var>active
  1.2110 -                    service</var>'s <code>id</code> attribute and <var>active service</var>'s <a href=
  1.2111 -                    "#dom-networkservice-online"><code>online</code></a> attribute is currently set to
  1.2112 +                    service</var>'s <code>id</code> attribute and <var>active service</var>'s <a href="#dom-networkservice-online"><code>online</code></a> attribute is currently set to
  1.2113                      <code>true</code> then set <var>active service</var>'s <a href="#dom-networkservice-online"><code>
  1.2114 -                      online</code></a> attribute to <code>false</code> and then <a href=
  1.2115 -                      "http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task"
  1.2116 -                          class="externalDFN">queue a task</a> to dispatch a newly created event with the name <a href=
  1.2117 -                          "#event-serviceoffline"><code>serviceoffline</code></a> that uses the <a href=
  1.2118 -                          "http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event"
  1.2119 -                          class="externalDFN"><code>Event</code></a> interface, which does not bubble, is not
  1.2120 +                      online</code></a> attribute to <code>false</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> to dispatch a newly created event with the name <a href="#event-serviceoffline"><code>serviceoffline</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, which does not bubble, is not
  1.2121                            cancellable, and has no default action, at the current <var>active service</var>.
  1.2122                      </li>
  1.2123                    </ol>
  1.2124 @@ -1676,309 +1280,198 @@
  1.2125                    </ol>
  1.2126                  </li>
  1.2127                  <li>If the <var>'service type in current service manager' flag</var> is set to <code>true</code> then
  1.2128 -                decrement <var>service manager</var>'s <a href=
  1.2129 -                "#dom-networkservices-servicesavailable"><code>servicesAvailable</code></a> attribute by <code>1</code>
  1.2130 -                and then <a href=
  1.2131 -                "http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task"
  1.2132 -                      class="externalDFN">queue a task</a> to dispatch a newly created event with the name <a href=
  1.2133 -                      "#event-serviceunavailable"><code>serviceunavailable</code></a> that uses the <a href=
  1.2134 -                      "http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event"
  1.2135 -                      class="externalDFN"><code>Event</code></a> interface, which does not bubble, is not cancellable,
  1.2136 +                decrement <var>service manager</var>'s <a href="#dom-networkservices-servicesavailable"><code>servicesAvailable</code></a> attribute by <code>1</code>
  1.2137 +                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> to dispatch a newly created event with the name <a href="#event-serviceunavailable"><code>serviceunavailable</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, which does not bubble, is not cancellable,
  1.2138                        and has no default action, at the current <var>service manager</var> object.
  1.2139                  </li>
  1.2140                </ol>
  1.2141              </li>
  1.2142              <li>If the <var>'service type in use' flag</var> is <code>false</code> and the <var>existing service
  1.2143              record</var>'s <code>type</code> property begins with the DOMString "<code>upnp:</code>" and <var>existing
  1.2144 -            service record</var>'s <code>eventsURL</code> property is set then run the rule to <a href=
  1.2145 -            "#dfn-terminate-an-existing-upnp-events-subscription"
  1.2146 -                  class="internalDFN">terminate an existing UPnP Events Subscription</a>, if one is currently active
  1.2147 -                  (as a result of having previously called <a href="#dfn-setup-a-upnp-events-subscription"
  1.2148 -                  class="internalDFN">setup a UPnP Events Subscription</a> against the current <var>existing service
  1.2149 -                  record</var>).
  1.2150 +            service record</var>'s <code>eventsURL</code> property is set then run the rule to <a class="internalDFN" href="#dfn-terminate-an-existing-upnp-events-subscription">terminate an existing
  1.2151 +            UPnP Events Subscription</a>, if one is currently active (as a result of having previously called <a class="internalDFN" href="#dfn-setup-a-upnp-events-subscription">setup
  1.2152 +            a UPnP Events Subscription</a> against the current <var>existing service record</var>).
  1.2153              </li>
  1.2154 -            <li>Remove <var>existing service record</var> from the current <a href=
  1.2155 -            "#dfn-list-of-available-service-records"
  1.2156 -                  class="internalDFN">list of available service records</a>.
  1.2157 +            <li>Remove <var>existing service record</var> from the current <a class="internalDFN" href="#dfn-list-of-available-service-records">list of available service records</a>.
  1.2158              </li>
  1.2159            </ol>
  1.2160          </li>
  1.2161        </ol>
  1.2162        <p>
  1.2163 -        User agents <em class="rfc2119"
  1.2164 -           title="should">should</em> expire a service record from the <a href="#dfn-list-of-available-service-records"
  1.2165 -           class="internalDFN">list of available service records</a> when its <code>expiryTimestamp</code> attribute
  1.2166 -           exceeds the current UTC timestamp. When this condition is met the <a href="#dfn-user-agent"
  1.2167 -           class="internalDFN">user agent</a> <em class="rfc2119"
  1.2168 -           title="should">should</em> run the rule for <a href="#dfn-removing-an-available-service"
  1.2169 -           class="internalDFN">removing an available service</a>, passing in the expired service record's
  1.2170 -           <code>id</code> attribute as the only argument.
  1.2171 +        User agents <em title="SHOULD" class="rfc2119">SHOULD</em> expire a service record from the <a class="internalDFN" href="#dfn-list-of-available-service-records">list of available service records</a> when its
  1.2172 +        <code>expiryTimestamp</code> attribute exceeds the current UTC timestamp. When this condition is met the
  1.2173 +        <a class="internalDFN" href="#dfn-user-agent">user agent</a> <em title="SHOULD" class="rfc2119">SHOULD</em> run the rule for <a class="internalDFN" href="#dfn-removing-an-available-service">removing an available service</a>, passing in the expired service
  1.2174 +        record's <code>id</code> attribute as the only argument.
  1.2175        </p>
  1.2176        <section id="zeroconf-mdns-dns-sd">
  1.2177 -        <h3>
  1.2178 -          <span class="secno">7.1</span> Zeroconf (<abbr title="Multicast DNS">mDNS</abbr> + <abbr title=
  1.2179 -          "Domain Name System">DNS</abbr>-<abbr title="Service Discovery">SD</abbr>)
  1.2180 +        <h3><span class="secno">7.1 </span>
  1.2181 +          Zeroconf (<abbr title="Multicast DNS">mDNS</abbr> + <abbr title="Domain Name System">DNS</abbr>-<abbr title="Service Discovery">SD</abbr>)
  1.2182          </h3>
  1.2183          <p>
  1.2184 -          For each <abbr title="Domain Name System">DNS</abbr> response received from a user-agent-initiated Multicast
  1.2185 -          <abbr title="Domain Name System">DNS</abbr> Browse for <abbr title="DNS Pointer Record">PTR</abbr> records
  1.2186 -          with the name <code>_services._dns-sd._udp</code> on the resolved recommended automatic browsing domain
  1.2187 -          [<cite><a class="bibref"
  1.2188 -             href="#bib-MDNS">MDNS</a></cite>], the <a href="#dfn-user-agent"
  1.2189 -             class="internalDFN">user agent</a> <em class="rfc2119"
  1.2190 -             title="must">must</em> run the following steps:
  1.2191 +          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
  1.2192 +          recommended automatic browsing domain [<cite><a href="#bib-MDNS" class="bibref">MDNS</a></cite>], the <a class="internalDFN" href="#dfn-user-agent">user agent</a> <em title="MUST" class="rfc2119">MUST</em> run the following steps:
  1.2193          </p>
  1.2194          <ol class="rule">
  1.2195 -          <li>Let <var>service <abbr title="Multicast DNS">mDNS</abbr> responses</var> be an array of <abbr title=
  1.2196 -          "DNS Pointer Record">PTR</abbr> records received by issuing a Multicast <abbr title=
  1.2197 -          "Domain Name System">DNS</abbr> Browse for <abbr title="DNS Pointer Record">PTR</abbr> records with the name
  1.2198 -          of the current discovered service type.
  1.2199 +          <li>Let <var>service <abbr title="Multicast DNS">mDNS</abbr> responses</var> be an array of <abbr title="DNS Pointer Record">PTR</abbr> records received by issuing a Multicast <abbr title="Domain Name System">DNS</abbr>
  1.2200 +          Browse for <abbr title="DNS Pointer Record">PTR</abbr> records with the name of the current discovered service type.
  1.2201            </li>
  1.2202 -          <li>For each Object <var>service <abbr title="Multicast DNS">mDNS</abbr> response</var> in <var>service
  1.2203 -          <abbr title="Multicast DNS">mDNS</abbr> responses</var>, run the following steps:
  1.2204 +          <li>For each Object <var>service <abbr title="Multicast DNS">mDNS</abbr> response</var> in <var>service <abbr title="Multicast DNS">mDNS</abbr> responses</var>, run the following
  1.2205 +          steps:
  1.2206              <ol>
  1.2207                <li>Let <var>network service record</var> be an Object consisting of the following empty properties:
  1.2208                <code>id</code>, <code>name</code>, <code>type</code>, <code>url</code>, <code>config</code>,
  1.2209                <code>expiryTimestamp</code>.
  1.2210                </li>
  1.2211 -              <li>Set <var>network service record</var>'s <code>id</code> property to the value of the full
  1.2212 -                <abbr title="DNS Pointer Record">PTR</abbr> Service Instance Name [<cite><a class="bibref"
  1.2213 -                   href="#bib-MDNS">MDNS</a></cite>].
  1.2214 +              <li>Set <var>network service record</var>'s <code>id</code> property to the value of the full <abbr title="DNS Pointer Record">PTR</abbr> Service
  1.2215 +              Instance Name [<cite><a href="#bib-MDNS" class="bibref">MDNS</a></cite>].
  1.2216                </li>
  1.2217 -              <li>Set <var>network service record</var>'s <code>name</code> property to the value of the <abbr title=
  1.2218 -              "DNS Pointer Record">PTR</abbr> Service Instance Name's <var>Instance</var> component [<cite><a class=
  1.2219 -              "bibref"
  1.2220 -                   href="#bib-MDNS">MDNS</a></cite>].
  1.2221 +              <li>Set <var>network service record</var>'s <code>name</code> property to the value of the <abbr title="DNS Pointer Record">PTR</abbr> Service
  1.2222 +              Instance Name's <var>Instance</var> component [<cite><a href="#bib-MDNS" class="bibref">MDNS</a></cite>].
  1.2223                </li>
  1.2224                <li>Set <var>network service record</var>'s <code>type</code> property to the concatenation of the string
  1.2225 -              <code>zeroconf:</code> followed be the value of the <abbr title="DNS Pointer Record">PTR</abbr> Service
  1.2226 -              Instance Name's <var>Service</var> component [<cite><a class="bibref"
  1.2227 -                   href="#bib-MDNS">MDNS</a></cite>].
  1.2228 +              <code>zeroconf:</code> followed be the value of the <abbr title="DNS Pointer Record">PTR</abbr> Service Instance Name's <var>Service</var>
  1.2229 +              component [<cite><a href="#bib-MDNS" class="bibref">MDNS</a></cite>].
  1.2230                </li>
  1.2231 -              <li>Set <var>network service record</var>'s <code>url</code> property to the resolvable Service
  1.2232 -              <abbr title="Uniform Resource Locator">URL</abbr> obtained from performing an <abbr title=
  1.2233 -              "Domain Name System">DNS</abbr>-<abbr title="Service Discovery">SD</abbr> Lookup [<cite><a class="bibref"
  1.2234 -                   href="#bib-DNS-SD">DNS-SD</a></cite>] of the current service from the <abbr title=
  1.2235 -                   "DNS Pointer Record">PTR</abbr> record provided [<cite><a class="bibref"
  1.2236 -                   href="#bib-MDNS">MDNS</a></cite>].
  1.2237 +              <li>Set <var>network service record</var>'s <code>url</code> property to the resolvable Service <abbr title="Uniform Resource Locator">URL</abbr>
  1.2238 +              obtained from performing an <abbr title="Domain Name System">DNS</abbr>-<abbr title="Service Discovery">SD</abbr> Lookup [<cite><a href="#bib-DNS-SD" class="bibref">DNS-SD</a></cite>] of the current service from the <abbr title="DNS Pointer Record">PTR</abbr> record provided
  1.2239 +              [<cite><a href="#bib-MDNS" class="bibref">MDNS</a></cite>].
  1.2240                </li>
  1.2241                <li>Set <var>network service record</var>'s <code>config</code> property to the string value of the
  1.2242 -              contents of the first <abbr title="Domain Name System">DNS</abbr>-<abbr title=
  1.2243 -              "Service Discovery">SD</abbr> TXT record associated with the <var>service <abbr title=
  1.2244 -              "Multicast DNS">mDNS</abbr> response</var> as defined in [<cite><a class="bibref"
  1.2245 -                   href="#bib-DNS-SD">DNS-SD</a></cite>].
  1.2246 +              contents of the first <abbr title="Domain Name System">DNS</abbr>-<abbr title="Service Discovery">SD</abbr> TXT record associated with the <var>service <abbr title="Multicast DNS">mDNS</abbr> response</var> as defined
  1.2247 +              in [<cite><a href="#bib-DNS-SD" class="bibref">DNS-SD</a></cite>].
  1.2248                </li>
  1.2249                <li>Set <var>network service record</var>'s <code>expiryTimestamp</code> property to the value of the
  1.2250                current date, in UTC timestamp format, plus a value of <code>120</code> seconds.
  1.2251                </li>
  1.2252 -              <li>Run the general rule for <a href="#dfn-adding-an-available-service"
  1.2253 -                    class="internalDFN">adding an available service</a>, passing in the current <var>network service
  1.2254 -                    record</var> as the only argument.
  1.2255 +              <li>Run the general rule for <a class="internalDFN" href="#dfn-adding-an-available-service">adding an available service</a>, passing in the current <var>network
  1.2256 +              service record</var> as the only argument.
  1.2257                </li>
  1.2258              </ol>
  1.2259            </li>
  1.2260          </ol>
  1.2261        </section>
  1.2262        <section id="simple-service-discovery-protocol-ssdp">
  1.2263 -        <h3>
  1.2264 -          <span class="secno">7.2</span> Simple Service Discovery Protocol (<abbr title=
  1.2265 -          "Simple Service Discovery Protocol">SSDP</abbr>)
  1.2266 +        <h3><span class="secno">7.2 </span>
  1.2267 +          Simple Service Discovery Protocol (<abbr title="Simple Service Discovery Protocol">SSDP</abbr>)
  1.2268          </h3>
  1.2269          <p>
  1.2270 -          A user agent that implements UPnP service discovery <em class="rfc2119"
  1.2271 -             title="must">must</em> issue a <dfn id="dfn-search-request-for-upnp-root-devices">search request for UPnP
  1.2272 -             root devices</dfn> against the user's current local network according to the full normative text and
  1.2273 -             timing provided in 'Section 1.3.2: Search request with M-SEARCH' detailed in [<cite><a class="bibref"
  1.2274 -             href="#bib-UPNP-DEVICEARCH11">UPNP-DEVICEARCH11</a></cite>].
  1.2275 +          A user agent that implements UPnP service discovery <em title="MUST" class="rfc2119">MUST</em> issue a <dfn id="dfn-search-request-for-upnp-root-devices">search request for UPnP root
  1.2276 +          devices</dfn> against the user's current local network according to the full normative text and timing
  1.2277 +          provided in 'Section 1.3.2: Search request with M-SEARCH' detailed in [<cite><a href="#bib-UPNP-DEVICEARCH11" class="bibref">UPNP-DEVICEARCH11</a></cite>].
  1.2278          </p>
  1.2279          <p>
  1.2280 -          The user agent <em class="rfc2119"
  1.2281 -             title="must">must</em> issue all <a title="search request for UPnP root devices"
  1.2282 -             href="#dfn-search-request-for-upnp-root-devices"
  1.2283 -             class="internalDFN">search requests for UPnP root devices</a> with a <abbr title=
  1.2284 -             "Hypertext Transfer Protocol">HTTP</abbr> request line equal to <code>M-SEARCH * <abbr title=
  1.2285 -             "Hypertext Transfer Protocol">HTTP</abbr>/1.1</code>, with a HOST header equal to the reserved multicast
  1.2286 -             address and port of <code>239.255.255.250:1900</code> and a MAN header equal to
  1.2287 -             <code>ssdp:discover</code>. The <a href="#dfn-user-agent"
  1.2288 -             class="internalDFN">user agent</a> must also send an ST header with this <abbr title=
  1.2289 -             "Hypertext Transfer Protocol">HTTP</abbr> request equal to the String value of <code>ssdp:all</code> or
  1.2290 -             <code>upnp:rootdevice</code> or a single <a href="#dfn-valid-service-type"
  1.2291 -             class="internalDFN">valid service type</a> token beginning with the String value <code>upnp:</code>. If a
  1.2292 -             single <a href="#dfn-valid-service-type"
  1.2293 -             class="internalDFN">valid service type</a> token beginning with the String value <code>upnp:</code> is to
  1.2294 -             be used, the user agent <em class="rfc2119"
  1.2295 -             title="must">must</em> strip the leading String <code>upnp:</code> before using this value in this
  1.2296 -             <abbr title="Hypertext Transfer Protocol">HTTP</abbr> request. The user-agent <em class="rfc2119"
  1.2297 -             title="must">must</em> also send an MX header equal to a <dfn id=
  1.2298 -             "dfn-maximum-upnp-advertisement-response-wait-time">maximum UPnP advertisement response wait time</dfn>
  1.2299 -             value between <code>1</code> and <code>5</code> seconds with this <abbr title=
  1.2300 -             "Hypertext Transfer Protocol">HTTP</abbr> request.
  1.2301 +          The user agent <em title="MUST" class="rfc2119">MUST</em> issue all <a class="internalDFN" href="#dfn-search-request-for-upnp-root-devices" title="search request for UPnP root devices">search requests for UPnP root
  1.2302 +          devices</a> with a <abbr title="Hypertext Transfer Protocol">HTTP</abbr> request line equal to <code>M-SEARCH * <abbr title="Hypertext Transfer Protocol">HTTP</abbr>/1.1</code>, with a HOST header equal to
  1.2303 +          the reserved multicast address and port of <code>239.255.255.250:1900</code> and a MAN header equal to
  1.2304 +          <code>ssdp:discover</code>. The <a class="internalDFN" href="#dfn-user-agent">user agent</a> must also send an ST header with this <abbr title="Hypertext Transfer Protocol">HTTP</abbr> request equal to
  1.2305 +          the String value of <code>ssdp:all</code> or <code>upnp:rootdevice</code> or a single <a class="internalDFN" href="#dfn-valid-service-type">valid service
  1.2306 +          type</a> token beginning with the String value <code>upnp:</code>. If a single <a class="internalDFN" href="#dfn-valid-service-type">valid service type</a>
  1.2307 +          token beginning with the String value <code>upnp:</code> is to be used, the user agent <em title="MUST" class="rfc2119">MUST</em> strip the leading
  1.2308 +          String <code>upnp:</code> before using this value in this <abbr title="Hypertext Transfer Protocol">HTTP</abbr> request. The user-agent <em title="MUST" class="rfc2119">MUST</em> also send an MX
  1.2309 +          header equal to a <dfn id="dfn-maximum-upnp-advertisement-response-wait-time">maximum UPnP advertisement response wait time</dfn> value between <code>1</code> and
  1.2310 +          <code>5</code> seconds with this <abbr title="Hypertext Transfer Protocol">HTTP</abbr> request.
  1.2311          </p>
  1.2312          <p>
  1.2313 -          The user agent <em class="rfc2119"
  1.2314 -             title="must">must</em> listen for any incoming responses to any <a href=
  1.2315 -             "#dfn-search-request-for-upnp-root-devices"
  1.2316 -             class="internalDFN">search request for UPnP root devices</a>.
  1.2317 +          The user agent <em title="MUST" class="rfc2119">MUST</em> listen for any incoming responses to any <a class="internalDFN" href="#dfn-search-request-for-upnp-root-devices">search request for UPnP root devices</a>.
  1.2318          </p>
  1.2319          <p>
  1.2320 -          For each <dfn id="dfn-http-response"><abbr title="Hypertext Transfer Protocol">HTTP</abbr> Response</dfn>
  1.2321 -          following an initial <a href="#dfn-search-request-for-upnp-root-devices"
  1.2322 -             class="internalDFN">search request for UPnP root devices</a> sent on a <a href=
  1.2323 -             "#dfn-standard-upnp-address-and-port"
  1.2324 -             class="internalDFN">standard UPnP address and port</a> the user agent <em class="rfc2119"
  1.2325 -             title="must">must</em> run the following steps:
  1.2326 +          For each <dfn id="dfn-http-response"><abbr title="Hypertext Transfer Protocol">HTTP</abbr> Response</dfn> following an initial <a class="internalDFN" href="#dfn-search-request-for-upnp-root-devices">search request for UPnP root devices</a> sent on a
  1.2327 +          <a class="internalDFN" href="#dfn-standard-upnp-address-and-port">standard UPnP address and port</a> the user agent <em title="MUST" class="rfc2119">MUST</em> run the following steps:
  1.2328          </p>
  1.2329          <ol class="rule">
  1.2330 -          <li>If the <a href="#dfn-http-response"
  1.2331 -                class="internalDFN"><abbr title="Hypertext Transfer Protocol">HTTP</abbr> Response</a> is not a
  1.2332 -                <abbr title="Hypertext Transfer Protocol">HTTP</abbr> 200 OK response then this response is invalid and
  1.2333 -                the user agent <em class="rfc2119"
  1.2334 -                title="must">must</em> discard this response, abort any remaining steps and return. The user agent
  1.2335 -                <em class="rfc2119"
  1.2336 -                title="may">may</em> issue a new <a href="#dfn-search-request-for-upnp-root-devices"
  1.2337 -                class="internalDFN">search request for UPnP root devices</a> as a result of this error occurring.
  1.2338 +          <li>If the <a class="internalDFN" href="#dfn-http-response"><abbr title="Hypertext Transfer Protocol">HTTP</abbr> Response</a> is not a <abbr title="Hypertext Transfer Protocol">HTTP</abbr> 200 OK response then this response is invalid and the user
  1.2339 +          agent <em title="MUST" class="rfc2119">MUST</em> discard this response, abort any remaining steps and return. The user agent <em title="MAY" class="rfc2119">MAY</em> issue a new
  1.2340 +          <a class="internalDFN" href="#dfn-search-request-for-upnp-root-devices">search request for UPnP root devices</a> as a result of this error occurring.
  1.2341            </li>
  1.2342 -          <li>If the <a href="#dfn-maximum-upnp-advertisement-response-wait-time"
  1.2343 -                class="internalDFN">maximum UPnP advertisement response wait time</a> has been exceeded since the
  1.2344 -                initial <a href="#dfn-search-request-for-upnp-root-devices"
  1.2345 -                class="internalDFN">search request for UPnP root devices</a> was sent then the <a href=
  1.2346 -                "#dfn-http-response"
  1.2347 -                class="internalDFN"><abbr title="Hypertext Transfer Protocol">HTTP</abbr> Response</a> is invalid and
  1.2348 -                the user agent <em class="rfc2119"
  1.2349 -                title="must">must</em> discard this response, abort any remaining steps and return. The user agent
  1.2350 -                <em class="rfc2119"
  1.2351 -                title="may">may</em> stop listening for responses from the current <a href=
  1.2352 -                "#dfn-search-request-for-upnp-root-devices"
  1.2353 -                class="internalDFN">search request for UPnP root devices</a> as a result of this error occurring.
  1.2354 -                Equally, the user agent <em class="rfc2119"
  1.2355 -                title="may">may</em> issue a new <a href="#dfn-search-request-for-upnp-root-devices"
  1.2356 -                class="internalDFN">search request for UPnP root devices</a> as a result of this error occurring.
  1.2357 +          <li>If the <a class="internalDFN" href="#dfn-maximum-upnp-advertisement-response-wait-time">maximum UPnP advertisement response wait time</a> has been exceeded since the initial <a class="internalDFN" href="#dfn-search-request-for-upnp-root-devices">search
  1.2358 +          request for UPnP root devices</a> was sent then the <a class="internalDFN" href="#dfn-http-response"><abbr title="Hypertext Transfer Protocol">HTTP</abbr> Response</a> is invalid and the user agent <em title="MUST" class="rfc2119">MUST</em>
  1.2359 +          discard this response, abort any remaining steps and return. The user agent <em title="MAY" class="rfc2119">MAY</em> stop listening for responses
  1.2360 +          from the current <a class="internalDFN" href="#dfn-search-request-for-upnp-root-devices">search request for UPnP root devices</a> as a result of this error occurring. Equally,
  1.2361 +          the user agent <em title="MAY" class="rfc2119">MAY</em> issue a new <a class="internalDFN" href="#dfn-search-request-for-upnp-root-devices">search request for UPnP root devices</a> as a result of this error
  1.2362 +          occurring.
  1.2363            </li>
  1.2364 -          <li>Let <var>ssdp device</var> be an Object with a property for each <abbr title=
  1.2365 -          "Hypertext Transfer Protocol">HTTP</abbr> header received in the <a href="#dfn-http-response"
  1.2366 -                class="internalDFN"><abbr title="Hypertext Transfer Protocol">HTTP</abbr> Response</a>, with each key
  1.2367 -                being the name of a <abbr title="Hypertext Transfer Protocol">HTTP</abbr> response header and each
  1.2368 -                value being that <abbr title="Hypertext Transfer Protocol">HTTP</abbr> response header's value.
  1.2369 +          <li>Let <var>ssdp device</var> be an Object with a property for each <abbr title="Hypertext Transfer Protocol">HTTP</abbr> header received in the <a class="internalDFN" href="#dfn-http-response"><abbr title="Hypertext Transfer Protocol">HTTP</abbr>
  1.2370 +          Response</a>, with each key being the name of a <abbr title="Hypertext Transfer Protocol">HTTP</abbr> response header and each value being that <abbr title="Hypertext Transfer Protocol">HTTP</abbr> response
  1.2371 +          header's value.
  1.2372            </li>
  1.2373            <li>If <var>ssdp device</var> does not contain at least one <var>CACHE-CONTROL</var> entry, at least one
  1.2374            <var>USN</var> entry, at least one <var>ST</var> entry and at least one <var>LOCATION</var> entry then the
  1.2375 -          <a href="#dfn-http-response"
  1.2376 -                class="internalDFN"><abbr title="Hypertext Transfer Protocol">HTTP</abbr> Response</a> is invalid and
  1.2377 -                the <a href="#dfn-user-agent"
  1.2378 -                class="internalDFN">user agent</a> <em class="rfc2119"
  1.2379 -                title="must">must</em> discard this response, abort any remaining steps and return.
  1.2380 +          <a class="internalDFN" href="#dfn-http-response"><abbr title="Hypertext Transfer Protocol">HTTP</abbr> Response</a> is invalid and the <a class="internalDFN" href="#dfn-user-agent">user agent</a> <em title="MUST" class="rfc2119">MUST</em> discard this response, abort any remaining
  1.2381 +          steps and return.
  1.2382            </li>
  1.2383 -          <li>The user agent <em class="rfc2119"
  1.2384 -                title="must">must</em> run the rule for <a href="#dfn-obtaining-a-upnp-device-description-file"
  1.2385 -                class="internalDFN">obtaining a UPnP Device Description File</a> passing in the first occurrence of
  1.2386 -                <var>LOCATION</var> from <var>ssdp device</var> as the <var>device descriptor <abbr title=
  1.2387 -                "Uniform Resource Locator">URL</abbr></var> argument and the first occurrence of <var>USN</var> from
  1.2388 -                <var>ssdp device</var> as the <var>device identifier</var> argument and the first occurrence of
  1.2389 -                <var>CACHE-CONTROL</var> from <var>ssdp device</var> (minus the leading string of
  1.2390 -                <code>max-age=</code>) as the <var>device expiry</var> argument.
  1.2391 +          <li>The user agent <em title="MUST" class="rfc2119">MUST</em> run the rule for <a class="internalDFN" href="#dfn-obtaining-a-upnp-device-description-file">obtaining a UPnP Device Description File</a> passing in the first
  1.2392 +          occurrence of <var>LOCATION</var> from <var>ssdp device</var> as the <var>device descriptor <abbr title="Uniform Resource Locator">URL</abbr></var>
  1.2393 +          argument and the first occurrence of <var>USN</var> from <var>ssdp device</var> as the <var>device
  1.2394 +          identifier</var> argument and the first occurrence of <var>CACHE-CONTROL</var> from <var>ssdp device</var>
  1.2395 +          (minus the leading string of <code>max-age=</code>) as the <var>device expiry</var> argument.
  1.2396            </li>
  1.2397          </ol>
  1.2398          <p>
  1.2399 -          The user agent <em class="rfc2119"
  1.2400 -             title="must">must</em> listen for incoming requests on the <dfn id=
  1.2401 -             "dfn-standard-upnp-address-and-port">standard UPnP address and port</dfn> on all current local network
  1.2402 -             interface addresses with the port <code>1900</code>.
  1.2403 +          The user agent <em title="MUST" class="rfc2119">MUST</em> listen for incoming requests on the <dfn id="dfn-standard-upnp-address-and-port">standard UPnP address and port</dfn> on all
  1.2404 +          current local network interface addresses with the port <code>1900</code>.
  1.2405          </p>
  1.2406          <p>
  1.2407 -          For each <dfn id="dfn-http-request"><abbr title="Hypertext Transfer Protocol">HTTP</abbr> Request</dfn>
  1.2408 -          received on a <a href="#dfn-standard-upnp-address-and-port"
  1.2409 -             class="internalDFN">standard UPnP address and port</a> the user agent <em class="rfc2119"
  1.2410 -             title="must">must</em> run the following steps:
  1.2411 +          For each <dfn id="dfn-http-request"><abbr title="Hypertext Transfer Protocol">HTTP</abbr> Request</dfn> received on a <a class="internalDFN" href="#dfn-standard-upnp-address-and-port">standard UPnP address and port</a> the user agent <em title="MUST" class="rfc2119">MUST</em> run
  1.2412 +          the following steps:
  1.2413          </p>
  1.2414          <ol class="rule">
  1.2415 -          <li>If the <a href="#dfn-http-request"
  1.2416 -                class="internalDFN"><abbr title="Hypertext Transfer Protocol">HTTP</abbr> Request</a> is not a
  1.2417 -                <abbr title="Hypertext Transfer Protocol">HTTP</abbr> NOTIFY request then it is not a valid UPnP
  1.2418 -                Request and the user agent <em class="rfc2119"
  1.2419 -                title="must">must</em> discard this request, abort any remaining steps and return.
  1.2420 +          <li>If the <a class="internalDFN" href="#dfn-http-request"><abbr title="Hypertext Transfer Protocol">HTTP</abbr> Request</a> is not a <abbr title="Hypertext Transfer Protocol">HTTP</abbr> NOTIFY request then it is not a valid UPnP Request and the user
  1.2421 +          agent <em title="MUST" class="rfc2119">MUST</em> discard this request, abort any remaining steps and return.
  1.2422            </li>
  1.2423 -          <li>Let <var>ssdp device</var> be an Object with a property for each <abbr title=
  1.2424 -          "Hypertext Transfer Protocol">HTTP</abbr> header received in the <a href="#dfn-http-request"
  1.2425 -                class="internalDFN"><abbr title="Hypertext Transfer Protocol">HTTP</abbr> Request</a>, with each key
  1.2426 -                being the name of a <abbr title="Hypertext Transfer Protocol">HTTP</abbr> header and each value being
  1.2427 -                that <abbr title="Hypertext Transfer Protocol">HTTP</abbr> header's value.
  1.2428 +          <li>Let <var>ssdp device</var> be an Object with a property for each <abbr title="Hypertext Transfer Protocol">HTTP</abbr> header received in the <a class="internalDFN" href="#dfn-http-request"><abbr title="Hypertext Transfer Protocol">HTTP</abbr>
  1.2429 +          Request</a>, with each key being the name of a <abbr title="Hypertext Transfer Protocol">HTTP</abbr> header and each value being that <abbr title="Hypertext Transfer Protocol">HTTP</abbr> header's value.
  1.2430            </li>
  1.2431 -          <li>If <var>ssdp device</var>'s <var>NTS</var> entry is equal to <code>ssdp:alive</code> and the <a href=
  1.2432 -          "#dfn-http-request"
  1.2433 -                class="internalDFN"><abbr title="Hypertext Transfer Protocol">HTTP</abbr> Request</a> does not contain
  1.2434 -                at least one <var>CACHE-CONTROL</var> entry, at least one <var>USN</var> entry, at least one
  1.2435 -                <var>NT</var> entry, at least one <var>NTS</var> entry and at least one <var>LOCATION</var> entry, then
  1.2436 -                the <a href="#dfn-user-agent"
  1.2437 -                class="internalDFN">user agent</a> <em class="rfc2119"
  1.2438 -                title="must">must</em> discard this request, abort any remaining steps and return.
  1.2439 +          <li>If <var>ssdp device</var>'s <var>NTS</var> entry is equal to <code>ssdp:alive</code> and the <a class="internalDFN" href="#dfn-http-request"><abbr title="Hypertext Transfer Protocol">HTTP</abbr>
  1.2440 +          Request</a> does not contain at least one <var>CACHE-CONTROL</var> entry, at least one <var>USN</var> entry,
  1.2441 +          at least one <var>NT</var> entry, at least one <var>NTS</var> entry and at least one <var>LOCATION</var>
  1.2442 +          entry, then the <a class="internalDFN" href="#dfn-user-agent">user agent</a> <em title="MUST" class="rfc2119">MUST</em> discard this request, abort any remaining steps and return.
  1.2443            </li>
  1.2444            <li>If <var>ssdp device</var>'s <var>NTS</var> entry is equal to <code>ssdp:alive</code> then the user agent
  1.2445 -          <em class="rfc2119"
  1.2446 -                title="must">must</em> run the rule for <a href="#dfn-obtaining-a-upnp-device-description-file"
  1.2447 -                class="internalDFN">obtaining a UPnP Device Description File</a> passing in the first occurrence of
  1.2448 -                <var>LOCATION</var> from <var>ssdp device</var> as the <var>device descriptor <abbr title=
  1.2449 -                "Uniform Resource Locator">URL</abbr></var> argument and the first occurrence of <var>USN</var> from
  1.2450 -                <var>ssdp device</var> as the <var>device identifier</var> argument and the first occurrence of
  1.2451 -                <var>CACHE-CONTROL</var> from <var>ssdp device</var> (minus the leading string of
  1.2452 -                <code>max-age=</code>) as the <var>device expiry</var>.<br>
  1.2453 +          <em title="MUST" class="rfc2119">MUST</em> run the rule for <a class="internalDFN" href="#dfn-obtaining-a-upnp-device-description-file">obtaining a UPnP Device Description File</a> passing in the first occurrence of
  1.2454 +          <var>LOCATION</var> from <var>ssdp device</var> as the <var>device descriptor <abbr title="Uniform Resource Locator">URL</abbr></var> argument and the
  1.2455 +          first occurrence of <var>USN</var> from <var>ssdp device</var> as the <var>device identifier</var> argument
  1.2456 +          and the first occurrence of <var>CACHE-CONTROL</var> from <var>ssdp device</var> (minus the leading string of
  1.2457 +          <code>max-age=</code>) as the <var>device expiry</var>.<br>
  1.2458              <br>
  1.2459              Otherwise, if <var>ssdp device</var>'s <var>NTS</var> entry is equal to <code>ssdp:byebye</code> then the
  1.2460 -            user agent <em class="rfc2119"
  1.2461 -                title="must">must</em> run the rule for <a href=
  1.2462 -                "#dfn-removing-all-services-from-a-registered-upnp-device"
  1.2463 -                class="internalDFN">removing all services from a registered UPnP Device</a> passing in the first
  1.2464 -                occurrence of <var>USN</var> from <var>ssdp device</var> as the <var>device identifier</var> argument.
  1.2465 +            user agent <em title="MUST" class="rfc2119">MUST</em> run the rule for <a class="internalDFN" href="#dfn-removing-all-services-from-a-registered-upnp-device">removing all services from a registered UPnP Device</a> passing in the
  1.2466 +            first occurrence of <var>USN</var> from <var>ssdp device</var> as the <var>device identifier</var>
  1.2467 +            argument.
  1.2468            </li>
  1.2469          </ol>
  1.2470          <p>
  1.2471 -          The rule for <dfn id="dfn-obtaining-a-upnp-device-description-file">obtaining a UPnP Device Description
  1.2472 -          File</dfn> is the process of obtaining the contents of a standard UPnP Device Description [<cite><a class=
  1.2473 -          "bibref"
  1.2474 -             href="#bib-UPNP-DEVICEARCH11">UPNP-DEVICEARCH11</a></cite>] from a <abbr title=
  1.2475 -             "Uniform Resource Locator">URL</abbr>-based resource. This rule takes three arguments - <var>device
  1.2476 -             descriptor <abbr title="Uniform Resource Locator">URL</abbr></var>, <var>device identifier</var> and
  1.2477 -             <var>device expiry</var> - and when called the user agent <em class="rfc2119"
  1.2478 -             title="must">must</em> run the following steps:
  1.2479 +          The rule for <dfn id="dfn-obtaining-a-upnp-device-description-file">obtaining a UPnP Device Description File</dfn> is the process of obtaining the contents of
  1.2480 +          a standard UPnP Device Description [<cite><a href="#bib-UPNP-DEVICEARCH11" class="bibref">UPNP-DEVICEARCH11</a></cite>] from a <abbr title="Uniform Resource Locator">URL</abbr>-based resource. This rule takes three
  1.2481 +          arguments - <var>device descriptor <abbr title="Uniform Resource Locator">URL</abbr></var>, <var>device identifier</var> and <var>device expiry</var> - and
  1.2482 +          when called the user agent <em title="MUST" class="rfc2119">MUST</em> run the following steps:
  1.2483          </p>
  1.2484          <ol class="rule">
  1.2485 -          <li>Let <var>device descriptor file</var> contain the contents of the file located at the <abbr title=
  1.2486 -          "Uniform Resource Locator">URL</abbr> provided in <var>device descriptor <abbr title=
  1.2487 -          "Uniform Resource Locator">URL</abbr></var> obtained according to the rules defined in 'Section 2.11:
  1.2488 -          Retrieving a description using <abbr title="Hypertext Transfer Protocol">HTTP</abbr>' in [<cite><a class=
  1.2489 -          "bibref"
  1.2490 -               href="#bib-UPNP-DEVICEARCH11">UPNP-DEVICEARCH11</a></cite>].
  1.2491 +          <li>Let <var>device descriptor file</var> contain the contents of the file located at the <abbr title="Uniform Resource Locator">URL</abbr> provided in
  1.2492 +          <var>device descriptor <abbr title="Uniform Resource Locator">URL</abbr></var> obtained according to the rules defined in 'Section 2.11: Retrieving a
  1.2493 +          description using <abbr title="Hypertext Transfer Protocol">HTTP</abbr>' in [<cite><a href="#bib-UPNP-DEVICEARCH11" class="bibref">UPNP-DEVICEARCH11</a></cite>].
  1.2494            </li>
  1.2495 -          <li>If the value provided in <var>device descriptor <abbr title="Uniform Resource Locator">URL</abbr></var>
  1.2496 -          cannot be resolved as a reachable <abbr title="Uniform Resource Locator">URL</abbr> on the current network or
  1.2497 -          the <var>device descriptor file</var> remains empty then it is invalid and the <a href="#dfn-user-agent"
  1.2498 -                class="internalDFN">user agent</a> <em class="rfc2119"
  1.2499 -                title="must">must</em> abort any remaining steps and return.
  1.2500 +          <li>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
  1.2501 +          current network or the <var>device descriptor file</var> remains empty then it is invalid and the <a class="internalDFN" href="#dfn-user-agent">user
  1.2502 +          agent</a> <em title="MUST" class="rfc2119">MUST</em> abort any remaining steps and return.
  1.2503            </li>
  1.2504 -          <li>Run the rule for <a href="#dfn-processing-a-upnp-device-description-file"
  1.2505 -                class="internalDFN">processing a UPnP Device Description File</a>, passing in the current <var>device
  1.2506 -                descriptor file</var>, <var>device identifier</var> and <var>device expiry</var> arguments.
  1.2507 +          <li>Run the rule for <a class="internalDFN" href="#dfn-processing-a-upnp-device-description-file">processing a UPnP Device Description File</a>, passing in the current <var>device
  1.2508 +          descriptor file</var>, <var>device identifier</var> and <var>device expiry</var> arguments.
  1.2509            </li>
  1.2510          </ol>
  1.2511          <p>
  1.2512 -          The rule for <dfn id="dfn-processing-a-upnp-device-description-file">processing a UPnP Device Description
  1.2513 -          File</dfn> is the process of parsing the contents of a standard UPnP Device Description [<cite><a class=
  1.2514 -          "bibref"
  1.2515 -             href="#bib-UPNP-DEVICEARCH11">UPNP-DEVICEARCH11</a></cite>] and registering the UPnP services contained
  1.2516 -             therein within the <a href="#dfn-list-of-available-service-records"
  1.2517 -             class="internalDFN">list of available service records</a>.
  1.2518 +          The rule for <dfn id="dfn-processing-a-upnp-device-description-file">processing a UPnP Device Description File</dfn> is the process of parsing the contents of a
  1.2519 +          standard UPnP Device Description [<cite><a href="#bib-UPNP-DEVICEARCH11" class="bibref">UPNP-DEVICEARCH11</a></cite>] and registering the UPnP services contained therein
  1.2520 +          within the <a class="internalDFN" href="#dfn-list-of-available-service-records">list of available service records</a>.
  1.2521          </p>
  1.2522          <p>
  1.2523 -          The rule for <a href="#dfn-processing-a-upnp-device-description-file"
  1.2524 -             class="internalDFN">processing a UPnP Device Description File</a> takes three arguments - <var>device
  1.2525 -             descriptor file</var>, <var>device identifier</var> and <var>device expiry</var> - and when called the
  1.2526 -             user agent <em class="rfc2119"
  1.2527 -             title="must">must</em> run the following steps:
  1.2528 +          The rule for <a class="internalDFN" href="#dfn-processing-a-upnp-device-description-file">processing a UPnP Device Description File</a> takes three arguments - <var>device descriptor
  1.2529 +          file</var>, <var>device identifier</var> and <var>device expiry</var> - and when called the user agent <em title="MUST" class="rfc2119">MUST</em>
  1.2530 +          run the following steps:
  1.2531          </p>
  1.2532          <ol class="rule">
  1.2533            <li>Let <var>advertised services</var> be a list of all advertised services obtained from the <var>device
  1.2534            descriptor file</var> containing the value of the first occurrence of the <code>&lt;serviceList&gt;</code>
  1.2535 -          element as it is defined in 'Section 2.3: Device Description' in [<cite><a class="bibref"
  1.2536 -               href="#bib-UPNP-DEVICEARCH11">UPNP-DEVICEARCH11</a></cite>].
  1.2537 +          element as it is defined in 'Section 2.3: Device Description' in [<cite><a href="#bib-UPNP-DEVICEARCH11" class="bibref">UPNP-DEVICEARCH11</a></cite>].
  1.2538            </li>
  1.2539            <li>For each <code>&lt;service&gt;</code> element - known as an <var>advertised service</var> - in
  1.2540            <var>advertised services</var> run the following steps:
  1.2541 @@ -2016,74 +1509,58 @@
  1.2542                <li>Set <var>network service record</var>'s <code>expiryTimestamp</code> property to the value of the
  1.2543                current date, in UTC timestamp format, plus the value of <var>device expiry</var>.
  1.2544                </li>
  1.2545 -              <li>Run the general rule for <a href="#dfn-adding-an-available-service"
  1.2546 -                    class="internalDFN">adding an available service</a>, passing in the current <var>network service
  1.2547 -                    record</var> as the only argument.
  1.2548 +              <li>Run the general rule for <a class="internalDFN" href="#dfn-adding-an-available-service">adding an available service</a>, passing in the current <var>network
  1.2549 +              service record</var> as the only argument.
  1.2550                </li>
  1.2551              </ol>
  1.2552            </li>
  1.2553            <li>If <var>device descriptor file</var> contains a <code>&lt;deviceList&gt;</code> element then for each
  1.2554            <code>&lt;device&gt;</code> element within <code>&lt;deviceList&gt;</code> - herein known as an <var>embedded
  1.2555 -          device descriptor file</var> - the user agent <em class="rfc2119"
  1.2556 -                title="must">must</em> run the rule for <a href="#dfn-processing-a-upnp-device-description-file"
  1.2557 -                class="internalDFN">processing a UPnP Device Description File</a>, passing in the current <var>embedded
  1.2558 -                device descriptor file</var> as the <var>device descriptor file</var> argument, along with the current
  1.2559 -                <var>device identifier</var> and <var>device expiry</var> arguments.
  1.2560 +          device descriptor file</var> - the user agent <em title="MUST" class="rfc2119">MUST</em> run the rule for <a class="internalDFN" href="#dfn-processing-a-upnp-device-description-file">processing a UPnP Device Description
  1.2561 +          File</a>, passing in the current <var>embedded device descriptor file</var> as the <var>device descriptor
  1.2562 +          file</var> argument, along with the current <var>device identifier</var> and <var>device expiry</var>
  1.2563 +          arguments.
  1.2564            </li>
  1.2565          </ol>
  1.2566          <p>
  1.2567 -          The rule for <dfn id="dfn-removing-all-services-from-a-registered-upnp-device">removing all services from a
  1.2568 -          registered UPnP Device</dfn> is the process of removing all services associated with a device from the
  1.2569 -          <a href="#dfn-list-of-available-service-records"
  1.2570 -             class="internalDFN">list of available service records</a> that has left the user's current network or has
  1.2571 -             otherwise timed out or expired. This rule takes one argument, <var>device identifier</var>, and consists
  1.2572 -             of running the following steps:
  1.2573 +          The rule for <dfn id="dfn-removing-all-services-from-a-registered-upnp-device">removing all services from a registered UPnP Device</dfn> is the process of removing all
  1.2574 +          services associated with a device from the <a class="internalDFN" href="#dfn-list-of-available-service-records">list of available service records</a> that has left the user's
  1.2575 +          current network or has otherwise timed out or expired. This rule takes one argument, <var>device
  1.2576 +          identifier</var>, and consists of running the following steps:
  1.2577          </p>
  1.2578          <ol class="rule">
  1.2579 -          <li>For each <var>existing service record</var> in the current <a href=
  1.2580 -          "#dfn-list-of-available-service-records"
  1.2581 -                class="internalDFN">list of available service records</a>, run the following sub-steps:
  1.2582 +          <li>For each <var>existing service record</var> in the current <a class="internalDFN" href="#dfn-list-of-available-service-records">list of available service records</a>, run
  1.2583 +          the following sub-steps:
  1.2584              <ol class="rule">
  1.2585                <li>If the <var>existing service record</var>'s <code>deviceId</code> property does not match <var>device
  1.2586                identifier</var> then skip any remaining sub-steps for the current <var>existing service record</var> and
  1.2587                continue at the next available <var>existing service record</var>.
  1.2588                </li>
  1.2589 -              <li>Run the general rule for <a href="#dfn-removing-an-available-service"
  1.2590 -                    class="internalDFN">removing an available service</a> passing in <var>existing service
  1.2591 -                    record</var>'s <code>id</code> property as the only argument.
  1.2592 +              <li>Run the general rule for <a class="internalDFN" href="#dfn-removing-an-available-service">removing an available service</a> passing in <var>existing service
  1.2593 +              record</var>'s <code>id</code> property as the only argument.
  1.2594                </li>
  1.2595              </ol>
  1.2596            </li>
  1.2597          </ol>
  1.2598          <p>
  1.2599 -          When the <a href="#dfn-user-agent"
  1.2600 -             class="internalDFN">user agent</a> is to <dfn id="dfn-setup-a-upnp-events-subscription">setup a UPnP
  1.2601 -             Events Subscription</dfn>, it is to run the following steps with the current <var>network service
  1.2602 -             record</var> object as defined in 'Section 4.1.2: SUBSCRIBE with NT and CALLBACK' in [<cite><a class=
  1.2603 -             "bibref"
  1.2604 -             href="#bib-UPNP-DEVICEARCH11">UPNP-DEVICEARCH11</a></cite>]:
  1.2605 +          When the <a class="internalDFN" href="#dfn-user-agent">user agent</a> is to <dfn id="dfn-setup-a-upnp-events-subscription">setup a UPnP Events Subscription</dfn>, it is to run the following
  1.2606 +          steps with the current <var>network service record</var> object as defined in 'Section 4.1.2: SUBSCRIBE with
  1.2607 +          NT and CALLBACK' in [<cite><a href="#bib-UPNP-DEVICEARCH11" class="bibref">UPNP-DEVICEARCH11</a></cite>]:
  1.2608          </p>
  1.2609          <ol class="rule">
  1.2610 -          <li>If <var>network service record</var>'s <code>eventsUrl</code> property is empty then the <a href=
  1.2611 -          "#dfn-user-agent"
  1.2612 -                class="internalDFN">user agent</a> <em class="rfc2119"
  1.2613 -                title="must">must</em> abort these steps.
  1.2614 +          <li>If <var>network service record</var>'s <code>eventsUrl</code> property is empty then the <a class="internalDFN" href="#dfn-user-agent">user
  1.2615 +          agent</a> <em title="MUST" class="rfc2119">MUST</em> abort these steps.
  1.2616            </li>
  1.2617 -          <li>Let <var>callback <abbr title="Uniform Resource Locator">URL</abbr></var> be the value of creating a new
  1.2618 -          <a href="#dfn-user-agent-generated-callback-url"
  1.2619 -                class="internalDFN">user-agent generated callback url</a>.
  1.2620 +          <li>Let <var>callback <abbr title="Uniform Resource Locator">URL</abbr></var> be the value of creating a new <a class="internalDFN" href="#dfn-user-agent-generated-callback-url">user-agent generated callback url</a>.
  1.2621            </li>
  1.2622 -          <li>Send a <abbr title="Hypertext Transfer Protocol">HTTP</abbr> SUBSCRIBE request with a <em>NT</em> header
  1.2623 -          with a string value of <code>upnp:event</code>, a <em>TIMEOUT</em> header with a user-agent defined timeout
  1.2624 -          value (in the form <code>Second-XX</code> where <code>XX</code> is the user-agent defined timeout value in
  1.2625 -          seconds) and a <em>CALLBACK</em> header with a string value of <var>callback <abbr title=
  1.2626 -          "Uniform Resource Locator">URL</abbr></var> towards the <var>network service record</var>'s
  1.2627 +          <li>Send a <abbr title="Hypertext Transfer Protocol">HTTP</abbr> SUBSCRIBE request with a <em>NT</em> header with a string value of <code>upnp:event</code>, a
  1.2628 +          <em>TIMEOUT</em> header with a user-agent defined timeout value (in the form <code>Second-XX</code> where
  1.2629 +          <code>XX</code> is the user-agent defined timeout value in seconds) and a <em>CALLBACK</em> header with a
  1.2630 +          string value of <var>callback <abbr title="Uniform Resource Locator">URL</abbr></var> towards the <var>network service record</var>'s
  1.2631            <code>eventsUrl</code> property.
  1.2632            </li>
  1.2633 -          <li>If a non-200 OK response is received from the <abbr title="Hypertext Transfer Protocol">HTTP</abbr>
  1.2634 -          SUBSCRIBE request then the <a href="#dfn-user-agent"
  1.2635 -                class="internalDFN">user agent</a> <em class="rfc2119"
  1.2636 -                title="must">must</em> abort these steps.
  1.2637 +          <li>If a non-200 OK response is received from the <abbr title="Hypertext Transfer Protocol">HTTP</abbr> SUBSCRIBE request then the <a class="internalDFN" href="#dfn-user-agent">user agent</a> <em title="MUST" class="rfc2119">MUST</em>
  1.2638 +          abort these steps.
  1.2639            </li>
  1.2640            <li>On receiving a valid 200 OK response, run the following steps:
  1.2641              <ol class="rule">
  1.2642 @@ -2096,63 +1573,47 @@
  1.2643                <li>Run the following steps asynchronously and continue to the step labeled <em>listen</em> below.
  1.2644                </li>
  1.2645                <li>
  1.2646 -                <em>Refresh Subscription</em>: Run the following steps at a set interval (X) within the <a href=
  1.2647 -                "#dfn-user-agent"
  1.2648 -                    class="internalDFN">user agent</a>:
  1.2649 +                <em>Refresh Subscription</em>: Run the following steps at a set interval (X) within the <a class="internalDFN" href="#dfn-user-agent">user
  1.2650 +                agent</a>:
  1.2651                  <ol class="rule">
  1.2652                    <li>Let <var>current date</var> equal the current UTC date.
  1.2653                    </li>
  1.2654                    <li>If <var>current date</var> is less than the <var>timeout date</var> then continue to the step
  1.2655                    labeled <em>refresh subscription</em> above.
  1.2656                    </li>
  1.2657 -                  <li>Send a <abbr title="Hypertext Transfer Protocol">HTTP</abbr> SUBSCRIBE request with a
  1.2658 -                  <em>SID</em> header with the string value of <var>callback ID</var> and a user-agent defined
  1.2659 -                  <em>TIMEOUT</em> header (in the form <code>Second-XX</code> where <code>XX</code> is the user-agent
  1.2660 -                  defined timeout value in seconds) towards the <var>network service record</var>'s
  1.2661 -                  <code>eventsUrl</code> property.
  1.2662 +                  <li>Send a <abbr title="Hypertext Transfer Protocol">HTTP</abbr> SUBSCRIBE request with a <em>SID</em> header with the string value of <var>callback
  1.2663 +                  ID</var> and a user-agent defined <em>TIMEOUT</em> header (in the form <code>Second-XX</code> where
  1.2664 +                  <code>XX</code> is the user-agent defined timeout value in seconds) towards the <var>network service
  1.2665 +                  record</var>'s <code>eventsUrl</code> property.
  1.2666                    </li>
  1.2667                    <li>On receiving a valid 200 OK, update <var>callback ID</var> with the string value of the first
  1.2668                    included <em>SID</em> header and set <var>timeout date</var> to the sum of the current UTC date value
  1.2669                    plus the integer value of the first included <em>TIMEOUT</em> header (minus the leading string of
  1.2670                    <code>Second-</code>), if it exists. If the current date is greater than or equal to <var>timeout
  1.2671 -                  date</var> then the <a href="#dfn-user-agent"
  1.2672 -                        class="internalDFN">user agent</a> <em class="rfc2119"
  1.2673 -                        title="should">should</em> continue from the step labeled <em>refresh subscription</em> above.
  1.2674 -                        For all non 200 OK responses the <a href="#dfn-user-agent"
  1.2675 -                        class="internalDFN">user agent</a> <em class="rfc2119"
  1.2676 -                        title="should">should</em> continue from the step labeled <em>refresh subscription</em> above.
  1.2677 +                  date</var> then the <a class="internalDFN" href="#dfn-user-agent">user agent</a> <em title="SHOULD" class="rfc2119">SHOULD</em> continue from the step labeled <em>refresh
  1.2678 +                  subscription</em> above. For all non 200 OK responses the <a class="internalDFN" href="#dfn-user-agent">user agent</a> <em title="SHOULD" class="rfc2119">SHOULD</em> continue from the
  1.2679 +                  step labeled <em>refresh subscription</em> above.
  1.2680                    </li>
  1.2681                  </ol>
  1.2682                </li>
  1.2683                <li>
  1.2684 -                <em>Listen</em>: For each <abbr title="Hypertext Transfer Protocol">HTTP</abbr> NOTIFY request received
  1.2685 -                at the <var>callback <abbr title="Uniform Resource Locator">URL</abbr></var> the <a href=
  1.2686 -                "#dfn-user-agent"
  1.2687 -                    class="internalDFN">user agent</a> is to run the following steps:
  1.2688 +                <em>Listen</em>: For each <abbr title="Hypertext Transfer Protocol">HTTP</abbr> NOTIFY request received at the <var>callback <abbr title="Uniform Resource Locator">URL</abbr></var> the <a class="internalDFN" href="#dfn-user-agent">user
  1.2689 +                agent</a> is to run the following steps:
  1.2690                  <ol class="rule">
  1.2691 -                  <li>Let <var>content clone</var> be the result of obtaining the message body of the <abbr title=
  1.2692 -                  "Hypertext Transfer Protocol">HTTP</abbr> NOTIFY request. If <var>content clone</var> is empty, then
  1.2693 -                  the <a href="#dfn-user-agent"
  1.2694 -                        class="internalDFN">user agent</a> <em class="rfc2119"
  1.2695 -                        title="must">must</em> abort these steps.
  1.2696 +                  <li>Let <var>content clone</var> be the result of obtaining the message body of the <abbr title="Hypertext Transfer Protocol">HTTP</abbr> NOTIFY
  1.2697 +                  request. If <var>content clone</var> is empty, then the <a class="internalDFN" href="#dfn-user-agent">user agent</a> <em title="MUST" class="rfc2119">MUST</em> abort these steps.
  1.2698                    </li>
  1.2699 -                  <li>Let <var>notification event</var> be a new simple event that uses the <a href=
  1.2700 -                  "http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event"
  1.2701 -                        class="externalDFN"><code>Event</code></a> interface with the name <a href=
  1.2702 -                        "#event-notify"><code>notify</code></a>, which does not bubble, is not cancellable, and has no
  1.2703 +                  <li>Let <var>notification event</var> be a new simple event that uses the <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event" class="externalDFN"><code>Event</code></a> interface with the name <a href="#event-notify"><code>notify</code></a>, which does not bubble, is not cancellable, and has no
  1.2704                          default action.
  1.2705                    </li>
  1.2706                    <li>Let the <code>data</code> attribute of <var>notification event</var> have the DOMString value of
  1.2707                    <var>content clone</var>.
  1.2708                    </li>
  1.2709                    <li>
  1.2710 -                    <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task"
  1.2711 -                        class="externalDFN">Queue a task</a> to dispatch <var>notification event</var> at the current
  1.2712 -                        <a href="#networkservice"
  1.2713 -                        class="internalDFN"><code>NetworkService</code></a> object.
  1.2714 +                    <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">Queue a task</a> to dispatch <var>notification event</var> at the current
  1.2715 +                        <a class="internalDFN" href="#networkservice"><code>NetworkService</code></a> object.
  1.2716                    </li>
  1.2717 -                  <li>Return a <abbr title="Hypertext Transfer Protocol">HTTP</abbr> 200 OK response to the sender of
  1.2718 -                  the <abbr title="Hypertext Transfer Protocol">HTTP</abbr> NOTIFY request.
  1.2719 +                  <li>Return a <abbr title="Hypertext Transfer Protocol">HTTP</abbr> 200 OK response to the sender of the <abbr title="Hypertext Transfer Protocol">HTTP</abbr> NOTIFY request.
  1.2720                    </li>
  1.2721                  </ol>
  1.2722                </li>
  1.2723 @@ -2160,142 +1621,90 @@
  1.2724            </li>
  1.2725          </ol>
  1.2726          <p>
  1.2727 -          A <a href="#dfn-user-agent"
  1.2728 -             class="internalDFN">user agent</a> can <dfn id=
  1.2729 -             "dfn-terminate-an-existing-upnp-events-subscription">terminate an existing UPnP Events Subscription</dfn>
  1.2730 -             at any time for a <var>network service record</var> by sending an <abbr title=
  1.2731 -             "Hypertext Transfer Protocol">HTTP</abbr> UNSUBSCRIBE request - as defined in 'Section 4.1.4: Cancelling a
  1.2732 -             subscription with UNSUBSCRIBE' in [<cite><a class="bibref"
  1.2733 -             href="#bib-UPNP-DEVICEARCH11">UPNP-DEVICEARCH11</a></cite>] - with a HOST header set to that <var>active
  1.2734 -             service</var>'s <code>eventsUrl</code> property and a SID header set to the <var>callback ID</var>
  1.2735 -             obtained when the initial <a href="#dfn-setup-a-upnp-events-subscription"
  1.2736 -             class="internalDFN">setup a UPnP Events Subscription</a> action occurred.
  1.2737 +          A <a class="internalDFN" href="#dfn-user-agent">user agent</a> can <dfn id="dfn-terminate-an-existing-upnp-events-subscription">terminate an existing UPnP Events Subscription</dfn> at any time for a
  1.2738 +          <var>network service record</var> by sending an <abbr title="Hypertext Transfer Protocol">HTTP</abbr> UNSUBSCRIBE request - as defined in 'Section 4.1.4:
  1.2739 +          Cancelling a subscription with UNSUBSCRIBE' in [<cite><a href="#bib-UPNP-DEVICEARCH11" class="bibref">UPNP-DEVICEARCH11</a></cite>] - with a HOST header set to that
  1.2740 +          <var>active service</var>'s <code>eventsUrl</code> property and a SID header set to the <var>callback
  1.2741 +          ID</var> obtained when the initial <a class="internalDFN" href="#dfn-setup-a-upnp-events-subscription">setup a UPnP Events Subscription</a> action occurred.
  1.2742          </p>
  1.2743        </section>
  1.2744        <section id="discovery-and-launch-protocol-dial">
  1.2745 -        <h3>
  1.2746 -          <span class="secno">7.3</span> Discovery and Launch Protocol (<abbr title=
  1.2747 -          "Discovery and Launch Protocol">DIAL</abbr>)
  1.2748 +        <h3><span class="secno">7.3 </span>
  1.2749 +          Discovery and Launch Protocol (<abbr title="Discovery and Launch Protocol">DIAL</abbr>)
  1.2750          </h3>
  1.2751          <p>
  1.2752 -          A user agent that implements <abbr title="Discovery and Launch Protocol">DIAL</abbr> service discovery
  1.2753 -          <em class="rfc2119"
  1.2754 -             title="must">must</em> issue a <dfn id="dfn-search-request-for-dial-enabled-devices">search request for
  1.2755 -             <abbr title="Discovery and Launch Protocol">DIAL</abbr>-enabled devices</dfn> against the user's current
  1.2756 -             local network according to the full normative text and timing provided in 'Section 1.3.2: Search request
  1.2757 -             with M-SEARCH' detailed in [<cite><a class="bibref"
  1.2758 -             href="#bib-UPNP-DEVICEARCH11">UPNP-DEVICEARCH11</a></cite>].
  1.2759 +          A user agent that implements <abbr title="Discovery and Launch Protocol">DIAL</abbr> service discovery <em title="MUST" class="rfc2119">MUST</em> issue a <dfn id="dfn-search-request-for-dial-enabled-devices">search request for <abbr title="Discovery and Launch Protocol">DIAL</abbr>-enabled
  1.2760 +          devices</dfn> against the user's current local network according to the full normative text and timing
  1.2761 +          provided in 'Section 1.3.2: Search request with M-SEARCH' detailed in [<cite><a href="#bib-UPNP-DEVICEARCH11" class="bibref">UPNP-DEVICEARCH11</a></cite>].
  1.2762          </p>
  1.2763          <p>
  1.2764 -          Let <var>dial version</var> be the version number specified in the <a href="#dfn-valid-service-type"
  1.2765 -             class="internalDFN">valid service type</a> token. Let <var>dial search target</var> be the concatentation
  1.2766 -             of the <code>urn:dial-multiscreen-org:service:dial:</code> string constant with the <var>dial
  1.2767 -             version</var> (currently, <var>dial version</var> can only be <code>1</code>)
  1.2768 +          Let <var>dial version</var> be the version number specified in the <a class="internalDFN" href="#dfn-valid-service-type">valid service type</a> token. Let
  1.2769 +          <var>dial search target</var> be the concatentation of the
  1.2770 +          <code>urn:dial-multiscreen-org:service:dial:</code> string constant with the <var>dial version</var>
  1.2771 +          (currently, <var>dial version</var> can only be <code>1</code>)
  1.2772          </p>
  1.2773          <p>
  1.2774 -          The user agent <em class="rfc2119"
  1.2775 -             title="must">must</em> issue all <a title="search request for DIAL devices">search requests for
  1.2776 -             <abbr title="Discovery and Launch Protocol">DIAL</abbr> devices</a> with a <abbr title=
  1.2777 -             "Hypertext Transfer Protocol">HTTP</abbr> request line equal to <code>M-SEARCH * <abbr title=
  1.2778 -             "Hypertext Transfer Protocol">HTTP</abbr>/1.1</code>, with a HOST header equal to the reserved multicast
  1.2779 -             address and port of <code>239.255.255.250:1900</code>, a MAN header equal to <code>ssdp:discover</code>,
  1.2780 -             an ST header equal to <var>dial search target</var> and a user-agent defined MX header equal to a <dfn id=
  1.2781 -             "dfn-maximum-dial-advertisement-response-wait-time">maximum <abbr title=
  1.2782 -             "Discovery and Launch Protocol">DIAL</abbr> advertisement response wait time</dfn> value between
  1.2783 -             <code>1</code> and <code>5</code> seconds.
  1.2784 +          The user agent <em title="MUST" class="rfc2119">MUST</em> issue all <a title="search request for DIAL devices">search requests for <abbr title="Discovery and Launch Protocol">DIAL</abbr> devices</a>
  1.2785 +          with a <abbr title="Hypertext Transfer Protocol">HTTP</abbr> request line equal to <code>M-SEARCH * <abbr title="Hypertext Transfer Protocol">HTTP</abbr>/1.1</code>, with a HOST header equal to the reserved
  1.2786 +          multicast address and port of <code>239.255.255.250:1900</code>, a MAN header equal to
  1.2787 +          <code>ssdp:discover</code>, an ST header equal to <var>dial search target</var> and a user-agent defined MX
  1.2788 +          header equal to a <dfn id="dfn-maximum-dial-advertisement-response-wait-time">maximum <abbr title="Discovery and Launch Protocol">DIAL</abbr> advertisement response wait time</dfn> value between <code>1</code> and
  1.2789 +          <code>5</code> seconds.
  1.2790          </p>
  1.2791          <p>
  1.2792 -          The user agent <em class="rfc2119"
  1.2793 -             title="must">must</em> listen for any incoming responses to a <a>search request for <abbr title=
  1.2794 -             "Discovery and Launch Protocol">DIAL</abbr> devices</a>.
  1.2795 +          The user agent <em title="MUST" class="rfc2119">MUST</em> listen for any incoming responses to a <a>search request for <abbr title="Discovery and Launch Protocol">DIAL</abbr> devices</a>.
  1.2796          </p>
  1.2797          <p>
  1.2798 -          For each <abbr title="Hypertext Transfer Protocol">HTTP</abbr> Response following an initial <a>search
  1.2799 -          request for <abbr title="Discovery and Launch Protocol">DIAL</abbr> devices</a> sent on a <a href=
  1.2800 -          "#dfn-standard-upnp-address-and-port"
  1.2801 -             class="internalDFN">standard UPnP address and port</a> the user agent <em class="rfc2119"
  1.2802 -             title="must">must</em> run the following steps:
  1.2803 +          For each <abbr title="Hypertext Transfer Protocol">HTTP</abbr> Response following an initial <a>search request for <abbr title="Discovery and Launch Protocol">DIAL</abbr> devices</a> sent on a <a class="internalDFN" href="#dfn-standard-upnp-address-and-port">standard UPnP
  1.2804 +          address and port</a> the user agent <em title="MUST" class="rfc2119">MUST</em> run the following steps:
  1.2805          </p>
  1.2806          <ol class="rule">
  1.2807 -          <li>If the <abbr title="Hypertext Transfer Protocol">HTTP</abbr> Response is not a <abbr title=
  1.2808 -          "Hypertext Transfer Protocol">HTTP</abbr> 200 OK response then this response is invalid and the user agent
  1.2809 -          <em class="rfc2119"
  1.2810 -                title="must">must</em> discard this response, abort any remaining steps and return. The user agent
  1.2811 -                <em class="rfc2119"
  1.2812 -                title="may">may</em> issue a new <a>search request for <abbr title=
  1.2813 -                "Discovery and Launch Protocol">DIAL</abbr> devices</a> as a result of this error occurring.
  1.2814 +          <li>If the <abbr title="Hypertext Transfer Protocol">HTTP</abbr> Response is not a <abbr title="Hypertext Transfer Protocol">HTTP</abbr> 200 OK response then this response is invalid and the user agent <em title="MUST" class="rfc2119">MUST</em>
  1.2815 +          discard this response, abort any remaining steps and return. The user agent <em title="MAY" class="rfc2119">MAY</em> issue a new <a>search request
  1.2816 +          for <abbr title="Discovery and Launch Protocol">DIAL</abbr> devices</a> as a result of this error occurring.
  1.2817            </li>
  1.2818 -          <li>If the <a href="#dfn-maximum-dial-advertisement-response-wait-time"
  1.2819 -                class="internalDFN">maximum <abbr title="Discovery and Launch Protocol">DIAL</abbr> advertisement
  1.2820 -                response wait time</a> has been exceeded since the initial <a>search request for <abbr title=
  1.2821 -                "Discovery and Launch Protocol">DIAL</abbr> devices</a> was sent then the <a href="#dfn-http-response"
  1.2822 -                class="internalDFN"><abbr title="Hypertext Transfer Protocol">HTTP</abbr> Response</a> is invalid and
  1.2823 -                the user agent <em class="rfc2119"
  1.2824 -                title="must">must</em> discard this response, abort any remaining steps and return. The user agent
  1.2825 -                <em class="rfc2119"
  1.2826 -                title="may">may</em> stop listening for responses from the current <a>search request for <abbr title=
  1.2827 -                "Discovery and Launch Protocol">DIAL</abbr> devices</a> as a result of this error occurring. Equally,
  1.2828 -                the user agent <em class="rfc2119"
  1.2829 -                title="may">may</em> issue a new <a>search request for <abbr title=
  1.2830 -                "Discovery and Launch Protocol">DIAL</abbr> devices</a> as a result of this error occurring.
  1.2831 +          <li>If the <a class="internalDFN" href="#dfn-maximum-dial-advertisement-response-wait-time">maximum <abbr title="Discovery and Launch Protocol">DIAL</abbr> advertisement response wait time</a> has been exceeded since the initial <a>search
  1.2832 +          request for <abbr title="Discovery and Launch Protocol">DIAL</abbr> devices</a> was sent then the <a class="internalDFN" href="#dfn-http-response"><abbr title="Hypertext Transfer Protocol">HTTP</abbr> Response</a> is invalid and the user agent <em title="MUST" class="rfc2119">MUST</em>
  1.2833 +          discard this response, abort any remaining steps and return. The user agent <em title="MAY" class="rfc2119">MAY</em> stop listening for responses
  1.2834 +          from the current <a>search request for <abbr title="Discovery and Launch Protocol">DIAL</abbr> devices</a> as a result of this error occurring. Equally, the
  1.2835 +          user agent <em title="MAY" class="rfc2119">MAY</em> issue a new <a>search request for <abbr title="Discovery and Launch Protocol">DIAL</abbr> devices</a> as a result of this error occurring.
  1.2836            </li>
  1.2837 -          <li>Let <var>dial device</var> be an Object with a property for each <abbr title=
  1.2838 -          "Hypertext Transfer Protocol">HTTP</abbr> header received in the <a href="#dfn-http-response"
  1.2839 -                class="internalDFN"><abbr title="Hypertext Transfer Protocol">HTTP</abbr> Response</a>, with each key
  1.2840 -                being the name of a <abbr title="Hypertext Transfer Protocol">HTTP</abbr> response header and each
  1.2841 -                value being that <abbr title="Hypertext Transfer Protocol">HTTP</abbr> response header's value.
  1.2842 +          <li>Let <var>dial device</var> be an Object with a property for each <abbr title="Hypertext Transfer Protocol">HTTP</abbr> header received in the <a class="internalDFN" href="#dfn-http-response"><abbr title="Hypertext Transfer Protocol">HTTP</abbr>
  1.2843 +          Response</a>, with each key being the name of a <abbr title="Hypertext Transfer Protocol">HTTP</abbr> response header and each value being that <abbr title="Hypertext Transfer Protocol">HTTP</abbr> response
  1.2844 +          header's value.
  1.2845            </li>
  1.2846            <li>If <var>dial device</var> does not contain at least one <var>CACHE-CONTROL</var> entry, at least one
  1.2847            <var>USN</var> entry, at least one <var>ST</var> entry and at least one <var>LOCATION</var> entry or the
  1.2848 -          value of its <var>ST</var> entry is not <var>dial search target</var>, then the <a href="#dfn-http-response"
  1.2849 -                class="internalDFN"><abbr title="Hypertext Transfer Protocol">HTTP</abbr> Response</a> is invalid and
  1.2850 -                the <a href="#dfn-user-agent"
  1.2851 -                class="internalDFN">user agent</a> <em class="rfc2119"
  1.2852 -                title="must">must</em> discard this response, abort any remaining steps and return.
  1.2853 +          value of its <var>ST</var> entry is not <var>dial search target</var>, then the <a class="internalDFN" href="#dfn-http-response"><abbr title="Hypertext Transfer Protocol">HTTP</abbr> Response</a> is
  1.2854 +          invalid and the <a class="internalDFN" href="#dfn-user-agent">user agent</a> <em title="MUST" class="rfc2119">MUST</em> discard this response, abort any remaining steps and return.
  1.2855            </li>
  1.2856 -          <li>The user agent <em class="rfc2119"
  1.2857 -                title="must">must</em> run the rule for <a href="#dfn-obtaining-a-upnp-device-description-file"
  1.2858 -                class="internalDFN">obtaining a UPnP Device Description File</a> passing in the first occurrence of
  1.2859 -                <var>LOCATION</var> from <var>dial device</var> as the <var>device descriptor <abbr title=
  1.2860 -                "Uniform Resource Locator">URL</abbr></var> argument and the first occurrence of <var>USN</var> from
  1.2861 -                <var>dial device</var> as the <var>device identifier</var> argument and the first occurrence of
  1.2862 -                <var>CACHE-CONTROL</var> from <var>dial device</var> (minus the leading string of
  1.2863 -                <code>max-age=</code>) as the <var>device expiry</var> argument.
  1.2864 +          <li>The user agent <em title="MUST" class="rfc2119">MUST</em> run the rule for <a class="internalDFN" href="#dfn-obtaining-a-upnp-device-description-file">obtaining a UPnP Device Description File</a> passing in the first
  1.2865 +          occurrence of <var>LOCATION</var> from <var>dial device</var> as the <var>device descriptor <abbr title="Uniform Resource Locator">URL</abbr></var>
  1.2866 +          argument and the first occurrence of <var>USN</var> from <var>dial device</var> as the <var>device
  1.2867 +          identifier</var> argument and the first occurrence of <var>CACHE-CONTROL</var> from <var>dial device</var>
  1.2868 +          (minus the leading string of <code>max-age=</code>) as the <var>device expiry</var> argument.
  1.2869            </li>
  1.2870          </ol>
  1.2871          <p>
  1.2872 -          The rule for <dfn id="dfn-obtaining-a-dial-device-description-file">obtaining a <abbr title=
  1.2873 -          "Discovery and Launch Protocol">DIAL</abbr> Device Description File</dfn> is the process of obtaining the
  1.2874 -          contents of a standard UPnP Device Description [<cite><a class="bibref"
  1.2875 -             href="#bib-UPNP-DEVICEARCH11">UPNP-DEVICEARCH11</a></cite>] from a <abbr title=
  1.2876 -             "Uniform Resource Locator">URL</abbr>-based resource. This rule takes three arguments - <var>device
  1.2877 -             descriptor <abbr title="Uniform Resource Locator">URL</abbr></var>, <var>device identifier</var> and
  1.2878 -             <var>device expiry</var> - and when called the user agent <em class="rfc2119"
  1.2879 -             title="must">must</em> run the following steps:
  1.2880 +          The rule for <dfn id="dfn-obtaining-a-dial-device-description-file">obtaining a <abbr title="Discovery and Launch Protocol">DIAL</abbr> Device Description File</dfn> is the process of obtaining the contents of
  1.2881 +          a standard UPnP Device Description [<cite><a href="#bib-UPNP-DEVICEARCH11" class="bibref">UPNP-DEVICEARCH11</a></cite>] from a <abbr title="Uniform Resource Locator">URL</abbr>-based resource. This rule takes three
  1.2882 +          arguments - <var>device descriptor <abbr title="Uniform Resource Locator">URL</abbr></var>, <var>device identifier</var> and <var>device expiry</var> - and
  1.2883 +          when called the user agent <em title="MUST" class="rfc2119">MUST</em> run the following steps:
  1.2884          </p>
  1.2885          <ol class="rule">
  1.2886 -          <li>Let <var>device descriptor file</var> contain the contents of the file located at the <abbr title=
  1.2887 -          "Uniform Resource Locator">URL</abbr> provided in <var>device descriptor <abbr title=
  1.2888 -          "Uniform Resource Locator">URL</abbr></var> obtained according to the rules defined in 'Section 2.11:
  1.2889 -          Retrieving a description using <abbr title="Hypertext Transfer Protocol">HTTP</abbr>' in [<cite><a class=
  1.2890 -          "bibref"
  1.2891 -               href="#bib-UPNP-DEVICEARCH11">UPNP-DEVICEARCH11</a></cite>].
  1.2892 +          <li>Let <var>device descriptor file</var> contain the contents of the file located at the <abbr title="Uniform Resource Locator">URL</abbr> provided in
  1.2893 +          <var>device descriptor <abbr title="Uniform Resource Locator">URL</abbr></var> obtained according to the rules defined in 'Section 2.11: Retrieving a
  1.2894 +          description using <abbr title="Hypertext Transfer Protocol">HTTP</abbr>' in [<cite><a href="#bib-UPNP-DEVICEARCH11" class="bibref">UPNP-DEVICEARCH11</a></cite>].
  1.2895            </li>
  1.2896 -          <li>Let <var>application url</var> be the value of the first occurrence of the
  1.2897 -            <code>Application-<abbr title="Uniform Resource Locator">URL</abbr></code> response header field obtained
  1.2898 -            according to the rules defined in 'Section 5.4: Device Description Response' in [<a href=
  1.2899 -            "https://sites.google.com/a/dial-multiscreen.org/dial/dial-protocol-specification"><abbr title=
  1.2900 -            "Discovery and Launch Protocol">DIAL</abbr></a>]
  1.2901 +          <li>Let <var>application url</var> be the value of the first occurrence of the <code>Application-<abbr title="Uniform Resource Locator">URL</abbr></code>
  1.2902 +          response header field obtained according to the rules defined in 'Section 5.4: Device Description Response'
  1.2903 +          in [<a href="https://sites.google.com/a/dial-multiscreen.org/dial/dial-protocol-specification"><abbr title="Discovery and Launch Protocol">DIAL</abbr></a>]
  1.2904            </li>
  1.2905 -          <li>If the value provided in <var>device descriptor <abbr title="Uniform Resource Locator">URL</abbr></var>
  1.2906 -          cannot be resolved as a reachable <abbr title="Uniform Resource Locator">URL</abbr> on the current network or
  1.2907 -          the <var>device descriptor file</var> remains empty or <var>application url</var> is undefined then it is
  1.2908 -          invalid and the <a href="#dfn-user-agent"
  1.2909 -                class="internalDFN">user agent</a> <em class="rfc2119"
  1.2910 -                title="must">must</em> abort any remaining steps and return.
  1.2911 +          <li>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
  1.2912 +          current network or the <var>device descriptor file</var> remains empty or <var>application url</var> is
  1.2913 +          undefined then it is invalid and the <a class="internalDFN" href="#dfn-user-agent">user agent</a> <em title="MUST" class="rfc2119">MUST</em> abort any remaining steps and return.
  1.2914            </li>
  1.2915 -          <li>Run the following steps to add the newly discovered <abbr title=
  1.2916 -          "Discovery and Launch Protocol">DIAL</abbr> service:
  1.2917 +          <li>Run the following steps to add the newly discovered <abbr title="Discovery and Launch Protocol">DIAL</abbr> service:
  1.2918              <ol class="rule">
  1.2919                <li>Let <var>network service record</var> be a new Object consisting of the following empty properties:
  1.2920                <code>id</code>, <code>deviceId</code>, <code>name</code>, <code>type</code>, <code>url</code>,
  1.2921 @@ -2319,45 +1728,36 @@
  1.2922                <li>Set <var>network service record</var>'s <code>expiryTimestamp</code> property to the value of the
  1.2923                current date, in UTC timestamp format, plus the value of <var>device expiry</var>.
  1.2924                </li>
  1.2925 -              <li>Run the general rule for <a href="#dfn-adding-an-available-service"
  1.2926 -                    class="internalDFN">adding an available service</a>, passing in the current <var>network service
  1.2927 -                    record</var> as the only argument.
  1.2928 +              <li>Run the general rule for <a class="internalDFN" href="#dfn-adding-an-available-service">adding an available service</a>, passing in the current <var>network
  1.2929 +              service record</var> as the only argument.
  1.2930                </li>
  1.2931              </ol>
  1.2932            </li>
  1.2933          </ol>
  1.2934        </section>
  1.2935        <section id="network-topology-monitoring">
  1.2936 -        <h3>
  1.2937 -          <span class="secno">7.4</span> Network Topology Monitoring
  1.2938 +        <h3><span class="secno">7.4 </span>
  1.2939 +          Network Topology Monitoring
  1.2940          </h3>
  1.2941          <div>
  1.2942            <p>
  1.2943 -            When the <a href="#dfn-user-agent"
  1.2944 -               class="internalDFN">user agent</a> detects that the user has dropped from a connected network then, for
  1.2945 -               each <var>existing service record</var> in the <a href="#dfn-list-of-available-service-records"
  1.2946 -               class="internalDFN">list of available service records</a> discovered via that network connection, the
  1.2947 -               <a href="#dfn-user-agent"
  1.2948 -               class="internalDFN">user agent</a> <em class="rfc2119"
  1.2949 -               title="must">must</em> run the general rule for <a href="#dfn-removing-an-available-service"
  1.2950 -               class="internalDFN">removing an available service</a> passing in each <var>existing service
  1.2951 -               record</var>'s <code>id</code> property as the only argument for each call.
  1.2952 +            When the <a class="internalDFN" href="#dfn-user-agent">user agent</a> detects that the user has dropped from a connected network then, for each
  1.2953 +            <var>existing service record</var> in the <a class="internalDFN" href="#dfn-list-of-available-service-records">list of available service records</a> discovered via that
  1.2954 +            network connection, the <a class="internalDFN" href="#dfn-user-agent">user agent</a> <em title="MUST" class="rfc2119">MUST</em> run the general rule for <a class="internalDFN" href="#dfn-removing-an-available-service">removing an available
  1.2955 +            service</a> passing in each <var>existing service record</var>'s <code>id</code> property as the only
  1.2956 +            argument for each call.
  1.2957            </p>
  1.2958            <p>
  1.2959 -            When the <a href="#dfn-user-agent"
  1.2960 -               class="internalDFN">user agent</a> detects that the user has connected to a new network or reconnected
  1.2961 -               to an existing network, then it <em class="rfc2119"
  1.2962 -               title="should">should</em> restart its discovery mechanisms as defined in the <a href=
  1.2963 -               "#service-discovery">Service Discovery</a> section of this specification, maintaining the existing
  1.2964 -               <a href="#dfn-list-of-active-service-managers"
  1.2965 -               class="internalDFN">list of active service managers</a> currently in use.
  1.2966 +            When the <a class="internalDFN" href="#dfn-user-agent">user agent</a> detects that the user has connected to a new network or reconnected to an
  1.2967 +            existing network, then it <em title="SHOULD" class="rfc2119">SHOULD</em> restart its discovery mechanisms as defined in the <a href="#service-discovery">Service Discovery</a> section of this specification, maintaining the existing <a class="internalDFN" href="#dfn-list-of-active-service-managers">list
  1.2968 +            of active service managers</a> currently in use.
  1.2969            </p>
  1.2970          </div>
  1.2971        </section>
  1.2972      </section>
  1.2973      <section id="events-summary">
  1.2974 -      <h2>
  1.2975 -        <span class="secno">8.</span> Events Summary
  1.2976 +      <!--OddPage--><h2><span class="secno">8. </span>
  1.2977 +        Events Summary
  1.2978        </h2>
  1.2979        <p>
  1.2980          The following events are dispatched on the <a href="#networkservices"><code>NetworkServices</code></a> and/or
  1.2981 @@ -2383,13 +1783,11 @@
  1.2982                <dfn id="event-serviceavailable"><code>serviceavailable</code></dfn>
  1.2983              </td>
  1.2984              <td>
  1.2985 -              <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event"
  1.2986 -                  class="externalDFN"><code>Event</code></a>
  1.2987 +              <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event" class="externalDFN"><code>Event</code></a>
  1.2988              </td>
  1.2989              <td>
  1.2990 -              When a <a href="#dfn-new-service"
  1.2991 -                  class="internalDFN">new service</a> that matches one of the <a>requested type tokens</a> is found in
  1.2992 -                  the current network.
  1.2993 +              When a <a class="internalDFN" href="#dfn-new-service">new service</a> that matches one of the <a>requested type tokens</a> is found in the current
  1.2994 +              network.
  1.2995              </td>
  1.2996            </tr>
  1.2997            <tr>
  1.2998 @@ -2397,13 +1795,11 @@
  1.2999                <dfn id="event-serviceunavailable"><code>serviceunavailable</code></dfn>
  1.3000              </td>
  1.3001              <td>
  1.3002 -              <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event"
  1.3003 -                  class="externalDFN"><code>Event</code></a>
  1.3004 +              <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event" class="externalDFN"><code>Event</code></a>
  1.3005              </td>
  1.3006              <td>
  1.3007 -              When an <a href="#dfn-existing-service"
  1.3008 -                  class="internalDFN">existing service</a> that matches one of the <a>requested type tokens</a>
  1.3009 -                  gracefully leaves or expires from the current network.
  1.3010 +              When an <a class="internalDFN" href="#dfn-existing-service">existing service</a> that matches one of the <a>requested type tokens</a> gracefully leaves or
  1.3011 +              expires from the current network.
  1.3012              </td>
  1.3013            </tr>
  1.3014            <tr>
  1.3015 @@ -2411,12 +1807,10 @@
  1.3016                <dfn id="event-serviceonline"><code>serviceonline</code></dfn>
  1.3017              </td>
  1.3018              <td>
  1.3019 -              <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event"
  1.3020 -                  class="externalDFN"><code>Event</code></a>
  1.3021 +              <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event" class="externalDFN"><code>Event</code></a>
  1.3022              </td>
  1.3023              <td>
  1.3024 -              When a <a href="#dfn-current-service"
  1.3025 -                  class="internalDFN">current service</a> renews its service registration within the current network.
  1.3026 +              When a <a class="internalDFN" href="#dfn-current-service">current service</a> renews its service registration within the current network.
  1.3027              </td>
  1.3028            </tr>
  1.3029            <tr>
  1.3030 @@ -2424,13 +1818,10 @@
  1.3031                <dfn id="event-serviceoffline"><code>serviceoffline</code></dfn>
  1.3032              </td>
  1.3033              <td>
  1.3034 -              <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event"
  1.3035 -                  class="externalDFN"><code>Event</code></a>
  1.3036 +              <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event" class="externalDFN"><code>Event</code></a>
  1.3037              </td>
  1.3038              <td>
  1.3039 -              When a <a href="#dfn-current-service"
  1.3040 -                  class="internalDFN">current service</a> gracefully leaves or otherwise expires from the current
  1.3041 -                  network.
  1.3042 +              When a <a class="internalDFN" href="#dfn-current-service">current service</a> gracefully leaves or otherwise expires from the current network.
  1.3043              </td>
  1.3044            </tr>
  1.3045            <tr>
  1.3046 @@ -2438,57 +1829,41 @@
  1.3047                <dfn id="event-notify"><code>notify</code></dfn>
  1.3048              </td>
  1.3049              <td>
  1.3050 -              <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event"
  1.3051 -                  class="externalDFN"><code>Event</code></a>
  1.3052 +              <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event" class="externalDFN"><code>Event</code></a>
  1.3053              </td>
  1.3054              <td>
  1.3055 -              When a valid UPnP Events Subscription Message is received on a <a href=
  1.3056 -              "#dfn-user-agent-generated-callback-url"
  1.3057 -                  class="internalDFN">user-agent generated callback url</a> for a <a href="#dfn-current-service"
  1.3058 -                  class="internalDFN">current service</a>. This event never fires for Zeroconf-based services.
  1.3059 +              When a valid UPnP Events Subscription Message is received on a <a class="internalDFN" href="#dfn-user-agent-generated-callback-url">user-agent generated callback url</a>
  1.3060 +              for a <a class="internalDFN" href="#dfn-current-service">current service</a>. This event never fires for Zeroconf-based services.
  1.3061              </td>
  1.3062            </tr>
  1.3063          </tbody>
  1.3064        </table>
  1.3065      </section>
  1.3066      <section id="garbage-collection">
  1.3067 -      <h2>
  1.3068 -        <span class="secno">9.</span> Garbage collection
  1.3069 +      <!--OddPage--><h2><span class="secno">9. </span>
  1.3070 +        Garbage collection
  1.3071        </h2>
  1.3072        <p>
  1.3073 -        A user agent <em class="rfc2119"
  1.3074 -           title="must">must</em> only garbage collect a <a href="#networkservices"
  1.3075 -           class="internalDFN"><code>NetworkServices</code></a> object and remove its entry from the <a href=
  1.3076 -           "#dfn-list-of-active-service-managers"
  1.3077 -           class="internalDFN">list of active service managers</a> when the user has navigated away from the <a href=
  1.3078 -           "http://www.whatwg.org/specs/web-apps/current-work/complete/browsers.html#entry-script"
  1.3079 -           class="externalDFN">entry script</a>'s <a href=
  1.3080 -           "http://www.whatwg.org/specs/web-apps/current-work/complete/origin-0.html#origin"
  1.3081 -           class="externalDFN">origin</a> in which the current <a href="#networkservices"
  1.3082 -           class="internalDFN"><code>NetworkServices</code></a> object was provided.
  1.3083 +        A user agent <em title="MUST" class="rfc2119">MUST</em> only garbage collect a <a class="internalDFN" href="#networkservices"><code>NetworkServices</code></a> object and remove its entry from
  1.3084 +        the <a class="internalDFN" href="#dfn-list-of-active-service-managers">list of active service managers</a> when the user has navigated away from the <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/browsers.html#entry-script" class="externalDFN">entry script</a>'s <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/origin-0.html#origin" class="externalDFN">origin</a> in which the current <a class="internalDFN" href="#networkservices"><code>NetworkServices</code></a> object was provided.
  1.3085        </p>
  1.3086        <p>
  1.3087 -        A user agent <em class="rfc2119"
  1.3088 -           title="must not">must not</em> garbage collect individual <a href="#networkservice"
  1.3089 -           class="internalDFN"><code>NetworkService</code></a> objects until their parent <a href="#networkservices"
  1.3090 -           class="internalDFN"><code>NetworkServices</code></a> object has been garbage collected.
  1.3091 +        A user agent <em title="MUST NOT" class="rfc2119">MUST NOT</em> garbage collect individual <a class="internalDFN" href="#networkservice"><code>NetworkService</code></a> objects until their parent
  1.3092 +        <a class="internalDFN" href="#networkservices"><code>NetworkServices</code></a> object has been garbage collected.
  1.3093        </p>
  1.3094        <p>
  1.3095 -        A user agent <em class="rfc2119"
  1.3096 -           title="must">must</em> garbage collect the <a href="#networkservice"
  1.3097 -           class="internalDFN"><code>NetworkService</code></a> <a href="#dfn-indexed-properties-1"
  1.3098 -           class="internalDFN">indexed properties</a> of a <a href="#networkservices"
  1.3099 -           class="internalDFN"><code>NetworkServices</code></a> object when that <a href="#networkservices"
  1.3100 -           class="internalDFN"><code>NetworkServices</code></a> object itself has been garbage-collected.
  1.3101 +        A user agent <em title="MUST" class="rfc2119">MUST</em> garbage collect the <a class="internalDFN" href="#networkservice"><code>NetworkService</code></a> <a class="internalDFN" href="#dfn-indexed-properties-1">indexed properties</a> of a
  1.3102 +        <a class="internalDFN" href="#networkservices"><code>NetworkServices</code></a> object, passing each indexed property's <code>id</code> attribute as the
  1.3103 +        only argument to the rule for <a class="internalDFN" href="#dfn-removing-an-available-service">removing an available service</a><a>, when that </a><a class="internalDFN" href="#networkservices"><code>NetworkServices</code></a> object itself has been
  1.3104 +        garbage-collected.
  1.3105        </p>
  1.3106      </section>
  1.3107      <section id="use-cases-and-requirements">
  1.3108 -      <h2>
  1.3109 -        <span class="secno">10.</span> Use Cases and Requirements
  1.3110 +      <!--OddPage--><h2><span class="secno">10. </span>
  1.3111 +        Use Cases and Requirements
  1.3112        </h2>
  1.3113        <p>
  1.3114 -        This section covers what the requirements are for this <abbr title=
  1.3115 -        "Application Programming Interface">API</abbr>, as well as illustrates some use cases.
  1.3116 +        This section covers what the requirements are for this <abbr title="Application Programming Interface">API</abbr>, as well as illustrates some use cases.
  1.3117        </p>
  1.3118        <ul class="rule">
  1.3119          <li>Once a user has given permission, user agents should provide the ability for Web pages to communicate
  1.3120 @@ -2549,22 +1924,17 @@
  1.3121              </li>
  1.3122            </ul>
  1.3123          </li>
  1.3124 -        <li>User agents should provide an <abbr title="Application Programming Interface">API</abbr> exposed to script
  1.3125 -        that exposes the features above. The user is notified by UI anytime interaction with Local-networked Services
  1.3126 -        is requested, giving the user full ability to cancel or abort the transaction. The user selects the
  1.3127 -        Local-networked Services to be connected to the current Web page, and can cancel these at any time. No
  1.3128 -        invocations to these APIs occur silently without user intervention.
  1.3129 +        <li>User agents should provide an <abbr title="Application Programming Interface">API</abbr> exposed to script that exposes the features above. The user is notified
  1.3130 +        by UI anytime interaction with Local-networked Services is requested, giving the user full ability to cancel or
  1.3131 +        abort the transaction. The user selects the Local-networked Services to be connected to the current Web page,
  1.3132 +        and can cancel these at any time. No invocations to these APIs occur silently without user intervention.
  1.3133          </li>
  1.3134        </ul>
  1.3135      </section>
  1.3136 -    <section class="informative appendix"
  1.3137 -             id="examples">
  1.3138 -      <h2>
  1.3139 -        <span class="secno">A.</span> Examples
  1.3140 -      </h2>
  1.3141 -      <p>
  1.3142 -        <em>This section is non-normative.</em>
  1.3143 -      </p>
  1.3144 +    <section id="examples" class="informative appendix">
  1.3145 +      <!--OddPage--><h2><span class="secno">A. </span>
  1.3146 +        Examples
  1.3147 +      </h2><p><em>This section is non-normative.</em></p>
  1.3148        <div class="example">
  1.3149          <p>
  1.3150            This sample code exposes a button. When clicked, this button is disabled and the user is prompted to offer a
  1.3151 @@ -2584,148 +1954,63 @@
  1.3152            Server</a>.
  1.3153          </p>
  1.3154          <hr>
  1.3155 -        <pre class="highlight prettyprint">
  1.3156 -<span class="tag">&lt;input</span><span class="pln"> </span><span class="atn">type</span><span class=
  1.3157 -"pun">=</span><span class="atv">"button"</span><span class="pln"> </span><span class="atn">value</span><span class=
  1.3158 -"pun">=</span><span class="atv">"Start"</span><span class="pln"> </span><span class="atn">onclick</span><span class=
  1.3159 -"pun">=</span><span class="atv">"</span><span class="pln">start</span><span class="pun">()</span><span class=
  1.3160 -"atv">"</span><span class="pln"> </span><span class="atn">id</span><span class="pun">=</span><span class=
  1.3161 -"atv">"startBtn"</span><span class="tag">/&gt;</span><span class="pln">
  1.3162 -</span><span class="tag">&lt;div</span><span class="pln"> </span><span class="atn">id</span><span class=
  1.3163 -"pun">=</span><span class="atv">"debugconsole"</span><span class="tag">&gt;&lt;/div&gt;</span><span class="pln">
  1.3164 +        <pre class="highlight prettyprint"><span class="tag">&lt;input</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"button"</span><span class="pln"> </span><span class="atn">value</span><span class="pun">=</span><span class="atv">"Start"</span><span class="pln"> </span><span class="atn">onclick</span><span class="pun">=</span><span class="atv">"</span><span class="pln">start</span><span class="pun">()</span><span class="atv">"</span><span class="pln"> </span><span class="atn">id</span><span class="pun">=</span><span class="atv">"startBtn"</span><span class="tag">/&gt;</span><span class="pln">
  1.3165 +</span><span class="tag">&lt;div</span><span class="pln"> </span><span class="atn">id</span><span class="pun">=</span><span class="atv">"debugconsole"</span><span class="tag">&gt;&lt;/div&gt;</span><span class="pln">
  1.3166  
  1.3167  </span><span class="tag">&lt;script&gt;</span><span class="pln">
  1.3168 - </span><span class="kwd">var</span><span class="pln"> startBtn </span><span class="pun">=</span><span class=
  1.3169 -"pln"> document</span><span class="pun">.</span><span class="pln">getElementById</span><span class=
  1.3170 -"pun">(</span><span class="str">'startBtn'</span><span class="pun">),</span><span class="pln">
  1.3171 -     debug </span><span class="pun">=</span><span class="pln"> document</span><span class="pun">.</span><span class=
  1.3172 -"pln">getElementById</span><span class="pun">(</span><span class="str">'debugconsole'</span><span class=
  1.3173 -"pun">);</span><span class="pln">
  1.3174 + </span><span class="kwd">var</span><span class="pln"> startBtn </span><span class="pun">=</span><span class="pln"> document</span><span class="pun">.</span><span class="pln">getElementById</span><span class="pun">(</span><span class="str">'startBtn'</span><span class="pun">),</span><span class="pln">
  1.3175 +     debug </span><span class="pun">=</span><span class="pln"> document</span><span class="pun">.</span><span class="pln">getElementById</span><span class="pun">(</span><span class="str">'debugconsole'</span><span class="pun">);</span><span class="pln">
  1.3176  
  1.3177 - </span><span class="kwd">function</span><span class="pln"> start</span><span class="pun">()</span><span class=
  1.3178 -"pln"> </span><span class="pun">{</span><span class="pln">
  1.3179 -   </span><span class="kwd">if</span><span class="pun">(</span><span class="pln">navigator</span><span class=
  1.3180 -"pun">.</span><span class="pln">getNetworkServices</span><span class="pun">)</span><span class=
  1.3181 -"pln"> </span><span class="pun">{</span><span class="pln">
  1.3182 -      navigator</span><span class="pun">.</span><span class="pln">getNetworkServices</span><span class=
  1.3183 -"pun">(</span><span class="str">'zeroconf:_xbmc-jsonrpc._tcp'</span><span class="pun">,</span><span class=
  1.3184 -"pln"> gotXBMCService</span><span class="pun">,</span><span class="pln"> error</span><span class=
  1.3185 -"pun">);</span><span class="pln">
  1.3186 -      startBtn</span><span class="pun">.</span><span class="pln">disabled </span><span class="pun">=</span><span class=
  1.3187 -"pln"> </span><span class="kwd">true</span><span class="pun">;</span><span class="pln">
  1.3188 -   </span><span class="pun">}</span><span class="pln"> </span><span class="kwd">else</span><span class=
  1.3189 -"pln"> </span><span class="pun">{</span><span class="pln">
  1.3190 -      debug</span><span class="pun">.</span><span class="pln">innerHTML </span><span class="pun">+=</span><span class=
  1.3191 -"pln"> </span><span class="str">"&lt;br&gt;Service Discovery not supported!"</span><span class=
  1.3192 -"pun">;</span><span class="pln">
  1.3193 + </span><span class="kwd">function</span><span class="pln"> start</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
  1.3194 +   </span><span class="kwd">if</span><span class="pun">(</span><span class="pln">navigator</span><span class="pun">.</span><span class="pln">getNetworkServices</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
  1.3195 +      navigator</span><span class="pun">.</span><span class="pln">getNetworkServices</span><span class="pun">(</span><span class="str">'zeroconf:_xbmc-jsonrpc._tcp'</span><span class="pun">,</span><span class="pln"> gotXBMCService</span><span class="pun">,</span><span class="pln"> error</span><span class="pun">);</span><span class="pln">
  1.3196 +      startBtn</span><span class="pun">.</span><span class="pln">disabled </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">true</span><span class="pun">;</span><span class="pln">
  1.3197 +   </span><span class="pun">}</span><span class="pln"> </span><span class="kwd">else</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
  1.3198 +      debug</span><span class="pun">.</span><span class="pln">innerHTML </span><span class="pun">+=</span><span class="pln"> </span><span class="str">"&lt;br&gt;Service Discovery not supported!"</span><span class="pun">;</span><span class="pln">
  1.3199     </span><span class="pun">}</span><span class="pln">
  1.3200   </span><span class="pun">}</span><span class="pln">
  1.3201  
  1.3202 - </span><span class="kwd">function</span><span class="pln"> gotXBMCService</span><span class="pun">(</span><span class=
  1.3203 -"pln">services</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
  1.3204 + </span><span class="kwd">function</span><span class="pln"> gotXBMCService</span><span class="pun">(</span><span class="pln">services</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
  1.3205  
  1.3206  </span><span class="com">// Listen for service disconnect messages</span><span class="pln">
  1.3207  
  1.3208 -   services</span><span class="pun">[</span><span class="lit">0</span><span class="pun">].</span><span class=
  1.3209 -"pln">addEventListener</span><span class="pun">(</span><span class="str">'serviceoffline'</span><span class=
  1.3210 -"pun">,</span><span class="pln"> </span><span class="kwd">function</span><span class="pln"> </span><span class=
  1.3211 -"pun">(</span><span class="pln"> e </span><span class="pun">)</span><span class="pln"> </span><span class=
  1.3212 -"pun">{</span><span class="pln">
  1.3213 -       debug</span><span class="pun">.</span><span class="pln">innerHTML </span><span class="pun">+=</span><span class=
  1.3214 -"pln"> </span><span class="str">"&lt;br&gt;"</span><span class="pln"> </span><span class="pun">+</span><span class=
  1.3215 -"pln"> services</span><span class="pun">[</span><span class="lit">0</span><span class="pun">].</span><span class=
  1.3216 -"pln">name </span><span class="pun">+</span><span class="pln"> </span><span class=
  1.3217 -"str">" disconnected."</span><span class="pun">;</span><span class="pln">
  1.3218 -       startBtn</span><span class="pun">.</span><span class="pln">disabled </span><span class=
  1.3219 -"pun">=</span><span class="pln"> </span><span class="kwd">false</span><span class="pun">;</span><span class="pln">
  1.3220 -   </span><span class="pun">},</span><span class="pln"> </span><span class="kwd">false</span><span class=
  1.3221 -"pun">);</span><span class="pln">
  1.3222 +   services</span><span class="pun">[</span><span class="lit">0</span><span class="pun">].</span><span class="pln">addEventListener</span><span class="pun">(</span><span class="str">'serviceoffline'</span><span class="pun">,</span><span class="pln"> </span><span class="kwd">function</span><span class="pln"> </span><span class="pun">(</span><span class="pln"> e </span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
  1.3223 +       debug</span><span class="pun">.</span><span class="pln">innerHTML </span><span class="pun">+=</span><span class="pln"> </span><span class="str">"&lt;br&gt;"</span><span class="pln"> </span><span class="pun">+</span><span class="pln"> services</span><span class="pun">[</span><span class="lit">0</span><span class="pun">].</span><span class="pln">name </span><span class="pun">+</span><span class="pln"> </span><span class="str">" disconnected."</span><span class="pun">;</span><span class="pln">
  1.3224 +       startBtn</span><span class="pun">.</span><span class="pln">disabled </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">false</span><span class="pun">;</span><span class="pln">
  1.3225 +   </span><span class="pun">},</span><span class="pln"> </span><span class="kwd">false</span><span class="pun">);</span><span class="pln">
  1.3226  
  1.3227 -</span><span class=
  1.3228 -"com">// Send a service message to get albums list (and process the service response)</span><span class="pln">
  1.3229 +</span><span class="com">// Send a service message to get albums list (and process the service response)</span><span class="pln">
  1.3230  
  1.3231 -   </span><span class="kwd">var</span><span class="pln"> svcXhr </span><span class="pun">=</span><span class=
  1.3232 -"pln"> </span><span class="kwd">new</span><span class="pln"> </span><span class="typ">XMLHttpRequest</span><span class=
  1.3233 -"pun">();</span><span class="pln">
  1.3234 -   svcXhr</span><span class="pun">.</span><span class="pln">open</span><span class="pun">(</span><span class=
  1.3235 -"str">"POST"</span><span class="pun">,</span><span class="pln"> services</span><span class="pun">[</span><span class=
  1.3236 -"lit">0</span><span class="pun">].</span><span class="pln">url </span><span class="pun">+</span><span class=
  1.3237 -"pln"> </span><span class="str">"/getAlbums"</span><span class="pun">);</span><span class="pln"> </span><span class=
  1.3238 -"com">// services[0].url and its sub-resources have been</span><span class="pln">
  1.3239 -                                                        </span><span class=
  1.3240 -"com">// whitelisted for cross-site XHR use in this</span><span class="pln">
  1.3241 -                                                        </span><span class=
  1.3242 -"com">// current browsing context.</span><span class="pln">
  1.3243 +   </span><span class="kwd">var</span><span class="pln"> svcXhr </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">new</span><span class="pln"> </span><span class="typ">XMLHttpRequest</span><span class="pun">();</span><span class="pln">
  1.3244 +   svcXhr</span><span class="pun">.</span><span class="pln">open</span><span class="pun">(</span><span class="str">"POST"</span><span class="pun">,</span><span class="pln"> services</span><span class="pun">[</span><span class="lit">0</span><span class="pun">].</span><span class="pln">url </span><span class="pun">+</span><span class="pln"> </span><span class="str">"/getAlbums"</span><span class="pun">);</span><span class="pln"> </span><span class="com">// services[0].url and its sub-resources have been</span><span class="pln">
  1.3245 +                                                        </span><span class="com">// whitelisted for cross-site XHR use in this</span><span class="pln">
  1.3246 +                                                        </span><span class="com">// current browsing context.</span><span class="pln">
  1.3247  
  1.3248 -   svcXhr</span><span class="pun">.</span><span class="pln">setRequestHeader</span><span class=
  1.3249 -"pun">(</span><span class="str">'Content-Type'</span><span class="pun">,</span><span class="pln"> </span><span class=
  1.3250 -"str">'application/json-rpc'</span><span class="pun">);</span><span class="pln">
  1.3251 +   svcXhr</span><span class="pun">.</span><span class="pln">setRequestHeader</span><span class="pun">(</span><span class="str">'Content-Type'</span><span class="pun">,</span><span class="pln"> </span><span class="str">'application/json-rpc'</span><span class="pun">);</span><span class="pln">
  1.3252  
  1.3253 -   svcXhr</span><span class="pun">.</span><span class="pln">addEventListener</span><span class=
  1.3254 -"pun">(</span><span class="str">'readystatechange'</span><span class="pun">,</span><span class=
  1.3255 -"pln"> </span><span class="kwd">function</span><span class="pln"> </span><span class="pun">(</span><span class=
  1.3256 -"pln"> response </span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
  1.3257 -     </span><span class="kwd">if</span><span class="pun">(</span><span class="pln"> response</span><span class=
  1.3258 -"pun">.</span><span class="pln">readyState </span><span class="pun">!=</span><span class="pln"> </span><span class=
  1.3259 -"lit">4</span><span class="pln"> </span><span class="pun">||</span><span class="pln"> response</span><span class=
  1.3260 -"pun">.</span><span class="pln">status </span><span class="pun">!=</span><span class="pln"> </span><span class=
  1.3261 -"lit">200</span><span class="pln"> </span><span class="pun">)</span><span class="pln">
  1.3262 +   svcXhr</span><span class="pun">.</span><span class="pln">addEventListener</span><span class="pun">(</span><span class="str">'readystatechange'</span><span class="pun">,</span><span class="pln"> </span><span class="kwd">function</span><span class="pln"> </span><span class="pun">(</span><span class="pln"> response </span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
  1.3263 +     </span><span class="kwd">if</span><span class="pun">(</span><span class="pln"> response</span><span class="pun">.</span><span class="pln">readyState </span><span class="pun">!=</span><span class="pln"> </span><span class="lit">4</span><span class="pln"> </span><span class="pun">||</span><span class="pln"> response</span><span class="pun">.</span><span class="pln">status </span><span class="pun">!=</span><span class="pln"> </span><span class="lit">200</span><span class="pln"> </span><span class="pun">)</span><span class="pln">
  1.3264          </span><span class="kwd">return</span><span class="pun">;</span><span class="pln">
  1.3265 -     debug</span><span class="pun">.</span><span class="pln">innerHTML </span><span class="pun">+=</span><span class=
  1.3266 -"pln"> </span><span class="str">"&lt;br&gt;"</span><span class="pln"> </span><span class="pun">+</span><span class=
  1.3267 -"pln"> services</span><span class="pun">[</span><span class="lit">0</span><span class="pun">].</span><span class=
  1.3268 -"pln">name </span><span class="pun">+</span><span class="pln"> </span><span class=
  1.3269 -"str">" response received: "</span><span class="pun">;</span><span class="pln">
  1.3270 -     debug</span><span class="pun">.</span><span class="pln">textContent </span><span class="pun">+=</span><span class=
  1.3271 -"pln"> JSON</span><span class="pun">.</span><span class="pln">parse</span><span class="pun">(</span><span class=
  1.3272 -"pln">response</span><span class="pun">.</span><span class="pln">responseText</span><span class=
  1.3273 -"pun">);</span><span class="pln">
  1.3274 -   </span><span class="pun">},</span><span class="pln"> </span><span class="kwd">false</span><span class=
  1.3275 -"pun">);</span><span class="pln">
  1.3276 +     debug</span><span class="pun">.</span><span class="pln">innerHTML </span><span class="pun">+=</span><span class="pln"> </span><span class="str">"&lt;br&gt;"</span><span class="pln"> </span><span class="pun">+</span><span class="pln"> services</span><span class="pun">[</span><span class="lit">0</span><span class="pun">].</span><span class="pln">name </span><span class="pun">+</span><span class="pln"> </span><span class="str">" response received: "</span><span class="pun">;</span><span class="pln">
  1.3277 +     debug</span><span class="pun">.</span><span class="pln">textContent </span><span class="pun">+=</span><span class="pln"> JSON</span><span class="pun">.</span><span class="pln">parse</span><span class="pun">(</span><span class="pln">response</span><span class="pun">.</span><span class="pln">responseText</span><span class="pun">);</span><span class="pln">
  1.3278 +   </span><span class="pun">},</span><span class="pln"> </span><span class="kwd">false</span><span class="pun">);</span><span class="pln">
  1.3279  
  1.3280 -   </span><span class="kwd">var</span><span class="pln"> svcMsg </span><span class="pun">=</span><span class=
  1.3281 -"pln"> </span><span class="pun">[</span><span class="pln">
  1.3282 -     </span><span class="pun">{</span><span class="pln"> </span><span class="str">"jsonrpc"</span><span class=
  1.3283 -"pun">:</span><span class="pln"> </span><span class="str">"2.0"</span><span class="pun">,</span><span class=
  1.3284 -"pln"> </span><span class="str">"method"</span><span class="pun">:</span><span class="pln"> </span><span class=
  1.3285 -"str">"AudioLibrary.GetAlbums"</span><span class="pun">,</span><span class="pln"> </span><span class=
  1.3286 -"str">"params"</span><span class="pun">:</span><span class="pln"> </span><span class="pun">{</span><span class=
  1.3287 -"pln"> </span><span class="str">"genreid"</span><span class="pun">:</span><span class="pln"> </span><span class=
  1.3288 -"pun">-</span><span class="lit">1</span><span class="pun">,</span><span class="pln">
  1.3289 -         </span><span class="str">"artistid"</span><span class="pun">:</span><span class="pln"> </span><span class=
  1.3290 -"pun">-</span><span class="lit">1</span><span class="pun">,</span><span class="pln"> </span><span class=
  1.3291 -"str">"start"</span><span class="pun">:</span><span class="pln"> </span><span class="pun">-</span><span class=
  1.3292 -"lit">1</span><span class="pun">,</span><span class="pln"> </span><span class="str">"end"</span><span class=
  1.3293 -"pun">:</span><span class="pln"> </span><span class="pun">-</span><span class="lit">1</span><span class=
  1.3294 -"pln"> </span><span class="pun">},</span><span class="pln"> </span><span class="str">"id"</span><span class=
  1.3295 -"pun">:</span><span class="pln"> </span><span class="str">"1"</span><span class="pln"> </span><span class=
  1.3296 -"pun">}</span><span class="pln">
  1.3297 +   </span><span class="kwd">var</span><span class="pln"> svcMsg </span><span class="pun">=</span><span class="pln"> </span><span class="pun">[</span><span class="pln">
  1.3298 +     </span><span class="pun">{</span><span class="pln"> </span><span class="str">"jsonrpc"</span><span class="pun">:</span><span class="pln"> </span><span class="str">"2.0"</span><span class="pun">,</span><span class="pln"> </span><span class="str">"method"</span><span class="pun">:</span><span class="pln"> </span><span class="str">"AudioLibrary.GetAlbums"</span><span class="pun">,</span><span class="pln"> </span><span class="str">"params"</span><span class="pun">:</span><span class="pln"> </span><span class="pun">{</span><span class="pln"> </span><span class="str">"genreid"</span><span class="pun">:</span><span class="pln"> </span><span class="pun">-</span><span class="lit">1</span><span class="pun">,</span><span class="pln">
  1.3299 +         </span><span class="str">"artistid"</span><span class="pun">:</span><span class="pln"> </span><span class="pun">-</span><span class="lit">1</span><span class="pun">,</span><span class="pln"> </span><span class="str">"start"</span><span class="pun">:</span><span class="pln"> </span><span class="pun">-</span><span class="lit">1</span><span class="pun">,</span><span class="pln"> </span><span class="str">"end"</span><span class="pun">:</span><span class="pln"> </span><span class="pun">-</span><span class="lit">1</span><span class="pln"> </span><span class="pun">},</span><span class="pln"> </span><span class="str">"id"</span><span class="pun">:</span><span class="pln"> </span><span class="str">"1"</span><span class="pln"> </span><span class="pun">}</span><span class="pln">
  1.3300     </span><span class="pun">];</span><span class="pln">
  1.3301  
  1.3302 -   svcXhr</span><span class="pun">.</span><span class="pln">send</span><span class="pun">(</span><span class=
  1.3303 -"pln">JSON</span><span class="pun">.</span><span class="pln">stringify</span><span class="pun">(</span><span class=
  1.3304 -"pln">svcMsg</span><span class="pun">));</span><span class="pln">
  1.3305 -   debug</span><span class="pun">.</span><span class="pln">innerHTML </span><span class="pun">+=</span><span class=
  1.3306 -"pln"> </span><span class="str">"&lt;br&gt;"</span><span class="pln"> </span><span class="pun">+</span><span class=
  1.3307 -"pln"> services</span><span class="pun">[</span><span class="lit">0</span><span class="pun">].</span><span class=
  1.3308 -"pln">name </span><span class="pun">+</span><span class="pln"> </span><span class=
  1.3309 -"str">" request sent: "</span><span class="pun">;</span><span class="pln">
  1.3310 -   debug</span><span class="pun">.</span><span class="pln">textContent </span><span class="pun">+=</span><span class=
  1.3311 -"pln"> JSON</span><span class="pun">.</span><span class="pln">stringify</span><span class="pun">(</span><span class=
  1.3312 -"pln">svcMsg</span><span class="pun">);</span><span class="pln">
  1.3313 +   svcXhr</span><span class="pun">.</span><span class="pln">send</span><span class="pun">(</span><span class="pln">JSON</span><span class="pun">.</span><span class="pln">stringify</span><span class="pun">(</span><span class="pln">svcMsg</span><span class="pun">));</span><span class="pln">
  1.3314 +   debug</span><span class="pun">.</span><span class="pln">innerHTML </span><span class="pun">+=</span><span class="pln"> </span><span class="str">"&lt;br&gt;"</span><span class="pln"> </span><span class="pun">+</span><span class="pln"> services</span><span class="pun">[</span><span class="lit">0</span><span class="pun">].</span><span class="pln">name </span><span class="pun">+</span><span class="pln"> </span><span class="str">" request sent: "</span><span class="pun">;</span><span class="pln">
  1.3315 +   debug</span><span class="pun">.</span><span class="pln">textContent </span><span class="pun">+=</span><span class="pln"> JSON</span><span class="pun">.</span><span class="pln">stringify</span><span class="pun">(</span><span class="pln">svcMsg</span><span class="pun">);</span><span class="pln">
  1.3316  
  1.3317   </span><span class="pun">}</span><span class="pln">
  1.3318  
  1.3319 - </span><span class="kwd">function</span><span class="pln"> error</span><span class="pun">(</span><span class=
  1.3320 -"pln"> err </span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
  1.3321 -   debug</span><span class="pun">.</span><span class="pln">innerHTML </span><span class="pun">+=</span><span class=
  1.3322 -"pln"> </span><span class="str">"&lt;br&gt;An error occurred obtaining a local network service."</span><span class=
  1.3323 -"pun">;</span><span class="pln">
  1.3324 -   startBtn</span><span class="pun">.</span><span class="pln">disabled </span><span class="pun">=</span><span class=
  1.3325 -"pln"> </span><span class="kwd">false</span><span class="pun">;</span><span class="pln">
  1.3326 + </span><span class="kwd">function</span><span class="pln"> error</span><span class="pun">(</span><span class="pln"> err </span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
  1.3327 +   debug</span><span class="pun">.</span><span class="pln">innerHTML </span><span class="pun">+=</span><span class="pln"> </span><span class="str">"&lt;br&gt;An error occurred obtaining a local network service."</span><span class="pun">;</span><span class="pln">
  1.3328 +   startBtn</span><span class="pun">.</span><span class="pln">disabled </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">false</span><span class="pun">;</span><span class="pln">
  1.3329   </span><span class="pun">}</span><span class="pln">
  1.3330 -</span><span class="tag">&lt;/script&gt;</span>
  1.3331 -</pre>
  1.3332 +</span><span class="tag">&lt;/script&gt;</span></pre>
  1.3333        </div>
  1.3334        <div class="example">
  1.3335          <p>
  1.3336 @@ -2740,267 +2025,113 @@
  1.3337            format supported by the device.
  1.3338          </p>
  1.3339          <hr>
  1.3340 -        <pre class="highlight prettyprint">
  1.3341 -<span class="tag">&lt;select</span><span class="pln"> </span><span class="atn">name</span><span class=
  1.3342 -"pun">=</span><span class="atv">"make"</span><span class="pln"> </span><span class="atn">id</span><span class=
  1.3343 -"pun">=</span><span class="atv">"make"</span><span class="tag">&gt;</span><span class="pln">
  1.3344 -  </span><span class="tag">&lt;option</span><span class="pln"> </span><span class="atn">selected</span><span class=
  1.3345 -"pun">=</span><span class="atv">"selected"</span><span class="pln"> </span><span class=
  1.3346 -"atn">disabled</span><span class="pun">=</span><span class="atv">"disabled"</span><span class=
  1.3347 -"tag">&gt;</span><span class="pln">Select make</span><span class="tag">&lt;/option&gt;</span><span class="pln">
  1.3348 -  </span><span class="tag">&lt;option&gt;</span><span class="pln">Sony</span><span class=
  1.3349 -"tag">&lt;/option&gt;</span><span class="pln">
  1.3350 -  </span><span class="tag">&lt;option&gt;</span><span class="pln">Philips</span><span class=
  1.3351 -"tag">&lt;/option&gt;</span><span class="pln">
  1.3352 -  </span><span class="tag">&lt;option&gt;</span><span class="pln">Alba</span><span class=
  1.3353 -"tag">&lt;/option&gt;</span><span class="pln">
  1.3354 +        <pre class="highlight prettyprint"><span class="tag">&lt;select</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"make"</span><span class="pln"> </span><span class="atn">id</span><span class="pun">=</span><span class="atv">"make"</span><span class="tag">&gt;</span><span class="pln">
  1.3355 +  </span><span class="tag">&lt;option</span><span class="pln"> </span><span class="atn">selected</span><span class="pun">=</span><span class="atv">"selected"</span><span class="pln"> </span><span class="atn">disabled</span><span class="pun">=</span><span class="atv">"disabled"</span><span class="tag">&gt;</span><span class="pln">Select make</span><span class="tag">&lt;/option&gt;</span><span class="pln">
  1.3356 +  </span><span class="tag">&lt;option&gt;</span><span class="pln">Sony</span><span class="tag">&lt;/option&gt;</span><span class="pln">
  1.3357 +  </span><span class="tag">&lt;option&gt;</span><span class="pln">Philips</span><span class="tag">&lt;/option&gt;</span><span class="pln">
  1.3358 +  </span><span class="tag">&lt;option&gt;</span><span class="pln">Alba</span><span class="tag">&lt;/option&gt;</span><span class="pln">
  1.3359  </span><span class="tag">&lt;/select&gt;</span><span class="pln">
  1.3360 -</span><span class="tag">&lt;select</span><span class="pln"> </span><span class="atn">name</span><span class=
  1.3361 -"pun">=</span><span class="atv">"model"</span><span class="pln"> </span><span class="atn">id</span><span class=
  1.3362 -"pun">=</span><span class="atv">"model"</span><span class="tag">&gt;&lt;/select&gt;</span><span class="pln">
  1.3363 -</span><span class="tag">&lt;div</span><span class="pln"> </span><span class="atn">id</span><span class=
  1.3364 -"pun">=</span><span class="atv">"debugconsole"</span><span class="tag">&gt;&lt;/div&gt;</span><span class="pln">
  1.3365 +</span><span class="tag">&lt;select</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"model"</span><span class="pln"> </span><span class="atn">id</span><span class="pun">=</span><span class="atv">"model"</span><span class="tag">&gt;&lt;/select&gt;</span><span class="pln">
  1.3366 +</span><span class="tag">&lt;div</span><span class="pln"> </span><span class="atn">id</span><span class="pun">=</span><span class="atv">"debugconsole"</span><span class="tag">&gt;&lt;/div&gt;</span><span class="pln">
  1.3367  
  1.3368  </span><span class="tag">&lt;script&gt;</span><span class="pln">
  1.3369 -  </span><span class="kwd">var</span><span class="pln"> debug </span><span class="pun">=</span><span class=
  1.3370 -"pln"> document</span><span class="pun">.</span><span class="pln">getElementById</span><span class=
  1.3371 -"pun">(</span><span class="str">'debugconsole'</span><span class="pun">);</span><span class="pln">
  1.3372 +  </span><span class="kwd">var</span><span class="pln"> debug </span><span class="pun">=</span><span class="pln"> document</span><span class="pun">.</span><span class="pln">getElementById</span><span class="pun">(</span><span class="str">'debugconsole'</span><span class="pun">);</span><span class="pln">
  1.3373  
  1.3374 -  </span><span class="kwd">var</span><span class="pln"> models </span><span class="pun">=</span><span class=
  1.3375 -"pln"> </span><span class="pun">{</span><span class="pln">
  1.3376 -    </span><span class="str">"Sony"</span><span class="pun">:</span><span class="pln"> </span><span class=
  1.3377 -"pun">[</span><span class="pln">
  1.3378 -      </span><span class="pun">{</span><span class="str">"name"</span><span class="pun">:</span><span class=
  1.3379 -"pln"> </span><span class="str">"Bravia TV S1000"</span><span class="pun">,</span><span class=
  1.3380 -"pln"> </span><span class="str">"type"</span><span class="pun">:</span><span class="pln"> </span><span class=
  1.3381 -"str">"upnp"</span><span class="pun">,</span><span class="pln"> </span><span class="str">"service"</span><span class=
  1.3382 -"pun">:</span><span class="pln"> </span><span class=
  1.3383 -"str">"urn:schemas-upnp-org:service:RenderingControl:1"</span><span class="pln"> </span><span class=
  1.3384 -"pun">},</span><span class="pln">
  1.3385 -      </span><span class="pun">{</span><span class="str">"name"</span><span class="pun">:</span><span class=
  1.3386 -"pln"> </span><span class="str">"Bravia TV S2000"</span><span class="pun">,</span><span class=
  1.3387 -"pln"> </span><span class="str">"type"</span><span class="pun">:</span><span class="pln"> </span><span class=
  1.3388 -"str">"zeroconf"</span><span class="pun">,</span><span class="pln"> </span><span class=
  1.3389 -"str">"service"</span><span class="pun">:</span><span class="pln"> </span><span class=
  1.3390 -"str">"_mediarenderer._http._tcp"</span><span class="pln"> </span><span class="pun">},</span><span class="pln">
  1.3391 -      </span><span class="pun">{</span><span class="str">"name"</span><span class="pun">:</span><span class=
  1.3392 -"pln"> </span><span class="str">"HiFi WD10"</span><span class="pun">,</span><span class="pln"> </span><span class=
  1.3393 -"str">"type"</span><span class="pun">:</span><span class="pln"> </span><span class="str">"upnp"</span><span class=
  1.3394 -"pun">,</span><span class="pln"> </span><span class="str">"service"</span><span class="pun">:</span><span class=
  1.3395 -"pln"> </span><span class="str">"urn:schemas-upnp-org:service:RenderingControl:1"</span><span class=
  1.3396 -"pln"> </span><span class="pun">}</span><span class="pln">
  1.3397 +  </span><span class="kwd">var</span><span class="pln"> models </span><span class="pun">=</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
  1.3398 +    </span><span class="str">"Sony"</span><span class="pun">:</span><span class="pln"> </span><span class="pun">[</span><span class="pln">
  1.3399 +      </span><span class="pun">{</span><span class="str">"name"</span><span class="pun">:</span><span class="pln"> </span><span class="str">"Bravia TV S1000"</span><span class="pun">,</span><span class="pln"> </span><span class="str">"type"</span><span class="pun">:</span><span class="pln"> </span><span class="str">"upnp"</span><span class="pun">,</span><span class="pln"> </span><span class="str">"service"</span><span class="pun">:</span><span class="pln"> </span><span class="str">"urn:schemas-upnp-org:service:RenderingControl:1"</span><span class="pln"> </span><span class="pun">},</span><span class="pln">
  1.3400 +      </span><span class="pun">{</span><span class="str">"name"</span><span class="pun">:</span><span class="pln"> </span><span class="str">"Bravia TV S2000"</span><span class="pun">,</span><span class="pln"> </span><span class="str">"type"</span><span class="pun">:</span><span class="pln"> </span><span class="str">"zeroconf"</span><span class="pun">,</span><span class="pln"> </span><span class="str">"service"</span><span class="pun">:</span><span class="pln"> </span><span class="str">"_mediarenderer._http._tcp"</span><span class="pln"> </span><span class="pun">},</span><span class="pln">
  1.3401 +      </span><span class="pun">{</span><span class="str">"name"</span><span class="pun">:</span><span class="pln"> </span><span class="str">"HiFi WD10"</span><span class="pun">,</span><span class="pln"> </span><span class="str">"type"</span><span class="pun">:</span><span class="pln"> </span><span class="str">"upnp"</span><span class="pun">,</span><span class="pln"> </span><span class="str">"service"</span><span class="pun">:</span><span class="pln"> </span><span class="str">"urn:schemas-upnp-org:service:RenderingControl:1"</span><span class="pln"> </span><span class="pun">}</span><span class="pln">
  1.3402      </span><span class="pun">],</span><span class="pln">
  1.3403 -    </span><span class="str">"Philips"</span><span class="pun">:</span><span class="pln"> </span><span class=
  1.3404 -"pun">[</span><span class="pln"> </span><span class="com">/* ... */</span><span class="pln"> </span><span class=
  1.3405 -"pun">],</span><span class="pln">
  1.3406 -    </span><span class="str">"Alba"</span><span class="pun">:</span><span class="pln"> </span><span class=
  1.3407 -"pun">[</span><span class="pln"> </span><span class="com">/* ... */</span><span class="pln"> </span><span class=
  1.3408 -"pun">]</span><span class="pln">
  1.3409 +    </span><span class="str">"Philips"</span><span class="pun">:</span><span class="pln"> </span><span class="pun">[</span><span class="pln"> </span><span class="com">/* ... */</span><span class="pln"> </span><span class="pun">],</span><span class="pln">
  1.3410 +    </span><span class="str">"Alba"</span><span class="pun">:</span><span class="pln"> </span><span class="pun">[</span><span class="pln"> </span><span class="com">/* ... */</span><span class="pln"> </span><span class="pun">]</span><span class="pln">
  1.3411    </span><span class="pun">};</span><span class="pln">
  1.3412  
  1.3413 -  </span><span class="kwd">var</span><span class="pln"> makeEl </span><span class="pun">=</span><span class=
  1.3414 -"pln"> document</span><span class="pun">.</span><span class="pln">getElementById</span><span class=
  1.3415 -"pun">(</span><span class="str">"make"</span><span class="pun">),</span><span class="pln">
  1.3416 -      modelEl </span><span class="pun">=</span><span class="pln"> document</span><span class="pun">.</span><span class=
  1.3417 -"pln">getElementById</span><span class="pun">(</span><span class="str">"model"</span><span class=
  1.3418 -"pun">);</span><span class="pln">
  1.3419 +  </span><span class="kwd">var</span><span class="pln"> makeEl </span><span class="pun">=</span><span class="pln"> document</span><span class="pun">.</span><span class="pln">getElementById</span><span class="pun">(</span><span class="str">"make"</span><span class="pun">),</span><span class="pln">
  1.3420 +      modelEl </span><span class="pun">=</span><span class="pln"> document</span><span class="pun">.</span><span class="pln">getElementById</span><span class="pun">(</span><span class="str">"model"</span><span class="pun">);</span><span class="pln">
  1.3421  
  1.3422 -  makeEl</span><span class="pun">.</span><span class="pln">addEventListener</span><span class=
  1.3423 -"pun">(</span><span class="str">'change'</span><span class="pun">,</span><span class="pln"> </span><span class=
  1.3424 -"kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
  1.3425 -    modelEl</span><span class="pun">.</span><span class="pln">innerHTML </span><span class="pun">=</span><span class=
  1.3426 -"pln"> </span><span class="str">""</span><span class="pun">;</span><span class="pln"> </span><span class=
  1.3427 -"com">// reset</span><span class="pln">
  1.3428 -    </span><span class="kwd">var</span><span class="pln"> defaultOption </span><span class="pun">=</span><span class=
  1.3429 -"pln"> document</span><span class="pun">.</span><span class="pln">createElement</span><span class=
  1.3430 -"pun">(</span><span class="str">"option"</span><span class="pun">);</span><span class="pln">
  1.3431 -    defaultOption</span><span class="pun">.</span><span class="pln">textContent </span><span class=
  1.3432 -"pun">=</span><span class="pln"> </span><span class="str">"Select model"</span><span class="pun">;</span><span class=
  1.3433 -"pln">
  1.3434 -    defaultOption</span><span class="pun">.</span><span class="pln">setAttribute</span><span class=
  1.3435 -"pun">(</span><span class="str">"disabled"</span><span class="pun">,</span><span class="pln"> </span><span class=
  1.3436 -"str">"disabled"</span><span class="pun">);</span><span class="pln">
  1.3437 -    defaultOption</span><span class="pun">.</span><span class="pln">setAttribute</span><span class=
  1.3438 -"pun">(</span><span class="str">"selected"</span><span class="pun">,</span><span class="pln"> </span><span class=
  1.3439 -"str">"selected"</span><span class="pun">);</span><span class="pln">
  1.3440 -    modelEl</span><span class="pun">.</span><span class="pln">appendChild</span><span class="pun">(</span><span class=
  1.3441 -"pln">defaultOption</span><span class="pun">);</span><span class="pln">
  1.3442 -    </span><span class="kwd">for</span><span class="pun">(</span><span class="kwd">var</span><span class=
  1.3443 -"pln"> i </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class=
  1.3444 -"pun">,</span><span class="pln"> l </span><span class="pun">=</span><span class="pln"> models</span><span class=
  1.3445 -"pun">[</span><span class="pln">makeEl</span><span class="pun">.</span><span class="pln">value</span><span class=
  1.3446 -"pun">].</span><span class="pln">length</span><span class="pun">;</span><span class="pln"> i </span><span class=
  1.3447 -"pun">&lt;</span><span class="pln"> l</span><span class="pun">;</span><span class="pln"> i</span><span class=
  1.3448 -"pun">++)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
  1.3449 -      </span><span class="kwd">var</span><span class="pln"> option </span><span class="pun">=</span><span class=
  1.3450 -"pln"> document</span><span class="pun">.</span><span class="pln">createElement</span><span class=
  1.3451 -"pun">(</span><span class="str">"option"</span><span class="pun">);</span><span class="pln">
  1.3452 -      option</span><span class="pun">.</span><span class="pln">textContent </span><span class=
  1.3453 -"pun">=</span><span class="pln"> models</span><span class="pun">[</span><span class="pln">makeEl</span><span class=
  1.3454 -"pun">.</span><span class="pln">value</span><span class="pun">][</span><span class="pln">i</span><span class=
  1.3455 -"pun">][</span><span class="str">"name"</span><span class="pun">];</span><span class="pln">
  1.3456 -      option</span><span class="pun">.</span><span class="pln">setAttribute</span><span class=
  1.3457 -"pun">(</span><span class="str">"value"</span><span class="pun">,</span><span class="pln"> models</span><span class=
  1.3458 -"pun">[</span><span class="pln">makeEl</span><span class="pun">.</span><span class="pln">value</span><span class=
  1.3459 -"pun">][</span><span class="pln">i</span><span class="pun">][</span><span class="str">"type"</span><span class=
  1.3460 -"pun">]</span><span class="pln"> </span><span class="pun">+</span><span class="pln"> </span><span class=
  1.3461 -"str">":"</span><span class="pln"> </span><span class="pun">+</span><span class="pln"> models</span><span class=
  1.3462 -"pun">[</span><span class="pln">makeEl</span><span class="pun">.</span><span class="pln">value</span><span class=
  1.3463 -"pun">][</span><span class="pln">i</span><span class="pun">][</span><span class="str">"service"</span><span class=
  1.3464 -"pun">]);</span><span class="pln">
  1.3465 -      modelEl</span><span class="pun">.</span><span class="pln">appendChild</span><span class=
  1.3466 -"pun">(</span><span class="pln">option</span><span class="pun">);</span><span class="pln">
  1.3467 +  makeEl</span><span class="pun">.</span><span class="pln">addEventListener</span><span class="pun">(</span><span class="str">'change'</span><span class="pun">,</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
  1.3468 +    modelEl</span><span class="pun">.</span><span class="pln">innerHTML </span><span class="pun">=</span><span class="pln"> </span><span class="str">""</span><span class="pun">;</span><span class="pln"> </span><span class="com">// reset</span><span class="pln">
  1.3469 +    </span><span class="kwd">var</span><span class="pln"> defaultOption </span><span class="pun">=</span><span class="pln"> document</span><span class="pun">.</span><span class="pln">createElement</span><span class="pun">(</span><span class="str">"option"</span><span class="pun">);</span><span class="pln">
  1.3470 +    defaultOption</span><span class="pun">.</span><span class="pln">textContent </span><span class="pun">=</span><span class="pln"> </span><span class="str">"Select model"</span><span class="pun">;</span><span class="pln">
  1.3471 +    defaultOption</span><span class="pun">.</span><span class="pln">setAttribute</span><span class="pun">(</span><span class="str">"disabled"</span><span class="pun">,</span><span class="pln"> </span><span class="str">"disabled"</span><span class="pun">);</span><span class="pln">
  1.3472 +    defaultOption</span><span class="pun">.</span><span class="pln">setAttribute</span><span class="pun">(</span><span class="str">"selected"</span><span class="pun">,</span><span class="pln"> </span><span class="str">"selected"</span><span class="pun">);</span><span class="pln">
  1.3473 +    modelEl</span><span class="pun">.</span><span class="pln">appendChild</span><span class="pun">(</span><span class="pln">defaultOption</span><span class="pun">);</span><span class="pln">
  1.3474 +    </span><span class="kwd">for</span><span class="pun">(</span><span class="kwd">var</span><span class="pln"> i </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class="pun">,</span><span class="pln"> l </span><span class="pun">=</span><span class="pln"> models</span><span class="pun">[</span><span class="pln">makeEl</span><span class="pun">.</span><span class="pln">value</span><span class="pun">].</span><span class="pln">length</span><span class="pun">;</span><span class="pln"> i </span><span class="pun">&lt;</span><span class="pln"> l</span><span class="pun">;</span><span class="pln"> i</span><span class="pun">++)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
  1.3475 +      </span><span class="kwd">var</span><span class="pln"> option </span><span class="pun">=</span><span class="pln"> document</span><span class="pun">.</span><span class="pln">createElement</span><span class="pun">(</span><span class="str">"option"</span><span class="pun">);</span><span class="pln">
  1.3476 +      option</span><span class="pun">.</span><span class="pln">textContent </span><span class="pun">=</span><span class="pln"> models</span><span class="pun">[</span><span class="pln">makeEl</span><span class="pun">.</span><span class="pln">value</span><span class="pun">][</span><span class="pln">i</span><span class="pun">][</span><span class="str">"name"</span><span class="pun">];</span><span class="pln">
  1.3477 +      option</span><span class="pun">.</span><span class="pln">setAttribute</span><span class="pun">(</span><span class="str">"value"</span><span class="pun">,</span><span class="pln"> models</span><span class="pun">[</span><span class="pln">makeEl</span><span class="pun">.</span><span class="pln">value</span><span class="pun">][</span><span class="pln">i</span><span class="pun">][</span><span class="str">"type"</span><span class="pun">]</span><span class="pln"> </span><span class="pun">+</span><span class="pln"> </span><span class="str">":"</span><span class="pln"> </span><span class="pun">+</span><span class="pln"> models</span><span class="pun">[</span><span class="pln">makeEl</span><span class="pun">.</span><span class="pln">value</span><span class="pun">][</span><span class="pln">i</span><span class="pun">][</span><span class="str">"service"</span><span class="pun">]);</span><span class="pln">
  1.3478 +      modelEl</span><span class="pun">.</span><span class="pln">appendChild</span><span class="pun">(</span><span class="pln">option</span><span class="pun">);</span><span class="pln">
  1.3479      </span><span class="pun">}</span><span class="pln">
  1.3480 -  </span><span class="pun">},</span><span class="pln"> </span><span class="kwd">false</span><span class=
  1.3481 -"pun">);</span><span class="pln">
  1.3482 +  </span><span class="pun">},</span><span class="pln"> </span><span class="kwd">false</span><span class="pun">);</span><span class="pln">
  1.3483  
  1.3484 -  modelEl</span><span class="pun">.</span><span class="pln">addEventListener</span><span class=
  1.3485 -"pun">(</span><span class="str">'change'</span><span class="pun">,</span><span class="pln"> </span><span class=
  1.3486 -"kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
  1.3487 -    </span><span class="kwd">if</span><span class="pun">(</span><span class="pln">navigator</span><span class=
  1.3488 -"pun">.</span><span class="pln">getNetworkServices </span><span class="pun">&amp;&amp;</span><span class="pln">
  1.3489 -         modelEl</span><span class="pun">.</span><span class="pln">value </span><span class="pun">==</span><span class=
  1.3490 -"pln"> </span><span class="str">"upnp:urn:schemas-upnp-org:service:RenderingControl:1"</span><span class=
  1.3491 -"pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
  1.3492 -      navigator</span><span class="pun">.</span><span class="pln">getNetworkServices</span><span class=
  1.3493 -"pun">(</span><span class="pln">modelEl</span><span class="pun">.</span><span class="pln">value</span><span class=
  1.3494 -"pun">,</span><span class="pln"> successCallback</span><span class="pun">,</span><span class=
  1.3495 -"pln"> errorCallback</span><span class="pun">);</span><span class="pln">
  1.3496 -    </span><span class="pun">}</span><span class="pln"> </span><span class="kwd">else</span><span class=
  1.3497 -"pln"> </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class=
  1.3498 -"pln">modelEl</span><span class="pun">.</span><span class="pln">value </span><span class="pun">==</span><span class=
  1.3499 -"pln"> </span><span class="str">"zeroconf:_mediarenderer._http._tcp"</span><span class="pun">)</span><span class=
  1.3500 -"pln"> </span><span class="pun">{</span><span class="pln">
  1.3501 -      debug</span><span class="pun">.</span><span class="pln">innerHTML </span><span class="pun">+=</span><span class=
  1.3502 -"pln"> </span><span class="str">"&lt;br&gt;Service type is not implemented by this application."</span><span class=
  1.3503 -"pun">;</span><span class="pln">
  1.3504 -    </span><span class="pun">}</span><span class="pln"> </span><span class="kwd">else</span><span class=
  1.3505 -"pln"> </span><span class="pun">{</span><span class="pln">
  1.3506 -      debug</span><span class="pun">.</span><span class="pln">innerHTML </span><span class="pun">+=</span><span class=
  1.3507 -"pln"> </span><span class="str">"&lt;br&gt;Service Discovery is not supported!"</span><span class=
  1.3508 -"pun">;</span><span class="pln">
  1.3509 +  modelEl</span><span class="pun">.</span><span class="pln">addEventListener</span><span class="pun">(</span><span class="str">'change'</span><span class="pun">,</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
  1.3510 +    </span><span class="kwd">if</span><span class="pun">(</span><span class="pln">navigator</span><span class="pun">.</span><span class="pln">getNetworkServices </span><span class="pun">&amp;&amp;</span><span class="pln">
  1.3511 +         modelEl</span><span class="pun">.</span><span class="pln">value </span><span class="pun">==</span><span class="pln"> </span><span class="str">"upnp:urn:schemas-upnp-org:service:RenderingControl:1"</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
  1.3512 +      navigator</span><span class="pun">.</span><span class="pln">getNetworkServices</span><span class="pun">(</span><span class="pln">modelEl</span><span class="pun">.</span><span class="pln">value</span><span class="pun">,</span><span class="pln"> successCallback</span><span class="pun">,</span><span class="pln"> errorCallback</span><span class="pun">);</span><span class="pln">
  1.3513 +    </span><span class="pun">}</span><span class="pln"> </span><span class="kwd">else</span><span class="pln"> </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="pln">modelEl</span><span class="pun">.</span><span class="pln">value </span><span class="pun">==</span><span class="pln"> </span><span class="str">"zeroconf:_mediarenderer._http._tcp"</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
  1.3514 +      debug</span><span class="pun">.</span><span class="pln">innerHTML </span><span class="pun">+=</span><span class="pln"> </span><span class="str">"&lt;br&gt;Service type is not implemented by this application."</span><span class="pun">;</span><span class="pln">
  1.3515 +    </span><span class="pun">}</span><span class="pln"> </span><span class="kwd">else</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
  1.3516 +      debug</span><span class="pun">.</span><span class="pln">innerHTML </span><span class="pun">+=</span><span class="pln"> </span><span class="str">"&lt;br&gt;Service Discovery is not supported!"</span><span class="pun">;</span><span class="pln">
  1.3517      </span><span class="pun">}</span><span class="pln">
  1.3518 -  </span><span class="pun">},</span><span class="pln"> </span><span class="kwd">false</span><span class=
  1.3519 -"pun">);</span><span class="pln">
  1.3520 +  </span><span class="pun">},</span><span class="pln"> </span><span class="kwd">false</span><span class="pun">);</span><span class="pln">
  1.3521  </span><span class="tag">&lt;/script&gt;</span><span class="pln">
  1.3522  
  1.3523  </span><span class="tag">&lt;script&gt;</span><span class="pln">
  1.3524 -  </span><span class="kwd">function</span><span class="pln"> successCallback</span><span class=
  1.3525 -"pun">(</span><span class="pln"> services </span><span class="pun">)</span><span class="pln"> </span><span class=
  1.3526 -"pun">{</span><span class="pln">
  1.3527 +  </span><span class="kwd">function</span><span class="pln"> successCallback</span><span class="pun">(</span><span class="pln"> services </span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
  1.3528  
  1.3529    </span><span class="com">// Listen for service push notification messages</span><span class="pln">
  1.3530  
  1.3531 -    services</span><span class="pun">[</span><span class="lit">0</span><span class="pun">].</span><span class=
  1.3532 -"pln">addEventListener</span><span class="pun">(</span><span class="str">'notify'</span><span class=
  1.3533 -"pun">,</span><span class="pln"> </span><span class="kwd">function</span><span class="pln"> </span><span class=
  1.3534 -"pun">(</span><span class="pln"> msg </span><span class="pun">)</span><span class="pln"> </span><span class=
  1.3535 -"pun">{</span><span class="pln">
  1.3536 -         debug</span><span class="pun">.</span><span class="pln">innerHTML </span><span class=
  1.3537 -"pun">+=</span><span class="pln"> </span><span class="str">"&lt;br&gt;"</span><span class="pln"> </span><span class=
  1.3538 -"pun">+</span><span class="pln"> services</span><span class="pun">[</span><span class="lit">0</span><span class=
  1.3539 -"pun">].</span><span class="pln">name </span><span class="pun">+</span><span class="pln"> </span><span class=
  1.3540 -"str">" event received: "</span><span class="pun">;</span><span class="pln">
  1.3541 -         debug</span><span class="pun">.</span><span class="pln">textContent </span><span class=
  1.3542 -"pun">+=</span><span class="pln"> msg</span><span class="pun">.</span><span class="pln">data</span><span class=
  1.3543 -"pun">;</span><span class="pln">
  1.3544 -    </span><span class="pun">},</span><span class="pln"> </span><span class="kwd">false</span><span class=
  1.3545 -"pun">);</span><span class="pln">
  1.3546 +    services</span><span class="pun">[</span><span class="lit">0</span><span class="pun">].</span><span class="pln">addEventListener</span><span class="pun">(</span><span class="str">'notify'</span><span class="pun">,</span><span class="pln"> </span><span class="kwd">function</span><span class="pln"> </span><span class="pun">(</span><span class="pln"> msg </span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
  1.3547 +         debug</span><span class="pun">.</span><span class="pln">innerHTML </span><span class="pun">+=</span><span class="pln"> </span><span class="str">"&lt;br&gt;"</span><span class="pln"> </span><span class="pun">+</span><span class="pln"> services</span><span class="pun">[</span><span class="lit">0</span><span class="pun">].</span><span class="pln">name </span><span class="pun">+</span><span class="pln"> </span><span class="str">" event received: "</span><span class="pun">;</span><span class="pln">
  1.3548 +         debug</span><span class="pun">.</span><span class="pln">textContent </span><span class="pun">+=</span><span class="pln"> msg</span><span class="pun">.</span><span class="pln">data</span><span class="pun">;</span><span class="pln">
  1.3549 +    </span><span class="pun">},</span><span class="pln"> </span><span class="kwd">false</span><span class="pun">);</span><span class="pln">
  1.3550  
  1.3551   </span><span class="com">// Send a control signal to mute the service audio</span><span class="pln">
  1.3552  
  1.3553 -    </span><span class="kwd">var</span><span class="pln"> svcXhr </span><span class="pun">=</span><span class=
  1.3554 -"pln"> </span><span class="kwd">new</span><span class="pln"> </span><span class="typ">XMLHttpRequest</span><span class=
  1.3555 -"pun">();</span><span class="pln">
  1.3556 -    svcXhr</span><span class="pun">.</span><span class="pln">open</span><span class="pun">(</span><span class=
  1.3557 -"str">"POST"</span><span class="pun">,</span><span class="pln"> services</span><span class="pun">[</span><span class=
  1.3558 -"lit">0</span><span class="pun">].</span><span class="pln">url</span><span class="pun">);</span><span class=
  1.3559 -"pln"> </span><span class="com">// services[0].url and its</span><span class="pln">
  1.3560 -                                          </span><span class=
  1.3561 -"com">// sub-resources have been whitelisted for</span><span class="pln">
  1.3562 -                                          </span><span class=
  1.3563 -"com">// cross-site XHR use in this current</span><span class="pln">
  1.3564 +    </span><span class="kwd">var</span><span class="pln"> svcXhr </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">new</span><span class="pln"> </span><span class="typ">XMLHttpRequest</span><span class="pun">();</span><span class="pln">
  1.3565 +    svcXhr</span><span class="pun">.</span><span class="pln">open</span><span class="pun">(</span><span class="str">"POST"</span><span class="pun">,</span><span class="pln"> services</span><span class="pun">[</span><span class="lit">0</span><span class="pun">].</span><span class="pln">url</span><span class="pun">);</span><span class="pln"> </span><span class="com">// services[0].url and its</span><span class="pln">
  1.3566 +                                          </span><span class="com">// sub-resources have been whitelisted for</span><span class="pln">
  1.3567 +                                          </span><span class="com">// cross-site XHR use in this current</span><span class="pln">
  1.3568                                            </span><span class="com">// browsing context.</span><span class="pln">
  1.3569  
  1.3570 -    svcXhr</span><span class="pun">.</span><span class="pln">setRequestHeader</span><span class=
  1.3571 -"pun">(</span><span class="str">'SOAPAction'</span><span class="pun">,</span><span class="pln"> </span><span class=
  1.3572 -"str">'urn:schemas-upnp-org:service:RenderingControl:1#SetMute'</span><span class="pun">);</span><span class="pln">
  1.3573 -    svcXhr</span><span class="pun">.</span><span class="pln">setRequestHeader</span><span class=
  1.3574 -"pun">(</span><span class="str">'Content-Type'</span><span class="pun">,</span><span class="pln"> </span><span class=
  1.3575 -"str">'text/xml; charset="utf-8";'</span><span class="pun">);</span><span class="pln">
  1.3576 +    svcXhr</span><span class="pun">.</span><span class="pln">setRequestHeader</span><span class="pun">(</span><span class="str">'SOAPAction'</span><span class="pun">,</span><span class="pln"> </span><span class="str">'urn:schemas-upnp-org:service:RenderingControl:1#SetMute'</span><span class="pun">);</span><span class="pln">
  1.3577 +    svcXhr</span><span class="pun">.</span><span class="pln">setRequestHeader</span><span class="pun">(</span><span class="str">'Content-Type'</span><span class="pun">,</span><span class="pln"> </span><span class="str">'text/xml; charset="utf-8";'</span><span class="pun">);</span><span class="pln">
  1.3578  
  1.3579 -    svcXhr</span><span class="pun">.</span><span class="pln">onreadystatechange </span><span class=
  1.3580 -"pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pln"> </span><span class=
  1.3581 -"pun">(</span><span class="pln"> response </span><span class="pun">)</span><span class="pln"> </span><span class=
  1.3582 -"pun">{</span><span class="pln">
  1.3583 -      </span><span class="kwd">if</span><span class="pun">(</span><span class="pln"> response</span><span class=
  1.3584 -"pun">.</span><span class="pln">readyState </span><span class="pun">!=</span><span class="pln"> </span><span class=
  1.3585 -"lit">4</span><span class="pln"> </span><span class="pun">||</span><span class="pln"> response</span><span class=
  1.3586 -"pun">.</span><span class="pln">status </span><span class="pun">!=</span><span class="pln"> </span><span class=
  1.3587 -"lit">200</span><span class="pln"> </span><span class="pun">)</span><span class="pln">
  1.3588 +    svcXhr</span><span class="pun">.</span><span class="pln">onreadystatechange </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pln"> </span><span class="pun">(</span><span class="pln"> response </span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
  1.3589 +      </span><span class="kwd">if</span><span class="pun">(</span><span class="pln"> response</span><span class="pun">.</span><span class="pln">readyState </span><span class="pun">!=</span><span class="pln"> </span><span class="lit">4</span><span class="pln"> </span><span class="pun">||</span><span class="pln"> response</span><span class="pun">.</span><span class="pln">status </span><span class="pun">!=</span><span class="pln"> </span><span class="lit">200</span><span class="pln"> </span><span class="pun">)</span><span class="pln">
  1.3590          </span><span class="kwd">return</span><span class="pun">;</span><span class="pln">
  1.3591 -      debug</span><span class="pun">.</span><span class="pln">innerHTML </span><span class="pun">+=</span><span class=
  1.3592 -"pln"> </span><span class="str">"&lt;br&gt;"</span><span class="pln"> </span><span class="pun">+</span><span class=
  1.3593 -"pln"> services</span><span class="pun">[</span><span class="lit">0</span><span class="pun">].</span><span class=
  1.3594 -"pln">name </span><span class="pun">+</span><span class="pln"> </span><span class=
  1.3595 -"str">" response received: "</span><span class="pun">;</span><span class="pln">
  1.3596 -      debug</span><span class="pun">.</span><span class="pln">textContent </span><span class=
  1.3597 -"pun">+=</span><span class="pln"> response</span><span class="pun">.</span><span class=
  1.3598 -"pln">responseXML</span><span class="pun">;</span><span class="pln">
  1.3599 +      debug</span><span class="pun">.</span><span class="pln">innerHTML </span><span class="pun">+=</span><span class="pln"> </span><span class="str">"&lt;br&gt;"</span><span class="pln"> </span><span class="pun">+</span><span class="pln"> services</span><span class="pun">[</span><span class="lit">0</span><span class="pun">].</span><span class="pln">name </span><span class="pun">+</span><span class="pln"> </span><span class="str">" response received: "</span><span class="pun">;</span><span class="pln">
  1.3600 +      debug</span><span class="pun">.</span><span class="pln">textContent </span><span class="pun">+=</span><span class="pln"> response</span><span class="pun">.</span><span class="pln">responseXML</span><span class="pun">;</span><span class="pln">
  1.3601      </span><span class="pun">}</span><span class="pln">
  1.3602  
  1.3603      </span><span class="com">// Service messaging to mute the provided service</span><span class="pln">
  1.3604 -    </span><span class="kwd">var</span><span class="pln"> svcMsg </span><span class="pun">=</span><span class=
  1.3605 -"pln"> </span><span class="str">'&lt;?xml version="1.0" encoding="utf-8"?&gt;'</span><span class=
  1.3606 -"pln"> </span><span class="pun">+</span><span class="pln">
  1.3607 -                 </span><span class=
  1.3608 -"str">'&lt;s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" '</span><span class=
  1.3609 -"pln"> </span><span class="pun">+</span><span class="pln">
  1.3610 -                   </span><span class=
  1.3611 -"str">'xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&gt;'</span><span class="pln"> </span><span class=
  1.3612 -"pun">+</span><span class="pln">
  1.3613 -                   </span><span class="str">'&lt;s:Body&gt;'</span><span class="pln"> </span><span class=
  1.3614 -"pun">+</span><span class="pln">
  1.3615 -                     </span><span class=
  1.3616 -"str">'&lt;u:SetMute xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1"&gt;'</span><span class=
  1.3617 -"pln"> </span><span class="pun">+</span><span class="pln">
  1.3618 -                       </span><span class="str">'&lt;InstanceID&gt;0&lt;/InstanceID&gt;'</span><span class=
  1.3619 -"pln"> </span><span class="pun">+</span><span class="pln">
  1.3620 -                       </span><span class="str">'&lt;Channel&gt;Master&lt;/Channel&gt;'</span><span class=
  1.3621 -"pln"> </span><span class="pun">+</span><span class="pln">
  1.3622 -                       </span><span class="str">'&lt;DesiredMute&gt;true&lt;/DesiredMute&gt;'</span><span class=
  1.3623 -"pln"> </span><span class="pun">+</span><span class="pln">
  1.3624 -                     </span><span class="str">'&lt;/u:SetMute&gt;'</span><span class="pln"> </span><span class=
  1.3625 -"pun">+</span><span class="pln">
  1.3626 -                   </span><span class="str">'&lt;/s:Body&gt;'</span><span class="pln"> </span><span class=
  1.3627 -"pun">+</span><span class="pln">
  1.3628 +    </span><span class="kwd">var</span><span class="pln"> svcMsg </span><span class="pun">=</span><span class="pln"> </span><span class="str">'&lt;?xml version="1.0" encoding="utf-8"?&gt;'</span><span class="pln"> </span><span class="pun">+</span><span class="pln">
  1.3629 +                 </span><span class="str">'&lt;s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" '</span><span class="pln"> </span><span class="pun">+</span><span class="pln">
  1.3630 +                   </span><span class="str">'xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&gt;'</span><span class="pln"> </span><span class="pun">+</span><span class="pln">
  1.3631 +                   </span><span class="str">'&lt;s:Body&gt;'</span><span class="pln"> </span><span class="pun">+</span><span class="pln">
  1.3632 +                     </span><span class="str">'&lt;u:SetMute xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1"&gt;'</span><span class="pln"> </span><span class="pun">+</span><span class="pln">
  1.3633 +                       </span><span class="str">'&lt;InstanceID&gt;0&lt;/InstanceID&gt;'</span><span class="pln"> </span><span class="pun">+</span><span class="pln">
  1.3634 +                       </span><span class="str">'&lt;Channel&gt;Master&lt;/Channel&gt;'</span><span class="pln"> </span><span class="pun">+</span><span class="pln">
  1.3635 +                       </span><span class="str">'&lt;DesiredMute&gt;true&lt;/DesiredMute&gt;'</span><span class="pln"> </span><span class="pun">+</span><span class="pln">
  1.3636 +                     </span><span class="str">'&lt;/u:SetMute&gt;'</span><span class="pln"> </span><span class="pun">+</span><span class="pln">
  1.3637 +                   </span><span class="str">'&lt;/s:Body&gt;'</span><span class="pln"> </span><span class="pun">+</span><span class="pln">
  1.3638                   </span><span class="str">'&lt;/s:Envelope&gt;'</span><span class="pun">;</span><span class="pln">
  1.3639  
  1.3640 -    svcXhr</span><span class="pun">.</span><span class="pln">send</span><span class="pun">(</span><span class=
  1.3641 -"pln">svcMsg</span><span class="pun">);</span><span class="pln">
  1.3642 -    debug</span><span class="pun">.</span><span class="pln">innerHTML </span><span class="pun">+=</span><span class=
  1.3643 -"pln"> </span><span class="str">"&lt;br&gt;"</span><span class="pln"> </span><span class="pun">+</span><span class=
  1.3644 -"pln"> services</span><span class="pun">[</span><span class="lit">0</span><span class="pun">].</span><span class=
  1.3645 -"pln">name </span><span class="pun">+</span><span class="pln"> </span><span class=
  1.3646 -"str">" request sent: "</span><span class="pun">;</span><span class="pln">
  1.3647 -    debug</span><span class="pun">.</span><span class="pln">textContent </span><span class="pun">+=</span><span class=
  1.3648 -"pln"> svcMsg</span><span class="pun">;</span><span class="pln">
  1.3649 +    svcXhr</span><span class="pun">.</span><span class="pln">send</span><span class="pun">(</span><span class="pln">svcMsg</span><span class="pun">);</span><span class="pln">
  1.3650 +    debug</span><span class="pun">.</span><span class="pln">innerHTML </span><span class="pun">+=</span><span class="pln"> </span><span class="str">"&lt;br&gt;"</span><span class="pln"> </span><span class="pun">+</span><span class="pln"> services</span><span class="pun">[</span><span class="lit">0</span><span class="pun">].</span><span class="pln">name </span><span class="pun">+</span><span class="pln"> </span><span class="str">" request sent: "</span><span class="pun">;</span><span class="pln">
  1.3651 +    debug</span><span class="pun">.</span><span class="pln">textContent </span><span class="pun">+=</span><span class="pln"> svcMsg</span><span class="pun">;</span><span class="pln">
  1.3652    </span><span class="pun">}</span><span class="pln">
  1.3653  
  1.3654 -  </span><span class="kwd">function</span><span class="pln"> errorCallback</span><span class="pun">(</span><span class=
  1.3655 -"pln"> error </span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
  1.3656 -    debug</span><span class="pun">.</span><span class="pln">innerHTML </span><span class="pun">+=</span><span class=
  1.3657 -"pln"> </span><span class="str">"&lt;br&gt;An error occurred: "</span><span class="pln"> </span><span class=
  1.3658 -"pun">+</span><span class="pln"> error</span><span class="pun">.</span><span class="pln">code</span><span class=
  1.3659 -"pun">;</span><span class="pln">
  1.3660 +  </span><span class="kwd">function</span><span class="pln"> errorCallback</span><span class="pun">(</span><span class="pln"> error </span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
  1.3661 +    debug</span><span class="pun">.</span><span class="pln">innerHTML </span><span class="pun">+=</span><span class="pln"> </span><span class="str">"&lt;br&gt;An error occurred: "</span><span class="pln"> </span><span class="pun">+</span><span class="pln"> error</span><span class="pun">.</span><span class="pln">code</span><span class="pun">;</span><span class="pln">
  1.3662    </span><span class="pun">}</span><span class="pln">
  1.3663 -</span><span class="tag">&lt;/script&gt;</span>
  1.3664 -</pre>
  1.3665 +</span><span class="tag">&lt;/script&gt;</span></pre>
  1.3666        </div>
  1.3667      </section>
  1.3668      <section id="acknowledgements">
  1.3669 -      <h2>
  1.3670 -        <span class="secno">B.</span> Acknowledgements
  1.3671 +      <!--OddPage--><h2><span class="secno">B. </span>
  1.3672 +        Acknowledgements
  1.3673        </h2>
  1.3674        <p>
  1.3675          Thanks are expressed by the editor to the following individuals for their feedback on this specification to
  1.3676 @@ -3013,79 +2144,16 @@
  1.3677          Thanks are also expressed by the editor to the following organizations and groups for their support in
  1.3678          producing this specification to date (in alphabetical order):<br>
  1.3679          <br>
  1.3680 -        CableLabs, Opera Software ASA, <abbr title="World Wide Web Consortium">W3C</abbr> Device APIs Working Group,
  1.3681 -        <abbr title="World Wide Web Consortium">W3C</abbr> Web and TV Interest Group.
  1.3682 +        CableLabs, Opera Software ASA, <abbr title="World Wide Web Consortium">W3C</abbr> Device APIs Working Group, <abbr title="World Wide Web Consortium">W3C</abbr> Web and TV Interest Group.
  1.3683        </p>
  1.3684      </section>
  1.3685 -    <section id="references"
  1.3686 -             class="appendix">
  1.3687 -      <h2>
  1.3688 -        <span class="secno">C.</span> References
  1.3689 -      </h2>
  1.3690 -      <section id="normative-references">
  1.3691 -        <h3>
  1.3692 -          <span class="secno">C.1</span> Normative references
  1.3693 -        </h3>
  1.3694 -        <dl class="bibliography">
  1.3695 -          <dt id="bib-DNS-SD">
  1.3696 -            [DNS-SD]
  1.3697 -          </dt>
  1.3698 -          <dd>
  1.3699 -            S. Cheshire; M. Krochmal. <a href=
  1.3700 -            "http://files.dns-sd.org/draft-cheshire-dnsext-dns-sd.txt"><cite>DNS-Based Service Discovery</cite></a>. 27
  1.3701 -            February 2011. IETF Draft. URL: <a href=
  1.3702 -            "http://files.dns-sd.org/draft-cheshire-dnsext-dns-sd.txt">http://files.dns-sd.org/draft-cheshire-dnsext-dns-sd.txt</a>
  1.3703 -          </dd>
  1.3704 -          <dt id="bib-DOM4">
  1.3705 -            [DOM4]
  1.3706 -          </dt>
  1.3707 -          <dd>
  1.3708 -            Anne van Kesteren; Aryeh Gregor; Lachlan Hunt; Ms2ger. <a href=
  1.3709 -            "http://www.w3.org/TR/2012/WD-dom-20121206"><cite>DOM4</cite></a>. 6 December 2012. W3C Working Draft. URL:
  1.3710 -            <a href="http://www.w3.org/TR/2012/WD-dom-20121206">http://www.w3.org/TR/2012/WD-dom-20121206</a>
  1.3711 -          </dd>
  1.3712 -          <dt id="bib-HTML5">
  1.3713 -            [HTML5]
  1.3714 -          </dt>
  1.3715 -          <dd>
  1.3716 -            Robin Berjon et al. <a href="http://www.w3.org/TR/html5/"><cite>HTML5</cite></a>. 17 December 2012. W3C
  1.3717 -            Candidate Recommendation. URL: <a href="http://www.w3.org/TR/html5/">http://www.w3.org/TR/html5/</a>
  1.3718 -          </dd>
  1.3719 -          <dt id="bib-MDNS">
  1.3720 -            [MDNS]
  1.3721 -          </dt>
  1.3722 -          <dd>
  1.3723 -            S. Cheshire; M. Krochmal. <a href=
  1.3724 -            "http://files.multicastdns.org/draft-cheshire-dnsext-multicastdns.txt"><cite>Multicast DNS</cite></a>. 14
  1.3725 -            February 2011. IETF Draft. URL: <a href=
  1.3726 -            "http://files.multicastdns.org/draft-cheshire-dnsext-multicastdns.txt">http://files.multicastdns.org/draft-cheshire-dnsext-multicastdns.txt</a>
  1.3727 -          </dd>
  1.3728 -          <dt id="bib-RFC2119">
  1.3729 -            [RFC2119]
  1.3730 -          </dt>
  1.3731 -          <dd>
  1.3732 -            S. Bradner. <a href="http://www.ietf.org/rfc/rfc2119.txt"><cite>Key words for use in RFCs to Indicate
  1.3733 -            Requirement Levels.</cite></a> March 1997. Internet RFC 2119. URL: <a href=
  1.3734 -            "http://www.ietf.org/rfc/rfc2119.txt">http://www.ietf.org/rfc/rfc2119.txt</a>
  1.3735 -          </dd>
  1.3736 -          <dt id="bib-UPNP-DEVICEARCH11">
  1.3737 -            [UPNP-DEVICEARCH11]
  1.3738 -          </dt>
  1.3739 -          <dd>
  1.3740 -            <a href="http://upnp.org/specs/arch/UPnP-arch-DeviceArchitecture-v1.1.pdf"><cite>UPnP Device Architecture
  1.3741 -            1.1</cite></a>. 15 October 2008. UPnP Forum. PDF document. URL: <a href=
  1.3742 -            "http://upnp.org/specs/arch/UPnP-arch-DeviceArchitecture-v1.1.pdf">http://upnp.org/specs/arch/UPnP-arch-DeviceArchitecture-v1.1.pdf</a>
  1.3743 -          </dd>
  1.3744 -          <dt id="bib-WEBIDL">
  1.3745 -            [WEBIDL]
  1.3746 -          </dt>
  1.3747 -          <dd>
  1.3748 -            Cameron McCormack. <a href="http://www.w3.org/TR/2011/WD-WebIDL-20110927/"><cite>Web IDL</cite></a>. 27
  1.3749 -            September 2011. W3C Working Draft. URL: <a href=
  1.3750 -            "http://www.w3.org/TR/2011/WD-WebIDL-20110927/">http://www.w3.org/TR/2011/WD-WebIDL-20110927/</a>
  1.3751 -          </dd>
  1.3752 -        </dl>
  1.3753 -      </section>
  1.3754 -    </section>
  1.3755 -  </body>
  1.3756 -</html>
  1.3757 +
  1.3758 +
  1.3759 +    <section class="appendix" id="references"><!--OddPage--><h2><span class="secno">C. </span>References</h2><section id="normative-references"><h3><span class="secno">C.1 </span>Normative references</h3><dl class="bibliography"><dt id="bib-DNS-SD">[DNS-SD]</dt><dd>S. Cheshire; M. Krochmal. <a href="http://tools.ietf.org/html/rfc6763"><cite>DNS-Based Service Discovery</cite></a>. February 2013. Internet RFC 6763. URL: <a href="http://tools.ietf.org/html/rfc6763">http://tools.ietf.org/html/rfc6763</a>
  1.3760 +    </dd><dt id="bib-DOM4">[DOM4]</dt><dd>Anne van Kesteren; Aryeh Gregor; Lachlan Hunt; Ms2ger. <a href="http://www.w3.org/TR/2012/WD-dom-20121206"><cite>DOM4</cite></a>. 6 December 2012. W3C Working Draft. URL: <a href="http://www.w3.org/TR/2012/WD-dom-20121206">http://www.w3.org/TR/2012/WD-dom-20121206</a>
  1.3761 +    </dd><dt id="bib-HTML5">[HTML5]</dt><dd>Robin Berjon et al. <a href="http://www.w3.org/TR/html5/"><cite>HTML5</cite></a>. 17 December 2012. W3C Candidate Recommendation. URL: <a href="http://www.w3.org/TR/html5/">http://www.w3.org/TR/html5/</a>
  1.3762 +    </dd><dt id="bib-MDNS">[MDNS]</dt><dd>S. Cheshire; M. Krochmal. <a href="http://tools.ietf.org/html/rfc6762"><cite>Multicast DNS</cite></a>. February 2013. Internet RFC 6762. URL: <a href="http://tools.ietf.org/html/rfc6762">http://tools.ietf.org/html/rfc6762</a>
  1.3763 +    </dd><dt id="bib-RFC2119">[RFC2119]</dt><dd>S. Bradner. <a href="http://www.ietf.org/rfc/rfc2119.txt"><cite>Key words for use in RFCs to Indicate Requirement Levels.</cite></a> March 1997. Internet RFC 2119.  URL: <a href="http://www.ietf.org/rfc/rfc2119.txt">http://www.ietf.org/rfc/rfc2119.txt</a>
  1.3764 +    </dd><dt id="bib-UPNP-DEVICEARCH11">[UPNP-DEVICEARCH11]</dt><dd><a href="http://upnp.org/specs/arch/UPnP-arch-DeviceArchitecture-v1.1.pdf"><cite>UPnP Device Architecture 1.1</cite></a>. 15 October 2008. UPnP Forum. PDF document. URL: <a href="http://upnp.org/specs/arch/UPnP-arch-DeviceArchitecture-v1.1.pdf">http://upnp.org/specs/arch/UPnP-arch-DeviceArchitecture-v1.1.pdf</a>
  1.3765 +    </dd><dt id="bib-WEBIDL">[WEBIDL]</dt><dd>Cameron McCormack. <a href="http://www.w3.org/TR/2011/WD-WebIDL-20110927/"><cite>Web IDL</cite></a>. 27 September 2011. W3C Working Draft. URL: <a href="http://www.w3.org/TR/2011/WD-WebIDL-20110927/">http://www.w3.org/TR/2011/WD-WebIDL-20110927/</a>
  1.3766 +    </dd></dl></section></section></body></html>
  1.3767 \ No newline at end of file
     2.1 --- a/discovery-api/Overview.src.html	Mon Mar 25 13:56:06 2013 -0400
     2.2 +++ b/discovery-api/Overview.src.html	Wed Mar 27 06:27:35 2013 +0100
     2.3 @@ -35,11 +35,11 @@
     2.4            class='remove'>
     2.5  var respecConfig = {
     2.6            specStatus:   "ED",
     2.7 -          //publishDate:  "2012-10-04",
     2.8 +          //publishDate:  "2013-03-29",
     2.9            shortName:    "discovery-api",
    2.10            edDraftURI:   "http://dvcs.w3.org/hg/dap/raw-file/tip/discovery-api/Overview.html",
    2.11            previousMaturity: "FPWD",
    2.12 -          previousPublishDate: "2012-08-07",
    2.13 +          previousPublishDate: "2012-10-04",
    2.14            editors: [
    2.15              {
    2.16                name:       "Rich Tibbett",
    2.17 @@ -70,7 +70,38 @@
    2.18            type="text/javascript"
    2.19            class='remove'
    2.20            async=""></script>
    2.21 -    <link href="./css/respec.nsd.css" rel="stylesheet" type="text/css">
    2.22 +    <style>
    2.23 +     /* Custom ReSpec CSS (by Rich Tibbett) */
    2.24 +
    2.25 +     /* Add better spacing to sections */
    2.26 +     section, .section { margin-bottom: 2em; }
    2.27 +
    2.28 +     /* Reduce note & issue render size */
    2.29 +     .note, .issue { font-size:0.8em; }
    2.30 +
    2.31 +     /* Add addition spacing to <ol> and <ul> for rule definition */
    2.32 +     ol.rule li, ul.rule li { padding:0.6em; }
    2.33 +
    2.34 +     pre.widl { border: solid thin; background: #EEEEEE; color: black; padding: 0.5em 1em; position: relative; }
    2.35 +     pre.widl :link, pre.widl :visited { color: #000; background: transparent; }
    2.36 +     pre.widl:before { content: "IDL"; font: bold small sans-serif; padding: 0.5em; background: white; position: absolute; top: 0; margin: -1px 0 0 -4em; width: 1.5em; border: thin solid; border-radius: 0 0 0 0.5em }
    2.37 +
    2.38 +     div.example { border: solid thin black; background: #FFFFF0; color: black; padding: 0.5em 1em; position: relative; margin: 1em 0 1em 4.6em; width: auto; }
    2.39 +     div.example:before { content: "EXAMPLE"; font: bold small sans-serif; padding: 0.5em; background: white; color: black; position: absolute; top: 0; margin: -1px 0 0 -7.6em; width: 5em; border: thin solid black; border-radius: 0 0 0 0.5em }
    2.40 +
    2.41 +     dl.domintro { color: green; margin: 2em 0 2em 2em; padding: 0.5em 1em; border: none; background: #DDFFDD; }
    2.42 +     hr + dl.domintro, div.impl + dl.domintro { margin-top: 2.5em; margin-bottom: 1.5em; }
    2.43 +     dl.domintro dt, dl.domintro dt * { color: black; text-decoration: none; }
    2.44 +     dl.domintro dd { margin: 0.5em 0 1em 2em; padding: 0; }
    2.45 +     dl.domintro dd p { margin: 0.5em 0; }
    2.46 +     dl.domintro code {font-size: inherit; font-style: italic; }
    2.47 +     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; font-size:0.8em; }
    2.48 +
    2.49 +     table { border-collapse:collapse; border-style:hidden hidden none hidden }
    2.50 +     table thead { border-bottom:solid }
    2.51 +     table tbody th:first-child { border-left:solid }
    2.52 +     table td, table th { border-left:solid; border-right:solid; border-bottom:solid thin; vertical-align:top; padding:0.2em }
    2.53 +     </style>
    2.54    </head>
    2.55    <body>
    2.56      <section id='abstract'>
    2.57 @@ -432,7 +463,7 @@
    2.58                </p>
    2.59                <p>
    2.60                  Alternatively, the user agent MAY choose to queue a task to invoke <var>successCallback</var> or
    2.61 -                <var>errorCallback</var> immediately based on a previously-established user preference, for security
    2.62 +                <var>errorCallback</var> immediately based on a previously-established user previously, for security
    2.63                  reasons, or due to platform limitations. In such an implementation, if <var>successCallback</var> is to
    2.64                  be fired as a result of a previously-established user preference then the <a>user agent</a> MUST
    2.65                  continue at the next step of this algorithm.
     3.1 --- a/discovery-api/WD.html	Mon Mar 25 13:56:06 2013 -0400
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,2004 +0,0 @@
     3.4 -<!DOCTYPE html>
     3.5 -<html lang="en" dir="ltr">
     3.6 -<head>
     3.7 -    <title>
     3.8 -      Network Service Discovery
     3.9 -    </title>
    3.10 -    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    3.11 -
    3.12 -
    3.13 -    <style type="text/css">
    3.14 -/* Custom ReSpec CSS (by Rich Tibbett) */
    3.15 -
    3.16 -      /* Add better spacing to sections */
    3.17 -      section, .section { margin-bottom: 2em; }
    3.18 -
    3.19 -      /* Reduce note & issue render size */
    3.20 -      .note, .issue { font-size:0.8em; }
    3.21 -
    3.22 -      /* Add addition spacing to <ol> and <ul> for rule definition */
    3.23 -      ol.rule li, ul.rule li { padding:0.6em; }
    3.24 -
    3.25 -      pre.widl { border: solid thin; background: #EEEEEE; color: black; padding: 0.5em 1em; position: relative; }
    3.26 -      pre.widl :link, pre.widl :visited { color: #000; background: transparent; }
    3.27 -      pre.widl:before { content: "IDL"; font: bold small sans-serif; padding: 0.5em; background: white; position: absolute; top: 0; margin: -1px 0 0 -4em; width: 1.5em; border: thin solid; border-radius: 0 0 0 0.5em }
    3.28 -
    3.29 -      div.example { border: solid thin red; background: #F7DFE5; color: black; padding: 0.5em 1em; position: relative; margin: 1em 0 1em 4.6em; width: auto; }
    3.30 -      div.example:before { content: "EXAMPLE"; font: bold small sans-serif; padding: 0.5em; background: red; color: white; position: absolute; top: 0; margin: -1px 0 0 -7.6em; width: 5em; border: thin solid red; border-radius: 0 0 0 0.5em }
    3.31 -
    3.32 -      dl.domintro { color: green; margin: 2em 0 2em 2em; padding: 0.5em 1em; border: none; background: #DDFFDD; }
    3.33 -      hr + dl.domintro, div.impl + dl.domintro { margin-top: 2.5em; margin-bottom: 1.5em; }
    3.34 -      dl.domintro dt, dl.domintro dt * { color: black; text-decoration: none; }
    3.35 -      dl.domintro dd { margin: 0.5em 0 1em 2em; padding: 0; }
    3.36 -      dl.domintro dd p { margin: 0.5em 0; }
    3.37 -      dl.domintro code {font-size: inherit; font-style: italic; }
    3.38 -      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; }
    3.39 -
    3.40 -      table { border-collapse:collapse; border-style:hidden hidden none hidden }
    3.41 -      table thead { border-bottom:solid }
    3.42 -      table tbody th:first-child { border-left:solid }
    3.43 -      table td, table th { border-left:solid; border-right:solid; border-bottom:solid thin; vertical-align:top; padding:0.2em }
    3.44 -    </style>
    3.45 -  <style>/*****************************************************************
    3.46 - * ReSpec 3 CSS
    3.47 - * Robin Berjon - http://berjon.com/
    3.48 - *****************************************************************/
    3.49 -
    3.50 -/* --- INLINES --- */
    3.51 -em.rfc2119 {
    3.52 -    text-transform:     lowercase;
    3.53 -    font-variant:       small-caps;
    3.54 -    font-style:         normal;
    3.55 -    color:              #900;
    3.56 -}
    3.57 -
    3.58 -h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
    3.59 -h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
    3.60 -    border: none;
    3.61 -}
    3.62 -
    3.63 -dfn {
    3.64 -    font-weight:    bold;
    3.65 -}
    3.66 -
    3.67 -a.internalDFN {
    3.68 -    color:  inherit;
    3.69 -    border-bottom:  1px solid #99c;
    3.70 -    text-decoration:    none;
    3.71 -}
    3.72 -
    3.73 -a.externalDFN {
    3.74 -    color:  inherit;
    3.75 -    border-bottom:  1px dotted #ccc;
    3.76 -    text-decoration:    none;
    3.77 -}
    3.78 -
    3.79 -a.bibref {
    3.80 -    text-decoration:    none;
    3.81 -}
    3.82 -
    3.83 -cite .bibref {
    3.84 -    font-style: normal;
    3.85 -}
    3.86 -
    3.87 -code {
    3.88 -    color:  #ff4500;
    3.89 -}
    3.90 -
    3.91 -
    3.92 -/* --- --- */
    3.93 -ol.algorithm { counter-reset:numsection; list-style-type: none; }
    3.94 -ol.algorithm li { margin: 0.5em 0; }
    3.95 -ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
    3.96 -
    3.97 -/* --- TOC --- */
    3.98 -.toc a, .tof a {
    3.99 -    text-decoration:    none;
   3.100 -}
   3.101 -
   3.102 -a .secno, a .figno {
   3.103 -    color:  #000;
   3.104 -}
   3.105 -
   3.106 -ul.tof, ol.tof {
   3.107 -    list-style: none outside none;
   3.108 -}
   3.109 -
   3.110 -.caption {
   3.111 -    margin-top: 0.5em;
   3.112 -    font-style:   italic;
   3.113 -}
   3.114 -
   3.115 -/* --- TABLE --- */
   3.116 -table.simple {
   3.117 -    border-spacing: 0;
   3.118 -    border-collapse:    collapse;
   3.119 -    border-bottom:  3px solid #005a9c;
   3.120 -}
   3.121 -
   3.122 -.simple th {
   3.123 -    background: #005a9c;
   3.124 -    color:  #fff;
   3.125 -    padding:    3px 5px;
   3.126 -    text-align: left;
   3.127 -}
   3.128 -
   3.129 -.simple th[scope="row"] {
   3.130 -    background: inherit;
   3.131 -    color:  inherit;
   3.132 -    border-top: 1px solid #ddd;
   3.133 -}
   3.134 -
   3.135 -.simple td {
   3.136 -    padding:    3px 10px;
   3.137 -    border-top: 1px solid #ddd;
   3.138 -}
   3.139 -
   3.140 -.simple tr:nth-child(even) {
   3.141 -    background: #f0f6ff;
   3.142 -}
   3.143 -
   3.144 -/* --- DL --- */
   3.145 -.section dd > p:first-child {
   3.146 -    margin-top: 0;
   3.147 -}
   3.148 -
   3.149 -.section dd > p:last-child {
   3.150 -    margin-bottom: 0;
   3.151 -}
   3.152 -
   3.153 -.section dd {
   3.154 -    margin-bottom:  1em;
   3.155 -}
   3.156 -
   3.157 -.section dl.attrs dd, .section dl.eldef dd {
   3.158 -    margin-bottom:  0;
   3.159 -}
   3.160 -</style><style>/* --- ISSUES/NOTES --- */
   3.161 -div.issue-title, div.note-title {
   3.162 -    padding-right:  1em;
   3.163 -    min-width: 7.5em;
   3.164 -    color: #b9ab2d;
   3.165 -}
   3.166 -div.issue-title { color: #e05252; }
   3.167 -div.note-title { color: #52e052; }
   3.168 -div.issue-title span, div.note-title span {
   3.169 -    text-transform: uppercase;
   3.170 -}
   3.171 -div.note, div.issue {
   3.172 -    margin-top: 1em;
   3.173 -    margin-bottom: 1em;
   3.174 -}
   3.175 -.note > p:first-child, .issue > p:first-child { margin-top: 0 }
   3.176 -.issue, .note {
   3.177 -    padding: .5em;
   3.178 -    border-left-width: .5em;
   3.179 -    border-left-style: solid;
   3.180 -}
   3.181 -div.issue, div.note {
   3.182 -    padding: 0.5em;
   3.183 -    margin: 1em 0;
   3.184 -    position: relative;
   3.185 -    clear: both;
   3.186 -}
   3.187 -span.note, span.issue { padding: .1em .5em .15em; }
   3.188 -
   3.189 -.issue {
   3.190 -    border-color: #e05252;
   3.191 -    background: #fbe9e9;
   3.192 -}
   3.193 -.note {
   3.194 -    border-color: #52e052;
   3.195 -    background: #e9fbe9;
   3.196 -}
   3.197 -
   3.198 -
   3.199 -</style><style>/* HIGHLIGHTS */
   3.200 -code.prettyprint {
   3.201 -    color:  inherit;
   3.202 -}
   3.203 -
   3.204 -/* this from google-code-prettify */
   3.205 -.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}
   3.206 -</style><link rel="stylesheet" href="http://www.w3.org/StyleSheets/TR/W3C-WD"><!--[if lt IE 9]><script src='undefined://www.w3.org/2008/site/js/html5shiv.js'></script><![endif]--></head>
   3.207 -  <body><div class="head">
   3.208 -  <p>
   3.209 -
   3.210 -      <a href="http://www.w3.org/"><img width="72" height="48" src="http://www.w3.org/Icons/w3c_home" alt="W3C"></a>
   3.211 -
   3.212 -  </p>
   3.213 -  <h1 class="title" id="title">Network Service Discovery</h1>
   3.214 -
   3.215 -  <h2 id="w3c-working-draft-04-october-2012"><abbr title="World Wide Web Consortium">W3C</abbr> Working Draft 04 October 2012</h2>
   3.216 -  <dl>
   3.217 -
   3.218 -      <dt>This version:</dt>
   3.219 -      <dd><a href="http://www.w3.org/TR/2012/WD-discovery-api-20121004/">http://www.w3.org/TR/2012/WD-discovery-api-20121004/</a></dd>
   3.220 -      <dt>Latest published version:</dt>
   3.221 -      <dd><a href="http://www.w3.org/TR/discovery-api/">http://www.w3.org/TR/discovery-api/</a></dd>
   3.222 -
   3.223 -
   3.224 -      <dt>Latest editor's draft:</dt>
   3.225 -      <dd><a href="http://dvcs.w3.org/hg/dap/raw-file/tip/discovery-api/Overview.html">http://dvcs.w3.org/hg/dap/raw-file/tip/discovery-api/Overview.html</a></dd>
   3.226 -
   3.227 -
   3.228 -
   3.229 -
   3.230 -
   3.231 -      <dt>Previous version:</dt>
   3.232 -      <dd><a href="http://www.w3.org/TR/2012/WD-discovery-api-20120807/">http://www.w3.org/TR/2012/WD-discovery-api-20120807/</a></dd>
   3.233 -
   3.234 -
   3.235 -    <dt>Editors:</dt>
   3.236 -    <dd><span>Rich Tibbett</span>, <a href="http://opera.com/">Opera Software ASA</a></dd>
   3.237 -<dd><span>Clarke Stevens</span>, <a href="http://cablelabs.com/">CableLabs</a></dd>
   3.238 -
   3.239 -
   3.240 -  </dl>
   3.241 -
   3.242 -
   3.243 -
   3.244 -
   3.245 -
   3.246 -      <p class="copyright">
   3.247 -        <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> ©
   3.248 -        2012
   3.249 -
   3.250 -        <a href="http://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup>
   3.251 -        (<a href="http://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>,
   3.252 -        <a href="http://www.ercim.eu/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>,
   3.253 -        <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved.
   3.254 -        <abbr title="World Wide Web Consortium">W3C</abbr> <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
   3.255 -        <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and
   3.256 -        <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> rules apply.
   3.257 -      </p>
   3.258 -
   3.259 -
   3.260 -  <hr>
   3.261 -</div>
   3.262 -    <section id="abstract" class="introductory"><h2>Abstract</h2>
   3.263 -      <p>
   3.264 -        This specification defines a mechanism for an HTML document to discover and subsequently communicate with
   3.265 -        <abbr title="Hypertext Transfer Protocol">HTTP</abbr>-based services advertised via common discovery protocols
   3.266 -        within the current network.
   3.267 -      </p>
   3.268 -    </section><section id="sotd" class="introductory"><h2>Status of This Document</h2>
   3.269 -
   3.270 -
   3.271 -
   3.272 -        <p>
   3.273 -          <em>This section describes the status of this document at the time of its publication. Other
   3.274 -          documents may supersede this document. A list of current <abbr title="World Wide Web Consortium">W3C</abbr> publications and the latest revision
   3.275 -          of this technical report can be found in the <a href="http://www.w3.org/TR/"><abbr title="World Wide Web Consortium">W3C</abbr> technical reports
   3.276 -          index</a> at http://www.w3.org/TR/.</em>
   3.277 -        </p>
   3.278 -
   3.279 -      <p>
   3.280 -        This document represents the early consensus of the group on the scope and features of the proposed <abbr title="Application Programming Interface">API</abbr>.
   3.281 -      </p>
   3.282 -
   3.283 -        <p>
   3.284 -          This document was published by the <a href="http://www.w3.org/2009/dap/">Device APIs Working Group</a> as a Working Draft.
   3.285 -
   3.286 -            This document is intended to become a <abbr title="World Wide Web Consortium">W3C</abbr> Recommendation.
   3.287 -
   3.288 -          If you wish to make comments regarding this document, please send them to
   3.289 -          <a href="mailto:public-device-apis@w3.org">public-device-apis@w3.org</a>
   3.290 -          (<a href="mailto:public-device-apis-request@w3.org?subject=subscribe">subscribe</a>,
   3.291 -          <a href="http://lists.w3.org/Archives/Public/public-device-apis/">archives</a>).
   3.292 -
   3.293 -
   3.294 -          All feedback is welcome.
   3.295 -        </p>
   3.296 -
   3.297 -          <p>
   3.298 -            Publication as a Working Draft does not imply endorsement by the <abbr title="World Wide Web Consortium">W3C</abbr> Membership.
   3.299 -            This is a draft document and may be updated, replaced or obsoleted by other documents at
   3.300 -            any time. It is inappropriate to cite this document as other than work in progress.
   3.301 -          </p>
   3.302 -
   3.303 -
   3.304 -        <p>
   3.305 -
   3.306 -            This document was produced by a group operating under the
   3.307 -            <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 <abbr title="World Wide Web Consortium">W3C</abbr> Patent Policy</a>.
   3.308 -
   3.309 -
   3.310 -
   3.311 -
   3.312 -              <abbr title="World Wide Web Consortium">W3C</abbr> maintains a <a href="http://www.w3.org/2004/01/pp-impl/43696/status" rel="disclosure">public list of any patent disclosures</a>
   3.313 -
   3.314 -            made in connection with the deliverables of the group; that page also includes instructions for
   3.315 -            disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains
   3.316 -            <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential Claim(s)</a> must disclose the
   3.317 -            information in accordance with <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section
   3.318 -            6 of the <abbr title="World Wide Web Consortium">W3C</abbr> Patent Policy</a>.
   3.319 -
   3.320 -
   3.321 -        </p>
   3.322 -
   3.323 -
   3.324 -
   3.325 -
   3.326 -</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>
   3.327 -        Introduction
   3.328 -      </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>
   3.329 -          Dependencies
   3.330 -        </a></li></ul></li><li class="tocline"><a href="#terminology" class="tocxref"><span class="secno">3. </span>
   3.331 -        Terminology
   3.332 -      </a></li><li class="tocline"><a href="#requesting-networked-services" class="tocxref"><span class="secno">4. </span>
   3.333 -        Requesting networked services
   3.334 -      </a><ul class="toc"><li class="tocline"><a href="#methods" class="tocxref"><span class="secno">4.1 </span>
   3.335 -          Methods
   3.336 -        </a></li><li class="tocline"><a href="#error-handling" class="tocxref"><span class="secno">4.2 </span>
   3.337 -          Error Handling
   3.338 -        </a></li></ul></li><li class="tocline"><a href="#obtaining-networked-services" class="tocxref"><span class="secno">5. </span>
   3.339 -        Obtaining networked services
   3.340 -      </a><ul class="toc"><li class="tocline"><a href="#attributes" class="tocxref"><span class="secno">5.1 </span>
   3.341 -          Attributes
   3.342 -        </a></li><li class="tocline"><a href="#methods-1" class="tocxref"><span class="secno">5.2 </span>
   3.343 -          Methods
   3.344 -        </a></li><li class="tocline"><a href="#events" class="tocxref"><span class="secno">5.3 </span>
   3.345 -          Events
   3.346 -        </a></li></ul></li><li class="tocline"><a href="#communicating-with-a-networked-service" class="tocxref"><span class="secno">6. </span>
   3.347 -        Communicating with a networked service
   3.348 -      </a><ul class="toc"><li class="tocline"><a href="#attributes-1" class="tocxref"><span class="secno">6.1 </span>
   3.349 -          Attributes
   3.350 -        </a></li><li class="tocline"><a href="#states" class="tocxref"><span class="secno">6.2 </span>
   3.351 -          States
   3.352 -        </a></li><li class="tocline"><a href="#events-1" class="tocxref"><span class="secno">6.3 </span>
   3.353 -          Events
   3.354 -        </a></li></ul></li><li class="tocline"><a href="#service-discovery" class="tocxref"><span class="secno">7. </span>
   3.355 -        Service Discovery
   3.356 -      </a><ul class="toc"><li class="tocline"><a href="#zeroconf-mdns-dns-sd" class="tocxref"><span class="secno">7.1 </span>
   3.357 -          Zeroconf (<abbr title="Multicast DNS">mDNS</abbr> + <abbr title="Domain Name System">DNS</abbr>-<abbr title="Service Discovery">SD</abbr>)
   3.358 -        </a></li><li class="tocline"><a href="#simple-service-discovery-protocol-ssdp" class="tocxref"><span class="secno">7.2 </span>
   3.359 -          Simple Service Discovery Protocol (<abbr title="Simple Service Discovery Protocol">SSDP</abbr>)
   3.360 -        </a></li><li class="tocline"><a href="#network-topology-monitoring" class="tocxref"><span class="secno">7.3 </span>
   3.361 -          Network Topology Monitoring
   3.362 -        </a></li></ul></li><li class="tocline"><a href="#events-summary" class="tocxref"><span class="secno">8. </span>
   3.363 -        Events Summary
   3.364 -      </a></li><li class="tocline"><a href="#garbage-collection" class="tocxref"><span class="secno">9. </span>
   3.365 -        Garbage collection
   3.366 -      </a></li><li class="tocline"><a href="#use-cases-and-requirements" class="tocxref"><span class="secno">10. </span>
   3.367 -        Use Cases and Requirements
   3.368 -      </a></li><li class="tocline"><a href="#examples" class="tocxref"><span class="secno">A. </span>
   3.369 -        Examples
   3.370 -      </a></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">B. </span>
   3.371 -        Acknowledgements
   3.372 -      </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>
   3.373 -
   3.374 -    <section class="informative" id="introduction">
   3.375 -      <!--OddPage--><h2><span class="secno">1. </span>
   3.376 -        Introduction
   3.377 -      </h2><p><em>This section is non-normative.</em></p>
   3.378 -      <p>
   3.379 -        To enable Web pages to connect and communicate with Local-networked Services provided over <abbr title="Hypertext Transfer Protocol">HTTP</abbr>, this
   3.380 -        specification introduces the <a href="#navigatornetworkservice"><code>NavigatorNetworkService</code></a>
   3.381 -        interface.
   3.382 -      </p>
   3.383 -      <p>
   3.384 -        Using this <abbr title="Application Programming Interface">API</abbr> consists of requesting a well-known
   3.385 -        service type, known by developers and advertised by Local-networked Devices. User authorization, where the user
   3.386 -        connects the web page to discovered services, is expected before the web page is able to interact
   3.387 -        with any Local-networked Services.
   3.388 -      </p>
   3.389 -      <p>
   3.390 -        A web page creates a request to obtain connectivity to services running in the network by specifying a
   3.391 -        well-known discovery service type that it wishes to interact with.
   3.392 -      </p>
   3.393 -      <p>
   3.394 -        The user agent, having captured all advertised services on the network from the <a href="#dfn-service-discovery-mechanisms" class="internalDFN">service discovery
   3.395 -        mechanisms</a> included in this recommendation, attempts to match the requested service type to a discovered
   3.396 -        service according to the processing described herein.
   3.397 -      </p>
   3.398 -      <p>
   3.399 -        If a service connectivity request is successful then the Web page is provided with the necessary information to
   3.400 -        communicate with the authorized Local-networked Service. If the request fails then the Web page will receive an
   3.401 -        error callback containing an error code describing the cause of Local-networked Service connectivity failure.
   3.402 -      </p>
   3.403 -      <p>
   3.404 -        Once connected to a Local-networked Service the Web page can send requests and receive responses to the
   3.405 -        Local-networked Service via the messaging format and appropriate channel inferred from the service type
   3.406 -        authorized via the provided <abbr title="Application Programming Interface">API</abbr>. The Web page, once connected, can also receive service-pushed events, in the
   3.407 -        messaging format supported by the Local-networked Device, if such event subscription functionality is provided
   3.408 -        by the connected Local-networked Service.
   3.409 -      </p>
   3.410 -      <div class="example">
   3.411 -        <p>
   3.412 -          Example of requesting a <abbr title="Domain Name System">DNS</abbr>-<abbr title="Service Discovery">SD</abbr> advertised service:
   3.413 -        </p>
   3.414 -        <hr>
   3.415 -        <pre class="highlight prettyprint"><span class="kwd">function</span><span class="pln"> showServices</span><span class="pun">(</span><span class="pln"> services </span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
   3.416 -  </span><span class="com">// Show a list of all the services provided to the web page</span><span class="pln">
   3.417 -  </span><span class="kwd">for</span><span class="pun">(</span><span class="kwd">var</span><span class="pln"> i </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class="pun">,</span><span class="pln"> l </span><span class="pun">=</span><span class="pln"> services</span><span class="pun">.</span><span class="pln">length</span><span class="pun">;</span><span class="pln"> i </span><span class="pun">&lt;</span><span class="pln"> l</span><span class="pun">;</span><span class="pln"> i</span><span class="pun">++)</span><span class="pln"> console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln"> services</span><span class="pun">[</span><span class="pln">i</span><span class="pun">].</span><span class="pln">name </span><span class="pun">);</span><span class="pln">
   3.418 -</span><span class="pun">}</span><span class="pln">
   3.419 -
   3.420 -navigator</span><span class="pun">.</span><span class="pln">getNetworkServices</span><span class="pun">(</span><span class="str">'zeroconf:_boxee-jsonrpc._tcp'</span><span class="pun">,</span><span class="pln"> showServices</span><span class="pun">);</span></pre>
   3.421 -      </div>
   3.422 -      <div class="example">
   3.423 -        <p>
   3.424 -          Example of requesting a UPnP advertised service, also handling error conditions:
   3.425 -        </p>
   3.426 -        <hr>
   3.427 -        <pre class="highlight prettyprint"><span class="kwd">function</span><span class="pln"> showServices</span><span class="pun">(</span><span class="pln"> services </span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
   3.428 -  </span><span class="com">// Show a list of all the services provided to the web page</span><span class="pln">
   3.429 -  </span><span class="kwd">for</span><span class="pun">(</span><span class="kwd">var</span><span class="pln"> i </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class="pun">,</span><span class="pln"> l </span><span class="pun">=</span><span class="pln"> services</span><span class="pun">.</span><span class="pln">length</span><span class="pun">;</span><span class="pln"> i </span><span class="pun">&lt;</span><span class="pln"> l</span><span class="pun">;</span><span class="pln"> i</span><span class="pun">++)</span><span class="pln"> console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln"> services</span><span class="pun">[</span><span class="pln">i</span><span class="pun">].</span><span class="pln">name </span><span class="pun">);</span><span class="pln">
   3.430 -</span><span class="pun">}</span><span class="pln">
   3.431 -
   3.432 -</span><span class="kwd">function</span><span class="pln"> error</span><span class="pun">(</span><span class="pln"> e </span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
   3.433 -  console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln"> </span><span class="str">"Error occurred: "</span><span class="pln"> </span><span class="pun">+</span><span class="pln"> e</span><span class="pun">.</span><span class="pln">code </span><span class="pun">);</span><span class="pln">
   3.434 -</span><span class="pun">}</span><span class="pln">
   3.435 -
   3.436 -navigator</span><span class="pun">.</span><span class="pln">getNetworkServices</span><span class="pun">(</span><span class="str">'upnp:urn:schemas-upnp-org:service:ContentDirectory:1'</span><span class="pun">,</span><span class="pln"> showServices</span><span class="pun">,</span><span class="pln"> error</span><span class="pun">);</span></pre>
   3.437 -      </div>
   3.438 -      <div class="example">
   3.439 -        <p>
   3.440 -          Example of requesting either a <abbr title="Domain Name System">DNS</abbr>-<abbr title="Service Discovery">SD</abbr> or UPnP advertised service:
   3.441 -        </p>
   3.442 -        <hr>
   3.443 -        <pre class="highlight prettyprint"><span class="kwd">function</span><span class="pln"> showServices</span><span class="pun">(</span><span class="pln"> services </span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
   3.444 -  </span><span class="com">// Show a list of all the services provided to the web page (+ service type)</span><span class="pln">
   3.445 -  </span><span class="kwd">for</span><span class="pun">(</span><span class="kwd">var</span><span class="pln"> i </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class="pun">,</span><span class="pln"> l </span><span class="pun">=</span><span class="pln"> services</span><span class="pun">.</span><span class="pln">length</span><span class="pun">;</span><span class="pln"> i </span><span class="pun">&lt;</span><span class="pln"> l</span><span class="pun">;</span><span class="pln"> i</span><span class="pun">++)</span><span class="pln">
   3.446 -     console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln"> services</span><span class="pun">[</span><span class="pln">i</span><span class="pun">].</span><span class="pln">name </span><span class="pun">+</span><span class="pln"> </span><span class="str">'('</span><span class="pln"> </span><span class="pun">+</span><span class="pln"> services</span><span class="pun">[</span><span class="pln">i</span><span class="pun">].</span><span class="pln">type </span><span class="pun">+</span><span class="pln"> </span><span class="str">')'</span><span class="pln"> </span><span class="pun">);</span><span class="pln">
   3.447 -</span><span class="pun">}</span><span class="pln">
   3.448 -
   3.449 -navigator</span><span class="pun">.</span><span class="pln">getNetworkServices</span><span class="pun">([</span><span class="pln">
   3.450 -  </span><span class="str">'zeroconf:_boxee-jsonrpc._tcp'</span><span class="pun">,</span><span class="pln">
   3.451 -  </span><span class="str">'upnp:urn:schemas-upnp-org:service:ContentDirectory:1'</span><span class="pln">
   3.452 -</span><span class="pun">],</span><span class="pln"> showServices</span><span class="pun">);</span></pre>
   3.453 -      </div>
   3.454 -      <p>
   3.455 -        For more detailed examples see the <a href="#examples">Examples</a> section.
   3.456 -      </p>
   3.457 -    </section>
   3.458 -    <section id="conformance"><!--OddPage--><h2><span class="secno">2. </span>Conformance</h2>
   3.459 -<p>
   3.460 -  As well as sections marked as non-normative, all authoring guidelines, diagrams, examples,
   3.461 -  and notes in this specification are non-normative. Everything else in this specification is
   3.462 -  normative.
   3.463 -</p>
   3.464 -<p>
   3.465 -  The key words <em class="rfc2119" title="must">must</em>, <em class="rfc2119" title="must not">must not</em>, <em class="rfc2119" title="required">required</em>, <em class="rfc2119" title="should">should</em>, <em class="rfc2119" title="should not">should not</em>, <em class="rfc2119" title="recommended">recommended</em>, <em class="rfc2119" title="may">may</em>,
   3.466 -  and <em class="rfc2119" title="optional">optional</em> in this specification are to be interpreted as described in [<cite><a class="bibref" href="#bib-RFC2119">RFC2119</a></cite>].
   3.467 -</p>
   3.468 -
   3.469 -      <p>
   3.470 -        Requirements phrased in the imperative as part of algorithms (such as "strip any leading space characters" or
   3.471 -        "return false and abort these steps") are to be interpreted with the meaning of the key word ("must", "should",
   3.472 -        "may", etc) used in introducing the algorithm.
   3.473 -      </p>
   3.474 -      <p>
   3.475 -        Some conformance requirements are phrased as requirements on attributes, methods or objects. Such requirements
   3.476 -        are to be interpreted as requirements on user agents.
   3.477 -      </p>
   3.478 -      <p>
   3.479 -        Conformance requirements phrased as algorithms or specific steps <em class="rfc2119" title="may">may</em> be implemented in any manner, so long as
   3.480 -        the end result is equivalent. (In particular, the algorithms defined in this specification are intended to be
   3.481 -        easy to follow, and not intended to be performant.)
   3.482 -      </p>
   3.483 -      <p>
   3.484 -        The only conformance class defined by this specification is a <dfn id="dfn-user-agent">user agent</dfn>.
   3.485 -      </p>
   3.486 -      <p>
   3.487 -        User agents <em class="rfc2119" title="may">may</em> impose implementation-specific limits on otherwise unconstrained inputs, e.g. to prevent denial
   3.488 -        of service attacks, to guard against running out of memory, or to work around platform-specific limitations.
   3.489 -      </p>
   3.490 -      <p>
   3.491 -        When support for a feature is disabled (e.g. as an emergency measure to mitigate a security problem, or to aid
   3.492 -        in development, or for performance reasons), user agents <em class="rfc2119" title="must">must</em> act as if they had no support for the feature
   3.493 -        whatsoever, and as if the feature was not mentioned in this specification. For example, if a particular feature
   3.494 -        is accessed via an attribute in a Web IDL interface, the attribute itself would be omitted from the objects
   3.495 -        that implement that interface - leaving the attribute on the object but making it return null or throw an
   3.496 -        exception is insufficient.
   3.497 -      </p>
   3.498 -      <section id="dependencies">
   3.499 -        <h3><span class="secno">2.1 </span>
   3.500 -          Dependencies
   3.501 -        </h3>This specification relies on several other underlying specifications.
   3.502 -        <dl>
   3.503 -          <dt>
   3.504 -            HTML
   3.505 -          </dt>
   3.506 -          <dd>
   3.507 -            Many fundamental concepts from HTML are used by this specification. [<cite><a class="bibref" href="#bib-HTML5">HTML5</a></cite>]
   3.508 -          </dd>
   3.509 -          <dt>
   3.510 -            WebIDL
   3.511 -          </dt>
   3.512 -          <dd>
   3.513 -            The IDL blocks in this specification use the semantics of the WebIDL specification. [<cite><a class="bibref" href="#bib-WEBIDL">WEBIDL</a></cite>]
   3.514 -          </dd>
   3.515 -        </dl>
   3.516 -      </section>
   3.517 -    </section>
   3.518 -    <section id="terminology">
   3.519 -      <!--OddPage--><h2><span class="secno">3. </span>
   3.520 -        Terminology
   3.521 -      </h2>
   3.522 -      <p>
   3.523 -        The construction "a <code>Foo</code> object", where <code>Foo</code> is actually an interface, is sometimes
   3.524 -        used instead of the more accurate "an object implementing the interface <code>Foo</code>".
   3.525 -      </p>
   3.526 -      <p>
   3.527 -        The term DOM is used to refer to the <abbr title="Application Programming Interface">API</abbr> set made available to scripts in Web applications, and does not
   3.528 -        necessarily imply the existence of an actual <code>Document</code> object or of any other <code>Node</code>
   3.529 -        objects as defined in the DOM Core specifications. [<cite><a class="bibref" href="#bib-DOM4">DOM4</a></cite>]
   3.530 -      </p>
   3.531 -      <p>
   3.532 -        An IDL attribute is said to be <em>getting</em> when its value is being retrieved (e.g. by author script), and
   3.533 -        is said to be <em>setting</em> when a new value is assigned to it.
   3.534 -      </p>
   3.535 -      <p>
   3.536 -        A <dfn id="dfn-valid-service-type">valid service type</dfn> is a string that begins with <code>upnp:</code> or <code>zeroconf:</code>
   3.537 -        followed by one or more characters in the ranges U+0021, U+0023 to U+0027, U+002A to U+002B, U+002D to U+002E,
   3.538 -        U+0030 to U+0039, U+0041 to U+005A, U+005E to U+007E.
   3.539 -      </p>
   3.540 -      <p>
   3.541 -        A <a href="#dfn-valid-service-type" class="internalDFN">valid service type</a> provided in the <code>type</code> attribute of the <a href="#dom-navigator-getnetworkservices"><code>getNetworkServices()</code></a> method will be matched against the
   3.542 -        services currently contained in the <a href="#dfn-list-of-available-service-records" class="internalDFN">list of available service records</a> according to the algorithms
   3.543 -        defined in this specification.
   3.544 -      </p>
   3.545 -      <p>
   3.546 -        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
   3.547 -        agent</a> generates and maintains for receiving <abbr title="Hypertext Transfer Protocol">HTTP</abbr> NOTIFY requests from UPnP Event sources. It is only
   3.548 -        required when the user agent implements UPnP Service Discovery as defined in this specification.
   3.549 -      </p>
   3.550 -    </section>
   3.551 -    <section id="requesting-networked-services">
   3.552 -      <!--OddPage--><h2><span class="secno">4. </span>
   3.553 -        Requesting networked services
   3.554 -      </h2>
   3.555 -      <pre class="widl">[Supplemental, NoInterfaceObject]
   3.556 -interface <dfn id="navigatornetworkservice">NavigatorNetworkService</dfn> {
   3.557 -  // Obtain a Local-networked Service
   3.558 -  void <a href="#dom-navigator-getnetworkservices">getNetworkServices</a>( in any type,
   3.559 -                           in <a href="#navigatornetworkservicesuccesscallback">NavigatorNetworkServiceSuccessCallback</a> successCallback,
   3.560 -                           in optional <a href="#navigatornetworkserviceerrorcallback">NavigatorNetworkServiceErrorCallback</a> errorCallback );
   3.561 -};
   3.562 -<a class="externalDFN" href="http://www.whatwg.org/specs/web-apps/current-work/complete/timers.html#navigator">Navigator</a> implements <a href="#navigatornetworkservice">NavigatorNetworkService</a>;
   3.563 -
   3.564 -[Callback=FunctionOnly, NoInterfaceObject]
   3.565 -interface <dfn id="navigatornetworkservicesuccesscallback">NavigatorNetworkServiceSuccessCallback</dfn> {
   3.566 -  void handleEvent( in <a href="#networkservices">NetworkServices</a> services );
   3.567 -};
   3.568 -
   3.569 -[NoInterfaceObject]
   3.570 -interface <dfn id="navigatornetworkserviceerror">NavigatorNetworkServiceError</dfn> {
   3.571 -  const unsigned short <a href="#dom-navigatornetworkserviceerror-permission_denied">PERMISSION_DENIED_ERR</a> = 1;
   3.572 -  const unsigned short <a href="#dom-navigatornetworkserviceerror-unknown_type_prefix">UNKNOWN_TYPE_PREFIX_ERR</a> = 2;
   3.573 -  readonly attribute unsigned short <a href="#dom-navigatornetworkserviceerror-code">code</a>;
   3.574 -};
   3.575 -
   3.576 -[Callback=FunctionOnly, NoInterfaceObject]
   3.577 -interface <dfn id="navigatornetworkserviceerrorcallback">NavigatorNetworkServiceErrorCallback</dfn> {
   3.578 -  void handleEvent( in <a href="#navigatornetworkserviceerror">NavigatorNetworkServiceError</a> error );
   3.579 -};
   3.580 -</pre>
   3.581 -      <section id="methods">
   3.582 -        <h3><span class="secno">4.1 </span>
   3.583 -          Methods
   3.584 -        </h3>
   3.585 -        <dl class="domintro">
   3.586 -          <dt>
   3.587 -            <var title="">window</var> . <code title="dom-navigator"><a href="http://www.whatwg.org/specs/web-apps/current-work/complete/timers.html#navigator">navigator</a></code> .
   3.588 -            <code title="dom-navigator-getNetworkServices"><a href="#dom-navigator-getnetworkservices">getNetworkServices</a></code> ( <var title="">type</var> , <var title="">successCallback</var> [, <var title="">errorCallback</var> ] )
   3.589 -          </dt>
   3.590 -          <dd>
   3.591 -            <p>
   3.592 -              Prompts the user to select discovered network services that have advertised support for the
   3.593 -              requested service type.
   3.594 -            </p>
   3.595 -            <p>
   3.596 -              The <var title="">type</var> argument contains one or more <a href="#dfn-valid-service-type" class="internalDFN">valid service type</a> tokens that the web
   3.597 -              page would like to interact with.
   3.598 -            </p>
   3.599 -            <p>
   3.600 -              If the user accepts, the <var title="">successCallback</var> is invoked, with zero or more <a href="#networkservice"><code>NetworkService</code></a> objects as its argument.
   3.601 -            </p>
   3.602 -            <p>
   3.603 -              If the user declines, the <var title="">errorCallback</var> (if any) is invoked.
   3.604 -            </p>
   3.605 -          </dd>
   3.606 -        </dl>
   3.607 -        <div>
   3.608 -          <p>
   3.609 -            When the <dfn id="dom-navigator-getnetworkservices" title="dom-navigator-getnetworkservices"><code>getNetworkServices(type, successCallback[,
   3.610 -               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:
   3.611 -          </p>
   3.612 -          <ol class="rule">
   3.613 -            <li>Let <var>requested control types</var> be initially set to an empty array.
   3.614 -            </li>
   3.615 -            <li>If <var>type</var> is an array consisting of one or more <a href="#dfn-valid-service-type" class="internalDFN">valid service type</a> tokens, then let
   3.616 -            <var>requested control types</var> by the value of <var>type</var>, removing any non-<a href="#dfn-valid-service-type" class="internalDFN">valid service
   3.617 -            type</a> tokens from the resulting array.
   3.618 -            </li>
   3.619 -            <li>If <var>type</var> is a string consisting of one <a href="#dfn-valid-service-type" class="internalDFN">valid service type</a> token, then let
   3.620 -            <var>requested control types</var> be an array containing one item with a value of <var>type</var>.
   3.621 -            </li>
   3.622 -            <li>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>
   3.623 -            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
   3.624 -                  object of type <code>Function</code>, with a new <a href="#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object whose <a href="#dom-navigatornetworkserviceerror-code"><code>code</code></a> attribute has the numeric value 2
   3.625 -                  (<a href="#dom-navigatornetworkserviceerror-unknown_type_prefix"><code>UNKNOWN_TYPE_PREFIX_ERR</code></a>) as
   3.626 -                  its argument, abort any remaining steps and return.
   3.627 -            </li>
   3.628 -            <li>
   3.629 -              <em>Process</em>: Let <var>services found</var> be an empty array.
   3.630 -            </li>
   3.631 -            <li>For each <var>available service</var> in the <a href="#dfn-list-of-available-service-records" class="internalDFN">list of available service records</a> run the following
   3.632 -            steps:
   3.633 -              <ol class="rule">
   3.634 -                <li>For each <var>requested control type</var> in <var>requested control types</var>: If <var>available
   3.635 -                service</var>'s <code>type</code> attribute equals the <var>requested control type</var> then let <var>
   3.636 -                  matched service</var> equal the value of <var>available service</var> and continue at the step
   3.637 -                  labeled <var>attach</var> below.
   3.638 -                </li>
   3.639 -                <li>Continue at the next <var>available service</var>.
   3.640 -                </li>
   3.641 -                <li>
   3.642 -                  <em>Attach</em>: If <var>matched service</var> is not empty then run the following steps:
   3.643 -                  <ol class="rule">
   3.644 -                    <li>Let <var>new service object</var> be a new <a href="#networkservice"><code>NetworkService</code></a> object, mapping the parameters of <var>matched
   3.645 -                    service</var> to this new object where possible.
   3.646 -                    </li>
   3.647 -                    <li>Append <var>new service object</var> to the <var>services found</var> array.
   3.648 -                    </li>
   3.649 -                  </ol>
   3.650 -                </li>
   3.651 -              </ol>
   3.652 -            </li>
   3.653 -            <li>Return, and run the remaining steps asynchronously.
   3.654 -            </li>
   3.655 -            <li>Optionally, e.g. based on a previously-established user preference, for security reasons, or due to
   3.656 -            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
   3.657 -                  object of type <code>Function</code>, with a new <a href="#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object whose <a href="#dom-navigatornetworkserviceerror-code"><code>code</code></a> attribute has the numeric value 1
   3.658 -                  (<a href="#dom-navigatornetworkserviceerror-permission_denied"><code>PERMISSION_DENIED_ERR</code></a>) as its
   3.659 -                  argument, abort any remaining steps and return.
   3.660 -            </li>
   3.661 -            <li>If <var>services found</var> is not an empty array then the <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="rfc2119" title="must">must</em> prompt the user in a
   3.662 -              user-agent-specific manner for permission to provide
   3.663 -            the <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/browsers.html#entry-script" class="externalDFN">entry script</a>'s <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/origin-0.html#origin" class="externalDFN">origin</a> with an array of <a href="#networkservice"><code>NetworkService</code></a> objects representing the <a href="#dfn-user-authorized" class="internalDFN">user-authorized</a> subset
   3.664 -                  of <var>services found</var>.
   3.665 -              <p>
   3.666 -                If the user grants permission to access one or more networked services then the <a href="#dfn-user-agent" class="internalDFN">user agent</a>
   3.667 -                <em class="rfc2119" title="should">should</em> include an "ongoing local-network communication" indicator.
   3.668 -              </p>
   3.669 -              <p>
   3.670 -                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
   3.671 -                   object of type <code>Function</code>, with a new <a href="#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object whose <a href="#dom-navigatornetworkserviceerror-code"><code>code</code></a> attribute has the numeric value 1
   3.672 -                   (<a href="#dom-navigatornetworkserviceerror-permission_denied"><code>PERMISSION_DENIED_ERR</code></a>) as its
   3.673 -                   argument, abort any remaining steps and return.
   3.674 -              </p>
   3.675 -              <p>
   3.676 -                If the user never responds, this algorithm stalls on this step.
   3.677 -              </p>
   3.678 -            </li>
   3.679 -            <li>Let <var>services</var> be an empty array.
   3.680 -            </li>
   3.681 -            <li>
   3.682 -               If <var>services found</var> is not an empty array then set <var>services</var> to be an array of one or more <a href="#networkservice"><code>NetworkService</code></a> objects for which the user granted permission above - known as the
   3.683 -            current objects <dfn id="dfn-user-authorized">user-authorized</dfn> services.
   3.684 -            </li>
   3.685 -            <li>For each Object <var>service</var> in <var>services</var>, if any, run the following sub-steps:
   3.686 -              <ol class="rule">
   3.687 -                <li>Add the <var>service</var>'s <code>url</code> parameter to the <a href="#dfn-entry-script-origin-s-url-whitelist" class="internalDFN">entry script origin's
   3.688 -                  <abbr title="Uniform Resource Locator">URL</abbr> whitelist</a>.
   3.689 -                </li>
   3.690 -                <li>If <var>service</var>'s <code>type</code> parameter begins with the DOMString "<code>upnp:</code>"
   3.691 -                and the <var>service</var>'s <code>eventsUrl</code> parameter is not empty then <a href="#dfn-setup-a-upnp-events-subscription" class="internalDFN">setup a UPnP Events
   3.692 -                Subscription</a> for <var>service</var>.
   3.693 -                </li>
   3.694 -              </ol>
   3.695 -            </li>
   3.696 -            <li>Let <var>services manager</var> be a new <a href="#networkservices"><code>NetworkServices</code></a>
   3.697 -            object.
   3.698 -            </li>
   3.699 -            <li>Set <var>services manager</var>'s <a href="#dom-networkservices-servicesavailable"><code>servicesAvailable</code></a> attribute to the number of
   3.700 -            items currently found in the <a href="#dfn-list-of-available-service-records" class="internalDFN">list of available service records</a> whose <code>type</code> property
   3.701 -            matches any of the tokens requested in <var>requested control types</var>.
   3.702 -            </li>
   3.703 -            <li>Add <var>services</var>, if any, to the <var>services manager</var> object as its collection of <a href="#dfn-indexed-properties-1" class="internalDFN">indexed
   3.704 -            properties</a>. If <var>services</var> is an empty array then the <var>services manager</var> does not have any
   3.705 -            <var>indexed properties</var>.
   3.706 -            </li>
   3.707 -            <li>Set <var>services manager</var>'s <a href="#dom-networkservices-length"><code>length</code></a>
   3.708 -            attribute to the number of items in <var>services</var>.
   3.709 -            </li>
   3.710 -            <li>Add <var>services manager</var> to the <a href="#dfn-list-of-active-service-managers" class="internalDFN">list of active service managers</a>.
   3.711 -            </li>
   3.712 -            <li>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 <var>services
   3.713 -                  manager</var> as its argument.
   3.714 -            </li>
   3.715 -          </ol>
   3.716 -          <p>
   3.717 -            The <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#task-source" class="externalDFN">task source</a> for these <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#concept-task" class="externalDFN">tasks</a> is the <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#user-interaction-task-source" class="externalDFN">user interaction task source</a>.
   3.718 -          </p>
   3.719 -          <p>
   3.720 -            When a <a href="#networkservice"><code>NetworkService</code></a> object is provided to a Web page, the
   3.721 -            <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="rfc2119" title="must">must</em> add the <code>url</code> property to the <dfn id="dfn-entry-script-origin-s-url-whitelist">entry script origin's <abbr title="Uniform Resource Locator">URL</abbr>
   3.722 -            whitelist</dfn>. This list enables the Web page to override and initiate cross-site resource requests
   3.723 -            towards these URLs, and any sub-resources of these URLs, within the current <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/browsers.html#entry-script" class="externalDFN">entry script</a>'s <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/origin-0.html#origin" class="externalDFN">origin</a> via various existing mechanisms (e.g. Web Sockets, Server-Sent Events,
   3.724 -               Web Messaging, XMLHttpRequest).
   3.725 -          </p>
   3.726 -          <p>
   3.727 -            If the user navigates away from the
   3.728 -            <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/browsers.html#entry-script" class="externalDFN">entry script</a>'s <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/origin-0.html#origin" class="externalDFN">origin</a> then 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>.
   3.729 -            There is no persistence to network service selections provided to a web page. It is not possible to access
   3.730 -            a previously white-listed networked service without the necessary user authorization in all of the
   3.731 -            following cases:
   3.732 -          </p>
   3.733 -          <ul>
   3.734 -            <li>If the current script is reloaded at any point in the same or different window.
   3.735 -            </li>
   3.736 -            <li>if the current script reinvokes the <a href="#dom-navigator-getnetworkservices"><code>getNetworkServices()</code></a> method at any point in its
   3.737 -            execution.
   3.738 -            </li>
   3.739 -            <li>If the user navigates forward or back in their history to reload the current page.
   3.740 -            </li>
   3.741 -            <li>If a script is running in a different origin.
   3.742 -            </li>
   3.743 -          </ul>
   3.744 -        </div>
   3.745 -      </section>
   3.746 -      <section id="error-handling">
   3.747 -        <h3><span class="secno">4.2 </span>
   3.748 -          Error Handling
   3.749 -        </h3>
   3.750 -        <dl class="domintro">
   3.751 -          <dt>
   3.752 -            <var title="">error</var> . <code title="dom-NavigatorNetworkServiceError-code"><a href="#dom-navigatornetworkserviceerror-code">code</a></code>
   3.753 -          </dt>
   3.754 -          <dd>
   3.755 -            <p>
   3.756 -              Returns the current error's error code. At the current time, this will be <code>1</code> or
   3.757 -              <code>2</code>, for which the corresponding error constants <a href="#dom-navigatornetworkserviceerror-permission_denied"><code>PERMISSION_DENIED_ERR</code></a> and <a href="#dom-navigatornetworkserviceerror-unknown_type_prefix"><code>UNKNOWN_TYPE_PREFIX_ERR</code></a> are
   3.758 -              defined.
   3.759 -            </p>
   3.760 -          </dd>
   3.761 -        </dl>
   3.762 -        <p>
   3.763 -          The <dfn id="dom-navigatornetworkserviceerror-code" title="dom-navigatornetworkserviceerror-code"><code>code</code></dfn> attribute of a <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:
   3.764 -        </p>
   3.765 -        <dl>
   3.766 -          <dt>
   3.767 -            <dfn id="dom-navigatornetworkserviceerror-permission_denied" title="dom-navigatornetworkserviceerror-permission_denied"><code>PERMISSION_DENIED_ERR</code></dfn>
   3.768 -                (numeric value 1)
   3.769 -          </dt>
   3.770 -          <dd>
   3.771 -            The user or user agent denied the page permission to access any services.
   3.772 -          </dd>
   3.773 -          <dt>
   3.774 -            <dfn id="dom-navigatornetworkserviceerror-unknown_type_prefix" title="dom-navigatornetworkserviceerror-unknown_type_prefix"><code>UNKNOWN_TYPE_PREFIX_ERR</code></dfn>
   3.775 -                (numeric value 2)
   3.776 -          </dt>
   3.777 -          <dd>
   3.778 -            No <a href="#dfn-valid-service-type" class="internalDFN">valid service type</a> tokens were provided in the method invocation.
   3.779 -          </dd>
   3.780 -        </dl>
   3.781 -      </section>
   3.782 -    </section>
   3.783 -    <section id="obtaining-networked-services">
   3.784 -      <!--OddPage--><h2><span class="secno">5. </span>
   3.785 -        Obtaining networked services
   3.786 -      </h2>
   3.787 -      <p>
   3.788 -        The <a href="#networkservices"><code>NetworkServices</code></a> interface represents a collection of zero
   3.789 -        or more <dfn id="dfn-indexed-properties">indexed properties</dfn> that are
   3.790 -        each a <a href="#dfn-user-authorized" class="internalDFN">user-authorized</a> <a href="#networkservice"><code>NetworkService</code></a> object.
   3.791 -      </p>
   3.792 -      <p>
   3.793 -        A <a href="#networkservices"><code>NetworkServices</code></a> object is the top level success callback
   3.794 -        parameter from a call to
   3.795 -        <a href="#dom-navigator-getnetworkservices"><code>getNetworkServices()</code></a>.
   3.796 -      </p>
   3.797 -      <pre class="widl">[NoInterfaceObject]
   3.798 -interface <dfn id="networkservices">NetworkServices</dfn> {
   3.799 -  readonly attribute unsigned long    <a href="#dom-networkservices-length">length</a>;
   3.800 -  getter <a href="#networkservice">NetworkService</a> (unsigned long index);
   3.801 -  <a href="#networkservice">NetworkService</a>? <a href="#dom-networkservices-getservicebyid">getServiceById</a>(DOMString id);
   3.802 -
   3.803 -  readonly attribute unsigned long    <a href="#dom-networkservices-servicesavailable">servicesAvailable</a>;
   3.804 -
   3.805 -  // event handler attributes
   3.806 -           attribute <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#eventhandler" class="externalDFN">EventHandler</a>     <a href="#dom-networkservices-onserviceavailable">onserviceavailable</a>;
   3.807 -           attribute <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#eventhandler" class="externalDFN">EventHandler</a>     <a href="#dom-networkservices-onserviceunavailable">onserviceunavailable</a>;
   3.808 -
   3.809 -};
   3.810 -
   3.811 -<a href="#networkservices">NetworkServices</a> implements <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#interface-eventtarget" class="externalDFN">EventTarget</a>;
   3.812 -</pre>
   3.813 -      <section id="attributes">
   3.814 -        <h3><span class="secno">5.1 </span>
   3.815 -          Attributes
   3.816 -        </h3>
   3.817 -        <dl class="domintro">
   3.818 -          <dt>
   3.819 -            <code title="dom-networkservices-length"><a href="#dom-networkservices-length">length</a></code>
   3.820 -          </dt>
   3.821 -          <dd>
   3.822 -            <p>
   3.823 -              Returns the current number of items in the current object's collection of <a href="#networkservice"><code>NetworkService</code></a> objects.
   3.824 -            </p>
   3.825 -          </dd>
   3.826 -          <dt>
   3.827 -            <code title="dom-networkservices-servicesavailable"><a href="#dom-networkservices-servicesavailable">servicesAvailable</a></code>
   3.828 -          </dt>
   3.829 -          <dd>
   3.830 -            <p>
   3.831 -              Returns the current number of items matching one of the app-requested <a href="#dfn-valid-service-type" class="internalDFN">valid service type</a> tokens in
   3.832 -              the <a href="#dfn-list-of-available-service-records" class="internalDFN">list of available service records</a>.
   3.833 -            </p>
   3.834 -          </dd>
   3.835 -        </dl>
   3.836 -        <div>
   3.837 -          <p>
   3.838 -            The <dfn id="dom-networkservices-length"><code>length</code></dfn> attribute <em class="rfc2119" title="must">must</em> return the number of
   3.839 -            <a href="#networkservice"><code>NetworkService</code></a> objects represented by the collection.
   3.840 -          </p>
   3.841 -          <p>
   3.842 -            The <dfn id="dom-networkservices-servicesavailable"><code>servicesAvailable</code></dfn> attribute <em class="rfc2119" title="must">must</em>
   3.843 -            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>
   3.844 -            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
   3.845 -            <a href="#networkservices"><code>NetworkServices</code></a> object.
   3.846 -          </p>
   3.847 -        </div>
   3.848 -      </section>
   3.849 -      <section id="methods-1">
   3.850 -        <h3><span class="secno">5.2 </span>
   3.851 -          Methods
   3.852 -        </h3>
   3.853 -        <dl class="domintro">
   3.854 -          <dt>
   3.855 -            <code title="networkservices-getter"><a href="#networkservices">services</a></code> [ <var title="">index</var> ]
   3.856 -          </dt>
   3.857 -          <dd>
   3.858 -            <p>
   3.859 -              Returns the specified <a href="#networkservice"><code>NetworkService</code></a> object.
   3.860 -            </p>
   3.861 -          </dd>
   3.862 -          <dt>
   3.863 -            <code title="networkservices-getter"><a href="#networkservices">services</a></code> . <code title="dom-networkservices-getservicebyid"><a href="#dom-networkservices-getservicebyid">getServiceById</a></code> ( <var title="">id</var> )
   3.864 -          </dt>
   3.865 -          <dd>
   3.866 -            <p>
   3.867 -              Returns the <a href="#networkservice"><code>NetworkService</code></a> object with the given identifier,
   3.868 -              or null if no service has that identifier.
   3.869 -            </p>
   3.870 -          </dd>
   3.871 -        </dl>
   3.872 -        <p>
   3.873 -          A <a href="#networkservices"><code>NetworkServices</code></a> object represents the current collection of zero
   3.874 -          or more <a href="#networkservice"><code>NetworkService</code></a> objects - its <a href="#dfn-indexed-properties-1" class="internalDFN">indexed properties</a>. A <a href="#networkservices"><code>NetworkServices</code></a> object is <span>immutable</span> meaning that
   3.875 -          <a href="#dfn-indexed-properties-1" class="internalDFN">indexed properties</a> cannot be added and <a href="#dfn-indexed-properties-1" class="internalDFN">indexed properties</a> cannot be removed for the lifetime of
   3.876 -          a <a href="#networkservices"><code>NetworkServices</code></a> object.
   3.877 -        </p>
   3.878 -        <div class="note"><div class="note-title"><span>Note</span></div><p class="">
   3.879 -          Each service in a <a href="#networkservices"><code>NetworkServices</code></a> object thus has an index; the
   3.880 -          first has the index 0, and each subsequent service is numbered one higher than the previous one.
   3.881 -        </p></div>
   3.882 -        <p>
   3.883 -          The <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#supported-property-indices" class="externalDFN">supported property indices</a> of <a href="#networkservices"><code>NetworkServices</code></a> objects at any instant are the numbers from zero to
   3.884 -             the number of the <a href="#networkservice"><code>NetworkService</code></a> objects in the collection
   3.885 -             minus one.
   3.886 -        </p>
   3.887 -        <p>
   3.888 -          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
   3.889 -             <a href="#networkservices"><code>NetworkServices</code></a> object 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 item in
   3.890 -             the collection.
   3.891 -        </p>
   3.892 -        <p>
   3.893 -          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
   3.894 -          collection whose <a href="#dom-networkservice-id"><code>id</code></a> attribute is equal to the value of the
   3.895 -          <var>id</var> argument provided. When no <a href="#networkservice"><code>NetworkService</code></a> objects
   3.896 -          match the given argument, the method <em class="rfc2119" title="must">must</em> return null.
   3.897 -        </p>
   3.898 -        <p>
   3.899 -          Services available within the local network can connect and disconnect at different times during the
   3.900 -          execution of a web page. A <a href="#dfn-user-agent" class="internalDFN">user agent</a> can inform a web page when the state of networked services
   3.901 -          matching the requested <a href="#dfn-valid-service-type" class="internalDFN">valid service type</a> change. Web pages can use this information to enable in-page
   3.902 -          experiences for communicating the state of networked services with the ability to change the particular
   3.903 -          service or set of services the page is connected to by re-invoking the <a href="#dom-navigator-getnetworkservices"><code>getNetworkServices()</code></a> method.
   3.904 -        </p>
   3.905 -      </section>
   3.906 -      <section id="events">
   3.907 -        <h3><span class="secno">5.3 </span>
   3.908 -          Events
   3.909 -        </h3>
   3.910 -        <p>
   3.911 -          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:
   3.912 -        </p>
   3.913 -        <table border="1">
   3.914 -          <thead>
   3.915 -            <tr>
   3.916 -              <th>
   3.917 -                <span title="event handlers">Event handler</span>
   3.918 -              </th>
   3.919 -              <th>
   3.920 -                <span>Event handler event type</span>
   3.921 -              </th>
   3.922 -            </tr>
   3.923 -          </thead>
   3.924 -          <tbody>
   3.925 -            <tr>
   3.926 -              <td>
   3.927 -                <dfn id="dom-networkservices-onserviceavailable" title="dom-NetworkServices-onserviceavailable"><code>onserviceavailable</code></dfn>
   3.928 -              </td>
   3.929 -              <td>
   3.930 -                <a href="#event-serviceavailable"><code>serviceavailable</code></a>
   3.931 -              </td>
   3.932 -            </tr>
   3.933 -            <tr>
   3.934 -              <td>
   3.935 -                <dfn id="dom-networkservices-onserviceunavailable" title="dom-NetworkServices-onserviceunavailable"><code>onserviceunavailable</code></dfn>
   3.936 -              </td>
   3.937 -              <td>
   3.938 -                <a href="#event-serviceunavailable"><code>serviceunavailable</code></a>
   3.939 -              </td>
   3.940 -            </tr>
   3.941 -          </tbody>
   3.942 -        </table>
   3.943 -      </section>
   3.944 -    </section>
   3.945 -    <section id="communicating-with-a-networked-service">
   3.946 -      <!--OddPage--><h2><span class="secno">6. </span>
   3.947 -        Communicating with a networked service
   3.948 -      </h2>
   3.949 -      <p>
   3.950 -        The <a href="#networkservice"><code>NetworkService</code></a> interface is used to provide a set of connection
   3.951 -        information for an <abbr title="Hypertext Transfer Protocol">HTTP</abbr> service endpoint and if available, service events, running on a networked device.
   3.952 -      </p>
   3.953 -      <pre class="widl">[NoInterfaceObject]
   3.954 -interface <dfn id="networkservice">NetworkService</dfn> {
   3.955 -  readonly attribute DOMString        <a href="#dom-networkservice-id">id</a>;
   3.956 -  readonly attribute DOMString        <a href="#dom-networkservice-name">name</a>;
   3.957 -  readonly attribute DOMString        <a href="#dom-networkservice-type">type</a>;
   3.958 -  readonly attribute DOMString        <a href="#dom-networkservice-url">url</a>;
   3.959 -  readonly attribute DOMString        <a href="#dom-networkservice-config">config</a>;
   3.960 -
   3.961 -  readonly attribute boolean          <a href="#dom-networkservice-online">online</a>;
   3.962 -
   3.963 -  // event handler attributes
   3.964 -           attribute <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#eventhandler" class="externalDFN">EventHandler</a>     <a href="#dom-networkservice-onserviceonline">onserviceonline</a>;
   3.965 -           attribute <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#eventhandler" class="externalDFN">EventHandler</a>     <a href="#dom-networkservice-onserviceoffline">onserviceoffline</a>;
   3.966 -
   3.967 -           attribute <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#eventhandler" class="externalDFN">EventHandler</a>     <a href="#dom-networkservice-onnotify">onnotify</a>;
   3.968 -};
   3.969 -
   3.970 -<a href="#networkservice">NetworkService</a> implements <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#interface-eventtarget" class="externalDFN">EventTarget</a>;
   3.971 -</pre>
   3.972 -      <section id="attributes-1">
   3.973 -        <h3><span class="secno">6.1 </span>
   3.974 -          Attributes
   3.975 -        </h3>
   3.976 -        <dl class="domintro">
   3.977 -          <dt>
   3.978 -            <var title="">service</var> . <code title="dom-networkservice-id"><a href="#dom-networkservice-id">id</a></code>
   3.979 -          </dt>
   3.980 -          <dd>
   3.981 -            <p>
   3.982 -              A unique identifier for the given user-selected service instance.
   3.983 -            </p>
   3.984 -          </dd>
   3.985 -          <dt>
   3.986 -            <var title="">service</var> . <code title="dom-networkservice-name"><a href="#dom-networkservice-name">name</a></code>
   3.987 -          </dt>
   3.988 -          <dd>
   3.989 -            <p>
   3.990 -              The name of the user-selected service.
   3.991 -            </p>
   3.992 -          </dd>
   3.993 -          <dt>
   3.994 -            <var title="">service</var> . <code title="dom-networkservice-type"><a href="#dom-networkservice-type">type</a></code>
   3.995 -          </dt>
   3.996 -          <dd>
   3.997 -            <p>
   3.998 -              The <a href="#dfn-valid-service-type" class="internalDFN">valid service type</a> token value of the user-selected service.
   3.999 -            </p>
  3.1000 -          </dd>
  3.1001 -          <dt>
  3.1002 -            <var title="">service</var> . <code title="dom-networkservice-url"><a href="#dom-networkservice-url">url</a></code>
  3.1003 -          </dt>
  3.1004 -          <dd>
  3.1005 -            <p>
  3.1006 -              The control <abbr title="Uniform Resource Locator">URL</abbr> endpoint (including any required port information) of the user-selected control service
  3.1007 -              that has been added to 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>.
  3.1008 -            </p>
  3.1009 -          </dd>
  3.1010 -          <dt>
  3.1011 -            <var title="">service</var> . <code title="dom-networkservice-config"><a href="#dom-networkservice-config">config</a></code>
  3.1012 -          </dt>
  3.1013 -          <dd>
  3.1014 -            <p>
  3.1015 -              The configuration information associated with the service depending on the requested service type.
  3.1016 -            </p>
  3.1017 -          </dd>
  3.1018 -        </dl>
  3.1019 -        <p>
  3.1020 -          The <dfn id="dom-networkservice-id"><code>id</code></dfn> attribute is a unique identifier for the service.
  3.1021 -          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.
  3.1022 -        </p>
  3.1023 -        <p>
  3.1024 -          The <dfn id="dom-networkservice-name"><code>name</code></dfn> attribute represents a human-readable title for
  3.1025 -          the service.
  3.1026 -        </p>
  3.1027 -        <p>
  3.1028 -          The <dfn id="dom-networkservice-type"><code>type</code></dfn> attribute reflects the value of the <a href="#dfn-valid-service-type" class="internalDFN">valid
  3.1029 -          service type</a> of the service.
  3.1030 -        </p>
  3.1031 -        <p>
  3.1032 -          The <dfn id="dom-networkservice-url"><code>url</code></dfn> attribute is an <a href="http://www.w3.org/TR/html5/urls.html#absolute-url" class="externalDFN">absolute <abbr title="Uniform Resource Locator">URL</abbr></a> pointing to the root <abbr title="Hypertext Transfer Protocol">HTTP</abbr> endpoint for the service that has been
  3.1033 -             added to 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>. Web pages can subsequently use this value for
  3.1034 -             implicit cross-document messaging via various existing mechanisms (e.g. Web Sockets, Server-Sent Events,
  3.1035 -             Web Messaging, XMLHttpRequest).
  3.1036 -        </p>
  3.1037 -        <p>
  3.1038 -          The <dfn id="dom-networkservice-config"><code>config</code></dfn> attribute provides the raw configuration
  3.1039 -          information extracted from the given network service.
  3.1040 -        </p>
  3.1041 -      </section>
  3.1042 -      <section id="states">
  3.1043 -        <h3><span class="secno">6.2 </span>
  3.1044 -          States
  3.1045 -        </h3>
  3.1046 -        <dl class="domintro">
  3.1047 -          <dt>
  3.1048 -            <var title="">service</var> . <code title="dom-networkservice-online"><a href="#dom-networkservice-online">online</a></code>
  3.1049 -          </dt>
  3.1050 -          <dd>
  3.1051 -            <p>
  3.1052 -              Returns <code>true</code> if the service is reporting that it is accessible on the local network or
  3.1053 -              <code>false</code> if the service is reporting that it is no longer accessible (temporarily or
  3.1054 -              permanently) on the local network.
  3.1055 -            </p>
  3.1056 -          </dd>
  3.1057 -        </dl>
  3.1058 -        <p>
  3.1059 -          The <dfn id="dom-networkservice-online"><code>online</code></dfn> attribute indicates whether the service is
  3.1060 -          reporting itself as being either <var>online</var>, and therefore accessible on the local network, in which
  3.1061 -          case this attribute will return <code>true</code> or, <var>offline</var>, and therefore not accessible on the
  3.1062 -          local network, either temporarily or permanently, in which case this attribute will return
  3.1063 -          <code>false</code>. This attribute <em class="rfc2119" title="must">must</em> default to <code>true</code>.
  3.1064 -        </p>
  3.1065 -      </section>
  3.1066 -      <section id="events-1">
  3.1067 -        <h3><span class="secno">6.3 </span>
  3.1068 -          Events
  3.1069 -        </h3>
  3.1070 -        <p>
  3.1071 -          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="#networkservice"><code>NetworkService</code></a> interface:
  3.1072 -        </p>
  3.1073 -        <table border="1">
  3.1074 -          <thead>
  3.1075 -            <tr>
  3.1076 -              <th>
  3.1077 -                <span title="event handlers">Event handler</span>
  3.1078 -              </th>
  3.1079 -              <th>
  3.1080 -                <span>Event handler event type</span>
  3.1081 -              </th>
  3.1082 -            </tr>
  3.1083 -          </thead>
  3.1084 -          <tbody>
  3.1085 -            <tr>
  3.1086 -              <td>
  3.1087 -                <dfn id="dom-networkservice-onnotify" title="dom-NetworkService-onnotify"><code>onnotify</code></dfn>
  3.1088 -              </td>
  3.1089 -              <td>
  3.1090 -                <a href="#event-notify"><code>notify</code></a>
  3.1091 -              </td>
  3.1092 -            </tr>
  3.1093 -            <tr>
  3.1094 -              <td>
  3.1095 -                <dfn id="dom-networkservice-onserviceonline" title="dom-NetworkService-onserviceonline"><code>onserviceonline</code></dfn>
  3.1096 -              </td>
  3.1097 -              <td>
  3.1098 -                <a href="#event-serviceonline"><code>serviceonline</code></a>
  3.1099 -              </td>
  3.1100 -            </tr>
  3.1101 -            <tr>
  3.1102 -              <td>
  3.1103 -                <dfn id="dom-networkservice-onserviceoffline" title="dom-NetworkService-onserviceoffline"><code>onserviceoffline</code></dfn>
  3.1104 -              </td>
  3.1105 -              <td>
  3.1106 -                <a href="#event-serviceoffline"><code>serviceoffline</code></a>
  3.1107 -              </td>
  3.1108 -            </tr>
  3.1109 -          </tbody>
  3.1110 -        </table>
  3.1111 -      </section>
  3.1112 -    </section>
  3.1113 -    <section id="service-discovery">
  3.1114 -      <!--OddPage--><h2><span class="secno">7. </span>
  3.1115 -        Service Discovery
  3.1116 -      </h2>
  3.1117 -      <p>
  3.1118 -        A <a href="#dfn-user-agent" class="internalDFN">user agent</a> conforming to this specification <em class="rfc2119" title="may">may</em> implement <abbr title="Simple Service Discovery Protocol">SSDP</abbr> [<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>]
  3.1119 -        <dfn id="dfn-service-discovery-mechanisms">service discovery mechanisms</dfn> - the requirements detailed in this section of the specification - to
  3.1120 -        enable Web pages to request and connect with <abbr title="Hypertext Transfer Protocol">HTTP</abbr> services running on networked devices, discovered via either
  3.1121 -        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 <a href="#dfn-service-discovery-mechanisms" class="internalDFN">service discovery
  3.1122 -        mechanisms</a>, then it <em class="rfc2119" title="must">must</em> conform to the corresponding algorithms provided in this section of the
  3.1123 -        specification.
  3.1124 -      </p>
  3.1125 -      <p>
  3.1126 -        This section presents how the results of these two <a href="#dfn-service-discovery-mechanisms" class="internalDFN">service discovery mechanisms</a> will be matched to
  3.1127 -        requested service types, how the user agent stores available and active services and how their properties are
  3.1128 -        applied to any resulting <a href="#networkservice"><code>NetworkService</code></a> objects.
  3.1129 -      </p>
  3.1130 -      <p>
  3.1131 -        It is expected that user agents will perform these <a href="#dfn-service-discovery-mechanisms" class="internalDFN">service discovery mechanisms</a> asynchronously and
  3.1132 -        periodically update the <a href="#dfn-list-of-available-service-records" class="internalDFN">list of available service records</a> as required. The timing of any <a href="#dfn-service-discovery-mechanisms" class="internalDFN">service
  3.1133 -        discovery mechanisms</a> is an implementation detail left to the discretion of the implementer (e.g. by
  3.1134 -        continuously monitoring the network as a background process or on invocation of this <abbr title="Application Programming Interface">API</abbr> from a Web page).
  3.1135 -      </p>
  3.1136 -      <p>
  3.1137 -        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
  3.1138 -        that is used to track all the services that have been discovered and are available in the current network at
  3.1139 -        any given time. At any point during the running of either of the two <a href="#dfn-service-discovery-mechanisms" class="internalDFN">service discovery mechanisms</a> then
  3.1140 -        existing entries within this table can be updated, entries can be added and entries can be removed as the
  3.1141 -        status of networked services changes according to the rules defined in this specification.
  3.1142 -      </p>
  3.1143 -      <p>
  3.1144 -        The <dfn id="dfn-list-of-active-service-managers">list of active service managers</dfn> is an internal list within user agents that is used to track all
  3.1145 -        <a href="#networkservices"><code>NetworkServices</code></a> objects currently being shared with any web pages
  3.1146 -        at the current time within the user agent. Each <a href="#networkservices"><code>NetworkServices</code></a> object
  3.1147 -        in the <a href="#dfn-list-of-active-service-managers" class="internalDFN">list of
  3.1148 -        active service managers</a> represents a collection of zero or more <a href="#networkservice"><code>NetworkService</code></a> objects - known as its <dfn id="dfn-indexed-properties-1">indexed properties</dfn>.
  3.1149 -        <a href="#networkservice"><code>NetworkService</code></a> objects are attached as the <a href="#dfn-indexed-properties-1" class="internalDFN">indexed properties</a>
  3.1150 -        of a <a href="#networkservices"><code>NetworkServices</code></a> object as part of the <a href="#dom-navigator-getnetworkservices"><code>getNetworkServices()</code></a> algorithm.
  3.1151 -      </p>
  3.1152 -      <p>
  3.1153 -        The rule for <dfn id="dfn-adding-an-available-service">adding an available service</dfn> is the process of adding a new service or updating an
  3.1154 -        existing service in the <a href="#dfn-list-of-available-service-records" class="internalDFN">list of available service records</a> that is generally available on the user's
  3.1155 -        current network. This rule takes one argument, <var>network service record</var>, and consists of running the
  3.1156 -        following steps:
  3.1157 -      </p>
  3.1158 -      <ol class="rule">
  3.1159 -        <li>Let <var>new service registration flag</var> be <code>true</code>.
  3.1160 -        </li>
  3.1161 -        <li>For each <var>existing service record</var> in the current <a href="#dfn-list-of-available-service-records" class="internalDFN">list of available service records</a>, run
  3.1162 -        the following sub-steps:
  3.1163 -          <ol class="rule">
  3.1164 -            <li>If the <var>existing service record</var>'s <code>id</code> property does not equal <var>network
  3.1165 -            service record</var>'s <code>id</code> property then abort any remaining sub-steps and continue at the next
  3.1166 -            available <var>existing service record</var>.
  3.1167 -            </li>
  3.1168 -            <li>Set <var>new service registration flag</var> to <code>false</code>.
  3.1169 -            </li>
  3.1170 -            <li>Replace the value of <var>existing service record</var> in the current <a href="#dfn-list-of-available-service-records" class="internalDFN">list of available service
  3.1171 -            records</a> with the value of <var>network service record</var>.
  3.1172 -            </li>
  3.1173 -          </ol>
  3.1174 -        </li>
  3.1175 -        <li>If <var>new service registration flag</var> is set to <code>true</code> then add <var>network service
  3.1176 -        record</var> to the <a href="#dfn-list-of-available-service-records" class="internalDFN">list of available service records</a> as a new item.
  3.1177 -        </li>
  3.1178 -        <li>For each <var>service manager</var> in the <a href="#dfn-list-of-active-service-managers" class="internalDFN">list of active service managers</a> run the following steps:
  3.1179 -          <ol class="rule">
  3.1180 -            <li>Let <var>service type in current service manager flag</var> be <code>false</code>.
  3.1181 -            </li>
  3.1182 -            <li>For each <var>active service</var> in <var>service manager</var> run the following steps:
  3.1183 -              <ol class="rule">
  3.1184 -                <li>If <var>network service record</var>'s <code>type</code> property does not equal <var>active
  3.1185 -                service</var>'s <code>type</code> attribute then abort any remaining sub-steps for this <var>active
  3.1186 -                service</var> and continue at the next available <var>active service</var>.
  3.1187 -                </li>
  3.1188 -                <li>Set the <var>service type in current service manager flag</var> to <code>true</code>.
  3.1189 -                </li>
  3.1190 -                <li>If the <var>new service registration flag</var> is set to <code>false</code>, the <var>network
  3.1191 -                service record</var>'s <code>id</code> property equals the <var>active service</var>'s <code>id</code>
  3.1192 -                attribute and <var>active service</var>'s <a href="#dom-networkservice-online"><code>online</code></a>
  3.1193 -                attribute is currently set to <code>false</code> then set <var>active service</var>'s <a href="#dom-networkservice-online"><code>online</code></a> attribute to <code>true</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> to dispatch a newly created event with the name <a href="#event-serviceonline"><code>serviceonline</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, which does not bubble, is not cancellable,
  3.1194 -                      and has no default action, at the current <var>active service</var> object.
  3.1195 -                </li>
  3.1196 -              </ol>
  3.1197 -            </li>
  3.1198 -            <li>If the <var>new service registration flag</var> is set to <code>true</code> and the <var>service type
  3.1199 -            in current service manager flag</var> is also set to <code>true</code> then increment <var>service
  3.1200 -            manager</var>'s <a href="#dom-networkservices-servicesavailable"><code>servicesAvailable</code></a>
  3.1201 -            attribute 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> 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, which does not bubble, is not cancellable, and
  3.1202 -                  has no default action, at the current <var>service manager</var> object.
  3.1203 -            </li>
  3.1204 -          </ol>
  3.1205 -        </li>
  3.1206 -      </ol>
  3.1207 -      <p>
  3.1208 -        The rule for <dfn id="dfn-removing-an-available-service">removing an available service</dfn> is the general process of removing a service from the
  3.1209 -        <a href="#dfn-list-of-available-service-records" class="internalDFN">list of available service records</a> that has left the user's current network or has otherwise expired.
  3.1210 -        This rule takes one argument, <var>service identifier</var>, and consists of running the following steps:
  3.1211 -      </p>
  3.1212 -      <ol class="rule">
  3.1213 -        <li>For each <var>existing service record</var> in the current <a href="#dfn-list-of-available-service-records" class="internalDFN">list of available service records</a>, run
  3.1214 -        the following sub-steps:
  3.1215 -          <ol class="rule">
  3.1216 -            <li>If the <var>existing service record</var>'s <code>id</code> property does not match <var>service
  3.1217 -            identifier</var> then skip any remaining sub-steps for the current <var>existing service record</var> and
  3.1218 -            continue at the next available <var>existing service record</var>.
  3.1219 -            </li>
  3.1220 -            <li>If the <var>existing service record</var>'s <code>type</code> property begins with the DOMString
  3.1221 -            "<code>upnp:</code>" and <var>existing service record</var>'s <code>eventsURL</code> property is set then
  3.1222 -            run the rule to <a href="#dfn-terminate-an-existing-upnp-events-subscription" class="internalDFN">terminate an existing UPnP Events Subscription</a>, if one is currently active (as a
  3.1223 -            result of having previously called <a href="#dfn-setup-a-upnp-events-subscription" class="internalDFN">setup a UPnP Events Subscription</a> against the current
  3.1224 -            <var>existing service record</var>).
  3.1225 -            </li>
  3.1226 -            <li>For each <var>service manager</var> in the <a href="#dfn-list-of-active-service-managers" class="internalDFN">list of active service managers</a> run the following
  3.1227 -            steps:
  3.1228 -              <ol class="rule">
  3.1229 -                <li>Let <var>service type in current service manager flag</var> be <code>false</code>.
  3.1230 -                </li>
  3.1231 -                <li>For each <var>active service</var> in <var>service manager</var> run the following steps:
  3.1232 -                  <ol class="rule">
  3.1233 -                    <li>If <var>existing service record</var>'s <code>type</code> property does not equal the
  3.1234 -                    <var>active service</var>'s <code>type</code> attribute then abort any remaining sub-steps for this
  3.1235 -                    <var>active service</var> and continue at the next available <var>active service</var>.
  3.1236 -                    </li>
  3.1237 -                    <li>Set the <var>service type in current service manager flag</var> to <code>true</code>.
  3.1238 -                    </li>
  3.1239 -                    <li>If <var>existing service record</var>'s <code>id</code> property equals the <var>active
  3.1240 -                    service</var>'s <code>id</code> attribute and <var>active service</var>'s <a href="#dom-networkservice-online"><code>online</code></a> attribute is currently set to
  3.1241 -                    <code>true</code> then set <var>active service</var>'s <a href="#dom-networkservice-online"><code>
  3.1242 -                      online</code></a> attribute to <code>false</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> to dispatch a newly created event with the name <a href="#event-serviceoffline"><code>serviceoffline</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, which does not bubble, is not
  3.1243 -                          cancellable, and has no default action, at the current <var>active service</var>.
  3.1244 -                    </li>
  3.1245 -                  </ol>
  3.1246 -                </li>
  3.1247 -                <li>If the <var>service type in current service manager flag</var> is set to <code>true</code> then
  3.1248 -                decrement <var>service manager</var>'s <a href="#dom-networkservices-servicesavailable"><code>servicesAvailable</code></a> attribute by <code>1</code>
  3.1249 -                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> to dispatch a newly created event with the name <a href="#event-serviceunavailable"><code>serviceunavailable</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, which does not bubble, is not cancellable,
  3.1250 -                      and has no default action, at the current <var>service manager</var> object.
  3.1251 -                </li>
  3.1252 -              </ol>
  3.1253 -            </li>
  3.1254 -            <li>Remove <var>existing service record</var> from the current <a href="#dfn-list-of-available-service-records" class="internalDFN">list of available service records</a>.
  3.1255 -            </li>
  3.1256 -          </ol>
  3.1257 -        </li>
  3.1258 -      </ol>
  3.1259 -      <p>
  3.1260 -        User agents <em class="rfc2119" title="should">should</em> expire a service record from the <a href="#dfn-list-of-available-service-records" class="internalDFN">list of available service records</a> when its
  3.1261 -        <code>expiryTimestamp</code> attribute exceeds the current UTC timestamp. When this condition is met the
  3.1262 -        <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="rfc2119" title="should">should</em> run the rule for <a href="#dfn-removing-an-available-service" class="internalDFN">removing an available service</a>, passing in the expired service
  3.1263 -        record's <code>id</code> attribute as the only argument.
  3.1264 -      </p>
  3.1265 -      <section id="zeroconf-mdns-dns-sd">
  3.1266 -        <h3><span class="secno">7.1 </span>
  3.1267 -          Zeroconf (<abbr title="Multicast DNS">mDNS</abbr> + <abbr title="Domain Name System">DNS</abbr>-<abbr title="Service Discovery">SD</abbr>)
  3.1268 -        </h3>
  3.1269 -        <p>
  3.1270 -          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
  3.1271 -          recommended automatic browsing 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:
  3.1272 -        </p>
  3.1273 -        <ol class="rule">
  3.1274 -          <li>Let <var>service <abbr title="Multicast DNS">mDNS</abbr> responses</var> be an array of <abbr title="DNS Pointer Record">PTR</abbr> records received by issuing a Multicast <abbr title="Domain Name System">DNS</abbr>
  3.1275 -          Browse for <abbr title="DNS Pointer Record">PTR</abbr> records with the name of the current discovered service type.
  3.1276 -          </li>
  3.1277 -          <li>For each Object <var>service <abbr title="Multicast DNS">mDNS</abbr> response</var> in <var>service <abbr title="Multicast DNS">mDNS</abbr> responses</var>, run the following
  3.1278 -          steps:
  3.1279 -            <ol>
  3.1280 -              <li>Let <var>network service record</var> be an Object consisting of the following empty properties:
  3.1281 -              <code>id</code>, <code>name</code>, <code>type</code>, <code>url</code>, <code>config</code>,
  3.1282 -              <code>expiryTimestamp</code>.
  3.1283 -              </li>
  3.1284 -              <li>Set <var>network service record</var>'s <code>id</code> property to the value of the full <abbr title="DNS Pointer Record">PTR</abbr> Service
  3.1285 -              Instance Name [<cite><a class="bibref" href="#bib-MDNS">MDNS</a></cite>].
  3.1286 -              </li>
  3.1287 -              <li>Set <var>network service record</var>'s <code>name</code> property to the value of the <abbr title="DNS Pointer Record">PTR</abbr> Service
  3.1288 -              Instance Name's <var>Instance</var> component [<cite><a class="bibref" href="#bib-MDNS">MDNS</a></cite>].
  3.1289 -              </li>
  3.1290 -              <li>Set <var>network service record</var>'s <code>type</code> property to the concatenation of the string
  3.1291 -              <code>zeroconf:</code> followed be the value of the <abbr title="DNS Pointer Record">PTR</abbr> Service Instance Name's <var>Service</var>
  3.1292 -              component [<cite><a class="bibref" href="#bib-MDNS">MDNS</a></cite>].
  3.1293 -              </li>
  3.1294 -              <li>Set <var>network service record</var>'s <code>url</code> property to the resolvable Service <abbr title="Uniform Resource Locator">URL</abbr>
  3.1295 -              obtained from performing an <abbr title="Domain Name System">DNS</abbr>-<abbr title="Service Discovery">SD</abbr> Lookup [<cite><a class="bibref" href="#bib-DNS-SD">DNS-SD</a></cite>] of the current service from the <abbr title="DNS Pointer Record">PTR</abbr> record provided
  3.1296 -              [<cite><a class="bibref" href="#bib-MDNS">MDNS</a></cite>].
  3.1297 -              </li>
  3.1298 -              <li>Set <var>network service record</var>'s <code>config</code> property to the string value of the
  3.1299 -              contents of the first <abbr title="Domain Name System">DNS</abbr>-<abbr title="Service Discovery">SD</abbr> TXT record associated with the <var>service <abbr title="Multicast DNS">mDNS</abbr> response</var> as defined
  3.1300 -              in [<cite><a class="bibref" href="#bib-DNS-SD">DNS-SD</a></cite>].
  3.1301 -              </li>
  3.1302 -              <li>Set <var>network service record</var>'s <code>expiryTimestamp</code> property to the value of the
  3.1303 -              current date, in UTC timestamp format, plus a value of <code>120</code> seconds.
  3.1304 -              </li>
  3.1305 -              <li>Run the general rule for <a href="#dfn-adding-an-available-service" class="internalDFN">adding an available service</a>, passing in the current <var>network
  3.1306 -              service record</var> as the only argument.
  3.1307 -              </li>
  3.1308 -            </ol>
  3.1309 -          </li>
  3.1310 -        </ol>
  3.1311 -      </section>
  3.1312 -      <section id="simple-service-discovery-protocol-ssdp">
  3.1313 -        <h3><span class="secno">7.2 </span>
  3.1314 -          Simple Service Discovery Protocol (<abbr title="Simple Service Discovery Protocol">SSDP</abbr>)
  3.1315 -        </h3>
  3.1316 -        <p>
  3.1317 -          A user agent that implements UPnP service discovery <em class="rfc2119" title="must">must</em> issue a <dfn id="dfn-search-request-for-upnp-root-devices">search request for UPnP root
  3.1318 -          devices</dfn> against the user's current local network according to the full normative text and timing
  3.1319 -          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>].
  3.1320 -        </p>
  3.1321 -        <p>
  3.1322 -          The user agent <em class="rfc2119" title="must">must</em> issue all <a title="search request for UPnP root devices" href="#dfn-search-request-for-upnp-root-devices" class="internalDFN">search requests for UPnP root
  3.1323 -          devices</a> with a <abbr title="Hypertext Transfer Protocol">HTTP</abbr> request line equal to <code>M-SEARCH * <abbr title="Hypertext Transfer Protocol">HTTP</abbr>/1.1</code>, with a HOST header equal to
  3.1324 -          the reserved multicast address and port of <code>239.255.255.250:1900</code>, a MAN header equal to
  3.1325 -          <code>ssdp:discover</code>, an ST header equal to <code>upnp:rootdevice</code> and a user-agent defined MX
  3.1326 -          header equal to a <dfn id="dfn-maximum-upnp-advertisement-response-wait-time">maximum UPnP advertisement response wait time</dfn> value between <code>1</code> and
  3.1327 -          <code>5</code> seconds.
  3.1328 -        </p>
  3.1329 -        <p>
  3.1330 -          The user agent <em class="rfc2119" title="must">must</em> listen for any incoming responses to any <a href="#dfn-search-request-for-upnp-root-devices" class="internalDFN">search request for UPnP root devices</a>.
  3.1331 -        </p>
  3.1332 -        <p>
  3.1333 -          For each <dfn id="dfn-http-response"><abbr title="Hypertext Transfer Protocol">HTTP</abbr> Response</dfn> following an initial <a href="#dfn-search-request-for-upnp-root-devices" class="internalDFN">search request for UPnP root devices</a> sent on a
  3.1334 -          <a href="#dfn-standard-upnp-address-and-port" class="internalDFN">standard UPnP address and port</a> the user agent <em class="rfc2119" title="must">must</em> run the following steps:
  3.1335 -        </p>
  3.1336 -        <ol class="rule">
  3.1337 -          <li>If the <a href="#dfn-http-response" class="internalDFN"><abbr title="Hypertext Transfer Protocol">HTTP</abbr> Response</a> is not a <abbr title="Hypertext Transfer Protocol">HTTP</abbr> 200 OK response then this response is invalid and the user
  3.1338 -          agent <em class="rfc2119" title="must">must</em> discard this response, abort any remaining steps and return. The user agent <em class="rfc2119" title="may">may</em> issue a new
  3.1339 -          <a href="#dfn-search-request-for-upnp-root-devices" class="internalDFN">search request for UPnP root devices</a> as a result of this error occurring.
  3.1340 -          </li>
  3.1341 -          <li>If the <a href="#dfn-maximum-upnp-advertisement-response-wait-time" class="internalDFN">maximum UPnP advertisement response wait time</a> has been exceeded since the initial <a href="#dfn-search-request-for-upnp-root-devices" class="internalDFN">search
  3.1342 -          request for UPnP root devices</a> was sent then the <a href="#dfn-http-response" class="internalDFN"><abbr title="Hypertext Transfer Protocol">HTTP</abbr> Response</a> is invalid and the user agent <em class="rfc2119" title="must">must</em>
  3.1343 -          discard this response, abort any remaining steps and return. The user agent <em class="rfc2119" title="may">may</em> stop listening for responses
  3.1344 -          from the current <a href="#dfn-search-request-for-upnp-root-devices" class="internalDFN">search request for UPnP root devices</a> as a result of this error occurring. Equally,
  3.1345 -          the user agent <em class="rfc2119" title="may">may</em> issue a new <a href="#dfn-search-request-for-upnp-root-devices" class="internalDFN">search request for UPnP root devices</a> as a result of this error
  3.1346 -          occurring.
  3.1347 -          </li>
  3.1348 -          <li>Let <var>ssdp device</var> be an Object with a property for each <abbr title="Hypertext Transfer Protocol">HTTP</abbr> header received in the <a href="#dfn-http-response" class="internalDFN"><abbr title="Hypertext Transfer Protocol">HTTP</abbr>
  3.1349 -          Response</a>, with each key being the name of a <abbr title="Hypertext Transfer Protocol">HTTP</abbr> response header and each value being that <abbr title="Hypertext Transfer Protocol">HTTP</abbr> response
  3.1350 -          header's value.
  3.1351 -          </li>
  3.1352 -          <li>If <var>ssdp device</var> does not contain at least one <var>CACHE-CONTROL</var> entry, at least one
  3.1353 -          <var>USN</var> entry, at least one <var>ST</var> entry and at least one <var>LOCATION</var> entry or the
  3.1354 -          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
  3.1355 -          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.
  3.1356 -          </li>
  3.1357 -          <li>The user agent <em class="rfc2119" title="must">must</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
  3.1358 -          occurrence of <var>LOCATION</var> from <var>ssdp device</var> as the <var>device descriptor <abbr title="Uniform Resource Locator">URL</abbr></var>
  3.1359 -          argument and the first occurrence of <var>USN</var> from <var>ssdp device</var> as the <var>device
  3.1360 -          identifier</var> argument and the first occurrence of <var>CACHE-CONTROL</var> from <var>ssdp device</var>
  3.1361 -          (minus the leading string of <code>max-age=</code>) as the <var>device expiry</var> argument.
  3.1362 -          </li>
  3.1363 -        </ol>
  3.1364 -        <p>
  3.1365 -          The user agent <em class="rfc2119" title="must">must</em> listen for incoming requests on the <dfn id="dfn-standard-upnp-address-and-port">standard UPnP address and port</dfn> on all
  3.1366 -          current local network interface addresses with the port <code>1900</code>.
  3.1367 -        </p>
  3.1368 -        <p>
  3.1369 -          For each <dfn id="dfn-http-request"><abbr title="Hypertext Transfer Protocol">HTTP</abbr> Request</dfn> received on a <a href="#dfn-standard-upnp-address-and-port" class="internalDFN">standard UPnP address and port</a> the user agent <em class="rfc2119" title="must">must</em> run
  3.1370 -          the following steps:
  3.1371 -        </p>
  3.1372 -        <ol class="rule">
  3.1373 -          <li>If the <a href="#dfn-http-request" class="internalDFN"><abbr title="Hypertext Transfer Protocol">HTTP</abbr> Request</a> is not a <abbr title="Hypertext Transfer Protocol">HTTP</abbr> NOTIFY request then it is not a valid UPnP Request and the user
  3.1374 -          agent <em class="rfc2119" title="must">must</em> discard this request, abort any remaining steps and return.
  3.1375 -          </li>
  3.1376 -          <li>Let <var>ssdp device</var> be an Object with a property for each <abbr title="Hypertext Transfer Protocol">HTTP</abbr> header received in the <a href="#dfn-http-request" class="internalDFN"><abbr title="Hypertext Transfer Protocol">HTTP</abbr>
  3.1377 -          Request</a>, with each key being the name of a <abbr title="Hypertext Transfer Protocol">HTTP</abbr> header and each value being that <abbr title="Hypertext Transfer Protocol">HTTP</abbr> header's value.
  3.1378 -          </li>
  3.1379 -          <li>If <var>ssdp device</var> does not contain at least one <var>CACHE-CONTROL</var> entry, at least one
  3.1380 -          <var>USN</var> entry, at least one <var>NT</var> entry, at least one <var>NTS</var> entry and at least one
  3.1381 -          <var>LOCATION</var> entry or the value of its <var>NT</var> entry is not <code>upnp:rootdevice</code>, then
  3.1382 -          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> discard this request,
  3.1383 -          abort any remaining steps and return.
  3.1384 -          </li>
  3.1385 -          <li>If <var>ssdp device</var>'s <var>NTS</var> entry is equal to <code>ssdp:alive</code> then the user agent
  3.1386 -          <em class="rfc2119" title="must">must</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
  3.1387 -          <var>LOCATION</var> from <var>ssdp device</var> as the <var>device descriptor <abbr title="Uniform Resource Locator">URL</abbr></var> argument and the
  3.1388 -          first occurrence of <var>USN</var> from <var>ssdp device</var> as the <var>device identifier</var> argument
  3.1389 -          and the first occurrence of <var>CACHE-CONTROL</var> from <var>ssdp device</var> (minus the leading string of
  3.1390 -          <code>max-age=</code>) as the <var>device expiry</var>.<br>
  3.1391 -            <br>
  3.1392 -            Otherwise, if <var>ssdp device</var>'s <var>NTS</var> entry is equal to <code>ssdp:byebye</code> then the
  3.1393 -            user agent <em class="rfc2119" title="must">must</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
  3.1394 -            first occurrence of <var>USN</var> from <var>ssdp device</var> as the <var>device identifier</var>
  3.1395 -            argument.
  3.1396 -          </li>
  3.1397 -        </ol>
  3.1398 -        <p>
  3.1399 -          The rule for <dfn id="dfn-obtaining-a-upnp-device-description-file">obtaining a UPnP Device Description File</dfn> is the process of obtaining the contents of
  3.1400 -          a standard UPnP Device Description [<cite><a class="bibref" href="#bib-UPNP-DEVICEARCH11">UPNP-DEVICEARCH11</a></cite>] from a <abbr title="Uniform Resource Locator">URL</abbr>-based resource. This rule takes three
  3.1401 -          arguments - <var>device descriptor <abbr title="Uniform Resource Locator">URL</abbr></var>, <var>device identifier</var> and <var>device expiry</var> - and
  3.1402 -          when called the user agent <em class="rfc2119" title="must">must</em> run the following steps:
  3.1403 -        </p>
  3.1404 -        <ol class="rule">
  3.1405 -          <li>Let <var>device descriptor file</var> contain the contents of the file located at the <abbr title="Uniform Resource Locator">URL</abbr> provided in
  3.1406 -          <var>device descriptor <abbr title="Uniform Resource Locator">URL</abbr></var> obtained according to the rules defined in 'Section 2.11: Retrieving a
  3.1407 -          description using <abbr title="Hypertext Transfer Protocol">HTTP</abbr>' in [<cite><a class="bibref" href="#bib-UPNP-DEVICEARCH11">UPNP-DEVICEARCH11</a></cite>].
  3.1408 -          </li>
  3.1409 -          <li>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
  3.1410 -          current network or the <var>device descriptor file</var> remains empty then it is invalid and the <a href="#dfn-user-agent" class="internalDFN">user
  3.1411 -          agent</a> <em class="rfc2119" title="must">must</em> abort any remaining steps and return.
  3.1412 -          </li>
  3.1413 -          <li>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>device
  3.1414 -          descriptor file</var>, <var>device identifier</var> and <var>device expiry</var> arguments.
  3.1415 -          </li>
  3.1416 -        </ol>
  3.1417 -        <p>
  3.1418 -          The rule for <dfn id="dfn-processing-a-upnp-device-description-file">processing a UPnP Device Description File</dfn> is the process of parsing the contents of a
  3.1419 -          standard UPnP Device Description [<cite><a class="bibref" href="#bib-UPNP-DEVICEARCH11">UPNP-DEVICEARCH11</a></cite>] and registering the UPnP services contained therein
  3.1420 -          within the <a href="#dfn-list-of-available-service-records" class="internalDFN">list of available service records</a>.
  3.1421 -        </p>
  3.1422 -        <p>
  3.1423 -          The rule for <a href="#dfn-processing-a-upnp-device-description-file" class="internalDFN">processing a UPnP Device Description File</a> takes three arguments - <var>device descriptor
  3.1424 -          file</var>, <var>device identifier</var> and <var>device expiry</var> - and when called the user agent <em class="rfc2119" title="must">must</em>
  3.1425 -          run the following steps:
  3.1426 -        </p>
  3.1427 -        <ol class="rule">
  3.1428 -          <li>Let <var>advertised services</var> be a list of all advertised services obtained from the <var>device
  3.1429 -          descriptor file</var> containing the value of the first occurrence of the <code>&lt;serviceList&gt;</code>
  3.1430 -          element as it is defined in 'Section 2.3: Device Description' in [<cite><a class="bibref" href="#bib-UPNP-DEVICEARCH11">UPNP-DEVICEARCH11</a></cite>].
  3.1431 -          </li>
  3.1432 -          <li>For each <code>&lt;service&gt;</code> element - known as an <var>advertised service</var> - in
  3.1433 -          <var>advertised services</var> run the following steps:
  3.1434 -            <ol class="rule">
  3.1435 -              <li>Let <var>network service record</var> be a new Object consisting of the following empty properties:
  3.1436 -              <code>id</code>, <code>deviceId</code>, <code>name</code>, <code>type</code>, <code>url</code>,
  3.1437 -              <code>eventsUrl</code>, <code>config</code>, <code>expiryTimestamp</code>.
  3.1438 -              </li>
  3.1439 -              <li>Set <var>network service record</var>'s <code>id</code> property to the concatenated string value of
  3.1440 -              the first occurrence of the <code>&lt;UDN&gt;</code> element in the <var>device descriptor file</var>
  3.1441 -              with the <var>advertised service</var>'s <code>&lt;serviceId&gt;</code> sub-element.
  3.1442 -              </li>