Skip to content
Permalink
Browse files
[e] (0) move .id and ID processing to DOM Core.
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=13610

git-svn-id: http://svn.whatwg.org/webapps@6605 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Sep 30, 2011
1 parent 75cb311 commit f99ba77e2c48691e1377ccc3bac1f7d06b114fbb
Showing with 36 additions and 74 deletions.
  1. +13 −26 complete.html
  2. +13 −26 index
  3. +10 −22 source
@@ -3789,6 +3789,7 @@ <h4 id=dependencies><span class=secno>2.2.2 </span>Dependencies</h4>
<li><dfn id=dom-node-parentnode title=dom-Node-parentNode><code>parentNode</code></dfn> attribute</li>
<li><dfn id=dom-node-namespaceuri title=dom-Node-namespaceURI><code>namespaceURI</code></dfn> attribute</li>
<li><dfn id=dom-element-tagname title=dom-Element-tagName><code>tagName</code></dfn> attribute</li>
<li><dfn id=dom-element-id title=dom-Element-id><code>id</code></dfn> attribute</li>
<li><dfn id=textcontent><code>textContent</code></dfn> attribute</li>

<li><dfn id=event><code>Event</code></dfn> interface</li>
@@ -3802,7 +3803,8 @@ <h4 id=dependencies><span class=secno>2.2.2 </span>Dependencies</h4>
<li>The distinction between <dfn id=xml-documents>XML documents</dfn> and <dfn id=html-documents>HTML documents</dfn></li>
<li>The terms <dfn id=quirks-mode>quirks mode</dfn>, <dfn id=limited-quirks-mode>limited-quirks mode</dfn>, and <dfn id=no-quirks-mode>no-quirks mode</dfn></li>
<li>The algorithm to <dfn id=concept-node-clone title=concept-node-clone>clone</dfn> a <code><a href=#node>Node</a></code>, and the concept of <dfn id=concept-node-clone-ext title=concept-node-clone-ext>cloning steps</dfn> used by tat algorithm</li>
<li>The concept of <span>base URL change steps</span> and the definition of what happens when an element is <span>affected by a base URL change</span>.</li>
<li>The concept of <dfn id=base-url-change-steps>base URL change steps</dfn> and the definition of what happens when an element is <dfn id=affected-by-a-base-url-change>affected by a base URL change</dfn>.</li>
<li>The concept of an element's <dfn id=concept-id title=concept-id>unique identifier (ID)</dfn>.</li>

</ul><p>The term <dfn id=throw>throw</dfn> in this specification is used as
defined in the DOM Core specification. The following
@@ -7119,14 +7121,14 @@ <h4 id=dynamic-changes-to-base-urls><span class=secno>2.6.5 </span>Dynamic chang

<p>When an <code title=attr-xml-base><a href=#the-xml:base-attribute-(xml-only)>xml:base</a></code> attribute
changes, the attribute's element, and all descendant elements, are
<span>affected by a base URL change</span>.</p>
<a href=#affected-by-a-base-url-change>affected by a base URL change</a>.</p>

<p>When a document's <a href=#document-base-url>document base URL</a> changes, all
elements in that document are <span>affected by a base URL
change</span>.</p>
elements in that document are <a href=#affected-by-a-base-url-change>affected by a base URL
change</a>.</p>

<p>The following are <span>base URL change steps</span>, which run
when an element is <span>affected by a base URL change</span> (as
<p>The following are <a href=#base-url-change-steps>base URL change steps</a>, which run
when an element is <a href=#affected-by-a-base-url-change>affected by a base URL change</a> (as
defined by the DOM Core specification):</p>

<dl class=switch><dt>If the element creates a <a href=#hyperlink>hyperlink</a></dt>
@@ -10231,7 +10233,6 @@ <h4 id=elements-in-the-dom><span class=secno>3.2.2 </span>Elements in the DOM</h

<pre class=idl>interface <dfn id=htmlelement>HTMLElement</dfn> : <a href=#element>Element</a> {
// <span>metadata attributes</span>
attribute DOMString <a href=#dom-id title=dom-id>id</a>;
attribute DOMString <a href=#dom-title title=dom-title>title</a>;
attribute DOMString <a href=#dom-lang title=dom-lang>lang</a>;
attribute DOMString <a href=#dom-dir title=dom-dir>dir</a>;
@@ -10483,8 +10484,9 @@ <h4 id=global-attributes><span class=secno>3.2.3 </span><dfn>Global attributes</
<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 specifies 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
element's <a href=#concept-id title=concept-id>unique identifier (ID)</a>. <a href=#refsDOMCORE>[DOMCORE]</a></p>

