[html5] r2709 - [] (0) Abstract out the determination of the base URL from the resolving-a-relat [...]

whatwg at whatwg.org whatwg at whatwg.org
Mon Jan 26 18:39:58 PST 2009


Author: ianh
Date: 2009-01-26 18:39:57 -0800 (Mon, 26 Jan 2009)
New Revision: 2709

Modified:
   header-whatwg
   index
   source
Log:
[] (0) Abstract out the determination of the base URL from the resolving-a-relative-URL section; remove the resolving step from the navigating and fetching algorithms; make the base URI used for relative URL resolution by scripts be set by the first script that is running, not the last.

Modified: header-whatwg
===================================================================
--- header-whatwg	2009-01-24 05:07:17 UTC (rev 2708)
+++ header-whatwg	2009-01-27 02:39:57 UTC (rev 2709)
@@ -25,11 +25,20 @@
    [hidden] { display: none; }
   </style>
   <link rel="stylesheet" href="status.css">
-  <script src="status.js"></script>
-  <script src="dfn.js"></script>
-  <script src="toc.js"></script>
+  <script>
+   function load(script) {
+     var e = document.createElement('script');
+     e.setAttribute('src', script);
+     document.body.appendChild(e);
+   }
+   function init() {
+     load('status.js');
+     load('dfn.js');
+     load('toc.js');
+   }
+  </script>
  </head>
- <body class="draft" onload="initAnnotations()">
+ <body class="draft" onload="init()">
 
   <div class="head">
    <p><a rel="home" href="http://www.whatwg.org/" class="logo"><img alt="WHATWG" src="/images/logo"></a></p>

Modified: index
===================================================================
--- index	2009-01-24 05:07:17 UTC (rev 2708)
+++ index	2009-01-27 02:39:57 UTC (rev 2709)
@@ -17,12 +17,23 @@
    .rfc2119.m\ust::after { content: '\2605'; }
    .rfc2119.s\hould::after { content: '\2606'; }
    [hidden] { display: none; }
-  </style><link href=status.css rel=stylesheet><script src=status.js></script><script src=dfn.js></script><script src=toc.js></script><body class=draft onload=initAnnotations()>
+  </style><link href=status.css rel=stylesheet><script>
+   function load(script) {
+     var e = document.createElement('script');
+     e.setAttribute('src', script);
+     document.body.appendChild(e);
+   }
+   function init() {
+     load('status.js');
+     load('dfn.js');
+     load('toc.js');
+   }
+  </script><body class=draft onload=init()>
 
   <div class=head>
    <p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
    <h1>HTML 5</h1>
-   <h2 class="no-num no-toc" id=draft-recommendation-—-date:-01-jan-1901>Draft Recommendation — 24 January 2009</h2>
+   <h2 class="no-num no-toc" id=draft-recommendation-—-date:-01-jan-1901>Draft Recommendation — 27 January 2009</h2>
    <p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
    <p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
    <dl><dt>Multiple-page version:</dt>
@@ -3999,21 +4010,28 @@
   it's not clear RFC3986 does a good job of defining that anymore
   (earlier URI specs did) --><h4 id=resolving-urls><span class=secno>2.5.3 </span>Resolving URLs</h4>
 
-  <p>Relative URLs are resolved relative to a base URL. The <dfn id=base-url>base
-  URL</dfn> of a <a href=#url>URL</a> is the <a href=#absolute-url>absolute URL</a>
-  obtained as follows:</p>
+  <p>To <dfn id=resolve-a-url>resolve a URL</dfn> to an <a href=#absolute-url>absolute URL</a>
+  relative to either another <a href=#absolute-url>absolute URL</a> or an element,
+  the user agent must use the following steps. Resolving a URL can
+  result in an error, in which case the URL is not resolvable.</p>
 
-  <dl class=switch><dt>If the URL to be resolved was passed to an API</dt>
+  <ol><li><p>Let <var title="">url</var> be the <a href=#url>URL</a> being
+   resolved.</li>
 
-   <dd><p>The base URL is the <a href="#script's-base-url">script's base URL</a>.</dd>
+   <li><p>Let <var title="">encoding</var> be the <a href=#url-character-encoding>URL character
+   encoding</a>.</li>
 
-   <dt>If the URL to be resolved is from the value of a content
-   attribute</dt>
+   <li><p>If <var title="">encoding</var> is UTF-16, then change it to
+   UTF-8.</li>
 
-   <dd>
+   <li>
 
-    <p>The base URL is the <i>base URI of the element</i> that the
-    attribute is on, as defined by the XML Base specification, with
+    <p>If the algorithm was invoked with an <a href=#absolute-url>absolute URL</a>
+    to use as the base URL, let <var title="">base</var> be that
+    <a href=#absolute-url>absolute URL</a>.</p>
+
+    <p>Otherwise, let <var title="">base</var> be the <i>base URI of
+    the element</i>, as defined by the XML Base specification, with
     <i>the base URI of the document entity</i> being defined as the
     <a href=#document-base-url>document base URL</a> of the <code>Document</code> that
     owns the element.</p>
@@ -4028,52 +4046,30 @@
     however, as <code title=attr-xml-base><a href=#the-xml:base-attribute-(xml-only)>xml:base</a></code> attributes
     are not allowed in <a href=#html-documents>HTML documents</a>.)</p>
 
-   </dd>
+    <p>The <dfn id=document-base-url>document base URL</dfn> of a <code>Document</code> is
+    the <a href=#absolute-url>absolute URL</a> obtained by running these
+    substeps:</p>
 
-   <dt>If the URL to be resolved was found in an offline application
-   cache manifest</dt>
+    <ol><li><p>If there is no <code><a href=#the-base-element>base</a></code> element that is both a
+     child of <a href=#the-head-element-0>the <code>head</code> element</a> and has an
+     <code title=attr-base-href><a href=#attr-base-href>href</a></code> attribute, then the
+     <a href=#document-base-url>document base URL</a> is <a href="#the-document's-address">the document's
+     address</a>.</li>
 
-   <dd><p>The base URL is the URL of the <a href=#application-cache>application
-   cache</a> <a href=#concept-appcache-manifest title=concept-appcache-manifest>manifest</a>.</dd>
+     <li><p>Otherwise, let <var title="">url</var> be the value of the
+     <code title=attr-base-href><a href=#attr-base-href>href</a></code> attribute of the first such
+     element.</li>
 
