Skip to content

Commit

Permalink
[at] (0) Revamp <address>'s semantics to make more sense given <artic…
Browse files Browse the repository at this point in the history
…le>'s semantics.

git-svn-id: http://svn.whatwg.org/webapps@3267 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jun 16, 2009
1 parent 5828b8d commit a2aca7c
Show file tree
Hide file tree
Showing 2 changed files with 119 additions and 30 deletions.
70 changes: 56 additions & 14 deletions index
Expand Up @@ -12049,9 +12049,10 @@ isn't his only passion. He also enjoys other pleasures.&lt;/p&gt;
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
</dl><p>The <code><a href=#the-address-element>address</a></code> element <a href=#represents>represents</a> the
contact information for the section it <a href=#applyToSection>applies</a> to. If it applies to <a href=#the-body-element-0>the
body element</a>, then it instead applies to the document as a
whole.</p>
contact information for its nearest <code><a href=#the-article-element>article</a></code> or
<code><a href=#the-body-element>body</a></code> element ancestor. IF that is <a href=#the-body-element-0>the body
element</a>, then the contact information applies to the document
as a whole.</p>

<div class=example>
<p>For example, a page at the W3C Web site related to HTML might
Expand All @@ -12065,8 +12066,9 @@ isn't his only passion. He also enjoys other pleasures.&lt;/p&gt;

<p>The <code><a href=#the-address-element>address</a></code> element must not be used to represent
arbitrary addresses (e.g. postal addresses), unless those addresses
are contact information for the section. (The <code><a href=#the-p-element>p</a></code> element
is the appropriate element for marking up such addresses.)</p>
are in fact the relevant contact information. (The <code><a href=#the-p-element>p</a></code>
element is the appropriate element for marking up postal addresses
in general.)</p>

<p>The <code><a href=#the-address-element>address</a></code> element must not contain information
other than contact information.</p>
Expand All @@ -12078,18 +12080,58 @@ isn't his only passion. He also enjoys other pleasures.&lt;/p&gt;
</div>

<p>Typically, the <code><a href=#the-address-element>address</a></code> element would be included
with other information in a <code><a href=#the-footer-element>footer</a></code> element.</p>
along with other information in a <code><a href=#the-footer-element>footer</a></code> element.</p>

<div class=impl>

<p>To determine the contact information for a <a href=#sectioning-content-0>sectioning
content</a> element (such as a document's <code><a href=#the-body-element>body</a></code>
element, which would give the contact information for the page), UAs
must collect all the <code><a href=#the-address-element>address</a></code> elements that <a href=#applyToSection>apply</a> to that <a href=#sectioning-content-0>sectioning
content</a> element and its ancestor <a href=#sectioning-content-0>sectioning
content</a> elements. The contact information is the collection
of all the information given by those elements.</p> <!-- XXX
exception for nested article elements? -->
<p>The contact information for a node <var title="">node</var> is a
collection of <code><a href=#the-address-element>address</a></code> elements defined by the first
applicable entry from the following list:</p>

<dl class=switch><dt>If <var title="">node</var> is an <code><a href=#the-article-element>article</a></code> element</dt>
<dt>If <var title="">node</var> is a <code><a href=#the-body-element>body</a></code> element</dt>

<dd>

<p>The contact information consists of all the
<code><a href=#the-address-element>address</a></code> elements that have <var title="">node</var>
as an ancestor and do not have another <code><a href=#the-body-element>body</a></code> or
<code><a href=#the-article-element>article</a></code> element ancestor that is a descendant of <var title="">node</var>.</p>

</dd>

<dt>If <var title="">node</var> has an ancestor element that is a <code><a href=#the-article-element>article</a></code> element</dt>
<dt>If <var title="">node</var> has an ancestor element that is a <code><a href=#the-body-element>body</a></code> element</dt>

<dd>

<p>The contact information of <var title="">node</var> is the same
as the contact information of the nearest <code><a href=#the-article-element>article</a></code> or
<code><a href=#the-body-element>body</a></code> element ancestor, whichever is nearest.</p>