<p>The value must be unique amongst all the <a href=#concept-id title=concept-id>IDs</a> 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>
@@ -10500,25 +10502,10 @@ <h5 id=the-id-attribute><span class=secno>3.2.3.1 </span>The <dfn title=attr-id>

<div class=impl>

<p>If the value is not the empty string, user agents must associate
the element with the given value (exactly, including any space
characters) for the purposes of <a href=#concept-id title=concept-id>ID</a> matching within the element's
<a href=#home-subtree>home subtree</a> (e.g. for selectors in CSS or for the
<code title=dom-Document-getElementById><a href=#dom-document-getelementbyid>getElementById()</a></code>
method in the DOM).</p>

<p>Identifiers are opaque strings. Particular meanings should not be
derived from the value of the <code title=attr-id><a href=#the-id-attribute>id</a></code>
attribute.</p>

<p>This specification doesn't preclude an element having multiple
IDs, if other mechanisms (e.g. DOM Core methods) can set an
element's <a href=#concept-id title=concept-id>ID</a> in a way that doesn't conflict with the <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute.</p>

<p>The <dfn id=dom-id title=dom-id><code>id</code></dfn> IDL attribute must
<a href=#reflect>reflect</a> the <code title=attr-id><a href=#the-id-attribute>id</a></code> content
attribute.</p>

</div>


@@ -53888,7 +53875,7 @@ <h4 id=commands><span class=secno>4.11.5 </span>Commands</h4>

</dd>

<dt><var title="">element</var> . <code title=dom-id><a href=#dom-id>id</a></code></dt>
<dt><var title="">element</var> . <code title=dom-Element-id><a href=#dom-element-id>id</a></code></dt>

<dd>

@@ -54017,7 +54004,7 @@ <h4 id=commands><span class=secno>4.11.5 </span>Commands</h4>
-->

<p class=note>The <a href=#command-facet-id title=command-facet-ID>ID</a> facet
is exposed by the <code title=dom-id><a href=#dom-id>id</a></code> IDL attribute, the
is exposed by the <code title=dom-Element-id><a href=#dom-element-id>id</a></code> IDL attribute, the
<a href=#command-facet-hint title=command-facet-Hint>Hint</a> facet is exposed by the
<code title=dom-title><a href=#dom-title>title</a></code> IDL attribute, and the <a href=#command-facet-accesskey title=command-facet-AccessKey>AccessKey</a> facet is exposed by
the <code title=dom-accessKeyLabel><a href=#dom-accesskeylabel>accessKeyLabel</a></code> IDL
39 index
@@ -3686,6 +3686,7 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<li><dfn id=dom-node-parentnode title=dom-Node-parentNode><code>parentNode</code></dfn> attribute</li>
<li><dfn id=dom-node-namespaceuri title=dom-Node-namespaceURI><code>namespaceURI</code></dfn> attribute</li>
<li><dfn id=dom-element-tagname title=dom-Element-tagName><code>tagName</code></dfn> attribute</li>
<li><dfn id=dom-element-id title=dom-Element-id><code>id</code></dfn> attribute</li>
<li><dfn id=textcontent><code>textContent</code></dfn> attribute</li>

<li><dfn id=event><code>Event</code></dfn> interface</li>
@@ -3699,7 +3700,8 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<li>The distinction between <dfn id=xml-documents>XML documents</dfn> and <dfn id=html-documents>HTML documents</dfn></li>
<li>The terms <dfn id=quirks-mode>quirks mode</dfn>, <dfn id=limited-quirks-mode>limited-quirks mode</dfn>, and <dfn id=no-quirks-mode>no-quirks mode</dfn></li>
<li>The algorithm to <dfn id=concept-node-clone title=concept-node-clone>clone</dfn> a <code><a href=#node>Node</a></code>, and the concept of <dfn id=concept-node-clone-ext title=concept-node-clone-ext>cloning steps</dfn> used by tat algorithm</li>
<li>The concept of <span>base URL change steps</span> and the definition of what happens when an element is <span>affected by a base URL change</span>.</li>
<li>The concept of <dfn id=base-url-change-steps>base URL change steps</dfn> and the definition of what happens when an element is <dfn id=affected-by-a-base-url-change>affected by a base URL change</dfn>.</li>
<li>The concept of an element's <dfn id=concept-id title=concept-id>unique identifier (ID)</dfn>.</li>

