Skip to content

Commit

Permalink
[c] (0) Add extra restrictions on <a name>.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@3674 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Aug 25, 2009
1 parent f5b922d commit 34edf28
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 45 deletions.
48 changes: 26 additions & 22 deletions index
Expand Up @@ -5414,9 +5414,9 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<dt><var title="">collection</var>[<var title="">name</var>]</dt>
<dt><var title="">collection</var>(<var title="">name</var>)</dt>
<dd>
<p>Returns the first item with ID or name <var title="">name</var>
<p>Returns the first item with <a href=#concept-id title=concept-id>ID</a> or name <var title="">name</var>
from the collection.</p>
<p>Returns null if no element with that ID or name could be found.</p>
<p>Returns null if no element with that <a href=#concept-id title=concept-id>ID</a> or name could be found.</p>
<p>Only <code><a href=#the-a-element>a</a></code>, <code><a href=#the-applet-element>applet</a></code>, <code><a href=#the-area-element>area</a></code>,
<code><a href=#the-embed-element>embed</a></code>, <code><a href=#the-form-element>form</a></code>, <code><a href=#frame>frame</a></code>,
<code><a href=#frameset>frameset</a></code>, <code><a href=#the-iframe-element>iframe</a></code>, <code><a href=#the-img-element>img</a></code>, and
Expand Down Expand Up @@ -5463,7 +5463,7 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<code><a href=#the-img-element>img</a></code>, or <code><a href=#the-object-element>object</a></code> element with a <code title="">name</code> attribute equal to <var title="">key</var>,
or,</li>

<li>It is an element with an ID <var title="">key</var>.</li>
<li>It is an element with an <a href=#concept-id title=concept-id>ID</a> <var title="">key</var>.</li>

</ul><p>If no such elements are found, then the method must return
null.</p>
Expand Down Expand Up @@ -5513,9 +5513,9 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<dt><var title="">collection</var>[<var title="">name</var>]</dt>
<dt><var title="">collection</var>(<var title="">name</var>)</dt>
<dd>
<p>Returns the item with ID or name <var title="">name</var> from the collection.</p>
<p>Returns the item with <a href=#concept-id title=concept-id>ID</a> or name <var title="">name</var> from the collection.</p>
<p>If there are multiple matching items, then an <code><a href=#htmlallcollection>HTMLAllCollection</a></code> object containing all those elements is returned.</p>
<p>Returns null if no element with that ID or name could be found.</p>
<p>Returns null if no element with that <a href=#concept-id title=concept-id>ID</a> or name could be found.</p>
<p>Only <code><a href=#the-a-element>a</a></code>, <code><a href=#the-applet-element>applet</a></code>, <code><a href=#the-area-element>area</a></code>,
<code><a href=#the-embed-element>embed</a></code>, <code><a href=#the-form-element>form</a></code>, <code><a href=#frame>frame</a></code>,
<code><a href=#frameset>frameset</a></code>, <code><a href=#the-iframe-element>iframe</a></code>, <code><a href=#the-img-element>img</a></code>, and
Expand Down Expand Up @@ -5571,7 +5571,7 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<code><a href=#the-object-element>object</a></code> elements with a <code title="">name</code>
attribute equal to <var title="">key</var>, or,</li>

<li>elements with an ID <var title="">key</var>.</li>
<li>elements with an <a href=#concept-id title=concept-id>ID</a> <var title="">key</var>.</li>

</ul></li>