-  </dl><p>The <dfn id=document-base-url>document base URL</dfn> of a <code>Document</code> is
-  the <a href=#absolute-url>absolute URL</a> obtained by running these steps:</p>
+     <li><p><a href=#resolve-a-url title="resolve a URL">Resolve</a> <var title="">url</var> relative to <a href="#the-document's-address">the document's
+     address</a> (thus, the <code><a href=#the-base-element>base</a></code> <code title=attr-base-href><a href=#attr-base-href>href</a></code> attribute isn't affected by
+     <code title=attr-xml-base><a href=#the-xml:base-attribute-(xml-only)>xml:base</a></code> attributes).</li>
 
-  <ol><li><p>If there is no <code><a href=#the-base-element>base</a></code> element that is both a
-   child of <a href=#the-head-element-0>the <code>head</code> element</a> and has an
-   <code title=attr-base-href><a href=#attr-base-href>href</a></code> attribute, then the
-   <a href=#document-base-url>document base URL</a> is <a href="#the-document's-address">the document's
-   address</a>.</li>
+     <li><p>The <a href=#document-base-url>document base URL</a> is the result of the
+     previous step if it was successful; otherwise it is <a href="#the-document's-address">the
+     document's address</a>.</li>
 
-   <li><p>Otherwise, let <var title="">url</var> be the value of the
-   <code title=attr-base-href><a href=#attr-base-href>href</a></code> attribute of the first such
-   element.</li>
+    </ol></li>
 
-   <li><p><a href=#resolve-a-url title="resolve a URL">Resolve</a> the <var title="">url</var> URL, using <a href="#the-document's-address">the document's address</a>
-   as the <a href=#base-url>base URL</a> (thus, the <code><a href=#the-base-element>base</a></code> <code title=attr-base-href><a href=#attr-base-href>href</a></code> attribute isn't affected by
-   <code title=attr-xml-base><a href=#the-xml:base-attribute-(xml-only)>xml:base</a></code> attributes).</li>
-
-   <li><p>The <a href=#document-base-url>document base URL</a> is the result of the
-   previous step if it was successful; otherwise it is <a href="#the-document's-address">the
-   document's address</a>.</li>
-
-  </ol><p>To <dfn id=resolve-a-url>resolve a URL</dfn> to an <a href=#absolute-url>absolute URL</a> the
-  user agent must use the following steps. Resolving a URL can result
-  in an error, in which case the URL is not resolvable.</p>
-
-  <ol><li><p>Let <var title="">url</var> be the <a href=#url>URL</a> being
-   resolved.</li>
-
-   <li><p>Let <var title="">encoding</var> be the <a href=#url-character-encoding>URL character
-   encoding</a>.</li>
-
-   <li><p>If <var title="">encoding</var> is UTF-16, then change it to
-   UTF-8.</li>
-
-   <li><p>Let <var title="">base</var> be the <a href=#base-url>base URL</a>
-   for <var title="">url</var>. (This is an <a href=#absolute-url>absolute
-   URL</a>.)</li>
-
    <li><p><a href=#parse-a-url title="parse a URL">Parse</a> <var title="">url</var> into its component parts.</li>
 
    <li>
@@ -4204,8 +4200,8 @@
 
     <p>If the <a href=#absolute-url>absolute URL</a> identified by the hyperlink is
     being shown to the user, or if any data derived from that URL is
-    affecting the display, then the <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute should be <a href=#resolve-a-url title="resolve a url">reresolved</a> and the UI updated
-    appropriately.</p>
+    affecting the display, then the <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute should be <a href=#resolve-a-url title="resolve a url">reresolved</a> relative to the element
+    and the UI updated appropriately.</p>
 
     <p class=example>For example, the CSS <code title="">:link</code>/<code title="">:visited</code>
     pseudo-classes might have been affected.</p>
@@ -4213,7 +4209,8 @@
     <p>If the hyperlink has a <code title=attr-hyperlink-ping><a href=#ping>ping</a></code> attribute and its <a href=#absolute-url title="absolute URL">absolute URL(s)</a> are being shown to the
     user, then the <code title=attr-hyperlink-ping><a href=#ping>ping</a></code>
     attribute's tokens should be <a href=#resolve-a-url title="resolve a
-    url">reresolved</a> and the UI updated appropriately.</p>
+    url">reresolved</a> relative to the element and the UI updated
+    appropriately.</p>
 
    </dd>
 
@@ -4225,7 +4222,8 @@
     <p>If the <a href=#absolute-url>absolute URL</a> identified by the <code title="">cite</code> attribute is being shown to the user, or if
     any data derived from that URL is affecting the display, then the
     <a href=#url>URL</a> should be <a href=#resolve-a-url title="resolve a
-    url">reresolved</a> and the UI updated appropriately.</p>
+    url">reresolved</a> relative to the element and the UI updated
+    appropriately.</p>
 
    </dd>
 
@@ -4397,11 +4395,7 @@
   <p>When a user agent is to <dfn id=fetch>fetch</dfn> a resource, the
   following steps must be run:</p>
 
-  <ol><li><p>If the resource is identified by a <a href=#url>URL</a>, then
-   immediately <a href=#resolve-a-url title="resolve a URL">resolve that
-   URL</a>.</li>
-
-   <li><p>If the resulting <a href=#absolute-url>absolute URL</a> is
+  <ol><li><p>If the resource is identified by the <a href=#url>URL</a>
    <dfn id=about:blank><code>about:blank</code></dfn>, then return the empty string
    and abort these steps.</li>
 
@@ -4409,22 +4403,22 @@
 
    <li>
 
-    <p>If the resource identified by the resulting <a href=#absolute-url>absolute
-    URL</a> is already being downloaded for other reasons
-    (e.g. another invocation of this algorithm), and the resource is
-    to be obtained using a idempotent action (such as an HTTP GET
-    <a href=#concept-http-equivalent-get title=concept-http-equivalent-get>or equivalent</a>),
-    and the user agent is configured such that it is to reuse the data
-    from the existing download instead of initiating a new one, then
-    use the results of the existing download instead of starting a new
+    <p>If the resource is identified by an <a href=#absolute-url>absolute URL</a>,
+    and the resource is to be obtained using a idempotent action (such
+    as an HTTP GET <a href=#concept-http-equivalent-get title=concept-http-equivalent-get>or
+    equivalent</a>), and it is already being downloaded for other
+    reasons (e.g. another invocation of this algorithm), and the user
+    agent is configured such that it is to reuse the data from the
+    existing download instead of initiating a new one, then use the
+    results of the existing download instead of starting a new
     one.</p>
 
     <p>Otherwise, at a time convenient to the user and the user agent,
-    download the resource, applying the semantics of the relevant
-    specifications (e.g. performing an HTTP GET or POST operation, or
-    reading the file from disk, following redirects, <a href=#concept-js-deref title=concept-js-deref>dereferencing <span title="javascript
-    protocol"><code title="">javascript:</code> URLs</span></a>,
-    etc).</p>
+    download (or otherwise obtain) the resource, applying the
+    semantics of the relevant specifications (e.g. performing an HTTP
+    GET or POST operation, or reading the file from disk, following
+    redirects, <a href=#concept-js-deref title=concept-js-deref>dereferencing <span title="javascript protocol"><code title="">javascript:</code>
+    URLs</span></a>, etc).</p>
 
    </li>
 
@@ -5148,24 +5142,25 @@
   <p>If a reflecting DOM attribute is a <code>DOMString</code>
   attribute whose content attribute is defined to contain a
   <a href=#url>URL</a>, then on getting, the DOM attribute must <a href=#resolve-a-url title="resolve a url">resolve</a> the value of the content
-  attribute and return the resulting <a href=#absolute-url>absolute URL</a> if that
-  was successful, or the empty string otherwise; and on setting, must
-  set the content attribute to the specified literal value. If the
-  content attribute is absent, the DOM attribute must return the
-  default value, if the content attribute has one, or else the empty
-  string.</p>
+  attribute relative to the element and return the resulting
+  <a href=#absolute-url>absolute URL</a> if that was successful, or the empty
+  string otherwise; and on setting, must set the content attribute to
+  the specified literal value. If the content attribute is absent, the
+  DOM attribute must return the default value, if the content
+  attribute has one, or else the empty string.</p>
 
   <p>If a reflecting DOM attribute is a <code>DOMString</code>
   attribute whose content attribute is defined to contain one or more
   <a href=#url title=URL>URLs</a>, then on getting, the DOM attribute
   must <a href=#split-a-string-on-spaces title="split a string on spaces">split the content
   attribute on spaces</a> and return the concatenation of <a href=#resolve-a-url title="resolve a URL">resolving</a> each token URL to an
-  <a href=#absolute-url>absolute URL</a>, with a single U+0020 SPACE character
-  between each URL, ignoring any tokens that did not resolve
-  successfully. If the content attribute is absent, the DOM attribute
-  must return the default value, if the content attribute has one, or
-  else the empty string. On setting, the DOM attribute must set the
-  content attribute to the specified literal value.</p>
+  <a href=#absolute-url>absolute URL</a> relative to the element, with a single
+  U+0020 SPACE character between each URL, ignoring any tokens that
+  did not resolve successfully. If the content attribute is absent,
+  the DOM attribute must return the default value, if the content
+  attribute has one, or else the empty string. On setting, the DOM
+  attribute must set the content attribute to the specified literal
+  value.</p>
 
   <p>If a reflecting DOM attribute is a <code>DOMString</code> whose
   content attribute is an <a href=#enumerated-attribute>enumerated attribute</a>, and the
@@ -6980,10 +6975,10 @@
   its value treated as the body (the part inside the curly brackets)
   of a declaration block in a rule whose selector matches just the
   element on which the attribute is set. All <a href=#url title=URL>URLs</a> in the value must be <a href=#resolve-a-url title="resolve a
-  url">resolved</a> when the attribute is parsed.<!-- so dynamic
-  changes to the base URL don't affect the CSS --> For the purposes of
-  the CSS cascade, the attribute must be considered to be a 'style'
-  attribute at the author level. </p>
+  url">resolved</a> relative to the element when the attribute is
+  parsed.<!-- so dynamic changes to the base URL don't affect the CSS
+  --> For the purposes of the CSS cascade, the attribute must be
+  considered to be a 'style' attribute at the author level. </p>
 
   <p>Documents that use <code title=attr-style><a href=#the-style-attribute>style</a></code>
   attributes on any of their elements must still be comprehensible and
@@ -8468,9 +8463,8 @@
   dynamically thus has no effect (and thus, no DOM API is provided for
   this attribute).</p>
 
-  <p class=note>Later <code><a href=#the-base-element>base</a></code> elements don't affect the
-  <a href=#resolve-a-url title="resolve a url">resolving of relative URLs</a> in
-  <code title=attr-html-manifest><a href=#attr-html-manifest>manifest</a></code> attributes, as the
+  <p class=note>For the purposes of <a href=#concept-appcache-init title=concept-appcache-init>application cache selection</a>,
+  later <code><a href=#the-base-element>base</a></code> elements cannot affect the <a href=#resolve-a-url title="resolve a url">resolving of relative URLs</a> in <code title=attr-html-manifest><a href=#attr-html-manifest>manifest</a></code> attributes, as the
   attributes are processed before those elements are seen.</p>
 
 
@@ -8677,9 +8671,13 @@
   applied (as defined below). For external resources that are
   represented in the DOM (for example, style sheets), the DOM
   representation must be made available even if the resource is not
-  applied. (However, user agents may opt to only <a href=#fetch>fetch</a>
-  such resources when they are needed, instead of pro-actively <a href=#fetch title=fetch>fetching</a> all the external resources that are
-  not applied.)</p>
+  applied. To obtain the resource, the user agent must <a href=#resolve-a-url title="resolve a url">resolve</a> the <a href=#url>URL</a> given by
+  the <code title=attr-link-href><a href=#attr-link-href>href</a></code> attribute, relative to
+  the element, and then <a href=#fetch>fetch</a> the resulting
+  <a href=#absolute-url>absolute URL</a>. User agents may opt to only
+  <a href=#fetch>fetch</a> such resources when they are needed, instead of
+  pro-actively <a href=#fetch title=fetch>fetching</a> all the external
+  resources that are not applied.</p>
 
   <p>The semantics of the protocol used (e.g. HTTP) must be followed
   when fetching external resources. (For example, redirects must be
@@ -9306,9 +9304,8 @@
      <li><p>Strip any U+0009 CHARACTER TABULATION, U+000A LINE FEED
      (LF), and U+000D CARRIAGE RETURN (CR) characters from <var title="">url</var>.</li>
 
-     <li><p><a href=#resolve-a-url title="resolve a url">Resolve</a> the <var title="">url</var> value to an <a href=#absolute-url>absolute URL</a>. (For
-     the purposes of determining the <a href=#base-url>base URL</a>, the <var title="">url</var> value comes from the value of a content
-     attribute of the <code><a href=#meta>meta</a></code> element.) If this fails, abort
+     <li><p><a href=#resolve-a-url title="resolve a url">Resolve</a> the <var title="">url</var> value to an <a href=#absolute-url>absolute URL</a>,
+     relative to the <code><a href=#meta>meta</a></code> element. If this fails, abort
      these steps.</li>
 
      <li>
@@ -9548,9 +9545,10 @@
   nodes of the <code><a href=#the-style-element>style</a></code> element to the style system.</p>
 
   <p>All <a href=#url title=URL>URLs</a> found by the styling language's
-  processor must be <a href=#resolve-a-url title="resolve a url">resolved</a> when
-  it is invoked.<!-- so dynamic changes to the base URL don't affect
-  the CSS --></p>
+  processor must be <a href=#resolve-a-url title="resolve a url">resolved</a>,
+  relative to the element (or as defined by the styling language),
+  when the processor is invoked.<!-- so dynamic changes to the base
+  URL don't affect the CSS --></p>
 
   <p class=note>This specification does not specify a style system,
   but CSS is expected to be supported by most Web browsers. <a href=#refsCSS21>[CSS21]</a></p>
@@ -9600,10 +9598,11 @@
 
    <dd><p>For <code><a href=#the-link-element>link</a></code> elements, the location must be the
    result of <a href=#resolve-a-url title="resolve a url">resolving</a> the
-   <a href=#url>URL</a> given by the element's <code title=attr-link-href><a href=#attr-link-href>href</a></code> content attribute, or the empty
-   string if that fails. For <code><a href=#the-style-element>style</a></code> elements, there is no
-   location.</dd> <!-- note that this might not match the style
-   sheet URL, if the base URL has changed for instance -->
+   <a href=#url>URL</a> given by the element's <code title=attr-link-href><a href=#attr-link-href>href</a></code> content attribute, relative to
+   the element, or the empty string if that fails. For
+   <code><a href=#the-style-element>style</a></code> elements, there is no location.</dd> <!--
+   note that this might not match the style sheet URL, if the base URL
+   has changed for instance -->
 
    <dt>The intended destination media for style information (<code title=dom-stylesheet-media>media</code> DOM attribute)</dt>
 
@@ -9861,7 +9860,8 @@
    <li>
 
     <p>If the element has a <code title=attr-script-src><a href=#attr-script-src>src</a></code>
-    attribute, then the specified resource must be <a href=#fetch title=fetch>fetched</a>.</p>
+    attribute, then the value of that attribute must be <a href=#resolve-a-url title="resolve a url">resolved</a> relative to the element, and
+    if that is successful, the specified resource must then be <a href=#fetch title=fetch>fetched</a>.</p>
 
     <p>For historical reasons, if the <a href=#url>URL</a> is a <a href=#javascript-protocol title="javascript protocol"><code title="">javascript:</code>
     URL</a>, then the user agent must not, despite the requirements
@@ -9891,8 +9891,9 @@
     document">inserted into the document</a>, the load must have
     started. If the UA performs such prefetching, but the element is
     never inserted in the document, or the <code title=attr-script-src><a href=#attr-script-src>src</a></code> attribute is dynamically
-    changed, then the user agent will not execute the script, and the
-    fetching process will have been effectively wasted.</p>
+    changed,<!-- or the base URL is dynamically changed,--> then the
+    user agent will not execute the script, and the fetching process
+    will have been effectively wasted.</p>
 
    </li>
 
@@ -10434,14 +10435,15 @@
   follows:</p>
 
   <ol><li><a href=#resolve-a-url title="resolve a url">Resolve</a> the <a href=#url>URL</a>
-   specified by the <code><a href=#the-eventsource-element>eventsource</a></code> element's <code title=attr-eventsource-src><a href=#attr-eventsource-src>src</a></code> attribute.</li>
+   specified by the <code><a href=#the-eventsource-element>eventsource</a></code> element's <code title=attr-eventsource-src><a href=#attr-eventsource-src>src</a></code> attribute, relative to the
+   element.</li>
 
    <li>If that fails, then set the element's <i>current declared event
    source</i> to "undefined" and abort these steps.</li>
 
-   <li>Otherwise, act as if the <code title=dom-remoteEventTarget-addEventSource><a href=#dom-remoteeventtarget-addeventsource>addEventSource()</a></code>
-   method on the <code><a href=#the-eventsource-element>eventsource</a></code> element had been invoked
-   with the resulting <a href=#absolute-url>absolute URL</a>.</li>
+   <li>Otherwise, add the resulting <a href=#absolute-url>absolute URL</a> to the
+   <a href=#concept-eventsource-list title=concept-eventsource-list>list of event sources</a>
+   for the element.</li>
 
    <li>Let the element's <i>current declared event source</i> be that
    <a href=#absolute-url>absolute URL</a>.</li>
@@ -10452,9 +10454,9 @@
   <ol><li>If the element's <i>current declared event source</i> is
    "undefined", abort these steps.</li>
 
-   <li>Otherwise, act as if the <code title=dom-remoteEventTarget-removeEventSource><a href=#dom-remoteeventtarget-removeeventsource>removeEventSource()</a></code>
-   method on the <code><a href=#the-eventsource-element>eventsource</a></code> element had been invoked
-   with the element's <i>current declared event source</i>.</li>
+   <li>Otherwise, remove the element's <i>current declared event
+   source</i> from the <a href=#concept-eventsource-list title=concept-eventsource-list>list of
+   event sources</a> for the element.</li>
 
    <li>Let the element's <i>current declared event source</i> be
    "undefined".</li>
@@ -10465,8 +10467,7 @@
   number of simultaneous connections that a user agent can open per
   server.</p>
 
-  <!-- XXX should we make 'load', 'error', 'abort' events fire on this
-  element? -->
+  <!-- v2: make 'load', 'error', 'abort' events fire on this element -->
 
   <p>The <dfn id=dom-eventsource-src title=dom-eventsource-src><code>src</code></dfn> DOM
   attribute must <a href=#reflect>reflect</a> the content attribute of the
@@ -11754,11 +11755,14 @@
   attribute.</p>
 
   <p>If the <code title=attr-blockquote-cite><a href=#attr-blockquote-cite>cite</a></code> attribute
-  is present, it must be a <a href=#valid-url>valid URL</a>. User agents should
-  allow users to follow such citation links.</p>
+  is present, it must be a <a href=#valid-url>valid URL</a>. To obtain the
+  corresponding citation link, the value of the attribute must be
+  <a href=#resolve-a-url title="resolve a url">resolved</a> relative to the
+  element. User agents should allow users to follow such citation
+  links.</p>
 
   <p>The <dfn id=dom-quote-cite title=dom-quote-cite><code>cite</code></dfn> DOM
-  attribute must <a href=#reflect>reflect</a> the element's <code title="">cite</code> content attribute.
+  attribute must <a href=#reflect>reflect</a> the element's <code title="">cite</code> content attribute.</p>
 
   <p class=note>The best way to represent a conversation is not with
   the <code><a href=#the-cite-element>cite</a></code> and <code><a href=#the-blockquote-element>blockquote</a></code> elements, but with
@@ -12486,8 +12490,11 @@
   screenplay.</p>
 
   <p>If the <code title=attr-q-cite><a href=#attr-q-cite>cite</a></code> attribute is
-  present, it must be a <a href=#valid-url>valid URL</a>. User agents should
-  allow users to follow such citation links.</p>
+  present, it must be a <a href=#valid-url>valid URL</a>. To obtain the
+  corresponding citation link, the value of the attribute must be
+  <a href=#resolve-a-url title="resolve a url">resolved</a> relative to the
+  element. User agents should allow users to follow such citation
+  links.</p>
 
   <p>The <code><a href=#the-q-element>q</a></code> element must not be used in place of quotation
   marks that do not represent quotes; for example, it is inappropriate
@@ -14707,8 +14714,10 @@
 
   <p>If the <code title=attr-mod-cite><a href=#attr-mod-cite>cite</a></code> attribute is
   present, it must be a <a href=#valid-url>valid URL</a> that explains the
-  change. User agents should allow users to follow such citation
-  links.</p>
+  change. To obtain the corresponding citation link, the value of the
+  attribute must be <a href=#resolve-a-url title="resolve a url">resolved</a>
+  relative to the element. User agents should allow users to follow
+  such citation links.</p>
 
   <p>The <dfn id=attr-mod-datetime title=attr-mod-datetime><code>datetime</code></dfn>
   attribute may be used to specify the time and date of the change.</p>
@@ -15046,24 +15055,25 @@
   attribute's value are described <a href=#alt>in the next
   section</a>.</p>
 
-  <p class=XXX>There has been some suggestion that the <code title="">longdesc</code> attribute from HTML4, or some other
-  mechanism that is more powerful than <code title="">alt=""</code>,
-  should be included. This has been considered and rejected in the
-  past, but may be considered again in the future.</p>
+  <p class=XXX>There has been some suggestion that the <code title="">longdesc</code> attribute from HTML4 should be
+  included. This has been considered and rejected in the past, but if
+  new evidence is found showing the attribute to actually help users
+  rather than harm them, it may be reconsidered.</p>
 
   <p>The <code><a href=#the-img-element>img</a></code> must not be used as a layout tool. In
   particular, <code><a href=#the-img-element>img</a></code> elements should not be used to display
   fully transparent images, as they rarely convey meaning and rarely
   add anything useful to the document.</p>
 
-  <hr><p>When an <code><a href=#the-img-element>img</a></code> is created with a <code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute, and whenever the <code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute is set subsequently, the
-  user agent must <a href=#fetch>fetch</a> the resource specifed by the
-  <code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute's value, unless the
-  user agent cannot support images, or its support for images has been
-  disabled, or the user agent only fetches elements on demand, or the
-  element's <code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute has a
-  value that is an <i>ignored self-reference</i>.</p> <!-- Note how
-  this does NOT happen when the base URL changes. -->
+  <hr><p>Unless the user agent cannot support images, or its support for
+  images has been disabled, or the user agent only fetches elements on
+  demand, or the element's <code title=attr-img-src><a href=#attr-img-src>src</a></code>
+  attribute has a value that is an <i>ignored self-reference</i>,
+  then, when an <code><a href=#the-img-element>img</a></code> is created with a <code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute, and whenever the <code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute is set subsequently, the
+  user agent must <a href=#resolve-a-url title="resolve a url">resolve</a> the value
+  of that attribute, relative to the element, and if that is
+  successful must then <a href=#fetch>fetch</a> that resource.</p> <!-- Note
+  how this does NOT happen when the base URL changes. -->
 
   <p>The <code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute's value is an
   <i>ignored self-reference</i> if its value is the empty string, and
@@ -16273,24 +16283,30 @@
   gives the address of a page that the nested <a href=#browsing-context>browsing
   context</a> is to contain. The attribute, if present, must be a
   <a href=#valid-url>valid URL</a>. When the browsing context is created, if the
-  attribute is present, the user agent must <a href=#navigate>navigate</a> the
-  element's browsing context to the given <a href=#url>URL</a>, with
-  <a href=#replacement-enabled>replacement enabled</a>, and with the <code><a href=#the-iframe-element>iframe</a></code>
-  element's document's <a href=#browsing-context>browsing context</a> as the
-  <a href=#source-browsing-context>source browsing context</a>. If the user <a href=#navigate title=navigate>navigates</a> away from this page, the
-  <code><a href=#the-iframe-element>iframe</a></code>'s corresponding <code><a href=#window>Window</a></code> object will
-  reference new <code>Document</code> objects, but the <code title=attr-iframe-src><a href=#attr-iframe-src>src</a></code> attribute will not change.</p>
+  attribute is present, the user agent must <a href=#resolve-a-url title="resolve a
+  url">resolve</a> the value of that attribute, relative to the
+  element, and if that is successful, must then <a href=#navigate>navigate</a>
+  the element's browsing context to the resulting <a href=#absolute-url>absolute
+  URL</a>, with <a href=#replacement-enabled>replacement enabled</a>, and with the
+  <code><a href=#the-iframe-element>iframe</a></code> element's document's <a href=#browsing-context>browsing
+  context</a> as the <a href=#source-browsing-context>source browsing context</a>. If the
+  user <a href=#navigate title=navigate>navigates</a> away from this page,
+  the <code><a href=#the-iframe-element>iframe</a></code>'s corresponding <code><a href=#window>Window</a></code> object
+  will reference new <code>Document</code> objects, but the <code title=attr-iframe-src><a href=#attr-iframe-src>src</a></code> attribute will not change.</p>
 
   <p>Whenever the <code title=attr-iframe-src><a href=#attr-iframe-src>src</a></code> attribute
-  is set, the nested <a href=#browsing-context>browsing context</a> must be <a href=#navigate title=navigate>navigated</a> to the <a href=#url>URL</a> given by
-  that attribute's value, with the <code><a href=#the-iframe-element>iframe</a></code> element's
-  document's <a href=#browsing-context>browsing context</a> as the <a href=#source-browsing-context>source
-  browsing context</a>.</p> <!-- It doesn't happen when the base
-  URL is changed, though. -->
+  is set, the user agent must <a href=#resolve-a-url title="resolve a
+  url">resolve</a> the value of that attribute, relative to the
+  element, and if that is successful, the nested <a href=#browsing-context>browsing
+  context</a> must be <a href=#navigate title=navigate>navigated</a> to
+  the resulting <a href=#absolute-url>absolute URL</a>, with the
+  <code><a href=#the-iframe-element>iframe</a></code> element's document's <a href=#browsing-context>browsing
+  context</a> as the <a href=#source-browsing-context>source browsing context</a>.</p> <!--
+  It doesn't happen when the base URL is changed, though. -->
 
   <p>If the <code title=attr-iframe-src><a href=#attr-iframe-src>src</a></code> attribute is not
-  set when the element is created, the browsing context will remain at
-  the initial <code><a href=#about:blank>about:blank</a></code> page.</p>
+  set when the element is created, or if its value cannot be <a href=#resolve-a-url title="resolve a url">resolved</a>, the browsing context will
+  remain at the initial <code><a href=#about:blank>about:blank</a></code> page.</p>
 
   <p>The <dfn id=attr-iframe-name title=attr-iframe-name><code>name</code></dfn>
   attribute, if present, must be a <a href=#valid-browsing-context-name>valid browsing context
@@ -16718,9 +16734,10 @@
   <p>When the element is created with a <code title=attr-embed-src><a href=#attr-embed-src>src</a></code> attribute, and whenever the <code title=attr-embed-src><a href=#attr-embed-src>src</a></code> attribute is subsequently set, and
   whenever the <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute is
   set or removed while the element has a <code title=attr-embed-src><a href=#attr-embed-src>src</a></code> attribute, if the element is not
-  in a sandboxed browsing context, user agents should
-  <a href=#fetch>fetch</a> the specified resource, find and instantiate an
-  appropriate <a href=#plugin>plugin</a> based on the <a href=#concept-embed-type title=concept-embed-type>content's type</a>, and hand that
+  in a sandboxed browsing context, user agents must <a href=#resolve-a-url title="resolve a url">resolve</a> the value of the attribute,
+  relative to the element, and if that is successful, should
+  <a href=#fetch>fetch</a> the resulting <a href=#absolute-url>absolute URL</a>, find and
+  instantiate an appropriate <a href=#plugin>plugin</a> based on the <a href=#concept-embed-type title=concept-embed-type>content's type</a>, and hand that
   <a href=#plugin>plugin</a> the content of the resource, replacing any
   previously instantiated plugin for the element. <!-- Note that this
   doesn't happen when the base URL changes. --></p>
@@ -16928,8 +16945,13 @@
 
      <li>
 
-      <p><a href=#fetch>Fetch</a> the resource specified by the <code title=attr-object-data><a href=#attr-object-data>data</a></code> attribute.</p>
+      <p><a href=#resolve-a-url title="resolve a url">Resolve</a> the
+      <a href=#url>URL</a> specified by the <code title=attr-object-data><a href=#attr-object-data>data</a></code> attribute, relative to the
+      element.</p>
 
+      <p>If that is successful, <a href=#fetch>fetch</a> the resulting
+      <a href=#absolute-url>absolute URL</a>.</p>
+
       <p>The fetching of the resource must <a href=#delay-the-load-event>delay the <code title=event-load>load</code> event</a>.</p>
 
      </li>
@@ -16943,10 +16965,11 @@
      agents may opt to consider a resource "available" whenever enough
      data has been obtained to begin processing the resource.</li>
 
-     <li><p>If the load failed (e.g. an HTTP 404 error, a DNS error),
-     <a href=#fire-an-error-event>fire an <code title=event-error>error</code> event</a>
-     at the element, then jump to the last step in the overall set of
-     steps (fallback).</li>
+     <li><p>If the load failed (e.g. the <a href=#url>URL</a> could not be
+     <a href=#resolve-a-url title="resolve a url">resolved</a>, there was an HTTP
+     404 error, there was a DNS error), <a href=#fire-an-error-event>fire an <code title=event-error>error</code> event</a> at the element,
+     then jump to the last step in the overall set of steps
+     (fallback).</li>
 
      <li><p>Determine the <var title="">resource type</var>, as follows:</p>
 
@@ -17037,7 +17060,8 @@
 
         <p class=XXX>navigation might end up treating it as
         something else, because it can do sniffing. how should we
-        handle that?</p>
+        handle that? it could also refetch the resource entirely,
+        maybe from another application cache.</p>
 
         <!-- note that malformed XML files don't cause fallback -->
 
@@ -17301,11 +17325,13 @@
   attribute gives the address of an image file that the user agent can
   show while no video data is available. The attribute, if present,
   must contain a <a href=#valid-url>valid URL</a>. If the specified resource is
-  to be used, it must be <a href=#fetch title=fetch>fetched</a> when the
-  element is created or when the <code title=attr-video-poster><a href=#attr-video-poster>poster</a></code> attribute is set. The
+  to be used, then, when the element is created or when the <code title=attr-video-poster><a href=#attr-video-poster>poster</a></code> attribute is set, its value
+  must be <a href=#resolve-a-url title="resolve a url">resolved</a> relative to the
+  element, and if that is successful, the resulting <a href=#absolute-url>absolute
+  URL</a> must be <a href=#fetch title=fetch>fetched</a>. The
   <dfn id=poster-frame>poster frame</dfn> is then the image obtained from that
-  resource, if any.</p> <!-- So that it is unaffected by changes to
-  the base URL.  -->
+  resource, if any.</p> <!-- thus it is unaffected by changes to the
+  base URL. -->
 
   <p class=note>The image given by the <code title=attr-video-poster><a href=#attr-video-poster>poster</a></code> attribute, the <i><a href=#poster-frame>poster
   frame</a></i>, is intended to be a representative frame of the video
@@ -17899,7 +17925,8 @@
     substeps:</p>
 
     <ol><li><p><a href=#resolve-a-url title="resolve a url">Resolve</a> the
-     <a href=#url>URL</a> given in that attribute.</p>
+     <a href=#url>URL</a> given in that attribute, relative to the
+     <a href=#media-element>media element</a>.</p>
 
      <li><p>If that is successful, then return a list consisting of
      only one entry, the resulting <a href=#absolute-url>absolute URL</a> as the
@@ -17934,8 +17961,8 @@
 
      <li><a href=#resolve-a-url title="resolve a url">Resolving</a> the
      <a href=#url>URL</a> given by the <var title="">candidate</var>
-     element's <code title=attr-source-src><a href=#attr-source-src>src</a></code> attribute does
-     not fail.</li>
+     element's <code title=attr-source-src><a href=#attr-source-src>src</a></code> attribute
+     relative to <var title="">candidate</var> does not fail.</li>
 
      <li>The <var title="">candidate</var> element either has no <code title=attr-source-type><a href=#attr-source-type>type</a></code> attribute, or its <code title=attr-source-type><a href=#attr-source-type>type</a></code> attribute's value, when
      parsed as a MIME type (including any codecs described by the
@@ -17949,7 +17976,8 @@
 
     </ul><p>...then append the <a href=#absolute-url>absolute URL</a> resulting from
     <a href=#resolve-a-url title="resolve a url">resolving</a> the <a href=#url>URL</a>
-    given in that <var title="">candidate</var> element's <code title=attr-source-src><a href=#attr-source-src>src</a></code> attribute to the <var title="">result</var> list.</p>
+    given in that <var title="">candidate</var> element's <code title=attr-source-src><a href=#attr-source-src>src</a></code> attribute relative to <var title="">candidate</var> to the <var title="">result</var>
+    list.</p>
 
    </li>
 
@@ -27276,11 +27304,14 @@
   optionally animated, image resource that is neither paged nor
   scripted.</p>
 
-  <p>When any of the following events occur, the user agent must
-  <a href=#fetch>fetch</a> the resource specifed by the <code title=attr-input-src><a href=#attr-input-src>src</a></code> attribute's value, unless the user
-  agent cannot support images, or its support for images has been
-  disabled, or the user agent only fetches elements on demand:</p>
-  <!-- Note how this does NOT happen when the base URL changes. -->
+  <p>When any of the following events occur, unless the user agent
+  cannot support images, or its support for images has been disabled,
+  or the user agent only fetches elements on demand, the user agent
+  must <a href=#resolve-a-url title="resolve a url">resolve</a> the value of the
+  <code title=attr-input-src><a href=#attr-input-src>src</a></code> attribute, relative to the
+  element, and if that is successful, must <a href=#fetch>fetch</a> the
+  resulting <a href=#absolute-url>absolute URL</a>:</p> <!-- Note how this does NOT
+  happen when the base URL changes. -->
 
   <ul><li>The <code><a href=#the-input-element>input</a></code> element's <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is first set to the
    <a href=#image-button-state title=attr-input-type-image>Image Button</a> state
@@ -29903,8 +29934,9 @@
    </li>
 
    <li><p><a href=#resolve-a-url title="resolve a url">Resolve</a> the
-   <a href=#url>URL</a> <var title="">action</var>. If this fails, abort
-   these steps.</li>
+   <a href=#url>URL</a> <var title="">action</var>, relative to the <var title="">submitter</var> element. If this fails, abort these
+   steps. Otherwise, let <var title="">action</var> be the resulting
+   <a href=#absolute-url>absolute URL</a>.</li>
 
    <li><p>Let <var title="">scheme</var> be the <a href=#url-scheme title=url-scheme><scheme></a> of the resulting
    <a href=#absolute-url>absolute URL</a>.</li>
@@ -31018,11 +31050,11 @@
     <p><strong><code title=dom-provider-getRowImage><a href=#dom-provider-getrowimage>getRowImage(<var title="">i</var>)</a></code></strong>: The <a href=#url>URL</a> of the
     row's image is the <a href=#absolute-url>absolute URL</a> obtained by <a href=#resolve-a-url title="resolve a url">resolving</a> the value of the <code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute of the first
     <code><a href=#the-img-element>img</a></code> element child of the row's first cell's element,
-    if there is one and resolving its attribute is
-    successful. Otherwise, the <a href=#url>URL</a> of the row's image is
-    the empty string.</p> <!-- note that if the base URL has changed,
-    this URL can be different than the one that the <img> element
-    fetched when it was created -->
+    relative to that element, if there is one and resolving its
+    attribute is successful. Otherwise, the <a href=#url>URL</a> of the
+    row's image is the empty string.</p> <!-- note that if the base
+    URL has changed, this URL can be different than the one that the
+    <img> element fetched when it was created -->
 
     <p><strong><code title=dom-provider-getRowMenu><a href=#dom-provider-getrowmenu>getRowMenu(<var title="">i</var>)</a></code></strong>: If the row's first cell's
     element has a <code><a href=#menus>menu</a></code> element child, then the row's menu
@@ -31233,11 +31265,11 @@
     the first <code><a href=#the-img-element>img</a></code> element descendant (in the real DOM) of
     the row's element, that is not also a descendant of another
     element in the filtered view that is a descendant of the row's
-    element, if such an element exists and resolving its attribute is
-    successful. Otherwise, it must return the empty string.</p> <!--
-    note that if the base URL has changed, this URL can be different
-    than the one that the <img> element fetched when it was created
-    -->
+    element, if such an element exists and resolving its attribute
+    relative to the element itself, is successful. Otherwise, it must
+    return the empty string.</p> <!-- note that if the base URL has
+    changed, this URL can be different than the one that the <img>
+    element fetched when it was created -->
 
     <div class=example>
 
@@ -31680,12 +31712,12 @@
 
    <dd>Invoke the <code title=dom-provider-getRowImage><a href=#dom-provider-getrowimage>getRowImage()</a></code> method with a
    <code><a href=#rowspecification>RowSpecification</a></code> object representing the row in
-   question. The return value is a <a href=#url>URL</a>. Immediately <a href=#resolve-a-url title="resolve a url">resolve</a> that URL as if it came from an
-   attribute of the <code><a href=#datagrid>datagrid</a></code> element to obtain an
-   <a href=#absolute-url>absolute URL</a> identifying the image that represents the
-   row. If the method returns the empty string, null, or if the method
-   is not defined, then the row has no associated image.</dd> <!--
-   changing the base URL doesn't change the image used later -->
+   question. The return value is a <a href=#url>URL</a>. Immediately <a href=#resolve-a-url title="resolve a url">resolve</a> that URL, relative to the
+   <code><a href=#datagrid>datagrid</a></code> element, to obtain an <a href=#absolute-url>absolute
+   URL</a> identifying the image that represents the row. If the
+   method returns the empty string, null, or if the method is not
+   defined, then the row has no associated image.</dd> <!-- changing
+   the base URL doesn't change the image used later -->
 
    <dt>To obtain a context menu appropriate for a particular row</dt>
 
@@ -32167,7 +32199,12 @@
   <p>The <dfn id=attr-command-icon title=attr-command-icon><code>icon</code></dfn>
   attribute gives a picture that represents the command. If the
   attribute is specified, the attribute's value must contain a
-  <a href=#valid-url>valid URL</a>.</p>
+  <a href=#valid-url>valid URL</a>. To obtain the <a href=#absolute-url>absolute URL</a> of
+  the icon, the attribute's value must be <a href=#resolve-a-url title="resolve a
+  url">resolved</a> relative to the element.</p> <!-- this is
+  affected by the base URL being changed, so users of this should
+  cache the image once they've fetched it once, at least until the
+  relative url changes again -->
 
   <p>The <dfn id=attr-command-disabled title=attr-command-disabled><code>disabled</code></dfn> attribute
   is a <a href=#boolean-attribute>boolean attribute</a> that, if present, indicates that
@@ -32614,11 +32651,12 @@
    this means for each facet -->. If the element is a
    <code><a href=#the-command>command</a></code> element with a <code title=attr-command-default><a href=#attr-command-default>default</a></code> attribute, mark the
    command as being a default command.</dd> <!-- XXX if there's an
-   Icon URL for the command, it should be <span
+   Icon facet for the command, it should be <span
    title="fetch">fetched</span>, and then that image should be
    associated with the command, such that each command only has its
    image fetched once, to prevent changes to the base URL from having
-   effects after the image has been fetched once. -->
+   effects after the image has been fetched once. (no need to resolve
+   the Icon facet, it's an absolute URL) -->
 
 
    <dt>An <code><a href=#the-hr-element>hr</a></code> element</dt>
@@ -32951,10 +32989,9 @@
   <p>The <a href=#command-facet-icon title=command-facet-Icon>Icon</a> of the command
   is the <a href=#absolute-url>absolute URL</a> obtained from <a href=#resolve-a-url title="resolve
   a url">resolving</a> the value of the <code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute of the first
-  <code><a href=#the-img-element>img</a></code> element descendant of the element, if there is such
-  an element and resolving its attribute is successful. Otherwise,
-  there is no <a href=#command-facet-icon title=command-facet-Icon>Icon</a> for the
-  command.</p>
+  <code><a href=#the-img-element>img</a></code> element descendant of the element, relative to that
+  element, if there is such an element and resolving its attribute is
+  successful. Otherwise, there is no <a href=#command-facet-icon title=command-facet-Icon>Icon</a> for the command.</p>
 
   <p>The <a href=#command-facet-hiddenstate title=command-facet-HiddenState>Hidden State</a>
   of the command is true (hidden) if the element has a <code title=attr-hidden><a href=#the-hidden-attribute>hidden</a></code> attribute, and false
@@ -33117,9 +33154,9 @@
 
   <p>The <a href=#command-facet-icon title=command-facet-Icon>Icon</a> for the command
   is the <a href=#absolute-url>absolute URL</a> obtained from <a href=#resolve-a-url title="resolve
-  a url">resolving</a> the value of the element's <code title=attr-command-icon><a href=#attr-command-icon>icon</a></code> attribute, if it has such an
-  attribute and resolving it is successful. Otherwise, there is no
-  <a href=#command-facet-icon title=command-facet-Icon>Icon</a> for the command.</p>
+  a url">resolving</a> the value of the element's <code title=attr-command-icon><a href=#attr-command-icon>icon</a></code> attribute, relative to the
+  element, if it has such an attribute and resolving it is
+  successful. Otherwise, there is no <a href=#command-facet-icon title=command-facet-Icon>Icon</a> for the command.</p>
 
   <p>The <a href=#command-facet-hiddenstate title=command-facet-HiddenState>Hidden State</a>
   of the command is true (hidden) if the element has a <code title=attr-hidden><a href=#the-hidden-attribute>hidden</a></code> attribute, and false
@@ -33166,10 +33203,10 @@
   <p>The <a href=#command-facet-icon title=command-facet-Icon>Icon</a> of the command
   is the <a href=#absolute-url>absolute URL</a> obtained from <a href=#resolve-a-url title="resolve
   a url">resolving</a> the value of the <code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute of the first
-  <code><a href=#the-img-element>img</a></code> element descendant of the element, if there is such
-  an element and resolving its attribute is successful. Otherwise, the
-  <a href=#command-facet-icon title=command-facet-Icon>Icon</a> is a user-agent-defined
-  image appropriate for the <code><a href=#the-bb-element>bb</a></code> element's <code title=attr-bb-type><a href=#attr-bb-type>type</a></code> attribute's state.</p>
+  <code><a href=#the-img-element>img</a></code> element descendant of the element, relative to that
+  element, if there is such an element and resolving its attribute is
+  successful. Otherwise, the <a href=#command-facet-icon title=command-facet-Icon>Icon</a> is a user-agent-defined image
+  appropriate for the <code><a href=#the-bb-element>bb</a></code> element's <code title=attr-bb-type><a href=#attr-bb-type>type</a></code> attribute's state.</p>
 
   <p>The <a href=#command-facet-hiddenstate title=command-facet-HiddenState>Hidden State</a>
   facet of the command is true (hidden) if the <code><a href=#the-bb-element>bb</a></code>
@@ -33534,8 +33571,13 @@
   be made the same as members of any other group. Each such group is a
   <dfn id=unit-of-related-similar-origin-browsing-contexts>unit of related similar-origin browsing contexts</dfn>.</p>
 
+  <p>Each <a href=#unit-of-related-similar-origin-browsing-contexts>unit of related similar-origin browsing
+  contexts</a> has a <dfn id=current-script-base-url>current script base URL</dfn> which is
+  used to <a href=#resolve-a-url title="resolve a url">resolve</a> relative <a href=#url title=URL>URLs</a> used in scripts running in that <a href=#unit-of-related-similar-origin-browsing-contexts>unit
+  of related similar-origin browsing contexts</a>.</p>
 
 
+
   <h4 id=browsing-context-names><span class=secno>5.1.6 </span>Browsing context names</h4>
 
   <p>Browsing contexts can have a <dfn id=browsing-context-name>browsing context name</dfn>. By
@@ -33798,7 +33840,8 @@
   context. If no arguments are provided, or if the first argument is
   the empty string, then the <var title="">url</var> argument defaults
   to "<code><a href=#about:blank>about:blank</a></code>". The argument must be <a href=#resolve-a-url title="resolve a url">resolved</a> to an <a href=#absolute-url>absolute
-  URL</a> (or an error) when the method is invoked.</p>
+  URL</a> (or an error), relative to the <a href=#current-script-base-url>current script base
+  URL</a>, when the method is invoked.</p>
 
   <p>The second argument, <var title="">target</var>, specifies the
   <a href=#browsing-context-name title="browsing context name">name</a> of the browsing
@@ -33838,14 +33881,14 @@
   <p>Then, the user agent must <a href=#navigate>navigate</a> the selected
   <a href=#browsing-context>browsing context</a> to the <a href=#absolute-url>absolute URL</a> (or
   error) obtained from <a href=#resolve-a-url title="resolve a url">resolving</a>
-  <var title="">url</var>. If the <var title="">replace</var> is true,
-  then <a href=#replacement-enabled title="replacement enabled">replacement must be
+  <var title="">url</var> earlier. If the <var title="">replace</var>
+  is true, then <a href=#replacement-enabled title="replacement enabled">replacement must be
   enabled</a>; otherwise, it must not be enabled unless the
   <a href=#browsing-context>browsing context</a> was just created as part of the
   <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name>the rules for choosing a browsing context given a browsing
   context name</a>. The navigation must be done with the <a href="#script's-browsing-context" title="script's browsing context">browsing context</a> of the
-  <a href=#concept-script title=concept-script>script</a> that invoked the method as the <a href=#source-browsing-context>source browsing
-  context</a>.</p>
+  <a href=#concept-script title=concept-script>script</a> that invoked the method
+  as the <a href=#source-browsing-context>source browsing context</a>.</p>
 
   <p>The method must return the <code><a href=#window>Window</a></code> object of the
   default view of the <a href=#browsing-context>browsing context</a> that was
@@ -34692,38 +34735,45 @@
   </dl><h5 id=calling-scripts><span class=secno>5.4.3.2 </span>Calling scripts</h5>
 
   <p>When a user agent is to <dfn id=jump-to-a-code-entry-point>jump to a code entry-point</dfn> for
-  a <a href=#concept-script title=concept-script>script</a>, if <a href=#concept-bc-noscript title=concept-bc-noscript>scripting is disabled</a> in the
-  <a href="#script's-browsing-context">script's browsing context</a>, or if the script's
-  <a href=#script-group>script group</a> is <i>frozen</i>, then the user agent must
-  throw an <code><a href=#unavailable_script_err>UNAVAILABLE_SCRIPT_ERR</a></code> exception. Otherwise,
-  the <a href=#script-execution-environment title="script execution environment">script execution
-  environment</a> for the <a href=#concept-script title=concept-script>script</a> must execute the code for the
-  given code entry-point.</p>
+  a <a href=#concept-script title=concept-script>script</a>, for example because
+  one <a href=#concept-script title=concept-script>script</a> has called another,
+  or because the user agent is to invoke a callback defined in that
+  <a href=#concept-script title=concept-script>script</a>, the user agent must run
+  the following steps:</p>
 
-  <p>When executable code from a <a href=#concept-script title=concept-script>script</a> in one <a href=#script-group>script
-  group</a> makes a call to a <a href=#concept-script title=concept-script>script</a> in another <a href=#script-group>script
-  group</a>, the user agent must <a href=#jump-to-a-code-entry-point title="jump to a code
-  entry-point">jump</a> to the corresponding code entry-point in
-  that second script using the steps above.</p>
+  <ol><li>
 
-  <p>When executable code from a <a href=#concept-script title=concept-script>script</a> makes a call to a <a href=#concept-script title=concept-script>script</a> in the same <a href=#script-group>script
-  group</a>, the <a href=#script-execution-environment title="script execution environment">script
-  execution environment</a> for the <a href=#concept-script title=concept-script>script</a> must execute the code for the
-  given code entry-point without checking if the <a href=#script-group>script
-  group</a> is frozen.</p>
+    <p>If executable code from a <a href=#concept-script title=concept-script>script</a> is making a call to a <a href=#concept-script title=concept-script>script</a> in the same <a href=#script-group>script
+    group</a>, then skip this step.</p>
 
-  <p class=note>In particular, this means that scripts in a
+    <p>Otherwise, if <a href=#concept-bc-noscript title=concept-bc-noscript>scripting is
+    disabled</a> in the <a href="#script's-browsing-context">script's browsing context</a>, or
+    if the script's <a href=#script-group>script group</a> is <i>frozen</i>, then
+    the user agent must throw an <code><a href=#unavailable_script_err>UNAVAILABLE_SCRIPT_ERR</a></code>
+    exception and abort these steps.</p>
+
+   </li>
+
+   <li><p>If the <a href=#current-script-base-url>current script base URL</a> has no value,
+   then set it to the <a href="#script's-base-url">script's base URL</a>.</li>
+
+   <li><p>Make the <a href=#script-execution-environment title="script execution environment">script
+   execution environment</a> for the <a href=#concept-script title=concept-script>script</a> execute the code for the given
+   code entry-point.</li>
+
+   <li><p>If the <a href=#current-script-base-url>current script base URL</a> was set in the
+   earlier step for this invocation of the algorithm, then set it back
+   to having no value.</li>
+
+  </ol><p class=note>In particular, this means that scripts in a
   <i>frozen</i> <a href=#script-group>script group</a> can keep on executing so
   long as they don't call code in another <a href=#script-group>script
   group</a>. This is why a script doesn't immediately terminate
   after calling <code title=dom-document-open><a href=#dom-document-open>document.open()</a></code>
   on its own <code>Document</code>.</p>
 
-  <p>Any time the user agent to invoke a callback defined in a <a href=#concept-script title=concept-script>script</a>, the user agent must <a href=#jump-to-a-code-entry-point title="jump to a code entry-point">jump</a> to the corresponding
-  code entry-point in that second script.</p>
 
 
-
   <h5 id=creating-scripts><span class=secno>5.4.3.3 </span>Creating scripts</h5>
 
   <p>When the specification says that a <a href=#concept-script title=concept-script>script</a> is to be <dfn id=create-a-script title="create a
@@ -35774,6 +35824,14 @@
 
   <ol><li>
 
+    <p><a href=#resolve-a-url title="resolve a url">Resolve</a> <var title="">url</var> relative to the <a href=#current-script-base-url>current script base
+    URL</a>.</p>
+
+    <p>If this fails, then throw a <code><a href=#syntax_err>SYNTAX_ERR</a></code> exception
+    and abort these steps.</p>
+
+   <li>
+
     <p>If the user agent is configured such that this invocation of
     <code title=dom-showModalDialog><a href=#dom-showmodaldialog>showModalDialog()</a></code> is
     somehow disabled, then the method returns the empty string; abort
@@ -35852,10 +35910,11 @@
 
    <li>
 
-    <p><a href=#navigate>Navigate</a> the new browsing context to <var title="">url</var>, with <a href=#replacement-enabled>replacement enabled</a>, and
-    with the <a href="#script's-browsing-context" title="script's browsing context">browsing
-    context</a> of the <a href=#concept-script title=concept-script>script</a> that invoked the method as the
-    <a href=#source-browsing-context>source browsing context</a>.</p>
+    <p><a href=#navigate>Navigate</a> the new <a href=#browsing-context>browsing context</a> to
+    the <a href=#absolute-url>absolute URL</a> that resulted from <a href=#resolve-a-url title="resolve a url">resolving</a> <var title="">url</var>
+    earlier, with <a href=#replacement-enabled>replacement enabled</a>, and with the <a href="#script's-browsing-context" title="script's browsing context">browsing context</a> of the
+    <a href=#concept-script title=concept-script>script</a> that invoked the method
+    as the <a href=#source-browsing-context>source browsing context</a>.</p>
 
    </li>
 
@@ -36247,7 +36306,8 @@
   <p>There is <a href=#sample-handler-impl>an example of how these
   methods could be presented to the user</a> below.</p>
 
-  <p>The arguments to the methods have the following meanings:</p>
+  <p>The arguments to the methods have the following meanings and
+  corresponding implementaion requirements:</p>
 
   <dl><dt><var title="">protocol</var> (<code title=dom-navigator-registerProtocolHandler><a href=#dom-navigator-registerprotocolhandler>registerProtocolHandler()</a></code> only)</dt>
 
@@ -36290,23 +36350,24 @@
    <dd>
 
     <p>The <a href=#url>URL</a> of the page that will handle the
-    requests. When the user agent uses this URL, it must replace the
-    first occurrence of the exact literal string "<code>%s</code>"
-    with an escaped version of the URL of the content in question (as
-    defined below), then <a href=#resolve-a-url title="resolve a url">resolve</a>
-    the resulting URL (using the <a href="#script's-base-url" title="script's base URL">base
-    URL</a> of the script that originally invoked the <code title=dom-navigator-registerContentHandler><a href=#dom-navigator-registercontenthandler>registerContentHandler()</a></code>
+    requests.</p>
+
+    <p>When the user agent uses this URL, it must replace the first
+    occurrence of the exact literal string "<code title="">%s</code>"
+    with an escaped version of the <a href=#absolute-url>absolute URL</a> of the
+    content in question (as defined below), then <a href=#resolve-a-url title="resolve
+    a url">resolve</a> the resulting URL, relative to the
+    <a href=#current-script-base-url>current script base URL</a> at the time the <code title=dom-navigator-registerContentHandler><a href=#dom-navigator-registercontenthandler>registerContentHandler()</a></code>
     or <code title=dom-navigator-registerProtocolHandler><a href=#dom-navigator-registerprotocolhandler>registerProtocolHandler()</a></code>
-    method), and then <a href=#fetch>fetch</a> the resulting URL using the
-    GET method (<a href=#concept-http-equivalent-get title=concept-http-equivalent-get>or
-    equivalent</a> for non-HTTP URLs).</p>
+    methods were invoked, and then <a href=#fetch>fetch</a> the resulting
+    URL using the GET method (<a href=#concept-http-equivalent-get title=concept-http-equivalent-get>or equivalent</a> for
+    non-HTTP URLs).</p>
 
-    <p>To get the escaped version of the URL of the content in
-    question, the user agent must <a href=#resolve-a-url title="resolve a
-    URL">resolve</a> the URL, and then every character in the URL
-    that doesn't match the <query> production defined in RFC
-    3986 must be replaced by the percent-encoded form of the
-    character. <a href=#refsRFC3986>[RFC3986]</a></p>
+    <p>To get the escaped version of the <a href=#absolute-url>absolute URL</a> of
+    the content in question, the user agent must replace every
+    character in that <a href=#absolute-url>absolute URL</a> that doesn't match the
+    <query> production defined in RFC 3986 by the
+    percent-encoded form of that character. <a href=#refsRFC3986>[RFC3986]</a></p>
 
     <div class=example>
 
@@ -36351,7 +36412,9 @@
 
   <p>User agents must raise a <code><a href=#syntax_err>SYNTAX_ERR</a></code> exception if the
   <var title="">url</var> argument passed to one of these methods does
-  not contain the exact literal string "<code>%s</code>".</p>
+  not contain the exact literal string "<code>%s</code>", or if <a href=#resolve-a-url title="resolve a url">resolving</a> the <var title="">url</var>
+  argument with the first occurance of the string "<code title="">%s</code>" removed, relative to the <a href=#current-script-base-url>current script
+  base URL</a>, is not successful.</p>
 
   <p>User agents must not raise any other exceptions (other than
   binding-specific exceptions, such as for an incorrect number of
@@ -36822,6 +36885,9 @@
    testable since neither U+0000 nor U+FFFD are valid anywhere in the
    syntax and thus both will be treated the same anyway)--></li>
 
+   <li><p>Let <var title="">base URL</var> be the <a href=#absolute-url>absolute
+   URL</a> representing the manifest.</li>
+
    <li><p>Let <var title="">explicit URLs</var> be an initially empty
    list of <a href=#concept-appcache-explicit title=concept-appcache-explicit>explicit
    entries</a>.</li>
@@ -36940,7 +37006,8 @@
      <dd>
 
       <p><a href=#resolve-a-url title="resolve a url">Resolve</a> the first item in
-      <var title="">tokens</var>; ignore the rest.</p>
+      <var title="">tokens</var>, relative to <var title="">base
+      URL</var>; ignore the rest.</p>
 
       <p>If this fails, then jump back to the step labeled "start of
       line".</p>
@@ -36967,7 +37034,7 @@
       the second token in <var title="">tokens</var>.</p>
 
       <p><a href=#resolve-a-url title="resolve a url">Resolve</a> <var title="">part
-      one</var> and <var title="">part two</var>.</p>
+      one</var> and <var title="">part two</var>, relative to <var title="">base URL</var>.</p>
 
       <p>If either fails, then jump back to the step labeled "start of
       line".</p>
@@ -36996,7 +37063,8 @@
      <dd>
 
       <p><a href=#resolve-a-url title="resolve a url">Resolve</a> the first item in
-      <var title="">tokens</var>; ignore the rest.</p>
+      <var title="">tokens</var>, relative to <var title="">base
+      URL</var>; ignore the rest.</p>
 
       <p>If this fails, then jump back to the step labeled "start of
       line".</p>
@@ -38211,7 +38279,8 @@
     <p>If a third argument is specified, run these substeps:</p>
 
     <ol><li><a href=#resolve-a-url title="resolve a url">Resolve</a> the value of the
-     third argument.</li>
+     third argument, relative to the <a href=#current-script-base-url>current script base
+     URL</a>.</li>
 
      <li>If that fails, raise a <code><a href=#security_err>SECURITY_ERR</a></code> exception and
      abort the <code title=dom-history-pushState><a href=#dom-history-pushstate>pushState()</a></code>
@@ -38394,7 +38463,9 @@
   well, so we don't have two levels of indirection -->
 
   <p>When the <dfn id=dom-location-assign title=dom-location-assign><code>assign(<var title="">url</var>)</code></dfn> method is invoked, the UA must
-  <a href=#navigate>navigate</a> the <a href=#browsing-context>browsing context</a> to the
+  <a href=#resolve-a-url title="resolve a url">resolve</a> the argument, relative to
+  the <a href=#current-script-base-url>current script base URL</a>, and if that is successful,
+  must <a href=#navigate>navigate</a> the <a href=#browsing-context>browsing context</a> to the
   specified <var title="">url</var>.</p> <!-- XXX browsers seem to
   treat this as having <span>replacement enabled</span> if the
   browsing context has only one entry and that entry is about:blank.
@@ -38402,6 +38473,8 @@
   virgin DOM; Safari doesn't check that. -->
 
   <p>When the <dfn id=dom-location-replace title=dom-location-replace><code>replace(<var title="">url</var>)</code></dfn> method is invoked, the UA must
+  <a href=#resolve-a-url title="resolve a url">resolve</a> the argument, relative to
+  the <a href=#current-script-base-url>current script base URL</a>, and if that is successful,
   <a href=#navigate>navigate</a> the <a href=#browsing-context>browsing context</a> to the
   specified <var title="">url</var> with <a href=#replacement-enabled>replacement
   enabled</a>.</p>
@@ -38411,6 +38484,11 @@
   context</a> of the script that invoked the method as the
   <a href=#source-browsing-context>source browsing context</a>.</p>
 
+  <p>If the <a href=#resolve-a-url title="resolve a url">resolving</a> step of the
+  the <code title=dom-location-assign><a href=#dom-location-assign>assign()</a></code> and <code title=dom-location-replace><a href=#dom-location-replace>replace()</a></code> methods is not
+  successful, then the user agent must instead throw a
+  <code><a href=#syntax_err>SYNTAX_ERR</a></code> exception.</p>
+
 <!--XXX
   <dfn title="dom-location-reload"><code>reload()</code></dfn>
   reload during resize event:
@@ -38434,10 +38512,10 @@
   value.</p>
 
   <hr><p>The <dfn id=dom-location-resolveurl title=dom-location-resolveURL><code>resolveURL(<var title="">url</var>)</code></dfn> method must <a href=#resolve-a-url title="resolve a
-  url">resolve</a> its <var title="">url</var> argument, and if
-  that succeeds, return the resulting <a href=#absolute-url>absolute URL</a>. If it
-  fails, it must throw a <code><a href=#syntax_err>SYNTAX_ERR</a></code> exception
-  instead.</p>
+  url">resolve</a> its <var title="">url</var> argument, relative
+  to the <a href=#current-script-base-url>current script base URL</a>, and if that succeeds,
+  return the resulting <a href=#absolute-url>absolute URL</a>. If it fails, it must
+  throw a <code><a href=#syntax_err>SYNTAX_ERR</a></code> exception instead.</p>
 
 
   <h5 id=security-3><span class=secno>5.8.4.1 </span>Security</h5>
@@ -38499,7 +38577,7 @@
   <h4 id=navigating-across-documents><span class=secno>5.9.1 </span>Navigating across documents</h4>
 
   <p>Certain actions cause the <a href=#browsing-context>browsing context</a> to
-  <dfn id=navigate>navigate</dfn> to a new resource. Navigation always involves
+  <i><a href=#navigate>navigate</a></i> to a new resource. Navigation always involves
   <dfn id=source-browsing-context>source browsing context</dfn>, which is the browsing context
   which was responsible for starting the navigation.</p>
 
@@ -38511,8 +38589,8 @@
   cause a browsing context to navigate, in addition to those defined
   in this specification.</p>
 
-  <p>When a browsing context is navigated to a new resource, the user
-  agent must run the following steps:</p>
+  <p>When a browsing context is <dfn id=navigate title=navigate>navigated</dfn>
+  to a new resource, the user agent must run the following steps:</p>
 
   <ol><li id=sandboxLinks><p>If the <a href=#source-browsing-context>source browsing
    context</a> is not the same as the <a href=#browsing-context>browsing context</a>
@@ -38542,13 +38620,6 @@
    <li><p>Cancel any preexisting attempt to navigate the
    <a href=#browsing-context>browsing context</a>.</li>
 
-   <li><a href=#resolve-a-url title="resolve a url">Resolve</a> the <a href=#url>URL</a>
-   of the new resource. If that fails, the user agent may abort these
-   steps, or may treat the URL as identifying some sort of user-agent
-   defined error resource, which could display some sort of inline
-   content, or could be handled using a mechanism that does not affect
-   the browsing context.</li>
-
    <li id=navigate-fragid-step><p><i>Fragment identifiers</i>: If
    the <a href=#absolute-url>absolute URL</a> of the new resource is the same as
    the <a href="#the-document's-address" title="the document's address">address</a> of the
@@ -38595,11 +38666,12 @@
     application cache at all; the submission will be made to the
     network.</p>
 
-    <p>Otherwise, <a href=#fetch>fetch</a> the new resource. If the resource
-    is being fetched using HTTP, and the method is not GET<!-- or HEAD
-    (but that can't happen) -->, then the user agent must include an
-    <code title=http-origin>XXX-Origin</code> header whose value is
-    determined as follows:</p>
+    <p>Otherwise, <a href=#fetch>fetch</a> the new resource, if it has not
+    already been obtained<!-- it's obtained by <object>, for instance
+    -->. If the resource is being fetched using HTTP, and the method
+    is not GET<!-- or HEAD (but that can't happen) -->, then the user
+    agent must include an <code title=http-origin>XXX-Origin</code>
+    header whose value is determined as follows:</p>
 
     <dl class=switch><dt>If the <a href=#navigate title=navigate>navigation</a> algorithm has
      so far contacted more than one <a href=#origin-0>origin</a></dt>
@@ -38889,8 +38961,8 @@
   element with an attribute <code title=attr-html-manifest><a href=#attr-html-manifest>manifest</a></code>, then, as soon as the
   element is <a href=#insert-an-element-into-a-document title="insert an element into a document">inserted
   into the document</a>, the user agent must <a href=#resolve-a-url title="resolve a
-  url">resolve</a> the value of that attribute, and if that is
-  successful, must run the <a href=#concept-appcache-init title=concept-appcache-init>application cache selection
+  url">resolve</a> the value of that attribute relative to that
+  element, and if that is successful, must run the <a href=#concept-appcache-init title=concept-appcache-init>application cache selection
   algorithm</a> with the resulting <a href=#absolute-url>absolute URL</a> as the
   manifest URL, and passing in the newly-created
   <code>Document</code>. Otherwise, if the attribute is absent or
@@ -40576,12 +40648,19 @@
   <h4 id=following-hyperlinks><span class=secno>5.11.2 </span><dfn>Following hyperlinks</dfn></h4>
 
   <p>When a user <em>follows a hyperlink</em>, the user agent must
-  <a href=#navigate>navigate</a> a <a href=#browsing-context>browsing context</a> to the
-  <a href=#url>URL</a> given by the <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute of that
-  hyperlink. In the case of server-side image maps, the URL of the
-  hyperlink must further have its <var><a href=#hyperlink-suffix>hyperlink suffix</a></var> appended
-  to it.</p>
+  <a href=#resolve-a-url title="resolve a url">resolve</a> the <a href=#url>URL</a>
+  given by the <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute
+  of that hyperlink, relative to the hyperlink element, and if that is
+  successful, must <a href=#navigate>navigate</a> a <a href=#browsing-context>browsing
+  context</a> to the resulting <a href=#absolute-url>absolute URL</a>. In the
+  case of server-side image maps, the URL of the hyperlink must
+  further have its <var><a href=#hyperlink-suffix>hyperlink suffix</a></var> appended to it.</p>
 
+  <p>If <a href=#resolve-a-url title="resolve a url">resolving</a> the
+  <a href=#url>URL</a> fails, the user agent may report the error to the
+  user in a user-agent-specific manner, may navigate to an error page
+  to report the error, or may ignore the error and do nothing.</p>
+
   <p>If the user indicated a specific <a href=#browsing-context>browsing context</a>
   when following the hyperlink, or if the user agent is configured to
   follow hyperlinks by navigating a particular browsing context, then
@@ -40629,14 +40708,15 @@
   <p>If an <code><a href=#the-a-element>a</a></code> or <code><a href=#the-area-element>area</a></code> hyperlink element has a
   <code title=attr-hyperlink-ping><a href=#ping>ping</a></code> attribute, and the
   user follows the hyperlink, and the hyperlink's <a href=#url>URL</a> can
-  be <a href=#resolve-a-url title="resolve a url">resolved</a> without failure, the
-  user agent must take the <code title=attr-hyperlink-ping><a href=#ping>ping</a></code> attribute's value, <a href=#split-a-string-on-spaces title="split a string on spaces">split that string on
+  be <a href=#resolve-a-url title="resolve a url">resolved</a>, relative to the
+  hyperlink element, without failure, then the user agent must take
+  the <code title=attr-hyperlink-ping><a href=#ping>ping</a></code> attribute's value,
+  <a href=#split-a-string-on-spaces title="split a string on spaces">split that string on
   spaces</a>, <a href=#resolve-a-url title="resolve a url">resolve</a> each
-  resulting token, and then should send a request (as described below)
-  to each of the resulting <a href=#absolute-url title="absolute URL">absolute
-  URLs</a>. (Tokens that fail to resolve are ignored.) This may be
-  done in parallel with the primary request, and is independent of the
-  result of that request.</p>
+  resulting token relative to the hyperlink element, and then should
+  send a request (as described below) to each of the resulting <a href=#absolute-url title="absolute URL">absolute URLs</a>. (Tokens that fail to
+  resolve are ignored.) This may be done in parallel with the primary
+  request, and is independent of the result of that request.</p>
 
   <p>User agents should allow the user to adjust this behavior, for
   example in conjunction with a setting that disables the sending of
@@ -44249,17 +44329,19 @@
 
   <p>When the <dfn id=dom-remoteeventtarget-addeventsource title=dom-RemoteEventTarget-addEventSource><code>addEventSource(<var title="">src</var>)</code></dfn> method is invoked, the user agent
   must <a href=#resolve-a-url title="resolve a url">resolve</a> the <a href=#url>URL</a>
-  specified in <var title="">src</var>, and if that succeeds, add the resulting <a href=#absolute-url>absolute URL</a>
-  to the <a href=#concept-eventsource-list title=concept-eventsource-list>list of event
-  sources</a> for that object. The same URL can be registered
-  multiple times. If the URL fails to resolve, then the user agent
-  must raise a <code><a href=#syntax_err>SYNTAX_ERR</a></code> exception.</p>
+  specified in <var title="">src</var>, relative to the <a href=#current-script-base-url>current
+  script base URL</a>, and if that succeeds, add the resulting
+  <a href=#absolute-url>absolute URL</a> to the <a href=#concept-eventsource-list title=concept-eventsource-list>list of event sources</a> for
+  that object. The same URL can be registered multiple times. If the
+  URL fails to resolve, then the user agent must raise a
+  <code><a href=#syntax_err>SYNTAX_ERR</a></code> exception.</p>
 
   <p>When the <dfn id=dom-remoteeventtarget-removeeventsource title=dom-RemoteEventTarget-removeEventSource><code>removeEventSource(<var title="">src</var>)</code></dfn> method is invoked, the user agent
   must <a href=#resolve-a-url title="resolve a url">resolve</a> the <a href=#url>URL</a>
-  specified in <var title="">src</var>, and if that succeeds, remove
-  the resulting <a href=#absolute-url>absolute URL</a> from the <a href=#concept-eventsource-list title=concept-eventsource-list>list of event sources</a> for
-  that object.  If the same URL has been registered multiple times,
+  specified in <var title="">src</var>, relative to the <a href=#current-script-base-url>current
+  script base URL</a>, and if that succeeds, remove the resulting
+  <a href=#absolute-url>absolute URL</a> from the <a href=#concept-eventsource-list title=concept-eventsource-list>list of event sources</a> for
+  that object. If the same URL has been registered multiple times,
   removing it must remove only one instance of that URL for each
   invocation of the <code title=removeEventSource>removeEventSource()</code> method. If the
   URL fails to resolve, the user agent does nothing.</p>
@@ -45725,8 +45807,8 @@
   <ol><li>
 
     <p>If the value of the <var title="">targetOrigin</var> argument
-    is not a single U+002A ASTERISK character ("*"), and either <a href=#parse-a-url title="parse a url">parsing</a> it as a <a href=#url>URL</a> fails,
-    or <a href=#resolve-a-url title="resolve a url">resolving</a> it results in a
+    is not a single U+002A ASTERISK character ("*"), and <a href=#resolve-a-url title="resolve a url">resolving</a> it relative to the
+    <a href=#current-script-base-url>current script base URL</a> either fails or results in a
     <a href=#url>URL</a> with a <code title=url-host-specific><a href=#url-host-specific><host-specific></a></code> component
     that is neither empty nor a single U+002F SOLIDUS character (/),
     then throw a <code><a href=#syntax_err>SYNTAX_ERR</a></code> exception and abort the
@@ -45798,8 +45880,8 @@
   <ol><!-- EXCEPT WHERE NOTED, THESE STEPS ARE IDENTICAL TO THE PREVIOUS SECTION --><!-- one exception is the use of -3 instead of -2 in the xrefs --><li>
 
     <p>If the value of the <var title="">targetOrigin</var> argument
-    is not a single U+002A ASTERISK character ("*"), and either <a href=#parse-a-url title="parse a url">parsing</a> it as a <a href=#url>URL</a> fails,
-    or <a href=#resolve-a-url title="resolve a url">resolving</a> it results in a
+    is not a single U+002A ASTERISK character ("*"), and <a href=#resolve-a-url title="resolve a url">resolving</a> it relative to the
+    <a href=#current-script-base-url>current script base URL</a> either fails or results in a
     <a href=#url>URL</a> with a <code title=url-host-specific><a href=#url-host-specific><host-specific></a></code> component
     that is neither empty nor a single U+002F SOLIDUS character (/),
     then throw a <code><a href=#syntax_err>SYNTAX_ERR</a></code> exception and abort the
@@ -49863,10 +49945,11 @@
 
     <p id=parser-appcache>If the <code>Document</code> is being
     loaded as part of <a href=#navigate title=navigate>navigation</a> of a
-    <a href=#browsing-context>browsing context</a>, then: if the token has an attribute
-    "manifest", then <a href=#resolve-a-url title="resolve a url">resolve</a> the
-    value of that attribute to an <a href=#absolute-url>absolute URL</a>, and if
-    that is successful, run the <a href=#concept-appcache-init title=concept-appcache-init>application cache selection
+    <a href=#browsing-context>browsing context</a>, then: if the newly created element
+    has a <code title=attr-html-manifest><a href=#attr-html-manifest>manifest</a></code> attribute,
+    then <a href=#resolve-a-url title="resolve a url">resolve</a> the value of that
+    attribute to an <a href=#absolute-url>absolute URL</a>, relative to the newly
+    created element, and if that is successful, run the <a href=#concept-appcache-init title=concept-appcache-init>application cache selection
     algorithm</a> with the resulting <a href=#absolute-url>absolute URL</a>;
     otherwise, if there is no such attribute or resolving it fails,
     run the <a href=#concept-appcache-init title=concept-appcache-init>application cache

Modified: source
===================================================================
--- source	2009-01-24 05:07:17 UTC (rev 2708)
+++ source	2009-01-27 02:39:57 UTC (rev 2709)
@@ -3564,25 +3564,33 @@
   (earlier URI specs did) -->
 
 
+
   <h4>Resolving URLs</h4>
 
-  <p>Relative URLs are resolved relative to a base URL. The <dfn>base
-  URL</dfn> of a <span>URL</span> is the <span>absolute URL</span>
-  obtained as follows:</p>
+  <p>To <dfn>resolve a URL</dfn> to an <span>absolute URL</span>
+  relative to either another <span>absolute URL</span> or an element,
+  the user agent must use the following steps. Resolving a URL can
+  result in an error, in which case the URL is not resolvable.</p>
 
-  <dl class="switch">
+  <ol>
 
-   <dt>If the URL to be resolved was passed to an API</dt>
+   <li><p>Let <var title="">url</var> be the <span>URL</span> being
+   resolved.</p></li>
 
-   <dd><p>The base URL is the <span>script's base URL</span>.</p></dd>
+   <li><p>Let <var title="">encoding</var> be the <span>URL character
+   encoding</span>.</p></li>
 
-   <dt>If the URL to be resolved is from the value of a content
-   attribute</dt>
+   <li><p>If <var title="">encoding</var> is UTF-16, then change it to
+   UTF-8.</p></li>
 
-   <dd>
+   <li>
 
-    <p>The base URL is the <i>base URI of the element</i> that the
-    attribute is on, as defined by the XML Base specification, with
+    <p>If the algorithm was invoked with an <span>absolute URL</span>
+    to use as the base URL, let <var title="">base</var> be that
+    <span>absolute URL</span>.</p>
+
+    <p>Otherwise, let <var title="">base</var> be the <i>base URI of
+    the element</i>, as defined by the XML Base specification, with
     <i>the base URI of the document entity</i> being defined as the
     <span>document base URL</span> of the <code>Document</code> that
     owns the element.</p>
@@ -3598,63 +3606,36 @@
     however, as <code title="attr-xml-base">xml:base</code> attributes
     are not allowed in <span>HTML documents</span>.)</p>
 
-   </dd>
+    <p>The <dfn>document base URL</dfn> of a <code>Document</code> is
+    the <span>absolute URL</span> obtained by running these
+    substeps:</p>
 
-   <dt>If the URL to be resolved was found in an offline application
-   cache manifest</dt>
+    <ol>
 
-   <dd><p>The base URL is the URL of the <span>application
-   cache</span> <span
-   title="concept-appcache-manifest">manifest</span>.</p></dd>
+     <li><p>If there is no <code>base</code> element that is both a
+     child of <span>the <code>head</code> element</span> and has an
+     <code title="attr-base-href">href</code> attribute, then the
+     <span>document base URL</span> is <span>the document's
+     address</span>.</p></li>
 
-  </dl>
+     <li><p>Otherwise, let <var title="">url</var> be the value of the
+     <code title="attr-base-href">href</code> attribute of the first such
+     element.</p></li>
 
-  <p>The <dfn>document base URL</dfn> of a <code>Document</code> is
-  the <span>absolute URL</span> obtained by running these steps:</p>
+     <li><p><span title="resolve a URL">Resolve</span> <var
+     title="">url</var> relative to <span>the document's
+     address</span> (thus, the <code>base</code> <code
+     title="attr-base-href">href</code> attribute isn't affected by
+     <code title="attr-xml-base">xml:base</code> attributes).</p></li>
 
-  <ol>
+     <li><p>The <span>document base URL</span> is the result of the
+     previous step if it was successful; otherwise it is <span>the
+     document's address</span>.</p></li>
 
-   <li><p>If there is no <code>base</code> element that is both a
-   child of <span>the <code>head</code> element</span> and has an
-   <code title="attr-base-href">href</code> attribute, then the
-   <span>document base URL</span> is <span>the document's
-   address</span>.</p></li>
+    </ol>
 
-   <li><p>Otherwise, let <var title="">url</var> be the value of the
-   <code title="attr-base-href">href</code> attribute of the first such
-   element.</p></li>
+   </li>
 
-   <li><p><span title="resolve a URL">Resolve</span> the <var
-   title="">url</var> URL, using <span>the document's address</span>
-   as the <span>base URL</span> (thus, the <code>base</code> <code
-   title="attr-base-href">href</code> attribute isn't affected by
-   <code title="attr-xml-base">xml:base</code> attributes).</p></li>
-
-   <li><p>The <span>document base URL</span> is the result of the
-   previous step if it was successful; otherwise it is <span>the
-   document's address</span>.</p></li>
-
-  </ol>
-
-  <p>To <dfn>resolve a URL</dfn> to an <span>absolute URL</span> the
-  user agent must use the following steps. Resolving a URL can result
-  in an error, in which case the URL is not resolvable.</p>
-
-  <ol>
-
-   <li><p>Let <var title="">url</var> be the <span>URL</span> being
-   resolved.</p></li>
-
-   <li><p>Let <var title="">encoding</var> be the <span>URL character
-   encoding</span>.</p></li>
-
-   <li><p>If <var title="">encoding</var> is UTF-16, then change it to
-   UTF-8.</p></li>
-
-   <li><p>Let <var title="">base</var> be the <span>base URL</span>
-   for <var title="">url</var>. (This is an <span>absolute
-   URL</span>.)</p></li>
-
    <li><p><span title="parse a URL">Parse</span> <var
    title="">url</var> into its component parts.</p></li>
 
@@ -3812,8 +3793,8 @@
     being shown to the user, or if any data derived from that URL is
     affecting the display, then the <code
     title="attr-hyperlink-href">href</code> attribute should be <span
-    title="resolve a url">reresolved</span> and the UI updated
-    appropriately.</p>
+    title="resolve a url">reresolved</span> relative to the element
+    and the UI updated appropriately.</p>
 
     <p class="example">For example, the CSS <code
     title="">:link</code>/<code title="">:visited</code>
@@ -3824,7 +3805,8 @@
     title="absolute URL">absolute URL(s)</span> are being shown to the
     user, then the <code title="attr-hyperlink-ping">ping</code>
     attribute's tokens should be <span title="resolve a
-    url">reresolved</span> and the UI updated appropriately.</p>
+    url">reresolved</span> relative to the element and the UI updated
+    appropriately.</p>
 
    </dd>
 
@@ -3838,7 +3820,8 @@
     title="">cite</code> attribute is being shown to the user, or if
     any data derived from that URL is affecting the display, then the
     <span>URL</span> should be <span title="resolve a
-    url">reresolved</span> and the UI updated appropriately.</p>
+    url">reresolved</span> relative to the element and the UI updated
+    appropriately.</p>
 
    </dd>
 
@@ -4050,11 +4033,7 @@
 
   <ol>
 
-   <li><p>If the resource is identified by a <span>URL</span>, then
-   immediately <span title="resolve a URL">resolve that
-   URL</span>.</p></li>
-
-   <li><p>If the resulting <span>absolute URL</span> is
+   <li><p>If the resource is identified by the <span>URL</span>
    <dfn><code>about:blank</code></dfn>, then return the empty string
    and abort these steps.</p></li>
 
@@ -4062,23 +4041,23 @@
 
    <li>
 
-    <p>If the resource identified by the resulting <span>absolute
-    URL</span> is already being downloaded for other reasons
-    (e.g. another invocation of this algorithm), and the resource is
-    to be obtained using a idempotent action (such as an HTTP GET
-    <span title="concept-http-equivalent-get">or equivalent</span>),
-    and the user agent is configured such that it is to reuse the data
-    from the existing download instead of initiating a new one, then
-    use the results of the existing download instead of starting a new
+    <p>If the resource is identified by an <span>absolute URL</span>,
+    and the resource is to be obtained using a idempotent action (such
+    as an HTTP GET <span title="concept-http-equivalent-get">or
+    equivalent</span>), and it is already being downloaded for other
+    reasons (e.g. another invocation of this algorithm), and the user
+    agent is configured such that it is to reuse the data from the
+    existing download instead of initiating a new one, then use the
+    results of the existing download instead of starting a new
     one.</p>
 
     <p>Otherwise, at a time convenient to the user and the user agent,
-    download the resource, applying the semantics of the relevant
-    specifications (e.g. performing an HTTP GET or POST operation, or
-    reading the file from disk, following redirects, <span
-    title="concept-js-deref">dereferencing <span title="javascript
-    protocol"><code title="">javascript:</code> URLs</span></span>,
-    etc).</p>
+    download (or otherwise obtain) the resource, applying the
+    semantics of the relevant specifications (e.g. performing an HTTP
+    GET or POST operation, or reading the file from disk, following
+    redirects, <span title="concept-js-deref">dereferencing <span
+    title="javascript protocol"><code title="">javascript:</code>
+    URLs</span></span>, etc).</p>
 
    </li>
 
@@ -4967,12 +4946,12 @@
   attribute whose content attribute is defined to contain a
   <span>URL</span>, then on getting, the DOM attribute must <span
   title="resolve a url">resolve</span> the value of the content
-  attribute and return the resulting <span>absolute URL</span> if that
-  was successful, or the empty string otherwise; and on setting, must
-  set the content attribute to the specified literal value. If the
-  content attribute is absent, the DOM attribute must return the
-  default value, if the content attribute has one, or else the empty
-  string.</p>
+  attribute relative to the element and return the resulting
+  <span>absolute URL</span> if that was successful, or the empty
+  string otherwise; and on setting, must set the content attribute to
+  the specified literal value. If the content attribute is absent, the
+  DOM attribute must return the default value, if the content
+  attribute has one, or else the empty string.</p>
 
   <p>If a reflecting DOM attribute is a <code>DOMString</code>
   attribute whose content attribute is defined to contain one or more
@@ -4980,12 +4959,13 @@
   must <span title="split a string on spaces">split the content
   attribute on spaces</span> and return the concatenation of <span
   title="resolve a URL">resolving</span> each token URL to an
-  <span>absolute URL</span>, with a single U+0020 SPACE character
-  between each URL, ignoring any tokens that did not resolve
-  successfully. If the content attribute is absent, the DOM attribute
-  must return the default value, if the content attribute has one, or
-  else the empty string. On setting, the DOM attribute must set the
-  content attribute to the specified literal value.</p>
+  <span>absolute URL</span> relative to the element, with a single
+  U+0020 SPACE character between each URL, ignoring any tokens that
+  did not resolve successfully. If the content attribute is absent,
+  the DOM attribute must return the default value, if the content
+  attribute has one, or else the empty string. On setting, the DOM
+  attribute must set the content attribute to the specified literal
+  value.</p>
 
   <p>If a reflecting DOM attribute is a <code>DOMString</code> whose
   content attribute is an <span>enumerated attribute</span>, and the
@@ -7090,10 +7070,10 @@
   of a declaration block in a rule whose selector matches just the
   element on which the attribute is set. All <span
   title="URL">URLs</span> in the value must be <span title="resolve a
-  url">resolved</span> when the attribute is parsed.<!-- so dynamic
-  changes to the base URL don't affect the CSS --> For the purposes of
-  the CSS cascade, the attribute must be considered to be a 'style'
-  attribute at the author level. </p>
+  url">resolved</span> relative to the element when the attribute is
+  parsed.<!-- so dynamic changes to the base URL don't affect the CSS
+  --> For the purposes of the CSS cascade, the attribute must be
+  considered to be a 'style' attribute at the author level. </p>
 
   <p>Documents that use <code title="attr-style">style</code>
   attributes on any of their elements must still be comprehensible and
@@ -8784,9 +8764,11 @@
   dynamically thus has no effect (and thus, no DOM API is provided for
   this attribute).</p>
 
-  <p class="note">Later <code>base</code> elements don't affect the
-  <span title="resolve a url">resolving of relative URLs</span> in
-  <code title="attr-html-manifest">manifest</code> attributes, as the
+  <p class="note">For the purposes of <span
+  title="concept-appcache-init">application cache selection</span>,
+  later <code>base</code> elements cannot affect the <span
+  title="resolve a url">resolving of relative URLs</span> in <code
+  title="attr-html-manifest">manifest</code> attributes, as the
   attributes are processed before those elements are seen.</p>
 
 
@@ -9017,10 +8999,14 @@
   applied (as defined below). For external resources that are
   represented in the DOM (for example, style sheets), the DOM
   representation must be made available even if the resource is not
-  applied. (However, user agents may opt to only <span>fetch</span>
-  such resources when they are needed, instead of pro-actively <span
-  title="fetch">fetching</span> all the external resources that are
-  not applied.)</p>
+  applied. To obtain the resource, the user agent must <span
+  title="resolve a url">resolve</span> the <span>URL</span> given by
+  the <code title="attr-link-href">href</code> attribute, relative to
+  the element, and then <span>fetch</span> the resulting
+  <span>absolute URL</span>. User agents may opt to only
+  <span>fetch</span> such resources when they are needed, instead of
+  pro-actively <span title="fetch">fetching</span> all the external
+  resources that are not applied.</p>
 
   <p>The semantics of the protocol used (e.g. HTTP) must be followed
   when fetching external resources. (For example, redirects must be
@@ -9754,10 +9740,8 @@
      title="">url</var>.</p></li>
 
      <li><p><span title="resolve a url">Resolve</span> the <var
-     title="">url</var> value to an <span>absolute URL</span>. (For
-     the purposes of determining the <span>base URL</span>, the <var
-     title="">url</var> value comes from the value of a content
-     attribute of the <code>meta</code> element.) If this fails, abort
+     title="">url</var> value to an <span>absolute URL</span>,
+     relative to the <code>meta</code> element. If this fails, abort
      these steps.</p></li>
 
      <li>
@@ -10039,9 +10023,10 @@
   nodes of the <code>style</code> element to the style system.</p>
 
   <p>All <span title="URL">URLs</span> found by the styling language's
-  processor must be <span title="resolve a url">resolved</span> when
-  it is invoked.<!-- so dynamic changes to the base URL don't affect
-  the CSS --></p>
+  processor must be <span title="resolve a url">resolved</span>,
+  relative to the element (or as defined by the styling language),
+  when the processor is invoked.<!-- so dynamic changes to the base
+  URL don't affect the CSS --></p>
 
   <p class="note">This specification does not specify a style system,
   but CSS is expected to be supported by most Web browsers. <a
@@ -10106,10 +10091,11 @@
    <dd><p>For <code>link</code> elements, the location must be the
    result of <span title="resolve a url">resolving</span> the
    <span>URL</span> given by the element's <code
-   title="attr-link-href">href</code> content attribute, or the empty
-   string if that fails. For <code>style</code> elements, there is no
-   location.</p></dd> <!-- note that this might not match the style
-   sheet URL, if the base URL has changed for instance -->
+   title="attr-link-href">href</code> content attribute, relative to
+   the element, or the empty string if that fails. For
+   <code>style</code> elements, there is no location.</p></dd> <!--
+   note that this might not match the style sheet URL, if the base URL
+   has changed for instance -->
 
    <dt>The intended destination media for style information (<code title="dom-stylesheet-media">media</code> DOM attribute)</dt>
 
@@ -10412,7 +10398,9 @@
    <li>
 
     <p>If the element has a <code title="attr-script-src">src</code>
-    attribute, then the specified resource must be <span
+    attribute, then the value of that attribute must be <span
+    title="resolve a url">resolved</span> relative to the element, and
+    if that is successful, the specified resource must then be <span
     title="fetch">fetched</span>.</p>
 
     <p>For historical reasons, if the <span>URL</span> is a <span
@@ -10445,8 +10433,9 @@
     started. If the UA performs such prefetching, but the element is
     never inserted in the document, or the <code
     title="attr-script-src">src</code> attribute is dynamically
-    changed, then the user agent will not execute the script, and the
-    fetching process will have been effectively wasted.</p>
+    changed,<!-- or the base URL is dynamically changed,--> then the
+    user agent will not execute the script, and the fetching process
+    will have been effectively wasted.</p>
 
    </li>
 
@@ -11078,15 +11067,15 @@
 
    <li><span title="resolve a url">Resolve</span> the <span>URL</span>
    specified by the <code>eventsource</code> element's <code
-   title="attr-eventsource-src">src</code> attribute.</li>
+   title="attr-eventsource-src">src</code> attribute, relative to the
+   element.</li>
 
    <li>If that fails, then set the element's <i>current declared event
    source</i> to "undefined" and abort these steps.</li>
 
-   <li>Otherwise, act as if the <code
-   title="dom-remoteEventTarget-addEventSource">addEventSource()</code>
-   method on the <code>eventsource</code> element had been invoked
-   with the resulting <span>absolute URL</span>.</li>
+   <li>Otherwise, add the resulting <span>absolute URL</span> to the
+   <span title="concept-eventsource-list">list of event sources</span>
+   for the element.</li>
 
    <li>Let the element's <i>current declared event source</i> be that
    <span>absolute URL</span>.</li>
@@ -11101,10 +11090,9 @@
    <li>If the element's <i>current declared event source</i> is
    "undefined", abort these steps.</li>
 
-   <li>Otherwise, act as if the <code
-   title="dom-remoteEventTarget-removeEventSource">removeEventSource()</code>
-   method on the <code>eventsource</code> element had been invoked
-   with the element's <i>current declared event source</i>.</li>
+   <li>Otherwise, remove the element's <i>current declared event
+   source</i> from the <span title="concept-eventsource-list">list of
+   event sources</span> for the element.</li>
 
    <li>Let the element's <i>current declared event source</i> be
    "undefined".</li>
@@ -11117,8 +11105,7 @@
   number of simultaneous connections that a user agent can open per
   server.</p>
 
-  <!-- XXX should we make 'load', 'error', 'abort' events fire on this
-  element? -->
+  <!-- v2: make 'load', 'error', 'abort' events fire on this element -->
 
   <p>The <dfn title="dom-eventsource-src"><code>src</code></dfn> DOM
   attribute must <span>reflect</span> the content attribute of the
@@ -12519,12 +12506,15 @@
   attribute.</p>
 
   <p>If the <code title="attr-blockquote-cite">cite</code> attribute
-  is present, it must be a <span>valid URL</span>. User agents should
-  allow users to follow such citation links.</p>
+  is present, it must be a <span>valid URL</span>. To obtain the
+  corresponding citation link, the value of the attribute must be
+  <span title="resolve a url">resolved</span> relative to the
+  element. User agents should allow users to follow such citation
+  links.</p>
 
   <p>The <dfn title="dom-quote-cite"><code>cite</code></dfn> DOM
   attribute must <span>reflect</span> the element's <code
-  title="">cite</code> content attribute.
+  title="">cite</code> content attribute.</p>
 
   <p class="note">The best way to represent a conversation is not with
   the <code>cite</code> and <code>blockquote</code> elements, but with
@@ -13324,8 +13314,11 @@
   screenplay.</p>
 
   <p>If the <code title="attr-q-cite">cite</code> attribute is
-  present, it must be a <span>valid URL</span>. User agents should
-  allow users to follow such citation links.</p>
+  present, it must be a <span>valid URL</span>. To obtain the
+  corresponding citation link, the value of the attribute must be
+  <span title="resolve a url">resolved</span> relative to the
+  element. User agents should allow users to follow such citation
+  links.</p>
 
   <p>The <code>q</code> element must not be used in place of quotation
   marks that do not represent quotes; for example, it is inappropriate
@@ -15730,8 +15723,10 @@
 
   <p>If the <code title="attr-mod-cite">cite</code> attribute is
   present, it must be a <span>valid URL</span> that explains the
-  change. User agents should allow users to follow such citation
-  links.</p>
+  change. To obtain the corresponding citation link, the value of the
+  attribute must be <span title="resolve a url">resolved</span>
+  relative to the element. User agents should allow users to follow
+  such citation links.</p>
 
   <p>The <dfn title="attr-mod-datetime"><code>datetime</code></dfn>
   attribute may be used to specify the time and date of the change.</p>
@@ -16087,10 +16082,10 @@
   section</a>.</p>
 
   <p class="XXX">There has been some suggestion that the <code
-  title="">longdesc</code> attribute from HTML4, or some other
-  mechanism that is more powerful than <code title="">alt=""</code>,
-  should be included. This has been considered and rejected in the
-  past, but may be considered again in the future.</p>
+  title="">longdesc</code> attribute from HTML4 should be
+  included. This has been considered and rejected in the past, but if
+  new evidence is found showing the attribute to actually help users
+  rather than harm them, it may be reconsidered.</p>
 
   <p>The <code>img</code> must not be used as a layout tool. In
   particular, <code>img</code> elements should not be used to display
@@ -16099,16 +16094,17 @@
 
   <hr>
 
-  <p>When an <code>img</code> is created with a <code
+  <p>Unless the user agent cannot support images, or its support for
+  images has been disabled, or the user agent only fetches elements on
+  demand, or the element's <code title="attr-img-src">src</code>
+  attribute has a value that is an <i>ignored self-reference</i>,
+  then, when an <code>img</code> is created with a <code
   title="attr-img-src">src</code> attribute, and whenever the <code
   title="attr-img-src">src</code> attribute is set subsequently, the
-  user agent must <span>fetch</span> the resource specifed by the
-  <code title="attr-img-src">src</code> attribute's value, unless the
-  user agent cannot support images, or its support for images has been
-  disabled, or the user agent only fetches elements on demand, or the
-  element's <code title="attr-img-src">src</code> attribute has a
-  value that is an <i>ignored self-reference</i>.</p> <!-- Note how
-  this does NOT happen when the base URL changes. -->
+  user agent must <span title="resolve a url">resolve</span> the value
+  of that attribute, relative to the element, and if that is
+  successful must then <span>fetch</span> that resource.</p> <!-- Note
+  how this does NOT happen when the base URL changes. -->
 
   <p>The <code title="attr-img-src">src</code> attribute's value is an
   <i>ignored self-reference</i> if its value is the empty string, and
@@ -17396,27 +17392,32 @@
   gives the address of a page that the nested <span>browsing
   context</span> is to contain. The attribute, if present, must be a
   <span>valid URL</span>. When the browsing context is created, if the
-  attribute is present, the user agent must <span>navigate</span> the
-  element's browsing context to the given <span>URL</span>, with
-  <span>replacement enabled</span>, and with the <code>iframe</code>
-  element's document's <span>browsing context</span> as the
-  <span>source browsing context</span>. If the user <span
-  title="navigate">navigates</span> away from this page, the
-  <code>iframe</code>'s corresponding <code>Window</code> object will
-  reference new <code>Document</code> objects, but the <code
+  attribute is present, the user agent must <span title="resolve a
+  url">resolve</span> the value of that attribute, relative to the
+  element, and if that is successful, must then <span>navigate</span>
+  the element's browsing context to the resulting <span>absolute
+  URL</span>, with <span>replacement enabled</span>, and with the
+  <code>iframe</code> element's document's <span>browsing
+  context</span> as the <span>source browsing context</span>. If the
+  user <span title="navigate">navigates</span> away from this page,
+  the <code>iframe</code>'s corresponding <code>Window</code> object
+  will reference new <code>Document</code> objects, but the <code
   title="attr-iframe-src">src</code> attribute will not change.</p>
 
   <p>Whenever the <code title="attr-iframe-src">src</code> attribute
-  is set, the nested <span>browsing context</span> must be <span
-  title="navigate">navigated</span> to the <span>URL</span> given by
-  that attribute's value, with the <code>iframe</code> element's
-  document's <span>browsing context</span> as the <span>source
-  browsing context</span>.</p> <!-- It doesn't happen when the base
-  URL is changed, though. -->
+  is set, the user agent must <span title="resolve a
+  url">resolve</span> the value of that attribute, relative to the
+  element, and if that is successful, the nested <span>browsing
+  context</span> must be <span title="navigate">navigated</span> to
+  the resulting <span>absolute URL</span>, with the
+  <code>iframe</code> element's document's <span>browsing
+  context</span> as the <span>source browsing context</span>.</p> <!--
+  It doesn't happen when the base URL is changed, though. -->
 
   <p>If the <code title="attr-iframe-src">src</code> attribute is not
-  set when the element is created, the browsing context will remain at
-  the initial <code>about:blank</code> page.</p>
+  set when the element is created, or if its value cannot be <span
+  title="resolve a url">resolved</span>, the browsing context will
+  remain at the initial <code>about:blank</code> page.</p>
 
   <p>The <dfn title="attr-iframe-name"><code>name</code></dfn>
   attribute, if present, must be a <span>valid browsing context
@@ -17904,9 +17905,11 @@
   whenever the <code title="attr-embed-type">type</code> attribute is
   set or removed while the element has a <code
   title="attr-embed-src">src</code> attribute, if the element is not
-  in a sandboxed browsing context, user agents should
-  <span>fetch</span> the specified resource, find and instantiate an
-  appropriate <span>plugin</span> based on the <span
+  in a sandboxed browsing context, user agents must <span
+  title="resolve a url">resolve</span> the value of the attribute,
+  relative to the element, and if that is successful, should
+  <span>fetch</span> the resulting <span>absolute URL</span>, find and
+  instantiate an appropriate <span>plugin</span> based on the <span
   title="concept-embed-type">content's type</span>, and hand that
   <span>plugin</span> the content of the resource, replacing any
   previously instantiated plugin for the element. <!-- Note that this
@@ -18145,9 +18148,14 @@
 
      <li>
 
-      <p><span>Fetch</span> the resource specified by the <code
-      title="attr-object-data">data</code> attribute.</p>
+      <p><span title="resolve a url">Resolve</span> the
+      <span>URL</span> specified by the <code
+      title="attr-object-data">data</code> attribute, relative to the
+      element.</p>
 
+      <p>If that is successful, <span>fetch</span> the resulting
+      <span>absolute URL</span>.</p>
+
       <p>The fetching of the resource must <span>delay the <code
       title="event-load">load</code> event</span>.</p>
 
@@ -18162,10 +18170,12 @@
      agents may opt to consider a resource "available" whenever enough
      data has been obtained to begin processing the resource.</p></li>
 
-     <li><p>If the load failed (e.g. an HTTP 404 error, a DNS error),
-     <span>fire an <code title="event-error">error</code> event</span>
-     at the element, then jump to the last step in the overall set of
-     steps (fallback).</p></li>
+     <li><p>If the load failed (e.g. the <span>URL</span> could not be
+     <span title="resolve a url">resolved</span>, there was an HTTP
+     404 error, there was a DNS error), <span>fire an <code
+     title="event-error">error</code> event</span> at the element,
+     then jump to the last step in the overall set of steps
+     (fallback).</p></li>
 
      <li><p>Determine the <var title="">resource type</var>, as follows:</p>
 
@@ -18268,7 +18278,8 @@
 
         <p class="XXX">navigation might end up treating it as
         something else, because it can do sniffing. how should we
-        handle that?</p>
+        handle that? it could also refetch the resource entirely,
+        maybe from another application cache.</p>
 
         <!-- note that malformed XML files don't cause fallback -->
 
@@ -18557,12 +18568,14 @@
   attribute gives the address of an image file that the user agent can
   show while no video data is available. The attribute, if present,
   must contain a <span>valid URL</span>. If the specified resource is
-  to be used, it must be <span title="fetch">fetched</span> when the
-  element is created or when the <code
-  title="attr-video-poster">poster</code> attribute is set. The
+  to be used, then, when the element is created or when the <code
+  title="attr-video-poster">poster</code> attribute is set, its value
+  must be <span title="resolve a url">resolved</span> relative to the
+  element, and if that is successful, the resulting <span>absolute
+  URL</span> must be <span title="fetch">fetched</span>. The
   <dfn>poster frame</dfn> is then the image obtained from that
-  resource, if any.</p> <!-- So that it is unaffected by changes to
-  the base URL.  -->
+  resource, if any.</p> <!-- thus it is unaffected by changes to the
+  base URL. -->
 
   <p class="note">The image given by the <code
   title="attr-video-poster">poster</code> attribute, the <i>poster
@@ -19232,7 +19245,8 @@
     <ol>
 
      <li><p><span title="resolve a url">Resolve</span> the
-     <span>URL</span> given in that attribute.</p>
+     <span>URL</span> given in that attribute, relative to the
+     <span>media element</span>.</p>
 
      <li><p>If that is successful, then return a list consisting of
      only one entry, the resulting <span>absolute URL</span> as the
@@ -19272,8 +19286,8 @@
 
      <li><span title="resolve a url">Resolving</span> the
      <span>URL</span> given by the <var title="">candidate</var>
-     element's <code title="attr-source-src">src</code> attribute does
-     not fail.</li>
+     element's <code title="attr-source-src">src</code> attribute
+     relative to <var title="">candidate</var> does not fail.</li>
 
      <li>The <var title="">candidate</var> element either has no <code
      title="attr-source-type">type</code> attribute, or its <code
@@ -19295,8 +19309,9 @@
     <p>...then append the <span>absolute URL</span> resulting from
     <span title="resolve a url">resolving</span> the <span>URL</span>
     given in that <var title="">candidate</var> element's <code
-    title="attr-source-src">src</code> attribute to the <var
-    title="">result</var> list.</p>
+    title="attr-source-src">src</code> attribute relative to <var
+    title="">candidate</var> to the <var title="">result</var>
+    list.</p>
 
    </li>
 
@@ -30442,12 +30457,14 @@
   optionally animated, image resource that is neither paged nor
   scripted.</p>
 
-  <p>When any of the following events occur, the user agent must
-  <span>fetch</span> the resource specifed by the <code
-  title="attr-input-src">src</code> attribute's value, unless the user
-  agent cannot support images, or its support for images has been
-  disabled, or the user agent only fetches elements on demand:</p>
-  <!-- Note how this does NOT happen when the base URL changes. -->
+  <p>When any of the following events occur, unless the user agent
+  cannot support images, or its support for images has been disabled,
+  or the user agent only fetches elements on demand, the user agent
+  must <span title="resolve a url">resolve</span> the value of the
+  <code title="attr-input-src">src</code> attribute, relative to the
+  element, and if that is successful, must <span>fetch</span> the
+  resulting <span>absolute URL</span>:</p> <!-- Note how this does NOT
+  happen when the base URL changes. -->
 
   <ul>
 
@@ -33711,8 +33728,10 @@
    </li>
 
    <li><p><span title="resolve a url">Resolve</span> the
-   <span>URL</span> <var title="">action</var>. If this fails, abort
-   these steps.</p></li>
+   <span>URL</span> <var title="">action</var>, relative to the <var
+   title="">submitter</var> element. If this fails, abort these
+   steps. Otherwise, let <var title="">action</var> be the resulting
+   <span>absolute URL</span>.</p></li>
 
    <li><p>Let <var title="">scheme</var> be the <span
    title="url-scheme"><scheme></span> of the resulting
@@ -35105,11 +35124,11 @@
     title="resolve a url">resolving</span> the value of the <code
     title="attr-img-src">src</code> attribute of the first
     <code>img</code> element child of the row's first cell's element,
-    if there is one and resolving its attribute is
-    successful. Otherwise, the <span>URL</span> of the row's image is
-    the empty string.</p> <!-- note that if the base URL has changed,
-    this URL can be different than the one that the <img> element
-    fetched when it was created -->
+    relative to that element, if there is one and resolving its
+    attribute is successful. Otherwise, the <span>URL</span> of the
+    row's image is the empty string.</p> <!-- note that if the base
+    URL has changed, this URL can be different than the one that the
+    <img> element fetched when it was created -->
 
     <p><strong><code title="dom-provider-getRowMenu">getRowMenu(<var
     title="">i</var>)</code></strong>: If the row's first cell's
@@ -35366,11 +35385,11 @@
     the first <code>img</code> element descendant (in the real DOM) of
     the row's element, that is not also a descendant of another
     element in the filtered view that is a descendant of the row's
-    element, if such an element exists and resolving its attribute is
-    successful. Otherwise, it must return the empty string.</p> <!--
-    note that if the base URL has changed, this URL can be different
-    than the one that the <img> element fetched when it was created
-    -->
+    element, if such an element exists and resolving its attribute
+    relative to the element itself, is successful. Otherwise, it must
+    return the empty string.</p> <!-- note that if the base URL has
+    changed, this URL can be different than the one that the <img>
+    element fetched when it was created -->
 
     <div class="example">
 
@@ -35912,12 +35931,12 @@
    title="dom-provider-getRowImage">getRowImage()</code> method with a
    <code>RowSpecification</code> object representing the row in
    question. The return value is a <span>URL</span>. Immediately <span
-   title="resolve a url">resolve</span> that URL as if it came from an
-   attribute of the <code>datagrid</code> element to obtain an
-   <span>absolute URL</span> identifying the image that represents the
-   row. If the method returns the empty string, null, or if the method
-   is not defined, then the row has no associated image.</dd> <!--
-   changing the base URL doesn't change the image used later -->
+   title="resolve a url">resolve</span> that URL, relative to the
+   <code>datagrid</code> element, to obtain an <span>absolute
+   URL</span> identifying the image that represents the row. If the
+   method returns the empty string, null, or if the method is not
+   defined, then the row has no associated image.</dd> <!-- changing
+   the base URL doesn't change the image used later -->
 
    <dt>To obtain a context menu appropriate for a particular row</dt>
 
@@ -36490,7 +36509,12 @@
   <p>The <dfn title="attr-command-icon"><code>icon</code></dfn>
   attribute gives a picture that represents the command. If the
   attribute is specified, the attribute's value must contain a
-  <span>valid URL</span>.</p>
+  <span>valid URL</span>. To obtain the <span>absolute URL</span> of
+  the icon, the attribute's value must be <span title="resolve a
+  url">resolved</span> relative to the element.</p> <!-- this is
+  affected by the base URL being changed, so users of this should
+  cache the image once they've fetched it once, at least until the
+  relative url changes again -->
 
   <p>The <dfn
   title="attr-command-disabled"><code>disabled</code></dfn> attribute
@@ -37006,11 +37030,12 @@
    <code>command</code> element with a <code
    title="attr-command-default">default</code> attribute, mark the
    command as being a default command.</dd> <!-- XXX if there's an
-   Icon URL for the command, it should be <span
+   Icon facet for the command, it should be <span
    title="fetch">fetched</span>, and then that image should be
    associated with the command, such that each command only has its
    image fetched once, to prevent changes to the base URL from having
-   effects after the image has been fetched once. -->
+   effects after the image has been fetched once. (no need to resolve
+   the Icon facet, it's an absolute URL) -->
 
 
    <dt>An <code>hr</code> element</dt>
@@ -37403,10 +37428,10 @@
   is the <span>absolute URL</span> obtained from <span title="resolve
   a url">resolving</span> the value of the <code
   title="attr-img-src">src</code> attribute of the first
-  <code>img</code> element descendant of the element, if there is such
-  an element and resolving its attribute is successful. Otherwise,
-  there is no <span title="command-facet-Icon">Icon</span> for the
-  command.</p>
+  <code>img</code> element descendant of the element, relative to that
+  element, if there is such an element and resolving its attribute is
+  successful. Otherwise, there is no <span
+  title="command-facet-Icon">Icon</span> for the command.</p>
 
   <p>The <span title="command-facet-HiddenState">Hidden State</span>
   of the command is true (hidden) if the element has a <code
@@ -37616,9 +37641,10 @@
   <p>The <span title="command-facet-Icon">Icon</span> for the command
   is the <span>absolute URL</span> obtained from <span title="resolve
   a url">resolving</span> the value of the element's <code
-  title="attr-command-icon">icon</code> attribute, if it has such an
-  attribute and resolving it is successful. Otherwise, there is no
-  <span title="command-facet-Icon">Icon</span> for the command.</p>
+  title="attr-command-icon">icon</code> attribute, relative to the
+  element, if it has such an attribute and resolving it is
+  successful. Otherwise, there is no <span
+  title="command-facet-Icon">Icon</span> for the command.</p>
 
   <p>The <span title="command-facet-HiddenState">Hidden State</span>
   of the command is true (hidden) if the element has a <code
@@ -37672,10 +37698,11 @@
   is the <span>absolute URL</span> obtained from <span title="resolve
   a url">resolving</span> the value of the <code
   title="attr-img-src">src</code> attribute of the first
-  <code>img</code> element descendant of the element, if there is such
-  an element and resolving its attribute is successful. Otherwise, the
-  <span title="command-facet-Icon">Icon</span> is a user-agent-defined
-  image appropriate for the <code>bb</code> element's <code
+  <code>img</code> element descendant of the element, relative to that
+  element, if there is such an element and resolving its attribute is
+  successful. Otherwise, the <span
+  title="command-facet-Icon">Icon</span> is a user-agent-defined image
+  appropriate for the <code>bb</code> element's <code
   title="attr-bb-type">type</code> attribute's state.</p>
 
   <p>The <span title="command-facet-HiddenState">Hidden State</span>
@@ -38091,8 +38118,14 @@
   be made the same as members of any other group. Each such group is a
   <dfn>unit of related similar-origin browsing contexts</dfn>.</p>
 
+  <p>Each <span>unit of related similar-origin browsing
+  contexts</span> has a <dfn>current script base URL</dfn> which is
+  used to <span title="resolve a url">resolve</span> relative <span
+  title="URL">URLs</span> used in scripts running in that <span>unit
+  of related similar-origin browsing contexts</span>.</p>
 
 
+
   <h4>Browsing context names</h4>
 
   <p>Browsing contexts can have a <dfn>browsing context name</dfn>. By
@@ -38387,7 +38420,8 @@
   the empty string, then the <var title="">url</var> argument defaults
   to "<code>about:blank</code>". The argument must be <span
   title="resolve a url">resolved</span> to an <span>absolute
-  URL</span> (or an error) when the method is invoked.</p>
+  URL</span> (or an error), relative to the <span>current script base
+  URL</span>, when the method is invoked.</p>
 
   <p>The second argument, <var title="">target</var>, specifies the
   <span title="browsing context name">name</span> of the browsing
@@ -38429,15 +38463,15 @@
   <p>Then, the user agent must <span>navigate</span> the selected
   <span>browsing context</span> to the <span>absolute URL</span> (or
   error) obtained from <span title="resolve a url">resolving</span>
-  <var title="">url</var>. If the <var title="">replace</var> is true,
-  then <span title="replacement enabled">replacement must be
+  <var title="">url</var> earlier. If the <var title="">replace</var>
+  is true, then <span title="replacement enabled">replacement must be
   enabled</span>; otherwise, it must not be enabled unless the
   <span>browsing context</span> was just created as part of the
   <span>the rules for choosing a browsing context given a browsing
   context name</span>. The navigation must be done with the <span
   title="script's browsing context">browsing context</span> of the
-  <span title="concept-script">script</span> that invoked the method as the <span>source browsing
-  context</span>.</p>
+  <span title="concept-script">script</span> that invoked the method
+  as the <span>source browsing context</span>.</p>
 
   <p>The method must return the <code>Window</code> object of the
   default view of the <span>browsing context</span> that was
@@ -39424,33 +39458,43 @@
   <h5>Calling scripts</h5>
 
   <p>When a user agent is to <dfn>jump to a code entry-point</dfn> for
-  a <span title="concept-script">script</span>, if <span
-  title="concept-bc-noscript">scripting is disabled</span> in the
-  <span>script's browsing context</span>, or if the script's
-  <span>script group</span> is <i>frozen</i>, then the user agent must
-  throw an <code>UNAVAILABLE_SCRIPT_ERR</code> exception. Otherwise,
-  the <span title="script execution environment">script execution
-  environment</span> for the <span
-  title="concept-script">script</span> must execute the code for the
-  given code entry-point.</p>
+  a <span title="concept-script">script</span>, for example because
+  one <span title="concept-script">script</span> has called another,
+  or because the user agent is to invoke a callback defined in that
+  <span title="concept-script">script</span>, the user agent must run
+  the following steps:</p>
 
-  <p>When executable code from a <span
-  title="concept-script">script</span> in one <span>script
-  group</span> makes a call to a <span
-  title="concept-script">script</span> in another <span>script
-  group</span>, the user agent must <span title="jump to a code
-  entry-point">jump</span> to the corresponding code entry-point in
-  that second script using the steps above.</p>
+  <ol>
 
-  <p>When executable code from a <span
-  title="concept-script">script</span> makes a call to a <span
-  title="concept-script">script</span> in the same <span>script
-  group</span>, the <span title="script execution environment">script
-  execution environment</span> for the <span
-  title="concept-script">script</span> must execute the code for the
-  given code entry-point without checking if the <span>script
-  group</span> is frozen.</p>
+   <li>
 
+    <p>If executable code from a <span
+    title="concept-script">script</span> is making a call to a <span
+    title="concept-script">script</span> in the same <span>script
+    group</span>, then skip this step.</p>
+
+    <p>Otherwise, if <span title="concept-bc-noscript">scripting is
+    disabled</span> in the <span>script's browsing context</span>, or
+    if the script's <span>script group</span> is <i>frozen</i>, then
+    the user agent must throw an <code>UNAVAILABLE_SCRIPT_ERR</code>
+    exception and abort these steps.</p>
+
+   </li>
+
+   <li><p>If the <span>current script base URL</span> has no value,
+   then set it to the <span>script's base URL</span>.</p></li>
+
+   <li><p>Make the <span title="script execution environment">script
+   execution environment</span> for the <span
+   title="concept-script">script</span> execute the code for the given
+   code entry-point.</p></li>
+
+   <li><p>If the <span>current script base URL</span> was set in the
+   earlier step for this invocation of the algorithm, then set it back
+   to having no value.</p></li>
+
+  </ol>
+
   <p class="note">In particular, this means that scripts in a
   <i>frozen</i> <span>script group</span> can keep on executing so
   long as they don't call code in another <span>script
@@ -39458,15 +39502,10 @@
   after calling <code title="dom-document-open">document.open()</code>
   on its own <code>Document</code>.</p>
 
-  <p>Any time the user agent to invoke a callback defined in a <span
-  title="concept-script">script</span>, the user agent must <span
-  title="jump to a code entry-point">jump</span> to the corresponding
-  code entry-point in that second script.</p>
 
 
+  <h5 id="creating-scripts">Creating scripts</h5>
 
-  <h5>Creating scripts</h5>
-
   <p>When the specification says that a <span
   title="concept-script">script</span> is to be <dfn title="create a
   script">created</dfn>, given some script source, its scripting
@@ -40730,6 +40769,15 @@
 
    <li>
 
+    <p><span title="resolve a url">Resolve</span> <var
+    title="">url</var> relative to the <span>current script base
+    URL</span>.</p>
+
+    <p>If this fails, then throw a <code>SYNTAX_ERR</code> exception
+    and abort these steps.</p>
+
+   <li>
+
     <p>If the user agent is configured such that this invocation of
     <code title="dom-showModalDialog">showModalDialog()</code> is
     somehow disabled, then the method returns the empty string; abort
@@ -40759,7 +40807,8 @@
 
      <li>have an <span>active document</span> whose
      <span>origin</span> is the <span title="same origin">same</span>
-     as the <span>origin</span> of the <span title="concept-script">script</span> that called the <code
+     as the <span>origin</span> of the <span
+     title="concept-script">script</span> that called the <code
      title="dom-showModalDialog">showModalDialog()</code> method at
      the time the method was called,</li> <!-- Note that changing
      document.domain to talk to another domain doesn't make you able
@@ -40809,18 +40858,21 @@
    <li>
 
     <p>Let the <span>dialog arguments' origin</span> be the
-    <span>origin</span> of the <span title="concept-script">script</span> that called the <code
+    <span>origin</span> of the <span
+    title="concept-script">script</span> that called the <code
     title="dom-showModalDialog">showModalDialog()</code> method.</p>
 
    </li>
 
    <li>
 
-    <p><span>Navigate</span> the new browsing context to <var
-    title="">url</var>, with <span>replacement enabled</span>, and
-    with the <span title="script's browsing context">browsing
-    context</span> of the <span title="concept-script">script</span> that invoked the method as the
-    <span>source browsing context</span>.</p>
+    <p><span>Navigate</span> the new <span>browsing context</span> to
+    the <span>absolute URL</span> that resulted from <span
+    title="resolve a url">resolving</span> <var title="">url</var>
+    earlier, with <span>replacement enabled</span>, and with the <span
+    title="script's browsing context">browsing context</span> of the
+    <span title="concept-script">script</span> that invoked the method
+    as the <span>source browsing context</span>.</p>
 
    </li>
 
@@ -41232,7 +41284,8 @@
   <p>There is <a href="#sample-handler-impl">an example of how these
   methods could be presented to the user</a> below.</p>
 
-  <p>The arguments to the methods have the following meanings:</p>
+  <p>The arguments to the methods have the following meanings and
+  corresponding implementaion requirements:</p>
 
   <dl>
 
@@ -41277,25 +41330,28 @@
    <dd>
 
     <p>The <span>URL</span> of the page that will handle the
-    requests. When the user agent uses this URL, it must replace the
-    first occurrence of the exact literal string "<code>%s</code>"
-    with an escaped version of the URL of the content in question (as
-    defined below), then <span title="resolve a url">resolve</span>
-    the resulting URL (using the <span title="script's base URL">base
-    URL</span> of the script that originally invoked the <code
+    requests.</p>
+
+    <p>When the user agent uses this URL, it must replace the first
+    occurrence of the exact literal string "<code title="">%s</code>"
+    with an escaped version of the <span>absolute URL</span> of the
+    content in question (as defined below), then <span title="resolve
+    a url">resolve</span> the resulting URL, relative to the
+    <span>current script base URL</span> at the time the <code
     title="dom-navigator-registerContentHandler">registerContentHandler()</code>
     or <code
     title="dom-navigator-registerProtocolHandler">registerProtocolHandler()</code>
-    method), and then <span>fetch</span> the resulting URL using the
-    GET method (<span title="concept-http-equivalent-get">or
-    equivalent</span> for non-HTTP URLs).</p>
+    methods were invoked, and then <span>fetch</span> the resulting
+    URL using the GET method (<span
+    title="concept-http-equivalent-get">or equivalent</span> for
+    non-HTTP URLs).</p>
 
-    <p>To get the escaped version of the URL of the content in
-    question, the user agent must <span title="resolve a
-    URL">resolve</span> the URL, and then every character in the URL
-    that doesn't match the <query> production defined in RFC
-    3986 must be replaced by the percent-encoded form of the
-    character. <a href="#refsRFC3986">[RFC3986]</a></p>
+    <p>To get the escaped version of the <span>absolute URL</span> of
+    the content in question, the user agent must replace every
+    character in that <span>absolute URL</span> that doesn't match the
+    <query> production defined in RFC 3986 by the
+    percent-encoded form of that character. <a
+    href="#refsRFC3986">[RFC3986]</a></p>
 
     <div class="example">
 
@@ -41345,7 +41401,11 @@
 
   <p>User agents must raise a <code>SYNTAX_ERR</code> exception if the
   <var title="">url</var> argument passed to one of these methods does
-  not contain the exact literal string "<code>%s</code>".</p>
+  not contain the exact literal string "<code>%s</code>", or if <span
+  title="resolve a url">resolving</span> the <var title="">url</var>
+  argument with the first occurance of the string "<code
+  title="">%s</code>" removed, relative to the <span>current script
+  base URL</span>, is not successful.</p>
 
   <p>User agents must not raise any other exceptions (other than
   binding-specific exceptions, such as for an incorrect number of
@@ -41884,6 +41944,9 @@
    testable since neither U+0000 nor U+FFFD are valid anywhere in the
    syntax and thus both will be treated the same anyway)--></p></li>
 
+   <li><p>Let <var title="">base URL</var> be the <span>absolute
+   URL</span> representing the manifest.</p></li>
+
    <li><p>Let <var title="">explicit URLs</var> be an initially empty
    list of <span title="concept-appcache-explicit">explicit
    entries</span>.</p></li>
@@ -42026,7 +42089,8 @@
      <dd>
 
       <p><span title="resolve a url">Resolve</span> the first item in
-      <var title="">tokens</var>; ignore the rest.</p>
+      <var title="">tokens</var>, relative to <var title="">base
+      URL</var>; ignore the rest.</p>
 
       <p>If this fails, then jump back to the step labeled "start of
       line".</p>
@@ -42055,7 +42119,8 @@
       the second token in <var title="">tokens</var>.</p>
 
       <p><span title="resolve a url">Resolve</span> <var title="">part
-      one</var> and <var title="">part two</var>.</p>
+      one</var> and <var title="">part two</var>, relative to <var
+      title="">base URL</var>.</p>
 
       <p>If either fails, then jump back to the step labeled "start of
       line".</p>
@@ -42091,7 +42156,8 @@
      <dd>
 
       <p><span title="resolve a url">Resolve</span> the first item in
-      <var title="">tokens</var>; ignore the rest.</p>
+      <var title="">tokens</var>, relative to <var title="">base
+      URL</var>; ignore the rest.</p>
 
       <p>If this fails, then jump back to the step labeled "start of
       line".</p>
@@ -43535,7 +43601,8 @@
     <ol>
 
      <li><span title="resolve a url">Resolve</span> the value of the
-     third argument.</li>
+     third argument, relative to the <span>current script base
+     URL</span>.</li>
 
      <li>If that fails, raise a <code>SECURITY_ERR</code> exception and
      abort the <code title="dom-history-pushState">pushState()</code>
@@ -43750,7 +43817,9 @@
 
   <p>When the <dfn title="dom-location-assign"><code>assign(<var
   title="">url</var>)</code></dfn> method is invoked, the UA must
-  <span>navigate</span> the <span>browsing context</span> to the
+  <span title="resolve a url">resolve</span> the argument, relative to
+  the <span>current script base URL</span>, and if that is successful,
+  must <span>navigate</span> the <span>browsing context</span> to the
   specified <var title="">url</var>.</p> <!-- XXX browsers seem to
   treat this as having <span>replacement enabled</span> if the
   browsing context has only one entry and that entry is about:blank.
@@ -43759,6 +43828,8 @@
 
   <p>When the <dfn title="dom-location-replace"><code>replace(<var
   title="">url</var>)</code></dfn> method is invoked, the UA must
+  <span title="resolve a url">resolve</span> the argument, relative to
+  the <span>current script base URL</span>, and if that is successful,
   <span>navigate</span> the <span>browsing context</span> to the
   specified <var title="">url</var> with <span>replacement
   enabled</span>.</p>
@@ -43770,6 +43841,12 @@
   context</span> of the script that invoked the method as the
   <span>source browsing context</span>.</p>
 
+  <p>If the <span title="resolve a url">resolving</span> step of the
+  the <code title="dom-location-assign">assign()</code> and <code
+  title="dom-location-replace">replace()</code> methods is not
+  successful, then the user agent must instead throw a
+  <code>SYNTAX_ERR</code> exception.</p>
+
 <!--XXX
   <dfn title="dom-location-reload"><code>reload()</code></dfn>
   reload during resize event:
@@ -43805,10 +43882,10 @@
 
   <p>The <dfn title="dom-location-resolveURL"><code>resolveURL(<var
   title="">url</var>)</code></dfn> method must <span title="resolve a
-  url">resolve</span> its <var title="">url</var> argument, and if
-  that succeeds, return the resulting <span>absolute URL</span>. If it
-  fails, it must throw a <code>SYNTAX_ERR</code> exception
-  instead.</p>
+  url">resolve</span> its <var title="">url</var> argument, relative
+  to the <span>current script base URL</span>, and if that succeeds,
+  return the resulting <span>absolute URL</span>. If it fails, it must
+  throw a <code>SYNTAX_ERR</code> exception instead.</p>
 
 
   <h5>Security</h5>
@@ -43878,7 +43955,7 @@
   <h4>Navigating across documents</h4>
 
   <p>Certain actions cause the <span>browsing context</span> to
-  <dfn>navigate</dfn> to a new resource. Navigation always involves
+  <i>navigate</i> to a new resource. Navigation always involves
   <dfn>source browsing context</dfn>, which is the browsing context
   which was responsible for starting the navigation.</p>
 
@@ -43893,8 +43970,8 @@
   cause a browsing context to navigate, in addition to those defined
   in this specification.</p>
 
-  <p>When a browsing context is navigated to a new resource, the user
-  agent must run the following steps:</p>
+  <p>When a browsing context is <dfn title="navigate">navigated</dfn>
+  to a new resource, the user agent must run the following steps:</p>
 
   <ol>
 
@@ -43926,13 +44003,6 @@
    <li><p>Cancel any preexisting attempt to navigate the
    <span>browsing context</span>.</p></li>
 
-   <li><span title="resolve a url">Resolve</span> the <span>URL</span>
-   of the new resource. If that fails, the user agent may abort these
-   steps, or may treat the URL as identifying some sort of user-agent
-   defined error resource, which could display some sort of inline
-   content, or could be handled using a mechanism that does not affect
-   the browsing context.</li>
-
    <li id="navigate-fragid-step"><p><i>Fragment identifiers</i>: If
    the <span>absolute URL</span> of the new resource is the same as
    the <span title="the document's address">address</span> of the
@@ -43985,11 +44055,12 @@
     application cache at all; the submission will be made to the
     network.</p>
 
-    <p>Otherwise, <span>fetch</span> the new resource. If the resource
-    is being fetched using HTTP, and the method is not GET<!-- or HEAD
-    (but that can't happen) -->, then the user agent must include an
-    <code title="http-origin">XXX-Origin</code> header whose value is
-    determined as follows:</p>
+    <p>Otherwise, <span>fetch</span> the new resource, if it has not
+    already been obtained<!-- it's obtained by <object>, for instance
+    -->. If the resource is being fetched using HTTP, and the method
+    is not GET<!-- or HEAD (but that can't happen) -->, then the user
+    agent must include an <code title="http-origin">XXX-Origin</code>
+    header whose value is determined as follows:</p>
 
     <dl class="switch">
 
@@ -44331,8 +44402,8 @@
   title="attr-html-manifest">manifest</code>, then, as soon as the
   element is <span title="insert an element into a document">inserted
   into the document</span>, the user agent must <span title="resolve a
-  url">resolve</span> the value of that attribute, and if that is
-  successful, must run the <span
+  url">resolve</span> the value of that attribute relative to that
+  element, and if that is successful, must run the <span
   title="concept-appcache-init">application cache selection
   algorithm</span> with the resulting <span>absolute URL</span> as the
   manifest URL, and passing in the newly-created
@@ -46206,13 +46277,19 @@
   <h4><dfn>Following hyperlinks</dfn></h4>
 
   <p>When a user <em>follows a hyperlink</em>, the user agent must
-  <span>navigate</span> a <span>browsing context</span> to the
-  <span>URL</span> given by the <code
-  title="attr-hyperlink-href">href</code> attribute of that
-  hyperlink. In the case of server-side image maps, the URL of the
-  hyperlink must further have its <var>hyperlink suffix</var> appended
-  to it.</p>
+  <span title="resolve a url">resolve</span> the <span>URL</span>
+  given by the <code title="attr-hyperlink-href">href</code> attribute
+  of that hyperlink, relative to the hyperlink element, and if that is
+  successful, must <span>navigate</span> a <span>browsing
+  context</span> to the resulting <span>absolute URL</span>. In the
+  case of server-side image maps, the URL of the hyperlink must
+  further have its <var>hyperlink suffix</var> appended to it.</p>
 
+  <p>If <span title="resolve a url">resolving</span> the
+  <span>URL</span> fails, the user agent may report the error to the
+  user in a user-agent-specific manner, may navigate to an error page
+  to report the error, or may ignore the error and do nothing.</p>
+
   <p>If the user indicated a specific <span>browsing context</span>
   when following the hyperlink, or if the user agent is configured to
   follow hyperlinks by navigating a particular browsing context, then
@@ -46265,16 +46342,16 @@
   <p>If an <code>a</code> or <code>area</code> hyperlink element has a
   <code title="attr-hyperlink-ping">ping</code> attribute, and the
   user follows the hyperlink, and the hyperlink's <span>URL</span> can
-  be <span title="resolve a url">resolved</span> without failure, the
-  user agent must take the <code
-  title="attr-hyperlink-ping">ping</code> attribute's value, <span
-  title="split a string on spaces">split that string on
+  be <span title="resolve a url">resolved</span>, relative to the
+  hyperlink element, without failure, then the user agent must take
+  the <code title="attr-hyperlink-ping">ping</code> attribute's value,
+  <span title="split a string on spaces">split that string on
   spaces</span>, <span title="resolve a url">resolve</span> each
-  resulting token, and then should send a request (as described below)
-  to each of the resulting <span title="absolute URL">absolute
-  URLs</span>. (Tokens that fail to resolve are ignored.) This may be
-  done in parallel with the primary request, and is independent of the
-  result of that request.</p>
+  resulting token relative to the hyperlink element, and then should
+  send a request (as described below) to each of the resulting <span
+  title="absolute URL">absolute URLs</span>. (Tokens that fail to
+  resolve are ignored.) This may be done in parallel with the primary
+  request, and is independent of the result of that request.</p>
 
   <p>User agents should allow the user to adjust this behavior, for
   example in conjunction with a setting that disables the sending of
@@ -50526,20 +50603,23 @@
   title="dom-RemoteEventTarget-addEventSource"><code>addEventSource(<var
   title="">src</var>)</code></dfn> method is invoked, the user agent
   must <span title="resolve a url">resolve</span> the <span>URL</span>
-  specified in <var title="">src</var>, and if that succeeds, add the resulting <span>absolute URL</span>
-  to the <span title="concept-eventsource-list">list of event
-  sources</span> for that object. The same URL can be registered
-  multiple times. If the URL fails to resolve, then the user agent
-  must raise a <code>SYNTAX_ERR</code> exception.</p>
+  specified in <var title="">src</var>, relative to the <span>current
+  script base URL</span>, and if that succeeds, add the resulting
+  <span>absolute URL</span> to the <span
+  title="concept-eventsource-list">list of event sources</span> for
+  that object. The same URL can be registered multiple times. If the
+  URL fails to resolve, then the user agent must raise a
+  <code>SYNTAX_ERR</code> exception.</p>
 
   <p>When the <dfn
   title="dom-RemoteEventTarget-removeEventSource"><code>removeEventSource(<var
   title="">src</var>)</code></dfn> method is invoked, the user agent
   must <span title="resolve a url">resolve</span> the <span>URL</span>
-  specified in <var title="">src</var>, and if that succeeds, remove
-  the resulting <span>absolute URL</span> from the <span
+  specified in <var title="">src</var>, relative to the <span>current
+  script base URL</span>, and if that succeeds, remove the resulting
+  <span>absolute URL</span> from the <span
   title="concept-eventsource-list">list of event sources</span> for
-  that object.  If the same URL has been registered multiple times,
+  that object. If the same URL has been registered multiple times,
   removing it must remove only one instance of that URL for each
   invocation of the <code
   title="removeEventSource">removeEventSource()</code> method. If the
@@ -52226,9 +52306,9 @@
    <li>
 
     <p>If the value of the <var title="">targetOrigin</var> argument
-    is not a single U+002A ASTERISK character ("*"), and either <span
-    title="parse a url">parsing</span> it as a <span>URL</span> fails,
-    or <span title="resolve a url">resolving</span> it results in a
+    is not a single U+002A ASTERISK character ("*"), and <span
+    title="resolve a url">resolving</span> it relative to the
+    <span>current script base URL</span> either fails or results in a
     <span>URL</span> with a <code
     title="url-host-specific"><host-specific></code> component
     that is neither empty nor a single U+002F SOLIDUS character (/),
@@ -52319,9 +52399,9 @@
    <li>
 
     <p>If the value of the <var title="">targetOrigin</var> argument
-    is not a single U+002A ASTERISK character ("*"), and either <span
-    title="parse a url">parsing</span> it as a <span>URL</span> fails,
-    or <span title="resolve a url">resolving</span> it results in a
+    is not a single U+002A ASTERISK character ("*"), and <span
+    title="resolve a url">resolving</span> it relative to the
+    <span>current script base URL</span> either fails or results in a
     <span>URL</span> with a <code
     title="url-host-specific"><host-specific></code> component
     that is neither empty nor a single U+002F SOLIDUS character (/),
@@ -56940,10 +57020,11 @@
 
     <p id="parser-appcache">If the <code>Document</code> is being
     loaded as part of <span title="navigate">navigation</span> of a
-    <span>browsing context</span>, then: if the token has an attribute
-    "manifest", then <span title="resolve a url">resolve</span> the
-    value of that attribute to an <span>absolute URL</span>, and if
-    that is successful, run the <span
+    <span>browsing context</span>, then: if the newly created element
+    has a <code title="attr-html-manifest">manifest</code> attribute,
+    then <span title="resolve a url">resolve</span> the value of that
+    attribute to an <span>absolute URL</span>, relative to the newly
+    created element, and if that is successful, run the <span
     title="concept-appcache-init">application cache selection
     algorithm</span> with the resulting <span>absolute URL</span>;
     otherwise, if there is no such attribute or resolving it fails,




More information about the Commit-Watchers mailing list