174 |
aforementioned cases.</p> |
aforementioned cases.</p> |
175 |
</div> |
</div> |
176 |
|
|
177 |
|
<div class=section id=section-node> |
178 |
|
<h3>Modifications to the <code id=Node>Node</code> Interface</h3> |
179 |
|
|
180 |
|
<pre class=idl><code>// Additions to the Node interface |
181 |
|
|
182 |
|
// Additions to the NodeType definition group |
183 |
|
const unsigned short <a href="#ELEMENT_TYPE_DEFINITION_NODE">ELEMENT_TYPE_DEFINITION_NODE</a> = 81001; |
184 |
|
const unsigned short <a href="#ATTRIBUTE_DEFINITION_NODE">ATTRIBUTE_DEFINITION_NODE</a> = 81002; |
185 |
|
</pre> |
186 |
|
|
187 |
|
<p>This specification adds two new types (subinterfaces) of |
188 |
|
<a href="#Node"><code>Node</code></a>: element type definition (node type |
189 |
|
<a href="#ELEMENT_TYPE_DEFINITION_NODE"><code>ELEMENT_TYPE_DEFINITION_NODE</code></a>, |
190 |
|
interface |
191 |
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a>) and |
192 |
|
attribute definition (node type |
193 |
|
<a href="#ATTRIBUTE_DEFINITION_NODE"><code>ATTRIBUTE_DEFINITION_NODE</code></a>, |
194 |
|
interface |
195 |
|
<a href="#AttributeDefinition"><code>AttributeDefinition</code></a>). For |
196 |
|
these kinds of nodes, methods and attributes in the |
197 |
|
<a href="#Node"><code>Node</code></a> interface must behave as following:</p> |
198 |
|
|
199 |
|
<dl> |
200 |
|
<dt><code id=nodeType>nodeType</code></dt> |
201 |
|
<dd> |
202 |
|
<p>On getting, the attribute <em class=rfc2119>MUST</em> return |
203 |
|
<a href="#ELEMENT_TYPE_DEFINITION_NODE"><code>ELEMENT_TYPE_DEFINITION_NODE</code></a> |
204 |
|
(if the node is an |
205 |
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a>) or |
206 |
|
<a href="#ATTRIBUTE_DEFINITION_NODE"><code>ATTRIBUTE_DEFINITION_NODE</code></a> |
207 |
|
(if the node is an |
208 |
|
<a href="#AttributeDefinition"><code>AttributeDefinition</code></a>).</p> |
209 |
|
|
210 |
|
<!-- NodeType --> |
211 |
|
<p>Two constants are added to the <code id=NodeType>NodeType</code> |
212 |
|
definition group of the <a href="#Node"><code>Node</code></a> interface as |
213 |
|
following:</p> |
214 |
|
<table> |
215 |
|
<thead> |
216 |
|
<tr><th scope=col>Name<th scope=col>Value<th scope=col>Description</tr> |
217 |
|
</thead> |
218 |
|
<tbody> |
219 |
|
<tr> |
220 |
|
<th scope=row><dfn id=ELEMENT_TYPE_DEFINITION_NODE class=dom-const><code>ELEMENT_TYPE_DEFINITION_NODE</code></dfn> |
221 |
|
<td><code>81001</code><td>The node is an |
222 |
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a>.</tr> |
223 |
|
<tr> |
224 |
|
<th scope=row><dfn id=ATTRIBUTE_DEFINITION_NODE class=dom-const><code>ATTRIBUTE_DEFINITION_NODE</code></dfn> |
225 |
|
<td><code>81002</code><td>The node is an |
226 |
|
<a href="#ElementTypeDefinition"><code>AttributeDefinition</code></a>.</tr> |
227 |
|
</tbody> |
228 |
|
</table> |
229 |
|
</dd> |
230 |
|
<dt class=ed>@@ ...</dt> |
231 |
|
</dl> |
232 |
|
|
233 |
|
</div> |
234 |
|
|
235 |
<div class=section id=section-documentxdoctype> |
<div class=section id=section-documentxdoctype> |
236 |
<h3>The <code>DocumentXDoctype</code> Interface</h3> |
<h3>The <code>DocumentXDoctype</code> Interface</h3> |
237 |
|
|
471 |
readonly attribute NamedNodeMap <a href="#generalEntities">generalEntities</a>; |
readonly attribute NamedNodeMap <a href="#generalEntities">generalEntities</a>; |
472 |
readonly attribute NamedNodeMap <a href="#notations">notations</a>; |
readonly attribute NamedNodeMap <a href="#notations">notations</a>; |
473 |
|
|
474 |
<span class=ed>more members come here...</span> |
<a href="#ElementTypeDefinition">ElementTypeDefinition</a> <a href="#getElementTypeDefinitionNode">getElementTypeDefinitionNode</a> |
475 |
|
(in DOMString <a href="#getElementTypeDefinitionNode-name"><var>name</var></a>); |
476 |
|
<a href="#Entity">Entity</a> <a href="#getGeneralEntityNode">getGeneralEntityNode</a> |
477 |
|
(in DOMString <a href="#getGeneralEntityNode-name"><var>name</var></a>); |
478 |
|
<a href="#Notation">Notation</a> <a href="#getNotationNode">getNotationNode</a> |
479 |
|
(in DOMString <a href="#getNotationNode-name"><var>name</var></a>); |
480 |
|
|
481 |
|
void <a href="#setElementTypeDefinitionNode">setElementTypeDefinitionNode</a> |
482 |
|
(in DOMString <a href="#setElementTypeDefinitionNode-node"><var>node</var></a>) |
483 |
|
raises (DOMException); |
484 |
|
void <a href="#setGeneralEntityNode">setGeneralEntityNode</a> |
485 |
|
(in DOMString <a href="#setGeneralEntityNode-node"><var>node</var></a>) |
486 |
|
raises (DOMException); |
487 |
|
void <a href="#setNotationNode">setNotationNode</a> |
488 |
|
(in DOMString <a href="#setNotationNode-node"><var>node</var></a>) |
489 |
|
raises (DOMException); |
490 |
}</code></pre> |
}</code></pre> |
491 |
|
|
492 |
<pre class=ed> |
<pre class=ed> |
960 |
<pre class=idl><code>// Modifications to the DocumentType interface |
<pre class=idl><code>// Modifications to the DocumentType interface |
961 |
attribute DOMString <a href="#publicId">publicId</a>; |
attribute DOMString <a href="#publicId">publicId</a>; |
962 |
attribute DOMString <a href="#systemId">systemId</a>; |
attribute DOMString <a href="#systemId">systemId</a>; |
|
</code></pre> |
|
963 |
|
|
964 |
<p class=ed> |
attribute DOMString <a href="#internalSubset">internalSubset</a>; |
965 |
The publicId attribute and the systemId attribute of DocumentType, Entity, and Notation objects are now read-write. |
</code></pre> |
966 |
|
|
967 |
The setter MUST throw a NO_MODIFICATION_ALLOWED_ERR DOMException if the Node object is read-only. Otherwise, it MUST set the specified value to the attribute. No normalization, lexical validation, or relative reference resolving is performed. null, which represents no public or system identifier is provided, might be specified. |
<p>The <code id=publicId>publicId</code> attribute and the |
968 |
|
<code id=systemId>systemId</code> attribute of |
969 |
|
<a href="#DocumentType"><code>DocumentType</code></a>, |
970 |
|
<a href="#Entity"><code>Entity</code></a>, and |
971 |
|
<a href="#Notation"><code>Notation</code></a> interfaces are no longer |
972 |
|
read$B!>(Bonly.</p> |
973 |
|
|
974 |
|
<p>On setting, the attribute <em class=rfc2119>MUST</em> raise a |
975 |
|
<code>NO_MODIFICATION_ALLOWED_ERR</code> <span class=ed>@@ ref</span> |
976 |
|
exception if the node is read$B!>(Bonly <span class=ed>@@ ref</span>. |
977 |
|
Otherwise, it <em class=rfc2119>MUST</em> set the specified value as the value |
978 |
|
associated to the attribute. No normalization, relative reference resolution, |
979 |
|
or lexical validation is performed. <span class=ed>@@ If the new |
980 |
|
value is <code>null</code>, ...</span></p> |
981 |
|
|
982 |
Setting public or system identifier does never result in any lexical or logical structure of the document being changed. In particular, no external entity referenced by new identifier will be loaded. |
<div class="note memo"> |
983 |
|
<p>Setting an invalid identifier might make the node unserializable. |
984 |
|
Setting a public identifier while leaveing system identifier unspecified |
985 |
|
would also make the <a href="#DocumentType"><code>DocumentType</code></a> |
986 |
|
or <a href="#Entity"><code>Entity</code></a> node unserializable.</p> |
987 |
|
</div> |
988 |
|
|
989 |
Setting an invalid or non-normalized identifier might make the object non-serializable. Setting a non-null public identifier to a DocumentType or Entity object that does not have non-null system identifier or setting null as the system identifier of a DocumentType or Entity object that does have non-null public identifier will make that object non-serializable. |
<div class=ed> |
990 |
|
<p>ISSUE: In HTML5, Firefox 1.5, and Opera 9, not specifying public or system identifier results in empty strings.</p> |
991 |
|
</div> |
992 |
|
|
993 |
ISSUE: In HTML5, Firefox 1.5, and Opera 9, not specifying public or system identifier results in empty strings. |
<p>The <code id=internalSubset>internalSubset</code> attribute of the |
994 |
</pre> |
<a href="#DocumentType"><code>DocumentType</code></a> interface is no longer |
995 |
|
read$B!>(Bonly.</p> |
996 |
|
|
997 |
|
<p>On setting, the attribute <em class=rfc2119>MUST</em> raise a |
998 |
|
<code>NO_MODIFICATION_ALLOWED_ERR</code> <span class=ed>@@ ref</span> |
999 |
|
exception if the node is read$B!>(Bonly <span class=ed>@@ ref</span>. |
1000 |
|
Otherwise, it <em class=rfc2119>MUST</em> set the specified value as the value |
1001 |
|
associated to the attribute. No normalization, or lexical validation is |
1002 |
|
performed. <span class=ed>@@ If the new value is <code>null</code>, |
1003 |
|
...</span></p> |
1004 |
|
|
1005 |
</div> |
</div> |
1006 |
|
|