</ul><p>The term <dfn id=throw>throw</dfn> in this specification is used as
defined in the DOM Core specification. The following
@@ -6983,14 +6985,14 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d

<p>When an <code title=attr-xml-base><a href=#the-xml:base-attribute-(xml-only)>xml:base</a></code> attribute
changes, the attribute's element, and all descendant elements, are
<span>affected by a base URL change</span>.</p>
<a href=#affected-by-a-base-url-change>affected by a base URL change</a>.</p>

<p>When a document's <a href=#document-base-url>document base URL</a> changes, all
elements in that document are <span>affected by a base URL
change</span>.</p>
elements in that document are <a href=#affected-by-a-base-url-change>affected by a base URL
change</a>.</p>

<p>The following are <span>base URL change steps</span>, which run
when an element is <span>affected by a base URL change</span> (as
<p>The following are <a href=#base-url-change-steps>base URL change steps</a>, which run
when an element is <a href=#affected-by-a-base-url-change>affected by a base URL change</a> (as
defined by the DOM Core specification):</p>

<dl class=switch><dt>If the element creates a <a href=#hyperlink>hyperlink</a></dt>
@@ -10095,7 +10097,6 @@ interface <dfn id=xmldocumentloader>XMLDocumentLoader</dfn> {

<pre class=idl>interface <dfn id=htmlelement>HTMLElement</dfn> : <a href=#element>Element</a> {
// <span>metadata attributes</span>
attribute DOMString <a href=#dom-id title=dom-id>id</a>;
attribute DOMString <a href=#dom-title title=dom-title>title</a>;
attribute DOMString <a href=#dom-lang title=dom-lang>lang</a>;
attribute DOMString <a href=#dom-dir title=dom-dir>dir</a>;
@@ -10347,8 +10348,9 @@ 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 specifies 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
element's <a href=#concept-id title=concept-id>unique identifier (ID)</a>. <a href=#refsDOMCORE>[DOMCORE]</a></p>

<p>The value must be unique amongst all the <a href=#concept-id title=concept-id>IDs</a> 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>
@@ -10364,25 +10366,10 @@ interface <dfn id=htmlunknownelement>HTMLUnknownElement</dfn> : <a href=#htmlele

<div class=impl>

<p>If the value is not the empty string, user agents must associate
the element with the given value (exactly, including any space
characters) for the purposes of <a href=#concept-id title=concept-id>ID</a> matching within the element's
<a href=#home-subtree>home subtree</a> (e.g. for selectors in CSS or for the
<code title=dom-Document-getElementById><a href=#dom-document-getelementbyid>getElementById()</a></code>
method in the DOM).</p>

<p>Identifiers are opaque strings. Particular meanings should not be
derived from the value of the <code title=attr-id><a href=#the-id-attribute>id</a></code>
attribute.</p>

<p>This specification doesn't preclude an element having multiple
IDs, if other mechanisms (e.g. DOM Core methods) can set an
element's <a href=#concept-id title=concept-id>ID</a> in a way that doesn't conflict with the <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute.</p>

<p>The <dfn id=dom-id title=dom-id><code>id</code></dfn> IDL attribute must
<a href=#reflect>reflect</a> the <code title=attr-id><a href=#the-id-attribute>id</a></code> content
attribute.</p>

</div>


@@ -53755,7 +53742,7 @@ fur

</dd>

<dt><var title="">element</var> . <code title=dom-id><a href=#dom-id>id</a></code></dt>
<dt><var title="">element</var> . <code title=dom-Element-id><a href=#dom-element-id>id</a></code></dt>

<dd>

@@ -53884,7 +53871,7 @@ fur
-->

