Permalink
Browse files

[e] (0) Move things more towards what people want (details to be sort…

…ed out later by change proposal, I expect).

git-svn-id: http://svn.whatwg.org/webapps@4974 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
Hixie committed Apr 6, 2010
1 parent 464870f commit befc98ca674669d9daf5ed0d61e61e166450eb5a
Showing with 403 additions and 182 deletions.
  1. +125 −58 complete.html
  2. +125 −63 index
  3. +153 −61 source
View
@@ -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 &mdash; 5 April 2010</h2>
<h2 class="no-num no-toc">Draft Standard &mdash; 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 @@ <h3 id=urls><span class=secno>2.5 </span>URLs</h3>
<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>&lt;scheme&gt;</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>&lt;scheme&gt;</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>&lt;scheme&gt;</dfn></li>
<li><dfn id=url-host title=url-host>&lt;host&gt;</dfn></li>
@@ -5650,54 +5647,126 @@ <h4 id=terminology-0><span class=secno>2.5.1 </span>Terminology</h4>
<li><dfn id=url-query title=url-query>&lt;query&gt;</dfn></li>
<li><dfn id=url-fragment title=url-fragment>&lt;fragment&gt;</dfn></li>
<li><dfn id=url-host-specific title=url-host-specific>&lt;host-specific&gt;</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>
<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 determined as follows:</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>
<dl class=switch><dt>If the URL had a character encoding defined when the URL was
created or defined</dt>
<ol><li><p>Let <var title="">fallback base url</var> be <a href="#the-document's-address">the
document's address</a>.</li>
<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>
<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="">fallback base url</var> be <a href="#the-document's-address">the
document's address</a>.</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>
<!-- 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><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>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>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>
<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>
</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>
<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>
<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>&lt;scheme&gt;</a> component
and it is a U+002F SOLIDUS character (/).</p>
</ol><p>This specification defines the URL
<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>&lt;scheme&gt;</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 @@ <h4 id=terminology-0><span class=secno>2.5.1 </span>Terminology</h4>
<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
Oops, something went wrong.

0 comments on commit befc98c

Please sign in to comment.