[html5] r4974 - [e] (0) Move things more towards what people want (details to be sorted out late [...]

whatwg at whatwg.org whatwg at whatwg.org
Mon Apr 5 17:08:12 PDT 2010


Author: ianh
Date: 2010-04-05 17:08:11 -0700 (Mon, 05 Apr 2010)
New Revision: 4974

Modified:
   complete.html
   index
   source
Log:
[e] (0) Move things more towards what people want (details to be sorted out later by change proposal, I expect).

Modified: complete.html
===================================================================
--- complete.html	2010-04-05 22:52:20 UTC (rev 4973)
+++ complete.html	2010-04-06 00:08:11 UTC (rev 4974)
@@ -181,7 +181,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
    <hgroup><h1>Web Applications 1.0</h1>
-    <h2 class="no-num no-toc">Draft Standard — 5 April 2010</h2>
+    <h2 class="no-num no-toc">Draft Standard — 6 April 2010</h2>
    </hgroup><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>
    <!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
@@ -5609,38 +5609,35 @@
 
   <h4 id=terminology-0><span class=secno>2.5.1 </span>Terminology</h4>
 
+  <!-- see also: svn diff -r3244:3245 source -->
+
   <p>A <dfn id=url>URL</dfn> is a string used to identify a resource.</p>
 
-  <p>A <a href=#url>URL</a> is a <dfn id=valid-url>valid URL</dfn> if it is a
-  <span>valid Web address</span> as defined by the Web addresses
-  specification. <a href=#refsWEBADDRESSES>[WEBADDRESSES]</a></p>
+  <p>A <a href=#url>URL</a> is a <dfn id=valid-url>valid URL</dfn> if at least one of
+  the following conditions holds:</p>
 
-  <p>A <a href=#url>URL</a> is a <dfn id=valid-non-empty-url>valid non-empty URL</dfn> if it is a
-  <a href=#valid-url>valid URL</a> but it is not the empty string.</p>
+  <ul><li><p>The <a href=#url>URL</a> is a valid URI reference <a href=#refsRFC3986>[RFC3986]</a>.</li>
 
-  <p>A <a href=#url>URL</a> is an <dfn id=absolute-url>absolute URL</dfn> if it is an
-  <span>absolute Web address</span> as defined by the Web addresses
-  specification. <a href=#refsWEBADDRESSES>[WEBADDRESSES]</a></p>
+   <li><p>The <a href=#url>URL</a> is a valid IRI reference and it has no
+   query component. <a href=#refsRFC3987>[RFC3987]</a></li>
 
-  <p>An <a href=#absolute-url>absolute URL</a> is a <dfn id=hierarchical-url>hierarchical URL</dfn> if,
-  when <a href=#parse-a-url title="parse a url">parsed</a>, there is a character
-  immediately after the <a href=#url-scheme title=url-scheme><scheme></a>
-  component and it is a U+002F SOLIDUS character (/).</p>
+   <li><p>The <a href=#url>URL</a> is a valid IRI reference and its query
+   component contains no unescaped non-ASCII characters. <a href=#refsRFC3987>[RFC3987]</a></li>
 
-  <p>An <a href=#absolute-url>absolute URL</a> is an <dfn id=authority-based-url>authority-based URL</dfn>
-  if, when <a href=#parse-a-url title="parse a url">parsed</a>, there are two
-  characters immediately after the <a href=#url-scheme title=url-scheme><scheme></a> component and they are both
-  U+002F SOLIDUS characters (//).</p>
+   <li><p>The <a href=#url>URL</a> is a valid IRI reference and the <a href="#document's-character-encoding" title="document's character encoding">character encoding</a> of
+   the URL's <code><a href=#document>Document</a></code> is UTF-8 or UTF-16. <a href=#refsRFC3987>[RFC3987]</a></li>
 
+  </ul><p>A <a href=#url>URL</a> is a <dfn id=valid-non-empty-url>valid non-empty URL</dfn> if it is a
+  <a href=#valid-url>valid URL</a> but it is not the empty string.</p>
+
   <div class=impl>
 
   <p>To <dfn id=parse-a-url>parse a URL</dfn> <var title="">url</var> into its
-  component parts, the user agent must use the <span>parse a Web
-  address</span> algorithm defined by the Web addresses
-  specification. <a href=#refsWEBADDRESSES>[WEBADDRESSES]</a></p>
+  component parts, the user agent must use the <span class=XXX>parse
+  an address</span> algorithm defined by the IRI specification. <a href=#refsRFC3987>[RFC3987]</a></p>
 
-  <p>Parsing a URL results in the following components, again as
-  defined by the Web addresses specification:</p>
+  <p>Parsing a URL can fail. If it does not, then results in the
+  following components, again as defined by the IRI specification:</p>
 
   <ul class=brief><li><dfn id=url-scheme title=url-scheme><scheme></dfn></li>
    <li><dfn id=url-host title=url-host><host></dfn></li>
@@ -5650,54 +5647,126 @@
    <li><dfn id=url-query title=url-query><query></dfn></li>
    <li><dfn id=url-fragment title=url-fragment><fragment></dfn></li>
    <li><dfn id=url-host-specific title=url-host-specific><host-specific></dfn></li>
-  </ul><p>To <dfn id=resolve-a-url>resolve a URL</dfn> to an <a href=#absolute-url>absolute URL</a>
+  </ul><hr><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 <span>resolve a Web address</span>
-  algorithm defined by the Web addresses specification. <a href=#refsWEBADDRESSES>[WEBADDRESSES]</a></p>
+  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>
 
-  <p>The <dfn id=document-base-url>document base URL</dfn> of a <code><a href=#document>Document</a></code>
-  object is the <a href=#absolute-url>absolute URL</a> obtained by running these
-  substeps:</p>
+  <ol><li><p>Let <var title="">url</var> be the <a href=#url>URL</a> being
+   resolved.</li>
 
-  <ol><li><p>Let <var title="">fallback base url</var> be <a href="#the-document's-address">the
-   document's address</a>.</li>
+   <li>
 
+    <p>Let <var title="">encoding</var> be determined as follows:</p>
+
+    <dl class=switch><dt>If the URL had a character encoding defined when the URL was
+     created or defined</dt>
+
+     <dd>The URL character encoding is as defined.</dd>
+
+     <dt>If the URL came from a script (e.g. as an argument to a
+     method)</dt>
+
+     <dd>The URL character encoding is the <a href="#script's-url-character-encoding">script's URL character
+     encoding</a>.</dd>
+
+     <dt>If the URL came from a DOM node (e.g. from an element)</dt>
+
+     <dd>The node has a <code><a href=#document>Document</a></code>, and the URL character
+     encoding is the <a href="#document's-character-encoding">document's character encoding</a>.</dd>
+
+    </dl></li>
+
+   <li><p>If <var title="">encoding</var> is a UTF-16 encoding, then
+   change the value of <var title="">encoding</var> to UTF-8.</li>
+
    <li>
 
-    <!-- http://www.hixie.ch/tests/adhoc/html/navigation/javascript-url/ -->
+    <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>
 
-    <!-- this should be tested in the case of a browsing context that
-    was navigated to about:blank after having been elsewhere, as
-    opposed to the about:blank used at the time of the browsing
-    context's creation. -->
+    <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><a href=#document>Document</a></code> that
+    owns the element. <a href=#refsXMLBASE>[XMLBASE]</a></p>
 
-    <p>If <var title="">fallback base url</var> is
-    <code><a href=#about:blank>about:blank</a></code>, and the <code><a href=#document>Document</a></code>'s
-    <a href=#browsing-context>browsing context</a> has a <a href=#creator-browsing-context>creator browsing
-    context</a>, then let <var title="">fallback base url</var>
-    be the <a href=#document-base-url>document base URL</a> of the <a href=#creator-document>creator
-    <code>Document</code></a> instead.</p>
+    <p>For the purposes of the XML Base specification, user agents
+    must act as if all <code><a href=#document>Document</a></code> objects represented XML
+    documents.</p>
 
-   </li>
+    <p class=note>It is possible for <code title=attr-xml-base><a href=#the-xml:base-attribute-(xml-only)>xml:base</a></code> attributes to be present
+    even in HTML fragments, as such attributes can be added
+    dynamically using script. (Such scripts would not be conforming,
+    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>
 
-   <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>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 <var title="">fallback base
-   url</var>.</li>
+    <p>The <dfn id=document-base-url>document base URL</dfn> of a <code><a href=#document>Document</a></code>
+    object is the <a href=#absolute-url>absolute URL</a> obtained by running these
+    substeps:</p>
 
-   <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><p>Let <var title="">fallback base url</var> be <a href="#the-document's-address">the
+     document's address</a>.</li>
 
-   <li><p><a href=#resolve-a-url title="resolve a URL">Resolve</a> <var title="">url</var> relative to <var title="">fallback base
-   url</var> (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>
 
-   <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 <var title="">fallback base url</var>.</li>
+      <!-- http://www.hixie.ch/tests/adhoc/html/navigation/javascript-url/ -->
 
-  </ol><p>This specification defines the URL
+      <!-- this should be tested in the case of a browsing context that
+      was navigated to about:blank after having been elsewhere, as
+      opposed to the about:blank used at the time of the browsing
+      context's creation. -->
+
+      <p>If <var title="">fallback base url</var> is
+      <code><a href=#about:blank>about:blank</a></code>, and the <code><a href=#document>Document</a></code>'s
+      <a href=#browsing-context>browsing context</a> has a <a href=#creator-browsing-context>creator browsing
+      context</a>, then let <var title="">fallback base url</var>
+      be the <a href=#document-base-url>document base URL</a> of the <a href=#creator-document>creator
+      <code>Document</code></a> instead.</p>
+
+     </li>
+
+     <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>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 <var title="">fallback base
+     url</var>.</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>
+
+     <li><p><a href=#resolve-a-url title="resolve a URL">Resolve</a> <var title="">url</var> relative to <var title="">fallback base
+     url</var> (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 <var title="">fallback base url</var>.</li>
+
+    </ol></li>
+
+   <li><p>Return the result of applying the <span class=XXX>resolve
+   an address</span> algorithm defined by the IRI specification to
+   resolve <var title="">url</var> relative to <var title="">base</var> using encoding <var title="">encoding</var>. <a href=#refsRFC3987>[RFC3987]</a></li>
+
+  </ol></div>
+
+  <p>A <a href=#url>URL</a> is an <dfn id=absolute-url>absolute URL</dfn> if <a href=#resolve-a-url title="resolve a url">resolving</a> it results in the same output
+  regardless of what it is resolved relative to, and that output is
+  not a failure.</p>
+
+  <p>An <a href=#absolute-url>absolute URL</a> is a <dfn id=hierarchical-url>hierarchical URL</dfn> if,
+  when <a href=#resolve-a-url title="resolve a url">resolved</a> and then <a href=#parse-a-url title="parse a url">parsed</a>, there is a character immediately
+  after the <a href=#url-scheme title=url-scheme><scheme></a> component
+  and it is a U+002F SOLIDUS character (/).</p>
+
+  <p>An <a href=#absolute-url>absolute URL</a> is an <dfn id=authority-based-url>authority-based URL</dfn>
+  if, when <a href=#resolve-a-url title="resolve a url">resolved</a> and then <a href=#parse-a-url title="parse a url">parsed</a>, there are two characters
+  immediately after the <a href=#url-scheme title=url-scheme><scheme></a>
+  component and they are both U+002F SOLIDUS characters (//).</p>
+
+  <hr><p>This specification defines the URL
   <dfn id=about:legacy-compat><code>about:legacy-compat</code></dfn> as a reserved, though
   unresolvable, <code title="">about:</code> URI, for use in <a href=#syntax-doctype title=syntax-doctype>DOCTYPE</a>s in <a href=#html-documents>HTML
   documents</a> when needed for compatibility with XML tools. <a href=#refsABOUT>[ABOUT]</a></p>
@@ -5708,8 +5777,6 @@
   <a href="#the-document's-address">the document's address</a> of <a href=#an-iframe-srcdoc-document title="an iframe srcdoc
   document"><code>iframe</code> <code title=attr-iframe-srcdoc>srcdoc</code> documents</a>. <a href=#refsABOUT>[ABOUT]</a></p>
 
-  </div>
-
   <p class=note>The term "URL" in this specification is used in a
   manner distinct from the precise technical meaning it is given in
   RFC 3986. Readers familiar with that RFC will find it easier to read

Modified: index
===================================================================
--- index	2010-04-05 22:52:20 UTC (rev 4973)
+++ index	2010-04-06 00:08:11 UTC (rev 4974)
@@ -185,7 +185,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
    <hgroup><h1>HTML5 (including next generation additions still in development)</h1>
-    <h2 class="no-num no-toc">Draft Standard — 5 April 2010</h2>
+    <h2 class="no-num no-toc">Draft Standard — 6 April 2010</h2>
    </hgroup><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>
    <!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
@@ -5507,38 +5507,35 @@
 
   <h4 id=terminology-0><span class=secno>2.5.1 </span>Terminology</h4>
 
+  <!-- see also: svn diff -r3244:3245 source -->
+
   <p>A <dfn id=url>URL</dfn> is a string used to identify a resource.</p>
 
-  <p>A <a href=#url>URL</a> is a <dfn id=valid-url>valid URL</dfn> if it is a
-  <span>valid Web address</span> as defined by the Web addresses
-  specification. <a href=#refsWEBADDRESSES>[WEBADDRESSES]</a></p>
+  <p>A <a href=#url>URL</a> is a <dfn id=valid-url>valid URL</dfn> if at least one of
+  the following conditions holds:</p>
 
-  <p>A <a href=#url>URL</a> is a <dfn id=valid-non-empty-url>valid non-empty URL</dfn> if it is a
-  <a href=#valid-url>valid URL</a> but it is not the empty string.</p>
+  <ul><li><p>The <a href=#url>URL</a> is a valid URI reference <a href=#refsRFC3986>[RFC3986]</a>.</li>
 
-  <p>A <a href=#url>URL</a> is an <dfn id=absolute-url>absolute URL</dfn> if it is an
-  <span>absolute Web address</span> as defined by the Web addresses
-  specification. <a href=#refsWEBADDRESSES>[WEBADDRESSES]</a></p>
+   <li><p>The <a href=#url>URL</a> is a valid IRI reference and it has no
+   query component. <a href=#refsRFC3987>[RFC3987]</a></li>
 
-  <p>An <a href=#absolute-url>absolute URL</a> is a <dfn id=hierarchical-url>hierarchical URL</dfn> if,
-  when <a href=#parse-a-url title="parse a url">parsed</a>, there is a character
-  immediately after the <a href=#url-scheme title=url-scheme><scheme></a>
-  component and it is a U+002F SOLIDUS character (/).</p>
+   <li><p>The <a href=#url>URL</a> is a valid IRI reference and its query
+   component contains no unescaped non-ASCII characters. <a href=#refsRFC3987>[RFC3987]</a></li>
 
-  <p>An <a href=#absolute-url>absolute URL</a> is an <dfn id=authority-based-url>authority-based URL</dfn>
-  if, when <a href=#parse-a-url title="parse a url">parsed</a>, there are two
-  characters immediately after the <a href=#url-scheme title=url-scheme><scheme></a> component and they are both
-  U+002F SOLIDUS characters (//).</p>
+   <li><p>The <a href=#url>URL</a> is a valid IRI reference and the <a href="#document's-character-encoding" title="document's character encoding">character encoding</a> of
+   the URL's <code><a href=#document>Document</a></code> is UTF-8 or UTF-16. <a href=#refsRFC3987>[RFC3987]</a></li>
 
+  </ul><p>A <a href=#url>URL</a> is a <dfn id=valid-non-empty-url>valid non-empty URL</dfn> if it is a
+  <a href=#valid-url>valid URL</a> but it is not the empty string.</p>
+
   <div class=impl>
 
   <p>To <dfn id=parse-a-url>parse a URL</dfn> <var title="">url</var> into its
-  component parts, the user agent must use the <span>parse a Web
-  address</span> algorithm defined by the Web addresses
-  specification. <a href=#refsWEBADDRESSES>[WEBADDRESSES]</a></p>
+  component parts, the user agent must use the <span class=XXX>parse
+  an address</span> algorithm defined by the IRI specification. <a href=#refsRFC3987>[RFC3987]</a></p>
 
-  <p>Parsing a URL results in the following components, again as
-  defined by the Web addresses specification:</p>
+  <p>Parsing a URL can fail. If it does not, then results in the
+  following components, again as defined by the IRI specification:</p>
 
   <ul class=brief><li><dfn id=url-scheme title=url-scheme><scheme></dfn></li>
    <li><dfn id=url-host title=url-host><host></dfn></li>
@@ -5548,54 +5545,126 @@
    <li><dfn id=url-query title=url-query><query></dfn></li>
    <li><dfn id=url-fragment title=url-fragment><fragment></dfn></li>
    <li><dfn id=url-host-specific title=url-host-specific><host-specific></dfn></li>
-  </ul><p>To <dfn id=resolve-a-url>resolve a URL</dfn> to an <a href=#absolute-url>absolute URL</a>
+  </ul><hr><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 <span>resolve a Web address</span>
-  algorithm defined by the Web addresses specification. <a href=#refsWEBADDRESSES>[WEBADDRESSES]</a></p>
+  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>
 
-  <p>The <dfn id=document-base-url>document base URL</dfn> of a <code><a href=#document>Document</a></code>
-  object is the <a href=#absolute-url>absolute URL</a> obtained by running these
-  substeps:</p>
+  <ol><li><p>Let <var title="">url</var> be the <a href=#url>URL</a> being
+   resolved.</li>
 
-  <ol><li><p>Let <var title="">fallback base url</var> be <a href="#the-document's-address">the
-   document's address</a>.</li>
+   <li>
 
+    <p>Let <var title="">encoding</var> be determined as follows:</p>
+
+    <dl class=switch><dt>If the URL had a character encoding defined when the URL was
+     created or defined</dt>
+
+     <dd>The URL character encoding is as defined.</dd>
+
+     <dt>If the URL came from a script (e.g. as an argument to a
+     method)</dt>
+
+     <dd>The URL character encoding is the <a href="#script's-url-character-encoding">script's URL character
+     encoding</a>.</dd>
+
+     <dt>If the URL came from a DOM node (e.g. from an element)</dt>
+
+     <dd>The node has a <code><a href=#document>Document</a></code>, and the URL character
+     encoding is the <a href="#document's-character-encoding">document's character encoding</a>.</dd>
+
+    </dl></li>
+
+   <li><p>If <var title="">encoding</var> is a UTF-16 encoding, then
+   change the value of <var title="">encoding</var> to UTF-8.</li>
+
    <li>
 
-    <!-- http://www.hixie.ch/tests/adhoc/html/navigation/javascript-url/ -->
+    <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>
 
-    <!-- this should be tested in the case of a browsing context that
-    was navigated to about:blank after having been elsewhere, as
-    opposed to the about:blank used at the time of the browsing
-    context's creation. -->
+    <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><a href=#document>Document</a></code> that
+    owns the element. <a href=#refsXMLBASE>[XMLBASE]</a></p>
 
-    <p>If <var title="">fallback base url</var> is
-    <code><a href=#about:blank>about:blank</a></code>, and the <code><a href=#document>Document</a></code>'s
-    <a href=#browsing-context>browsing context</a> has a <a href=#creator-browsing-context>creator browsing
-    context</a>, then let <var title="">fallback base url</var>
-    be the <a href=#document-base-url>document base URL</a> of the <a href=#creator-document>creator
-    <code>Document</code></a> instead.</p>
+    <p>For the purposes of the XML Base specification, user agents
+    must act as if all <code><a href=#document>Document</a></code> objects represented XML
+    documents.</p>
 
-   </li>
+    <p class=note>It is possible for <code title=attr-xml-base><a href=#the-xml:base-attribute-(xml-only)>xml:base</a></code> attributes to be present
+    even in HTML fragments, as such attributes can be added
+    dynamically using script. (Such scripts would not be conforming,
+    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>
 
-   <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>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 <var title="">fallback base
-   url</var>.</li>
+    <p>The <dfn id=document-base-url>document base URL</dfn> of a <code><a href=#document>Document</a></code>
+    object is the <a href=#absolute-url>absolute URL</a> obtained by running these
+    substeps:</p>
 
-   <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><p>Let <var title="">fallback base url</var> be <a href="#the-document's-address">the
+     document's address</a>.</li>
 
-   <li><p><a href=#resolve-a-url title="resolve a URL">Resolve</a> <var title="">url</var> relative to <var title="">fallback base
-   url</var> (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>
 
-   <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 <var title="">fallback base url</var>.</li>
+      <!-- http://www.hixie.ch/tests/adhoc/html/navigation/javascript-url/ -->
 
-  </ol><p>This specification defines the URL
+      <!-- this should be tested in the case of a browsing context that
+      was navigated to about:blank after having been elsewhere, as
+      opposed to the about:blank used at the time of the browsing
+      context's creation. -->
+
+      <p>If <var title="">fallback base url</var> is
+      <code><a href=#about:blank>about:blank</a></code>, and the <code><a href=#document>Document</a></code>'s
+      <a href=#browsing-context>browsing context</a> has a <a href=#creator-browsing-context>creator browsing
+      context</a>, then let <var title="">fallback base url</var>
+      be the <a href=#document-base-url>document base URL</a> of the <a href=#creator-document>creator
+      <code>Document</code></a> instead.</p>
+
+     </li>
+
+     <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>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 <var title="">fallback base
+     url</var>.</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>
+
+     <li><p><a href=#resolve-a-url title="resolve a URL">Resolve</a> <var title="">url</var> relative to <var title="">fallback base
+     url</var> (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 <var title="">fallback base url</var>.</li>
+
+    </ol></li>
+
+   <li><p>Return the result of applying the <span class=XXX>resolve
+   an address</span> algorithm defined by the IRI specification to
+   resolve <var title="">url</var> relative to <var title="">base</var> using encoding <var title="">encoding</var>. <a href=#refsRFC3987>[RFC3987]</a></li>
+
+  </ol></div>
+
+  <p>A <a href=#url>URL</a> is an <dfn id=absolute-url>absolute URL</dfn> if <a href=#resolve-a-url title="resolve a url">resolving</a> it results in the same output
+  regardless of what it is resolved relative to, and that output is
+  not a failure.</p>
+
+  <p>An <a href=#absolute-url>absolute URL</a> is a <dfn id=hierarchical-url>hierarchical URL</dfn> if,
+  when <a href=#resolve-a-url title="resolve a url">resolved</a> and then <a href=#parse-a-url title="parse a url">parsed</a>, there is a character immediately
+  after the <a href=#url-scheme title=url-scheme><scheme></a> component
+  and it is a U+002F SOLIDUS character (/).</p>
+
+  <p>An <a href=#absolute-url>absolute URL</a> is an <dfn id=authority-based-url>authority-based URL</dfn>
+  if, when <a href=#resolve-a-url title="resolve a url">resolved</a> and then <a href=#parse-a-url title="parse a url">parsed</a>, there are two characters
+  immediately after the <a href=#url-scheme title=url-scheme><scheme></a>
+  component and they are both U+002F SOLIDUS characters (//).</p>
+
+  <hr><p>This specification defines the URL
   <dfn id=about:legacy-compat><code>about:legacy-compat</code></dfn> as a reserved, though
   unresolvable, <code title="">about:</code> URI, for use in <a href=#syntax-doctype title=syntax-doctype>DOCTYPE</a>s in <a href=#html-documents>HTML
   documents</a> when needed for compatibility with XML tools. <a href=#refsABOUT>[ABOUT]</a></p>
@@ -5606,8 +5675,6 @@
   <a href="#the-document's-address">the document's address</a> of <a href=#an-iframe-srcdoc-document title="an iframe srcdoc
   document"><code>iframe</code> <code title=attr-iframe-srcdoc>srcdoc</code> documents</a>. <a href=#refsABOUT>[ABOUT]</a></p>
 
-  </div>
-
   <p class=note>The term "URL" in this specification is used in a
   manner distinct from the precise technical meaning it is given in
   RFC 3986. Readers familiar with that RFC will find it easier to read
@@ -83012,11 +83079,6 @@
    Guidelines (WCAG) 2.0</a></cite>, B. Caldwell, M. Cooper, L. Reid,
    G. Vanderheiden. W3C.</dd>
 
-   <dt id=refsWEBADDRESSES>[WEBADDRESSES]</dt>
-   <dd><cite><a href=http://www.w3.org/html/wg/href/draft>Web
-   addresses in HTML5</a></cite>, D. Connolly,
-   C. Sperberg-McQueen.</dd>
-
    <dt id=refsWEBIDL>[WEBIDL]</dt>
    <!--
    <dd><cite><a href="http://www.w3.org/TR/WebIDL/">Web

Modified: source
===================================================================
--- source	2010-04-05 22:52:20 UTC (rev 4973)
+++ source	2010-04-06 00:08:11 UTC (rev 4974)
@@ -5072,39 +5072,44 @@
 
   <h4>Terminology</h4>
 
+  <!-- see also: svn diff -r3244:3245 source -->
+
   <p>A <dfn>URL</dfn> is a string used to identify a resource.</p>
 
-  <p>A <span>URL</span> is a <dfn>valid URL</dfn> if it is a
-  <span>valid Web address</span> as defined by the Web addresses
-  specification. <a href="#refsWEBADDRESSES">[WEBADDRESSES]</a></p>
+  <p>A <span>URL</span> is a <dfn>valid URL</dfn> if at least one of
+  the following conditions holds:</p>
 
-  <p>A <span>URL</span> is a <dfn>valid non-empty URL</dfn> if it is a
-  <span>valid URL</span> but it is not the empty string.</p>
+  <ul>
 
-  <p>A <span>URL</span> is an <dfn>absolute URL</dfn> if it is an
-  <span>absolute Web address</span> as defined by the Web addresses
-  specification. <a href="#refsWEBADDRESSES">[WEBADDRESSES]</a></p>
+   <li><p>The <span>URL</span> is a valid URI reference <a
+   href="#refsRFC3986">[RFC3986]</a>.</p></li>
 
-  <p>An <span>absolute URL</span> is a <dfn>hierarchical URL</dfn> if,
-  when <span title="parse a url">parsed</span>, there is a character
-  immediately after the <span title="url-scheme"><scheme></span>
-  component and it is a U+002F SOLIDUS character (/).</p>
+   <li><p>The <span>URL</span> is a valid IRI reference and it has no
+   query component. <a href="#refsRFC3987">[RFC3987]</a></p></li>
 
-  <p>An <span>absolute URL</span> is an <dfn>authority-based URL</dfn>
-  if, when <span title="parse a url">parsed</span>, there are two
-  characters immediately after the <span
-  title="url-scheme"><scheme></span> component and they are both
-  U+002F SOLIDUS characters (//).</p>
+   <li><p>The <span>URL</span> is a valid IRI reference and its query
+   component contains no unescaped non-ASCII characters. <a
+   href="#refsRFC3987">[RFC3987]</a></p></li>
 
+   <li><p>The <span>URL</span> is a valid IRI reference and the <span
+   title="document's character encoding">character encoding</span> of
+   the URL's <code>Document</code> is UTF-8 or UTF-16. <a
+   href="#refsRFC3987">[RFC3987]</a></p></li>
+
+  </ul>
+
+  <p>A <span>URL</span> is a <dfn>valid non-empty URL</dfn> if it is a
+  <span>valid URL</span> but it is not the empty string.</p>
+
   <div class="impl">
 
   <p>To <dfn>parse a URL</dfn> <var title="">url</var> into its
-  component parts, the user agent must use the <span>parse a Web
-  address</span> algorithm defined by the Web addresses
-  specification. <a href="#refsWEBADDRESSES">[WEBADDRESSES]</a></p>
+  component parts, the user agent must use the <span class="XXX">parse
+  an address</span> algorithm defined by the IRI specification. <a
+  href="#refsRFC3987">[RFC3987]</a></p>
 
-  <p>Parsing a URL results in the following components, again as
-  defined by the Web addresses specification:</p>
+  <p>Parsing a URL can fail. If it does not, then results in the
+  following components, again as defined by the IRI specification:</p>
 
   <ul class="brief">
    <li><dfn title="url-scheme"><scheme></dfn></li>
@@ -5115,63 +5120,152 @@
    <li><dfn title="url-query"><query></dfn></li>
    <li><dfn title="url-fragment"><fragment></dfn></li>
    <li><dfn title="url-host-specific"><host-specific></dfn></li>
-  </ul> 
+  </ul>
 
+  <hr>
+
   <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 <span>resolve a Web address</span>
-  algorithm defined by the Web addresses specification. <a
-  href="#refsWEBADDRESSES">[WEBADDRESSES]</a></p>
+  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>
 
-  <p>The <dfn>document base URL</dfn> of a <code>Document</code>
-  object is the <span>absolute URL</span> obtained by running these
-  substeps:</p>
-
   <ol>
 
-   <li><p>Let <var title="">fallback base url</var> be <span>the
-   document's address</span>.</p></li>
+   <li><p>Let <var title="">url</var> be the <span>URL</span> being
+   resolved.</p></li>
 
    <li>
 
-    <!-- http://www.hixie.ch/tests/adhoc/html/navigation/javascript-url/ -->
+    <p>Let <var title="">encoding</var> be determined as follows:</p>
 
-    <!-- this should be tested in the case of a browsing context that
-    was navigated to about:blank after having been elsewhere, as
-    opposed to the about:blank used at the time of the browsing
-    context's creation. -->
+    <dl class="switch">
 
-    <p>If <var title="">fallback base url</var> is
-    <code>about:blank</code>, and the <code>Document</code>'s
-    <span>browsing context</span> has a <span>creator browsing
-    context</span>, then let <var title="">fallback base url</var>
-    be the <span>document base URL</span> of the <span>creator
-    <code>Document</code></span> instead.</p>
+     <dt>If the URL had a character encoding defined when the URL was
+     created or defined</dt>
 
+     <dd>The URL character encoding is as defined.</dd>
+
+     <dt>If the URL came from a script (e.g. as an argument to a
+     method)</dt>
+
+     <dd>The URL character encoding is the <span>script's URL character
+     encoding</span>.</dd>
+
+     <dt>If the URL came from a DOM node (e.g. from an element)</dt>
+
+     <dd>The node has a <code>Document</code>, and the URL character
+     encoding is the <span>document's character encoding</span>.</dd>
+
+    </dl>
+
    </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 <var title="">fallback base
-   url</var>.</p></li>
+   <li><p>If <var title="">encoding</var> is a UTF-16 encoding, then
+   change the value of <var title="">encoding</var> to UTF-8.</p></li>
 
-   <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> <var
-   title="">url</var> relative to <var title="">fallback base
-   url</var> (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>
+    <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>
 
-   <li><p>The <span>document base URL</span> is the result of the
-   previous step if it was successful; otherwise it is <var
-   title="">fallback base url</var>.</p></li>
+    <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. <a href="#refsXMLBASE">[XMLBASE]</a></p>
 
+    <p>For the purposes of the XML Base specification, user agents
+    must act as if all <code>Document</code> objects represented XML
+    documents.</p>
+
+    <p class="note">It is possible for <code
+    title="attr-xml-base">xml:base</code> attributes to be present
+    even in HTML fragments, as such attributes can be added
+    dynamically using script. (Such scripts would not be conforming,
+    however, as <code title="attr-xml-base">xml:base</code> attributes
+    are not allowed in <span>HTML documents</span>.)</p>
+
+    <p>The <dfn>document base URL</dfn> of a <code>Document</code>
+    object is the <span>absolute URL</span> obtained by running these
+    substeps:</p>
+
+    <ol>
+
+     <li><p>Let <var title="">fallback base url</var> be <span>the
+     document's address</span>.</p></li>
+
+     <li>
+
+      <!-- http://www.hixie.ch/tests/adhoc/html/navigation/javascript-url/ -->
+
+      <!-- this should be tested in the case of a browsing context that
+      was navigated to about:blank after having been elsewhere, as
+      opposed to the about:blank used at the time of the browsing
+      context's creation. -->
+
+      <p>If <var title="">fallback base url</var> is
+      <code>about:blank</code>, and the <code>Document</code>'s
+      <span>browsing context</span> has a <span>creator browsing
+      context</span>, then let <var title="">fallback base url</var>
+      be the <span>document base URL</span> of the <span>creator
+      <code>Document</code></span> instead.</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 <var title="">fallback base
+     url</var>.</p></li>
+
+     <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><p><span title="resolve a URL">Resolve</span> <var
+     title="">url</var> relative to <var title="">fallback base
+     url</var> (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 <var
+     title="">fallback base url</var>.</p></li>
+
+    </ol>
+
+   </li>
+
+   <li><p>Return the result of applying the <span class="XXX">resolve
+   an address</span> algorithm defined by the IRI specification to
+   resolve <var title="">url</var> relative to <var
+   title="">base</var> using encoding <var title="">encoding</var>. <a
+   href="#refsRFC3987">[RFC3987]</a></p></li>
+
   </ol>
 
+  </div>
+
+  <p>A <span>URL</span> is an <dfn>absolute URL</dfn> if <span
+  title="resolve a url">resolving</span> it results in the same output
+  regardless of what it is resolved relative to, and that output is
+  not a failure.</p>
+
+  <p>An <span>absolute URL</span> is a <dfn>hierarchical URL</dfn> if,
+  when <span title="resolve a url">resolved</span> and then <span
+  title="parse a url">parsed</span>, there is a character immediately
+  after the <span title="url-scheme"><scheme></span> component
+  and it is a U+002F SOLIDUS character (/).</p>
+
+  <p>An <span>absolute URL</span> is an <dfn>authority-based URL</dfn>
+  if, when <span title="resolve a url">resolved</span> and then <span
+  title="parse a url">parsed</span>, there are two characters
+  immediately after the <span title="url-scheme"><scheme></span>
+  component and they are both U+002F SOLIDUS characters (//).</p>
+
+  <hr>
+
   <p>This specification defines the URL
   <dfn><code>about:legacy-compat</code></dfn> as a reserved, though
   unresolvable, <code title="">about:</code> URI, for use in <span
@@ -5187,8 +5281,6 @@
   title="attr-iframe-srcdoc">srcdoc</code> documents</span>. <a
   href="#refsABOUT">[ABOUT]</a></p>
 
-  </div>
-
   <p class="note">The term "URL" in this specification is used in a
   manner distinct from the precise technical meaning it is given in
   RFC 3986. Readers familiar with that RFC will find it easier to read




More information about the Commit-Watchers mailing list