HTML Standard Tracker

Diff (omit for latest revision)
Filter

Short URL: http://html5.org/r/2468

File a bug

SVNBugCommentTime (UTC)
2468Define 'the document's address'.2008-11-27 02:00
Index: source
===================================================================
--- source	(revision 2467)
+++ source	(revision 2468)
@@ -3567,22 +3567,21 @@
    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><!-- XXXDOCURL -->.</p></li>
+   address</span>.</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> the <var
-   title="">url</var> URL, using <span>the document's
-   address</span><!-- XXXDOCURL --> as the <span>base URL</span>
-   (thus, the <code>base</code> <code
-   title="attr-base-href">href</code> attribute isn't affect by <code
-   title="attr-xml-base">xml:base</code> attributes).</p></li>
+   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><!-- XXXDOCURL -->.</p></li>
+   document's address</span>.</p></li>
 
   </ol>
 
@@ -5568,8 +5567,13 @@
   <code>Document</code> object. <a
   href="#refsDOM3CORE">[DOM3CORE]</a></p>
 
+  <p><dfn>The document's address</dfn> is an <span>absolute URL</span>
+  that is set when the <code>Document</code> is created.</p>
 
-  <h4>Documents in the DOM</h4>
+  <p>When a <code>Document</code> is created by a script using the
+  <code title="">createDocument()</code> API, <span>the document's
+  address</span> is the same as <span>the document's address</span> of
+  the <span>script document context</span> of that script.</p>
 
   <p><code>Document</code> objects are assumed to be <dfn>XML
   documents</dfn> unless they are flagged as being <dfn>HTML
@@ -5586,6 +5590,10 @@
   <span title="HTML documents">HTML document</span> by calling <code
   title="dom-document-open">document.open()</code> on it.</p>
 
+
+
+  <h4>Documents in the DOM</h4>
+
   <p>All <code>Document</code> objects (in user agents implementing
   this specification) must also implement the
   <code>HTMLDocument</code> interface, available using
@@ -5677,16 +5685,14 @@
   <h4><dfn>Resource metadata management</dfn></h4>
 
   <p>The <dfn title="dom-document-URL"><code>URL</code></dfn>
-  attribute must return <span>the document's address</span><!--
-  XXXDOCURL xref -->.</p>
+  attribute must return <span>the document's address</span>.</p>
 
-
   <p>The <dfn
   title="dom-document-referrer"><code>referrer</code></dfn> attribute
   must return either the <span title="the document's
-  address">address</span><!-- XXXDOXURL xref --> of the <span>active
-  document</span> of the <span>source browsing context</span> at the
-  time the navigation was started (that is, the page which <span
+  address">address</span> of the <span>active document</span> of the
+  <span>source browsing context</span> at the time the navigation was
+  started (that is, the page which <span
   title="navigate">navigated</span> the <span>browsing context</span>
   to the current document), or the empty string if there is no such
   originating page, or if the UA has been configured not to report
@@ -5705,7 +5711,6 @@
   title="">https:</code> page to an <code title="">http:</code>
   page).</p>
 
-
   <hr>
 
   <p>The <dfn title="dom-document-cookie"><code>cookie</code></dfn>
@@ -5719,24 +5724,23 @@
   <p id="sandboxCookies">On getting, if the <span>sandboxed origin
   browsing context flag</span> is set on the <span>browsing
   context</span> of the document, the user agent must raise a
-  <code>SECURITY_ERR</code> exception. Otherwise, it must return the same
-  string as the value of the <code title="">Cookie</code> HTTP header
-  it would include if <span title="fetch">fetching</span> the resource
-  indicated by <span>the document's address</span><!-- XXXDOCURL -->
-  over HTTP, as per RFC 2109 section 4.3.4 or later specifications. <a
+  <code>SECURITY_ERR</code> exception. Otherwise, it must return the
+  same string as the value of the <code title="">Cookie</code> HTTP
+  header it would include if <span title="fetch">fetching</span> the
+  resource indicated by <span>the document's address</span> over HTTP,
+  as per RFC 2109 section 4.3.4 or later specifications. <a
   href="#refsRFC2109">[RFC2109]</a> <a
   href="#refsRFC2965">[RFC2965]</a></p>
 
   <p>On setting, if the <span>sandboxed origin browsing context
   flag</span> is set on the <span>browsing context</span> of the
   document, the user agent must raise a <code>SECURITY_ERR</code>