</dd>

<dt>If <var title="">node</var>'s <code>Document</code> has <a href=#the-body-element-0 title="the body element">a body element</a></dt>

<dd>

<p>The contact information of <var title="">node</var> is the same
as the contact information <a href=#the-body-element-0>the body element</a> of the
<code>Document</code>.</p>

</dd>

<dt>Otherwise</dt>

<dd>

<p>There is no contact information for <var title="">node</var>.</p>

</dd>

</dl><p>User agents may expose the contact information of a node to the
user, or use it for other purposes, such as indexing sections based
on the sections' contact information.</p>

</div>

Expand Down
79 changes: 63 additions & 16 deletions source
Expand Up @@ -12702,10 +12702,10 @@ isn't his only passion. He also enjoys other pleasures.&lt;/p>
</dl>

<p>The <code>address</code> element <span>represents</span> the
contact information for the section it <a
href="#applyToSection">applies</a> to. If it applies to <span>the
body element</span>, then it instead applies to the document as a
whole.</p>
contact information for its nearest <code>article</code> or
<code>body</code> element ancestor. IF that is <span>the body
element</span>, then the contact information applies to the document
as a whole.</p>

<div class="example">
<p>For example, a page at the W3C Web site related to HTML might
Expand All @@ -12719,8 +12719,9 @@ isn't his only passion. He also enjoys other pleasures.&lt;/p>

<p>The <code>address</code> element must not be used to represent
arbitrary addresses (e.g. postal addresses), unless those addresses
are contact information for the section. (The <code>p</code> element
is the appropriate element for marking up such addresses.)</p>
are in fact the relevant contact information. (The <code>p</code>
element is the appropriate element for marking up postal addresses
in general.)</p>

<p>The <code>address</code> element must not contain information
other than contact information.</p>
Expand All @@ -12732,19 +12733,65 @@ isn't his only passion. He also enjoys other pleasures.&lt;/p>
</div>

<p>Typically, the <code>address</code> element would be included
with other information in a <code>footer</code> element.</p>
along with other information in a <code>footer</code> element.</p>

<div class="impl">

<p>To determine the contact information for a <span>sectioning
content</span> element (such as a document's <code>body</code>
element, which would give the contact information for the page), UAs
must collect all the <code>address</code> elements that <a
href="#applyToSection">apply</a> to that <span>sectioning
content</span> element and its ancestor <span>sectioning
content</span> elements. The contact information is the collection
of all the information given by those elements.</p> <!-- XXX
exception for nested article elements? -->
<p>The contact information for a node <var title="">node</var> is a
collection of <code>address</code> elements defined by the first
applicable entry from the following list:</p>

<dl class="switch">

<dt>If <var title="">node</var> is an <code>article</code> element</dt>
<dt>If <var title="">node</var> is a <code>body</code> element</dt>

<dd>

<p>The contact information consists of all the
<code>address</code> elements that have <var title="">node</var>
as an ancestor and do not have another <code>body</code> or
<code>article</code> element ancestor that is a descendant of <var
title="">node</var>.</p>

</dd>

<dt>If <var title="">node</var> has an ancestor element that is a <code>article</code> element</dt>
<dt>If <var title="">node</var> has an ancestor element that is a <code>body</code> element</dt>

<dd>

<p>The contact information of <var title="">node</var> is the same
as the contact information of the nearest <code>article</code> or
<code>body</code> element ancestor, whichever is nearest.</p>

</dd>

<dt>If <var title="">node</var>'s <code>Document</code> has <span
title="the body element">a body element</span></dt>

<dd>

<p>The contact information of <var title="">node</var> is the same
as the contact information <span>the body element</span> of the
<code>Document</code>.</p>

</dd>

<dt>Otherwise</dt>

<dd>

<p>There is no contact information for <var
title="">node</var>.</p>

</dd>

</dl>

<p>User agents may expose the contact information of a node to the
user, or use it for other purposes, such as indexing sections based
on the sections' contact information.</p>

</div>

Expand Down

0 comments on commit a2aca7c

Please sign in to comment.