Expand Down Expand Up @@ -5631,9 +5631,9 @@ interface <dfn id=radionodelist>RadioNodeList</dfn> : <span>NodeList</span> {
<dt><var title="">collection</var>[<var title="">name</var>]</dt>
<dt><var title="">collection</var>(<var title="">name</var>)</dt>
<dd>
<p>Returns the item with ID or <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> <var title="">name</var> from the collection.</p>
<p>Returns the item with <a href=#concept-id title=concept-id>ID</a> or <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> <var title="">name</var> from the collection.</p>
<p>If there are multiple matching items, then a <code><a href=#radionodelist>RadioNodeList</a></code> object containing all those elements is returned.</p>
<p>Returns null if no element with that ID or <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> could be found.</p>
<p>Returns null if no element with that <a href=#concept-id title=concept-id>ID</a> or <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> could be found.</p>
</dd>

<dt><var title="">radioNodeList</var> . <var title="">value</var> [ = <var title="">value</var> ]</dt>
Expand Down Expand Up @@ -5766,9 +5766,9 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E..
<dt><var title="">collection</var>[<var title="">name</var>]</dt>
<dt><var title="">collection</var>(<var title="">name</var>)</dt>
<dd>
<p>Returns the item with ID or <code title=attr-option-name>name</code> <var title="">name</var> from the collection.</p>
<p>Returns the item with <a href=#concept-id title=concept-id>ID</a> or <code title=attr-option-name>name</code> <var title="">name</var> from the collection.</p>
<p>If there are multiple matching items, then a <code>NodeList</code> object containing all those elements is returned.</p>
<p>Returns null if no element with that ID could be found.</p>
<p>Returns null if no element with that <a href=#concept-id title=concept-id>ID</a> could be found.</p>
</dd>

<dt><var title="">collection</var> . <code title=dom-HTMLOptionsCollection-add><a href=#dom-htmloptionscollection-add>add</a></code>(<var title="">element</var> [, <var title="">before</var> ] )</dt>
Expand Down Expand Up @@ -7686,18 +7686,20 @@ interface <dfn id=htmlunknownelement>HTMLUnknownElement</dfn> : <a href=#htmlele
<h5 id=the-id-attribute><span class=secno>3.2.3.1 </span>The <dfn title=attr-id><code>id</code></dfn> attribute</h5>

<p>The <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute
<a href=#represents>represents</a> its element's unique identifier. The value
must be unique in the element's <a href=#home-subtree>home subtree</a> and must
contain at least one character. The value must not contain any <a href=#space-character title="space character">space characters</a>.</p>
<a href=#represents>represents</a> its element's <dfn id=concept-id title=concept-id>unique
identifier (ID)</dfn>. The value must be unique amongst all the IDs
in the element's <a href=#home-subtree>home subtree</a> and must contain at least
one character. The value must not contain any <a href=#space-character title="space
character">space characters</a>.</p>

<!-- space characters are disallowed because space-separated lists
of IDs otherwise would not be able to reach all valid IDs -->

<p class=note>An element's unique identifier can be used for a
variety of purposes, most notably as a way to link to specific parts
of a document using fragment identifiers, as a way to target an
element when scripting, and as a way to style a specific element
from CSS.</p>
<p class=note>An element's <a href=#concept-id title=concept-id>unique
identifier</a> can be used for a variety of purposes, most
notably as a way to link to specific parts of a document using
fragment identifiers, as a way to target an element when scripting,
and as a way to style a specific element from CSS.</p>

<div class=impl>

Expand Down Expand Up @@ -71539,10 +71541,11 @@ time:empty { binding: <i title="">time</i>; }</pre>

<p>Authors should not specify the <code title=attr-a-name><a href=#attr-a-name>name</a></code> attribute on <code><a href=#the-a-element>a</a></code>
elements. If the attribute is present, its value must not be the
empty string. In earlier versions of the language, this attribute
served a similar role as the <code title=attr-id><a href=#the-id-attribute>id</a></code>
attribute. The <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute should be
used instead.</p>
empty string and must not be equal to the value of any of the <a href=#concept-id title=concept-id>IDs</a> in the element's <a href=#home-subtree>home
subtree</a> other than the element's own <a href=#concept-id title=concept-id>ID</a>, if any. If this attribute is present
and the element has an <a href=#concept-id title=concept-id>ID</a>, then the
attribute's value must be equal to the element's <a href=#concept-id title=concept-id>ID</a>. In earlier versions of the language,
this attribute served a similar role as the <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute. The <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute should be used instead.</p>

<p class=note>The <code title=attr-table-summary><a href=#attr-table-summary>summary</a></code>
attribute, defined in the <code><a href=#the-table-element>table</a></code> section, will also
Expand Down Expand Up @@ -74300,6 +74303,7 @@ interface <a href=#htmldocument>HTMLDocument</a> {
Robin Berjon,
Roland Steiner,
Roman Ivanov,
Roy Fielding,
Ryan King,
S. Mike Dierken,
Sam Dutton,
Expand Down
54 changes: 31 additions & 23 deletions source
Expand Up @@ -5153,9 +5153,9 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<dt><var title="">collection</var>[<var title="">name</var>]</dt>
<dt><var title="">collection</var>(<var title="">name</var>)</dt>
<dd>
<p>Returns the first item with ID or name <var title="">name</var>
<p>Returns the first item with <span title="concept-id">ID</span> or name <var title="">name</var>
from the collection.</p>
<p>Returns null if no element with that ID or name could be found.</p>
<p>Returns null if no element with that <span title="concept-id">ID</span> or name could be found.</p>
<p>Only <code>a</code>, <code>applet</code>, <code>area</code>,
<code>embed</code>, <code>form</code>, <code>frame</code>,
<code>frameset</code>, <code>iframe</code>, <code>img</code>, and
Expand Down Expand Up @@ -5216,7 +5216,7 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
title="">name</code> attribute equal to <var title="">key</var>,
or,</li>

<li>It is an element with an ID <var title="">key</var>.</li>
<li>It is an element with an <span title="concept-id">ID</span> <var title="">key</var>.</li>

</ul>

Expand Down Expand Up @@ -5272,9 +5272,9 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<dt><var title="">collection</var>[<var title="">name</var>]</dt>
<dt><var title="">collection</var>(<var title="">name</var>)</dt>
<dd>
<p>Returns the item with ID or name <var title="">name</var> from the collection.</p>
<p>Returns the item with <span title="concept-id">ID</span> or name <var title="">name</var> from the collection.</p>
<p>If there are multiple matching items, then an <code>HTMLAllCollection</code> object containing all those elements is returned.</p>
<p>Returns null if no element with that ID or name could be found.</p>
<p>Returns null if no element with that <span title="concept-id">ID</span> or name could be found.</p>
<p>Only <code>a</code>, <code>applet</code>, <code>area</code>,
<code>embed</code>, <code>form</code>, <code>frame</code>,
<code>frameset</code>, <code>iframe</code>, <code>img</code>, and
Expand Down Expand Up @@ -5345,7 +5345,7 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<code>object</code> elements with a <code title="">name</code>
attribute equal to <var title="">key</var>, or,</li>

<li>elements with an ID <var title="">key</var>.</li>
<li>elements with an <span title="concept-id">ID</span> <var title="">key</var>.</li>

</ul>

Expand Down Expand Up @@ -5414,9 +5414,9 @@ interface <dfn>RadioNodeList</dfn> : <span>NodeList</span> {
<dt><var title="">collection</var>[<var title="">name</var>]</dt>
<dt><var title="">collection</var>(<var title="">name</var>)</dt>
<dd>
<p>Returns the item with ID or <code title="attr-fe-name">name</code> <var title="">name</var> from the collection.</p>
<p>Returns the item with <span title="concept-id">ID</span> or <code title="attr-fe-name">name</code> <var title="">name</var> from the collection.</p>
<p>If there are multiple matching items, then a <code>RadioNodeList</code> object containing all those elements is returned.</p>
<p>Returns null if no element with that ID or <code title="attr-fe-name">name</code> could be found.</p>
<p>Returns null if no element with that <span title="concept-id">ID</span> or <code title="attr-fe-name">name</code> could be found.</p>
</dd>

<dt><var title="">radioNodeList</var> . <var title="">value</var> [ = <var title="">value</var> ]</dt>
Expand Down Expand Up @@ -5586,9 +5586,9 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E..
<dt><var title="">collection</var>[<var title="">name</var>]</dt>
<dt><var title="">collection</var>(<var title="">name</var>)</dt>
<dd>
<p>Returns the item with ID or <code title="attr-option-name">name</code> <var title="">name</var> from the collection.</p>
<p>Returns the item with <span title="concept-id">ID</span> or <code title="attr-option-name">name</code> <var title="">name</var> from the collection.</p>
<p>If there are multiple matching items, then a <code>NodeList</code> object containing all those elements is returned.</p>
<p>Returns null if no element with that ID could be found.</p>
<p>Returns null if no element with that <span title="concept-id">ID</span> could be found.</p>
</dd>

<dt><var title="">collection</var> . <code title="dom-HTMLOptionsCollection-add">add</code>(<var title="">element</var> [, <var title="">before</var> ] )</dt>
Expand Down Expand Up @@ -7807,19 +7807,20 @@ interface <dfn>HTMLUnknownElement</dfn> : <span>HTMLElement</span> { };</pre>
<h5>The <dfn title="attr-id"><code>id</code></dfn> attribute</h5>

<p>The <code title="attr-id">id</code> attribute
<span>represents</span> its element's unique identifier. The value
must be unique in the element's <span>home subtree</span> and must
contain at least one character. The value must not contain any <span
title="space character">space characters</span>.</p>
<span>represents</span> its element's <dfn title="concept-id">unique
identifier (ID)</dfn>. The value must be unique amongst all the IDs
in the element's <span>home subtree</span> and must contain at least
one character. The value must not contain any <span title="space
character">space characters</span>.</p>

<!-- space characters are disallowed because space-separated lists
of IDs otherwise would not be able to reach all valid IDs -->

<p class="note">An element's unique identifier can be used for a
variety of purposes, most notably as a way to link to specific parts
of a document using fragment identifiers, as a way to target an
element when scripting, and as a way to style a specific element
from CSS.</p>
<p class="note">An element's <span title="concept-id">unique
identifier</span> can be used for a variety of purposes, most
notably as a way to link to specific parts of a document using
fragment identifiers, as a way to target an element when scripting,
and as a way to style a specific element from CSS.</p>

<div class="impl">

Expand Down Expand Up @@ -84951,10 +84952,16 @@ time:empty { binding: <i title="">time</i>; }</pre>
<p>Authors should not specify the <code
title="attr-a-name">name</code> attribute on <code>a</code>
elements. If the attribute is present, its value must not be the
empty string. In earlier versions of the language, this attribute
served a similar role as the <code title="attr-id">id</code>
attribute. The <code title="attr-id">id</code> attribute should be
used instead.</p>
empty string and must not be equal to the value of any of the <span
title="concept-id">IDs</span> in the element's <span>home
subtree</span> other than the element's own <span
title="concept-id">ID</span>, if any. If this attribute is present
and the element has an <span title="concept-id">ID</span>, then the
attribute's value must be equal to the element's <span
title="concept-id">ID</span>. In earlier versions of the language,
this attribute served a similar role as the <code
title="attr-id">id</code> attribute. The <code
title="attr-id">id</code> attribute should be used instead.</p>

<p class="note">The <code title="attr-table-summary">summary</code>
attribute, defined in the <code>table</code> section, will also
Expand Down Expand Up @@ -88201,6 +88208,7 @@ interface <span>HTMLDocument</span> {
Robin Berjon,
Roland Steiner,
Roman Ivanov,
Roy Fielding,
Ryan King,
S. Mike Dierken,
Sam Dutton,
Expand Down

0 comments on commit 34edf28

Please sign in to comment.