-  exception. Otherwise, the user agent must act as it would
-  when processing cookies if it had just attempted to
-  <span>fetch</span> <span>the document's address</span><!-- XXXDOCURL
-  --> over HTTP, and had received a response with a
-  <code>Set-Cookie</code> header whose value was the specified value,
-  as per RFC 2109 sections 4.3.1, 4.3.2, and 4.3.3 or later
-  specifications. <a href="#refsRFC2109">[RFC2109]</a> <a
+  exception. Otherwise, the user agent must act as it would when
+  processing cookies if it had just attempted to <span>fetch</span>
+  <span>the document's address</span> over HTTP, and had received a
+  response with a <code>Set-Cookie</code> header whose value was the
+  specified value, as per RFC 2109 sections 4.3.1, 4.3.2, and 4.3.3 or
+  later specifications. <a href="#refsRFC2109">[RFC2109]</a> <a
   href="#refsRFC2965">[RFC2965]</a></p>
 
   <p class="note">Since the <code
@@ -5745,7 +5749,6 @@
   help manage which cookies are sent to which parts of the site, and
   are not in any way a security feature.</p>
 
-
   <hr> 
 
   <p>The <dfn
@@ -16411,7 +16414,7 @@
 
   <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><!-- XXX xref --> page.</p>
+  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
@@ -32379,8 +32382,7 @@
    <li>
 
     <p>If <var title="">action</var> is the empty string, let <var
-    title="">action</var> be <span>the document's address</span><!--
-    XXXDOCURL -->.</p>
+    title="">action</var> be <span>the document's address</span>.</p>
 
     <p class="note">This step is a willful violation of RFC 3986. <a
     href="#refsRFC3986">[RFC3986]</a></p>
@@ -35453,8 +35455,7 @@
   confirm the user's intent to use the current site in a standalone
   fashion, and, provided the user's intent is confirmed, offer the
   user a way to make the resource identified by <span>the document's
-  address</span><!-- XXXDOCURL xref --> available in such a
-  fashion.</p>
+  address</span> available in such a fashion.</p>
 
   <p class="warning">The confirmation is needed because it is
   relatively easy to trick users into activating buttons. The
@@ -36543,16 +36544,15 @@
 
   <p>When a <span>browsing context</span> is first created, it must be
   created with a single <code>Document</code> in its session history,
-  whose <span title="the document's address">address</span><!--
-  XXXDOCURL --> is <code>about:blank</code><!-- XXX xref -->, which is
-  marked as being an <span title="HTML documents">HTML
-  document</span>, and whose <span title="document's character
-  encoding">character encoding</span> is UTF-8. The
-  <code>Document</code> must have a single child <code>html</code>
-  node, which itself has a single child <code>body</code> node. If the
-  <span>browsing context</span> is created specifically to be
-  immediately navigated, then that initial navigation will have
-  <span>replacement enabled</span>.</p>
+  whose <span title="the document's address">address</span> is
+  <code>about:blank</code>, which is marked as being an <span
+  title="HTML documents">HTML document</span>, and whose <span
+  title="document's character encoding">character encoding</span> is
+  UTF-8. The <code>Document</code> must have a single child
+  <code>html</code> node, which itself has a single child
+  <code>body</code> node. If the <span>browsing context</span> is
+  created specifically to be immediately navigated, then that initial
+  navigation will have <span>replacement enabled</span>.</p>
 
   <p id="about-blank-origin">The <span>origin</span> of the
   <code>about:blank</code> <code>Document</code> is set when the