<p class=note>The <a href=#command-facet-id title=command-facet-ID>ID</a> facet
is exposed by the <code title=dom-id><a href=#dom-id>id</a></code> IDL attribute, the
is exposed by the <code title=dom-Element-id><a href=#dom-element-id>id</a></code> IDL attribute, the
<a href=#command-facet-hint title=command-facet-Hint>Hint</a> facet is exposed by the
<code title=dom-title><a href=#dom-title>title</a></code> IDL attribute, and the <a href=#command-facet-accesskey title=command-facet-AccessKey>AccessKey</a> facet is exposed by
the <code title=dom-accessKeyLabel><a href=#dom-accesskeylabel>accessKeyLabel</a></code> IDL
32 source
@@ -2698,6 +2698,7 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<li><dfn title="dom-Node-parentNode"><code>parentNode</code></dfn> attribute</li>
<li><dfn title="dom-Node-namespaceURI"><code>namespaceURI</code></dfn> attribute</li>
<li><dfn title="dom-Element-tagName"><code>tagName</code></dfn> attribute</li>
<li><dfn title="dom-Element-id"><code>id</code></dfn> attribute</li>
<li><dfn><code>textContent</code></dfn> attribute</li>

<li><dfn><code>Event</code></dfn> interface</li>
@@ -2711,7 +2712,8 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<li>The distinction between <dfn>XML documents</dfn> and <dfn>HTML documents</dfn></li>
<li>The terms <dfn>quirks mode</dfn>, <dfn>limited-quirks mode</dfn>, and <dfn>no-quirks mode</dfn></li>
<li>The algorithm to <dfn title="concept-node-clone">clone</dfn> a <code>Node</code>, and the concept of <dfn title="concept-node-clone-ext">cloning steps</dfn> used by tat algorithm</li>
<li>The concept of <span>base URL change steps</span> and the definition of what happens when an element is <span>affected by a base URL change</span>.</li>
<li>The concept of <dfn>base URL change steps</dfn> and the definition of what happens when an element is <dfn>affected by a base URL change</dfn>.</li>
<li>The concept of an element's <dfn title="concept-id">unique identifier (ID)</dfn>.</li>

</ul>

@@ -10412,7 +10414,6 @@ interface <dfn>XMLDocumentLoader</dfn> {

<pre class="idl">interface <dfn>HTMLElement</dfn> : <span>Element</span> {
// <span>metadata attributes</span>
attribute DOMString <span title="dom-id">id</span>;
attribute DOMString <span title="dom-title">title</span>;
attribute DOMString <span title="dom-lang">lang</span>;
attribute DOMString <span title="dom-dir">dir</span>;
@@ -10686,8 +10687,11 @@ 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 specifies 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
element's <span title="concept-id">unique identifier (ID)</span>. <a
href="#refsDOMCORE">[DOMCORE]</a></p>

<p>The value must be unique amongst all the <span
title="concept-id">IDs</span> 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>
@@ -10703,26 +10707,10 @@ interface <dfn>HTMLUnknownElement</dfn> : <span>HTMLElement</span> { };</pre>

<div class="impl">

<p>If the value is not the empty string, user agents must associate
the element with the given value (exactly, including any space
characters) for the purposes of <span title="concept-id">ID</span> matching within the element's
<span>home subtree</span> (e.g. for selectors in CSS or for the
<code title="dom-Document-getElementById">getElementById()</code>
method in the DOM).</p>

<p>Identifiers are opaque strings. Particular meanings should not be
derived from the value of the <code title="attr-id">id</code>
attribute.</p>

<p>This specification doesn't preclude an element having multiple
IDs, if other mechanisms (e.g. DOM Core methods) can set an
element's <span title="concept-id">ID</span> in a way that doesn't conflict with the <code
title="attr-id">id</code> attribute.</p>

<p>The <dfn title="dom-id"><code>id</code></dfn> IDL attribute must
<span>reflect</span> the <code title="attr-id">id</code> content
attribute.</p>

</div>


@@ -60680,7 +60668,7 @@ fur

</dd>

<dt><var title="">element</var> . <code title="dom-id">id</code></dt>
<dt><var title="">element</var> . <code title="dom-Element-id">id</code></dt>

<dd>

@@ -60824,7 +60812,7 @@ fur
-->

<p class="note">The <span title="command-facet-ID">ID</span> facet
is exposed by the <code title="dom-id">id</code> IDL attribute, the
is exposed by the <code title="dom-Element-id">id</code> IDL attribute, the
<span title="command-facet-Hint">Hint</span> facet is exposed by the
<code title="dom-title">title</code> IDL attribute, and the <span
title="command-facet-AccessKey">AccessKey</span> facet is exposed by

0 comments on commit f99ba77

Please sign in to comment.