@@ -37091,8 +37091,8 @@
   <span>valid URL</span> for a page to load in the browsing
   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>about:blank</code><!-- XXX xref -->". The argument must be
-  <span title="resolve a url">resolved</span> to an <span>absolute
+  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>
 
   <p>The second argument, <var title="">target</var>, specifies the
@@ -37399,8 +37399,9 @@
      server-based naming authority</dt>
 
      <dd>The <span>origin</span> is the <span>origin</span> of the
-     <span title="the document's address">address</span><!-- XXXDOCURL
-     --> of the <code>Document</code> or image.</dd>
+     <span title="the document's address">address</span> of the
+     <code>Document</code> or the <span>URL</span> of the image, as
+     appropriate.</dd>
 
 
      <dt>If a <code>Document</code> or image was generated from a
@@ -37422,7 +37423,7 @@
 
 
      <dt>If a <code>Document</code> has the <span title="the
-     document's address">address</span><!-- XXXDOCURL -->
+     document's address">address</span>
      "<code>about:blank</code>"</dt>
 
      <dd>The <span>origin</span> of the <code>Document</code> is <a
@@ -41418,8 +41419,8 @@
      steps.</li>
 
      <li>Compare the resulting <span>absolute URL</span> to <span>the
-     document's address</span><!-- XXXDOCURL -->. If any part of these
-     two <span title="URL">URLs</span> differ other than the <span
+     document's address</span>. If any part of these two <span
+     title="URL">URLs</span> differ other than the <span
      title="url-path">&lt;path&gt;</span>, <span
      title="url-query">&lt;query&gt;</span>, and <span
      title="url-fragment">&lt;fragment&gt;</span> components, then
@@ -41583,9 +41584,8 @@
 
   <p>The <dfn title="dom-location-href"><code>href</code></dfn>
   attribute must return <span title="the document's address">the
-  address</span><!-- XXXDOCURL --> of the page represented by the
-  associated <code>Document</code> object, as an <span>absolute
-  URL</span>.</p>
+  address</span> of the associated <code>Document</code> object, as an
+  <span>absolute URL</span>.</p>
 
   <p>On setting, <!--XXX Mozilla does this, but IE doesn't. What
   should we do?: the behavior depends on the context in which the
@@ -41647,13 +41647,13 @@
   title="dom-location-hash"><code>hash</code></dfn>. These must follow
   the rules given for URL decomposition attributes, with the <span
   title="concept-uda-input">input</span> being <span title="the
-  document's address">the address</span><!-- XXXDOCURL --> of the page
-  represented by the associated <code>Document</code> object, as an
-  <span>absolute URL</span> (same as the <code
-  title="dom-location-href">href</code> attribute), and the <span
-  title="concept-uda-setter">common setter action</span> being the
-  same as setting the <code title="dom-location-href">href</code>
-  attribute to the new output value.</p>
+  document's address">the address</span> of the associated
+  <code>Document</code> object, as an <span>absolute URL</span> (same
+  as the <code title="dom-location-href">href</code> attribute), and
+  the <span title="concept-uda-setter">common setter action</span>
+  being the same as setting the <code
+  title="dom-location-href">href</code> attribute to the new output
+  value.</p>
 
   <hr>
 
@@ -41789,10 +41789,9 @@
 
    <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><!--XXXDOCURL--> of the <span>active
-   document</span> of the <span>browsing context</span> being
-   navigated, ignoring any <span
+   the <span title="the document's address">address</span> of the
+   <span>active document</span> of the <span>browsing context</span>
+   being navigated, ignoring any <span
    title="url-fragment">&lt;fragment&gt;</span> components of those
    <span title="URL">URLs</span>, and the new resource is to be
    fetched using HTTP GET or equivalent, then <span
@@ -41899,11 +41898,10 @@
     URL of the resource that was requested (the one that matched the
     <span title="concept-appcache-fallback-ns">fallback
     namespace</span>), not the fallback resource, as the resource's
-    <span title="the document's address">address</span><!-- XXXDOCURL
-    -->. However, the user agent may indicate to the user that the
-    original page load failed, that the page used was a fallback
-    resource, and what the URL of the fallback resource actually
-    is.</p>
+    <span title="the document's address">address</span>. However, the
+    user agent may indicate to the user that the original page load
+    failed, that the page used was a fallback resource, and what the
+    URL of the fallback resource actually is.</p>
 
    </li>
 
@@ -41971,6 +41969,18 @@
 
     </dl>
 
+    <p>Any <code>Document</code> created by these steps must have its
+    <span title="the document's address">address</span> set to the
+    <span>URL</span> that was originally to be <span
+    title="fetch">fetched</span>, ignoring any other data that was
+    used to obtain the resource (e.g. the entity body in the case of a
+    POST submission is not part of <span>the document's
+    address</span>, nor is the URL of the fallback resource in the
+    case of the original load having failed and that URL having been
+    found to match a <span
+    title="concept-appcache-fallback-ns">fallback
+    namespace</span>).</p>
+
    </li>
 
    <li id="navigate-non-Document"><p><i>Non-document content</i>: If,
@@ -42324,7 +42334,7 @@
   identifier, then the user agent must <span>update the session
   history with the new page</span>, where "the new page" has the same
   <code>Document</code> as before but with the URL having the newly
-  specified fragment identifier.</p><!-- XXXDOCURL ? -->
+  specified fragment identifier.</p>
 
   <p>Part of that algorithm involves the user agent having to
   <span>scroll to the fragment identifier</span>, which is the
@@ -43945,29 +43955,28 @@
 
   <dl class="switch">
 
-   <dt>If both the <span title="the document's
-   address">address</span><!-- XXXDOCURL --> of the
-   <code>Document</code> object containing the hyperlink being audited
-   and the ping URL have the <span>same origin</span></dt>
+   <dt>If both the <span title="the document's address">address</span>
+   of the <code>Document</code> object containing the hyperlink being
+   audited and the ping URL have the <span>same origin</span></dt>
 
    <dd>The request must include a <code title="">Ping-From</code> HTTP
    header with, as its value, the <span title="the document's
-   address">address</span><!-- XXXDOCURL --> of the document
-   containing the hyperlink, and a <code title="">Ping-To</code> HTTP
-   header with, as its value, the address of the <span>absolute
-   URL</span> of the target of the hyperlink. The request must not
-   include a <code title="">Referer</code> HTTP header.</dd>
+   address">address</span> of the document containing the hyperlink,
+   and a <code title="">Ping-To</code> HTTP header with, as its value,
+   the address of the <span>absolute URL</span> of the target of the
+   hyperlink. The request must not include a <code
+   title="">Referer</code> HTTP header. <!-- why not? --></dd>
 
    <dt>Otherwise, if the origins are different, but the document
    containing the hyperlink being audited was not retrieved over an
-   encrypted connection</dt>
+   encrypted connection</dt> <!-- why different? -->
 
    <dd>The request must include a <code title="">Referer</code> HTTP
-   header [sic] with, as its value, the location of the document
-   containing the hyperlink, a <code title="">Ping-From</code> HTTP
-   header with the same value, and a <code title="">Ping-To</code>
-   HTTP header with, as its value, the address of the target of the
-   hyperlink.</dd>
+   header [sic] with, as its value, the <span title="the document's
+   address">address</span> of the document containing the hyperlink, a
+   <code title="">Ping-From</code> HTTP header with the same value,
+   and a <code title="">Ping-To</code> HTTP header with, as its value,
+   the address of the target of the hyperlink.</dd>
 
    <dt>Otherwise, the origins are different and the document
    containing the hyperlink being audited was retrieved over an

|