| 125 | interface.</p> | interface.</p> | 
| 126 |  |  | 
| 127 | <p class=ed>@@ ref to DOM Binding Spec</p> | <p class=ed>@@ ref to DOM Binding Spec</p> | 
| 128 |  |  | 
| 129 |  | <p>If the <code>strictErrorChecking</code> attribute of the | 
| 130 |  | <code>Document</code> node is <code>false</code>, the methods are | 
| 131 |  | not required to raise exceptions <span class=ed>[DOM3]</span>.</p> | 
| 132 | </div> | </div> | 
| 133 |  |  | 
| 134 | <div class=section id=dom-dtdef> | <div class=section id=dom-dtdef> | 
| 143 | <li><a href="#AttributeDefinition"><code>AttributeDefinition</code></a></li> | <li><a href="#AttributeDefinition"><code>AttributeDefinition</code></a></li> | 
| 144 | </ul> | </ul> | 
| 145 |  |  | 
| 146 | <p>In addition, it adds methods, attributes, and/or constants to interfaces | <p>In addition, it modifies interfaces | 
| 147 | <a href="#Node"><code>Node</code></a>, | <a href="#Node"><code>Node</code></a>, | 
| 148 |  | <a href="#DocumentType"><code>DocumentType</code></a>, | 
| 149 | <a href="#Entity"><code>Entity</code></a>, | <a href="#Entity"><code>Entity</code></a>, | 
| 150 | <a href="#EntityReference"><code>EntityReference</code></a>, and | <a href="#EntityReference"><code>EntityReference</code></a>, | 
| 151 | <a href="#Notation"><code>Notation</code></a>. | <a href="#Notation"><code>Notation</code></a>, and | 
| 152 | It modifies semantics of some of methods and attributes in | <a href="#ProcessingInstruction"><code>ProcessingInstruction</code></a>.</p> | 
|  | <a href="#Node"><code>Node</code></a> and |  | 
|  | <a href="#ProcessingInstruction"><code>ProcessingInstruction</code></a> |  | 
|  | interfaces, for the support of new interfaces.</p> |  | 
| 153 |  |  | 
| 154 | <div class=section id=features> | <div class=section id=features> | 
| 155 | <h3>Feature Name</h3> | <h3>Feature Name</h3> | 
| 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 |  | <p>The implementation of the | 
| 181 |  | <a href="#Node"><code>Node</code></a> interface | 
| 182 |  | <em class=rfc2119>MUST</em> be modified as following:</p> | 
| 183 |  | <pre class=idl><code>// Additions to the Node interface | 
| 184 |  |  | 
| 185 |  | // Additions to the NodeType definition group | 
| 186 |  | const unsigned short <a href="#ELEMENT_TYPE_DEFINITION_NODE">ELEMENT_TYPE_DEFINITION_NODE</a> = 81001; | 
| 187 |  | const unsigned short <a href="#ATTRIBUTE_DEFINITION_NODE">ATTRIBUTE_DEFINITION_NODE</a> = 81002; | 
| 188 |  | </pre> | 
| 189 |  |  | 
| 190 |  | <p>This specification adds two new types (subinterfaces) of | 
| 191 |  | <a href="#Node"><code>Node</code></a>: element type definition (node type | 
| 192 |  | <a href="#ELEMENT_TYPE_DEFINITION_NODE"><code>ELEMENT_TYPE_DEFINITION_NODE</code></a>, | 
| 193 |  | interface | 
| 194 |  | <a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a>) and | 
| 195 |  | attribute definition (node type | 
| 196 |  | <a href="#ATTRIBUTE_DEFINITION_NODE"><code>ATTRIBUTE_DEFINITION_NODE</code></a>, | 
| 197 |  | interface | 
| 198 |  | <a href="#AttributeDefinition"><code>AttributeDefinition</code></a>).  For | 
| 199 |  | these kinds of nodes, methods and attributes in the | 
| 200 |  | <a href="#Node"><code>Node</code></a> interface must behave as following:</p> | 
| 201 |  |  | 
| 202 |  | <dl> | 
| 203 |  | <dt><code id=attributes>attributes</code></dt> | 
| 204 |  | <dd> | 
| 205 |  | <p>On getting, the attribute <em class=rfc2119>MUST</em> return | 
| 206 |  | <code>null</code>.</p> | 
| 207 |  | </dd> | 
| 208 |  | <dt><code id=baseURI>baseURI</code></dt> | 
| 209 |  | <dd> | 
| 210 |  | <p>On getting, the attribute <em class=rfc2119>MUST</em> return the | 
| 211 |  | value of the <a href="#baseURI"><code>baseURI</code></a> attribute | 
| 212 |  | of the node in the <code>ownerDocument</code> attribute of the node. | 
| 213 |  | Note that the value might be <code>null</code>.</p> | 
| 214 |  | </dd> | 
| 215 |  | <dt><code id=nodeName>nodeName</code></dt> | 
| 216 |  | <dd> | 
| 217 |  | <p>If the node is an | 
| 218 |  | <a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a>: | 
| 219 |  | On getting, the attribute <em class=rfc2119>MUST</em> return the | 
| 220 |  | name of the element type definition represented by the node.</p> | 
| 221 |  |  | 
| 222 |  | <p>If the node is an | 
| 223 |  | <a href="#AttributeDefinition"><code>AttributeDefinition</code></a>: | 
| 224 |  | On getting, the attribute <em class=rfc2119>MUST</em> return the | 
| 225 |  | name of the attribute definition represented by the node.</p> | 
| 226 |  | </dd> | 
| 227 |  | <dt><code id=nodeType>nodeType</code></dt> | 
| 228 |  | <dd> | 
| 229 |  | <p>On getting, the attribute <em class=rfc2119>MUST</em> return | 
| 230 |  | <a href="#ELEMENT_TYPE_DEFINITION_NODE"><code>ELEMENT_TYPE_DEFINITION_NODE</code></a> | 
| 231 |  | (if the node is an | 
| 232 |  | <a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a>) or | 
| 233 |  | <a href="#ATTRIBUTE_DEFINITION_NODE"><code>ATTRIBUTE_DEFINITION_NODE</code></a> | 
| 234 |  | (if the node is an | 
| 235 |  | <a href="#AttributeDefinition"><code>AttributeDefinition</code></a>).</p> | 
| 236 |  |  | 
| 237 |  | <!-- NodeType --> | 
| 238 |  | <p>Two constants are added to the <code id=NodeType>NodeType</code> | 
| 239 |  | definition group of the <a href="#Node"><code>Node</code></a> interface as | 
| 240 |  | following:</p> | 
| 241 |  | <table> | 
| 242 |  | <thead> | 
| 243 |  | <tr><th scope=col>Name<th scope=col>Value<th scope=col>Description</tr> | 
| 244 |  | </thead> | 
| 245 |  | <tbody> | 
| 246 |  | <tr> | 
| 247 |  | <th scope=row><dfn id=ELEMENT_TYPE_DEFINITION_NODE class=dom-const><code>ELEMENT_TYPE_DEFINITION_NODE</code></dfn> | 
| 248 |  | <td><code>81001</code><td>The node is an | 
| 249 |  | <a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a>.</tr> | 
| 250 |  | <tr> | 
| 251 |  | <th scope=row><dfn id=ATTRIBUTE_DEFINITION_NODE class=dom-const><code>ATTRIBUTE_DEFINITION_NODE</code></dfn> | 
| 252 |  | <td><code>81002</code><td>The node is an | 
| 253 |  | <a href="#ElementTypeDefinition"><code>AttributeDefinition</code></a>.</tr> | 
| 254 |  | </tbody> | 
| 255 |  | </table> | 
| 256 |  | </dd> | 
| 257 |  | <dt><code id=nodeValue>nodeValue</code> and | 
| 258 |  | <code id=textContent>textContent</code></dt> | 
| 259 |  | <dd> | 
| 260 |  | <p>If the node is an | 
| 261 |  | <a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a>: | 
| 262 |  | On getting, the attributes <em class=rfc2119>MUST</em> return the | 
| 263 |  | name of the element type.</p> | 
| 264 |  |  | 
| 265 |  | <div class="note memo"> | 
| 266 |  | <p>Thus, on setting the attributes does nothing | 
| 267 |  | <span class=ed>[DOM3]</span>.</p> | 
| 268 |  | </div> | 
| 269 |  |  | 
| 270 |  | <p>On setting, the <a href="#textContent"><code>textContent</code></a> | 
| 271 |  | attribute <em class=rfc2119>MUST NOT</em> raise a | 
| 272 |  | <code>NO_MODIFICATION_ALLOWED_ERR</code> <span class=ed>@@ ref</span>. | 
| 273 |  | <span class=ed>@@ I forgot why this requirement is necessary.</span></p> | 
| 274 |  |  | 
| 275 |  | <p>If the node is an | 
| 276 |  | <a href="#AttributeDefinition"><code>AttributeDefinition</code></a>:</p> | 
| 277 |  |  | 
| 278 |  | <pre class=ed> | 
| 279 |  | The getter of the [CODE(DOMa)@en[[[nodeValue]]]] attribute | 
| 280 |  | of an [CODE(DOMi)@en[[[AttributeDefinition]]]] object | 
| 281 |  | [['''MUST''']] return the normalized default value | 
| 282 |  | of the attribute. | 
| 283 |  |  | 
| 284 |  | @@ | 
| 285 |  |  | 
| 286 |  | [4] The getter of the [CODE(DOMa)@en[[[textContent]]]] | 
| 287 |  | attribute of an [CODE(DOMi)@en[[[AttributeDefinition]]]] | 
| 288 |  | object [['''MUST''']] behave as if it were an | 
| 289 |  | [CODE(DOMi)@en[[[Attr]]]] object. | 
| 290 |  |  | 
| 291 |  | The setter of the [CODE(DOMa)@en[[[textContent]]]] attribute | 
| 292 |  | of an [CODE(DOMi)@en[[[AttributeDefinition]]]] object | 
| 293 |  | [['''MUST''']] behave as if the following algorithm | 
| 294 |  | is performed: | 
| 295 |  | = If the [CODE(DOMi)@en[[[AttributeDefinition]]]] | 
| 296 |  | object is read-only, then throw an | 
| 297 |  | [CODE(DOMc)@en[[[NO_MODIFICATION_ALLOWED_ERR]]]]. | 
| 298 |  | = Remove any child node the node has. | 
| 299 |  | = If the new value is not empty and not [CODE(IDL)@en[[[null]]]], | 
| 300 |  | then create a [CODE(DOMi)@en[[[Text]]]] node | 
| 301 |  | whose [CODE(DOMa)@en[[[data]]]] is the new value | 
| 302 |  | and append it to the [CODE(DOMi)@en[[[AttributeDefinition]]]]. | 
| 303 |  | </pre> | 
| 304 |  | </dd> | 
| 305 |  | <dt class=ed>@@ ...</dt> | 
| 306 |  | </dl> | 
| 307 |  |  | 
| 308 |  | </div> | 
| 309 |  |  | 
| 310 | <div class=section id=section-documentxdoctype> | <div class=section id=section-documentxdoctype> | 
| 311 | <h3>The <code>DocumentXDoctype</code> Interface</h3> | <h3>The <code>DocumentXDoctype</code> Interface</h3> | 
| 312 |  |  | 
| 313 |  | <p>The <a href="#DocumentXDoctype"><code>DocumentXDoctype</code></a> interface | 
| 314 |  | <em class=rfc2119>MUST</em> be implemented as following:</p> | 
| 315 | <pre class=idl><code>interface <dfn id=DocumentXDoctype><code>DocumentXDoctype</code></dfn> { | <pre class=idl><code>interface <dfn id=DocumentXDoctype><code>DocumentXDoctype</code></dfn> { | 
| 316 | DocumentType <a href="#createDocumentTypeDefinition">createDocumentTypeDefinition</a> | DocumentType <a href="#createDocumentTypeDefinition">createDocumentTypeDefinition</a> | 
| 317 | (in DOMString <a href="#createDocumentTypeDefinition-name"><var>name</var></a>) | (in DOMString <a href="#createDocumentTypeDefinition-name"><var>name</var></a>) | 
| 318 | raises (DOMException); | raises (DOMException); | 
| 319 | ElementTypeDefinition <a href="#createElementTypeDefinition">createElementTypeDefinition</a> | <a href="#ElementTypeDefinition">ElementTypeDefinition</a> <a href="#createElementTypeDefinition">createElementTypeDefinition</a> | 
| 320 | (in DOMString <a href="#createElementTypeDefinition-name"><var>name</var></a>) | (in DOMString <a href="#createElementTypeDefinition-name"><var>name</var></a>) | 
| 321 | raises (DOMException); | raises (DOMException); | 
| 322 | AttributeDefinition <a href="#createAttributeDefinition">createAttributeDefinition</a> | <a href="#AttributeDefinition">AttributeDefinition</a> <a href="#createAttributeDefinition">createAttributeDefinition</a> | 
| 323 | (in DOMString <a href="#createAttributeDefinition-name"><var>name</var></a>) | (in DOMString <a href="#createAttributeDefinition-name"><var>name</var></a>) | 
| 324 | raises (DOMException); | raises (DOMException); | 
| 325 | Entity <a href="#createGeneralEntity">createGeneralEntityDefinition</a> | <a href="#Entity">Entity</a> <a href="#createGeneralEntity">createGeneralEntityDefinition</a> | 
| 326 | (in DOMString <a href="#createGeneralEntity-name"><var>name</var></a>) | (in DOMString <a href="#createGeneralEntity-name"><var>name</var></a>) | 
| 327 | raises (DOMException); | raises (DOMException); | 
| 328 | Notation <a href="#createNotation">createNotation</a> | <a href="#Notation">Notation</a> <a href="#createNotation">createNotation</a> | 
| 329 | (in DOMString <a href="#createNotation-name"><var>name</var></a>) | (in DOMString <a href="#createNotation-name"><var>name</var></a>) | 
| 330 | raises (DOMException); | raises (DOMException); | 
| 331 | }</code></pre> | }</code></pre> | 
| 536 | define it for <code>Document</code> methods.</p> | define it for <code>Document</code> methods.</p> | 
| 537 |  |  | 
| 538 | <p><var>name</var> does not have to be a namespace qualified name.</p> | <p><var>name</var> does not have to be a namespace qualified name.</p> | 
| 539 |  | </div> | 
| 540 |  |  | 
|  | <p>If the <code>strictErrorChecking</code> attribute of the |  | 
|  | <code>Document</code> node is <code>false</code>, the methods are |  | 
|  | not required to raise the exception <span class=ed>[DOM3]</span>.</p> |  | 
| 541 | </div> | </div> | 
| 542 |  |  | 
| 543 |  |  | 
| 544 |  | <div class=section id=section-documenttype> | 
| 545 |  | <h3>Modifications to the <code id=DocumentType>DocumentType</code> | 
| 546 |  | Interface</h3> | 
| 547 |  |  | 
| 548 |  | <p>A <a href="#DocumentType"><code>DocumentType</code></a> interface | 
| 549 |  | <em class=rfc2119>MAY</em> contain zero or more | 
| 550 |  | <a href="#ProcessingInstruction"><code>ProcessingInstruction</code></a> | 
| 551 |  | nodes in the <code>NodeList</code> object contained in the | 
| 552 |  | <code>childNodes</code> attribute of the | 
| 553 |  | <a href="#DocumentType"><code>DocumentType</code></a> node.</p> | 
| 554 |  |  | 
| 555 |  | <p>If the <a href="#DocumentType"><code>DocumentType</code></a> node is created | 
| 556 |  | during the process to create a <abbr>DOM</abbr> from an <abbr>XML</abbr> | 
| 557 |  | document, the <code>NodeList</code> object in the <code>childNodes</code> | 
| 558 |  | object <em class=rfc2119>MUST</em> contains the | 
| 559 |  | <a href="#ProcessingInstruction"><code>ProcessingInstruction</code></a> | 
| 560 |  | nodes representing the processing instructions in the document type | 
| 561 |  | definition of the document processed <span class=ed>@@ ref</span> by | 
| 562 |  | the <abbr>XML</abbr> processor.  If the | 
| 563 |  | <a href="#DocumentType"><code>DocumentType</code></a> node is marked | 
| 564 |  | as read$B!>(Bonly, then all the child nodes <em class=rfc2119>MUST</em> | 
| 565 |  | also be marked as read$B!>(Bonly.</p> | 
| 566 |  |  | 
| 567 |  | <p>If a <a href="#DocumentType"><code>DocumentType</code></a> node is created | 
| 568 |  | from a document type declaration information item <span class=ed>@@ ref</span>, | 
| 569 |  | the <code>NodeList</code> object in the <code>childNodes</code> attribute | 
| 570 |  | of the node <em class=rfc2119>MUST</em> contain the | 
| 571 |  | <a href="#ProcessingInstruction"><code>ProcessingInstruction</code></a> nodes | 
| 572 |  | created from the processing instruction information items in the list in the | 
| 573 |  | [children] property of the document type declaration item in the same | 
| 574 |  | order.</p> | 
| 575 |  |  | 
| 576 |  | <p>If a <a href="#DocumentType"><code>DocumentType</code></a> node is mapped to | 
| 577 |  | a document type declaration information item, the list in the [children] | 
| 578 |  | property <em class=rfc2119>MUST</em> contain the processng instruction | 
| 579 |  | information items created from the | 
| 580 |  | <a href="#ProcessingInstruction"><code>ProcessingInstruction</code></a> nodes | 
| 581 |  | in the <code>NodeList</code> object in the <code>childNodes</code> attribute | 
| 582 |  | of the <a href="#DocumentType"><code>DocumentType</code></a> node.</p> | 
| 583 |  |  | 
| 584 |  | <p>The implementation of the | 
| 585 |  | <a href="#DocumentType"><code>DocumentType</code></a> interface | 
| 586 |  | <em class=rfc2119>MUST</em> be modified as following:</p> | 
| 587 |  | <pre class=idl><code>// Modifications to the DocumentType interface | 
| 588 |  | attribute DOMString <a href="#publicId">publicId</a>; | 
| 589 |  | attribute DOMString <a href="#systemId">systemId</a>; | 
| 590 |  |  | 
| 591 |  | attribute DOMString <a href="#internalSubset">internalSubset</a>; | 
| 592 |  | </code></pre> | 
| 593 |  |  | 
| 594 |  | <p>The <code id=publicId>publicId</code> attribute and the | 
| 595 |  | <code id=systemId>systemId</code> attribute of | 
| 596 |  | <a href="#DocumentType"><code>DocumentType</code></a>, | 
| 597 |  | <a href="#Entity"><code>Entity</code></a>, and | 
| 598 |  | <a href="#Notation"><code>Notation</code></a> interfaces are no longer | 
| 599 |  | read$B!>(Bonly.</p> | 
| 600 |  |  | 
| 601 |  | <p>On setting, the attribute <em class=rfc2119>MUST</em> raise a | 
| 602 |  | <code>NO_MODIFICATION_ALLOWED_ERR</code> <span class=ed>@@ ref</span> | 
| 603 |  | exception if the node is read$B!>(Bonly <span class=ed>@@ ref</span>. | 
| 604 |  | Otherwise, it <em class=rfc2119>MUST</em> set the specified value as the value | 
| 605 |  | associated to the attribute.  No normalization, relative reference resolution, | 
| 606 |  | or lexical validation is performed. <span class=ed>@@ If the new | 
| 607 |  | value is <code>null</code>, ...</span></p> | 
| 608 |  |  | 
| 609 |  | <div class="note memo"> | 
| 610 |  | <p>Setting an invalid identifier might make the node unserializable. | 
| 611 |  | Setting a public identifier while leaveing system identifier unspecified | 
| 612 |  | would also make the <a href="#DocumentType"><code>DocumentType</code></a> | 
| 613 |  | or <a href="#Entity"><code>Entity</code></a> node unserializable.</p> | 
| 614 |  | </div> | 
| 615 |  |  | 
| 616 |  | <div class=ed> | 
| 617 |  | <p>ISSUE: In HTML5, Firefox 1.5, and Opera 9, not specifying public or system identifier results in empty strings.</p> | 
| 618 |  | </div> | 
| 619 |  |  | 
| 620 |  | <p>The <code id=internalSubset>internalSubset</code> attribute of the | 
| 621 |  | <a href="#DocumentType"><code>DocumentType</code></a> interface is no longer | 
| 622 |  | read$B!>(Bonly.</p> | 
| 623 |  |  | 
| 624 |  | <p>On setting, the attribute <em class=rfc2119>MUST</em> raise a | 
| 625 |  | <code>NO_MODIFICATION_ALLOWED_ERR</code> <span class=ed>@@ ref</span> | 
| 626 |  | exception if the node is read$B!>(Bonly <span class=ed>@@ ref</span>. | 
| 627 |  | Otherwise, it <em class=rfc2119>MUST</em> set the specified value as the value | 
| 628 |  | associated to the attribute.  No normalization, or lexical validation is | 
| 629 |  | performed. <span class=ed>@@ If the new value is <code>null</code>, | 
| 630 |  | ...</span></p> | 
| 631 |  |  | 
| 632 | </div> | </div> | 
| 633 |  |  | 
| 634 | <div class=section id=section-documenttypedefinition> | <div class=section id=section-documenttypedefinition> | 
| 635 | <h3>The <code>DocumentTypeDefinition</code> Interface</h3> | <h3>The <code>DocumentTypeDefinition</code> Interface</h3> | 
| 636 |  |  | 
| 637 |  | <div class="note memo"> | 
| 638 |  | <p>This interface is a separated interface from the | 
| 639 |  | <a href="#DocumentType"><code>DocumentType</code></a>, not a set of extensions | 
| 640 |  | to the <a href="#DocumentType"><code>DocumentType</code></a>, | 
| 641 |  | for the historical reason.</p> | 
| 642 |  | </div> | 
| 643 |  |  | 
| 644 |  | <p>The | 
| 645 |  | <a href="#DocumentTypeDefinition"><code>DocumentTypeDefinition</code></a> | 
| 646 |  | interface <em class=rfc2119>MUST</em> be implemented as following:</p> | 
| 647 | <pre class=idl><code>interface <dfn id=DocumentTypeDefinition><code>DocumentTypeDefinition</code></dfn> { | <pre class=idl><code>interface <dfn id=DocumentTypeDefinition><code>DocumentTypeDefinition</code></dfn> { | 
| 648 | readonly attribute NamedNodeMap <a href="#elementTypes">elementTypes</a>; | readonly attribute NamedNodeMap <a href="#elementTypes">elementTypes</a>; | 
| 649 | readonly attribute NamedNodeMap <a href="#generalEntities">generalEntities</a>; | readonly attribute NamedNodeMap <a href="#generalEntities">generalEntities</a>; | 
| 650 | readonly attribute NamedNodeMap <a href="#notations">notations</a>; | readonly attribute NamedNodeMap <a href="#notations">notations</a>; | 
| 651 |  |  | 
| 652 | <span class=ed>more members come here...</span> | <a href="#ElementTypeDefinition">ElementTypeDefinition</a> <a href="#getElementTypeDefinitionNode">getElementTypeDefinitionNode</a> | 
| 653 |  | (in DOMString <a href="#getElementTypeDefinitionNode-name"><var>name</var></a>); | 
| 654 |  | <a href="#Entity">Entity</a> <a href="#getGeneralEntityNode">getGeneralEntityNode</a> | 
| 655 |  | (in DOMString <a href="#getGeneralEntityNode-name"><var>name</var></a>); | 
| 656 |  | <a href="#Notation">Notation</a> <a href="#getNotationNode">getNotationNode</a> | 
| 657 |  | (in DOMString <a href="#getNotationNode-name"><var>name</var></a>); | 
| 658 |  |  | 
| 659 |  | void <a href="#setElementTypeDefinitionNode">setElementTypeDefinitionNode</a> | 
| 660 |  | (in DOMString <a href="#setElementTypeDefinitionNode-node"><var>node</var></a>) | 
| 661 |  | raises (DOMException); | 
| 662 |  | void <a href="#setGeneralEntityNode">setGeneralEntityNode</a> | 
| 663 |  | (in DOMString <a href="#setGeneralEntityNode-node"><var>node</var></a>) | 
| 664 |  | raises (DOMException); | 
| 665 |  | void <a href="#setNotationNode">setNotationNode</a> | 
| 666 |  | (in DOMString <a href="#setNotationNode-node"><var>node</var></a>) | 
| 667 |  | raises (DOMException); | 
| 668 | }</code></pre> | }</code></pre> | 
| 669 |  |  | 
| 670 | <pre class=ed> | <pre class=ed> | 
| 791 | <div class=section id=section-elementtypedefinition> | <div class=section id=section-elementtypedefinition> | 
| 792 | <h3>The <code>ElementTypeDefinition</code> Interface</h3> | <h3>The <code>ElementTypeDefinition</code> Interface</h3> | 
| 793 |  |  | 
| 794 |  | <p>The nodes of type | 
| 795 |  | <a href="#ELEMENT_TYPE_DEFINITION_NODE"><code>ELEMENT_TYPE_DEFINITION_NODE</code></a> | 
| 796 |  | represents an element type definition.  Such a node implements the | 
| 797 |  | <a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> | 
| 798 |  | interface, which extends the <a href="#Node"><code>Node</code></a> | 
| 799 |  | interface.</p> | 
| 800 |  |  | 
| 801 |  | <p>An element type definition represents a definition of the element type. | 
| 802 |  | It is corresponding to the element type declaration in <abbr>DTD</abbr>. | 
| 803 |  | However, an | 
| 804 |  | <a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> node | 
| 805 |  | does not represent the element type definition in <abbr>DTD</abbr> itself. | 
| 806 |  | Even if there are more than one element type declarations for an element type | 
| 807 |  | in <abbr>DTD</abbr>, the result <abbr>DOM</abbr> will contain only an | 
| 808 |  | <a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> | 
| 809 |  | node for that element type.  In addition, if there are attribute definition | 
| 810 |  | declarations for an element type, even when there is no element type | 
| 811 |  | declaration for that element type, the <abbr>DOM</abbr> will contain an | 
| 812 |  | <a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> | 
| 813 |  | node for that element type.</p> | 
| 814 |  |  | 
| 815 |  | <p>The <a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> | 
| 816 |  | interface <em class=rfc2119>MUST</em> be implemented as following:</p> | 
| 817 | <pre class=idl><code>interface <dfn id=ElementTypeDefinition><code>ElementTypeDefinition</code></dfn> : <a href="#Node">Node</a> { | <pre class=idl><code>interface <dfn id=ElementTypeDefinition><code>ElementTypeDefinition</code></dfn> : <a href="#Node">Node</a> { | 
| 818 | readonly attribute <a href="#ownerDocumentTypeDefinition">ownerDocumentTypeDefinition</a>; | readonly attribute <a href="#ownerDocumentTypeDefinition">ownerDocumentTypeDefinition</a>; | 
| 819 |  |  | 
| 820 | <span class=ed>@@ more</span> | <span class=ed>@@ more</span> | 
| 821 | }</code></pre> | }</code></pre> | 
| 822 |  |  | 
| 823 | <pre class=ed>** Modifications to [CODE(DOMi)@en[[[Node]]]] members | <pre class=ed> | 
|  |  |  | 
|  | [3] The getter of the [CODE(DOMa)@en[[[attributes]]]] attribute |  | 
|  | of an [CODE(DOMi)@en[[[ElementTypeDefinition]]]] object |  | 
|  | [['''MUST''']] return [CODE(IDL)@en[[[null]]]]. |  | 
|  |  |  | 
|  | [4] The getter of the [CODE(DOMa)@en[[[baseURI]]]] attribute |  | 
|  | of an [CODE(DOMi)@en[[[ElementTypeDefinition]]]] object |  | 
|  | [['''MUST''']] return the [CODE(DOMa)@en[[[baseURI]]]] |  | 
|  | of the [CDOE(DOMa)@en[[[ownerDocument]]]] of the |  | 
|  | [CODE(DOMi)@en[[[ElementTypeDefinition]]]] object. |  | 
|  | Note that it might be [CODE(IDL)@en[[[null]]]]. |  | 
|  |  |  | 
|  | [1] The getter of the [CODE(DOMa)@en[[[nodeName]]]] attribute |  | 
|  | of an [CODE(DOMi)@en[[[ElementTypeDefinition]]]] object |  | 
|  | [['''MUST''']] return the name of the element type. |  | 
|  |  |  | 
|  | [2] The getters of the [CODE(DOMa)@en[[[nodeValue]]]] |  | 
|  | and [CODE(DOMa)@en[[[textContent]]]] attributes |  | 
|  | of an [CODE(DOMi)@en[[[ElementTypeDefinition]]]] |  | 
|  | object [['''MUST''']] return [CODE(IDL)@en[[[null]]]]. |  | 
|  |  |  | 
|  | ;; Thus, the setter of these attributes do nothing. |  | 
|  |  |  | 
|  | The setter of the [CODE(DOMa)@en[[[textContent]]]] |  | 
|  | attribute of an [CODE(DOMi)@en[[[ElementTypeDefinition]]]] |  | 
|  | object [['''MUST NOT''']] throw a |  | 
|  | [CODE(DOMc)@en[[[NO_MODIFICATION_ALLOWED_ERR]]]]. |  | 
|  |  |  | 
|  | ** The [CODE(DOMi)@en[ElementTypeDefinition]] Interface |  | 
|  |  |  | 
|  | [5] The |  | 
| 824 | [DFN@en[[CODE(DOMa)@en[[[ownerDocumentTypeDefinition]]]] attribute]] | [DFN@en[[CODE(DOMa)@en[[[ownerDocumentTypeDefinition]]]] attribute]] | 
| 825 | of the [CODE(DOMi)@en[[[ElementTypeDefinition]]]] | of the [CODE(DOMi)@en[[[ElementTypeDefinition]]]] | 
| 826 | interface is defined in [[manakai//DOM Extensions]>>50].</pre> | interface is defined in [[manakai//DOM Extensions]>>50].</pre> | 
| 829 | <div class=section id=section-attributedefinition> | <div class=section id=section-attributedefinition> | 
| 830 | <h3>The <code>AttributeDefinition</code> Interface</h3> | <h3>The <code>AttributeDefinition</code> Interface</h3> | 
| 831 |  |  | 
| 832 |  | <p>The nodes of type | 
| 833 |  | <a href="#ATTRIBUTE_DEFINITION_NODE"><code>ATTRIBUTE_DEFINITION_NODE</code></a> | 
| 834 |  | represents an attribute definition.  Such a node implements the | 
| 835 |  | <a href="#AttributeDefinition"><code>AttributeDefinition</code></a> interface, | 
| 836 |  | which extends the <a href="#Node"><code>Node</code></a> interface.</p> | 
| 837 |  |  | 
| 838 |  | <p>An attribute definition represents a definition of the attribute | 
| 839 |  | associated to an element type.  It is corresponding to the attribute definition | 
| 840 |  | in the attribute list declaration in <abbr>DTD</abbr>.  However, an | 
| 841 |  | <a href="#AttributeDefinition"><code>AttributeDefinition</code></a> node does | 
| 842 |  | not represent the attribute definition in <abbr>DTD</abbr> itself.  Even if | 
| 843 |  | there are more than one attribute definitions for an attribute of an element | 
| 844 |  | type in <abbr>DTD</abbr>, the result <abbr>DOM</abbr> will contain only an | 
| 845 |  | <a href="#AttributeDefinition"><code>AttributeDefinition</code></a> node for | 
| 846 |  | that attribute.</p> | 
| 847 |  |  | 
| 848 |  | <p>The <a href="#AttributeDefinition"><code>AttributeDefinition</code></a> | 
| 849 |  | interface <em class=rfc2119>MUST</em> be implemented as following:</p> | 
| 850 | <pre class=idl><code>interface <dfn id=AttributeDefinition><code>AttributeDefinition</code></dfn> : <a href="#Node">Node</a> { | <pre class=idl><code>interface <dfn id=AttributeDefinition><code>AttributeDefinition</code></dfn> : <a href="#Node">Node</a> { | 
| 851 | <span class=comment>// <a href="#DeclaredValueType">DeclaredValueType</a></span> | <span class=comment>// <a href="#DeclaredValueType">DeclaredValueType</a></span> | 
| 852 | const unsigned short <a href="#NO_TYPE_ATTR">NO_TYPE_ATTR</a> = 0; | const unsigned short <a href="#NO_TYPE_ATTR">NO_TYPE_ATTR</a> = 0; | 
| 861 | const unsigned short <a href="#NOTATION_ATTR">NOTATION_ATTR</a> = 9; | const unsigned short <a href="#NOTATION_ATTR">NOTATION_ATTR</a> = 9; | 
| 862 | const unsigned short <a href="#ENUMERATION_ATTR">ENUMERATION_ATTR</a> = 10; | const unsigned short <a href="#ENUMERATION_ATTR">ENUMERATION_ATTR</a> = 10; | 
| 863 | const unsigned short <a href="#UNKNOWN_ATTR">UNKNOWN_ATTR</a> = 11; | const unsigned short <a href="#UNKNOWN_ATTR">UNKNOWN_ATTR</a> = 11; | 
| 864 |  |  | 
| 865 |  | <span class=comment>// <a href="#DefaultValueType">DefaultValueType</a></span> | 
| 866 |  | const unsigned short <a href="#UNKNOWN_DEFAULT">UNKNOWN_DEFAULT</a> = 0; | 
| 867 |  | const unsigned short <a href="#FIXED_DEFAULT">FIXED_DEFAULT</a> = 1; | 
| 868 |  | const unsigned short <a href="#REQUIRED_DEFAULT">REQUIRED_DEFAULT</a> = 2; | 
| 869 |  | const unsigned short <a href="#IMPLIED_DEFAULT">IMPLIED_DEFAULT</a> = 3; | 
| 870 |  | const unsigned short <a href="#EXPLICIT_DEFAULT">EXPLICIT_DEFAULT</a> = 4; | 
| 871 |  |  | 
| 872 | readonly attribute <a href="#ElementTypeDefinition">ElementTypeDefinition</a> <a href="#ownerElementTypeDefinition">ownerElementTypeDefinition</a>; | readonly attribute <a href="#ElementTypeDefinition">ElementTypeDefinition</a> <a href="#ownerElementTypeDefinition">ownerElementTypeDefinition</a>; | 
| 873 |  |  | 
| 877 | <span class=ed>...</span> | <span class=ed>...</span> | 
| 878 | }</code></pre> | }</code></pre> | 
| 879 |  |  | 
|  | <pre class=ed>** Modifications to [CODE(DOMi)@en[[[Node]]]] members |  | 
|  |  |  | 
|  | [3] The getter of the [CODE(DOMa)@en[[[attributes]]]] attribute |  | 
|  | of an [CODE(DOMi)@en[[[AttributeDefinition]]]] object |  | 
|  | [['''MUST''']] return [CODE(IDL)@en[[[null]]]]. |  | 
|  |  |  | 
|  | [9] The getter of the [CODE(DOMa)@en[[[baseURI]]]] attribute |  | 
|  | of an [CODE(DOMi)@en[[[AttributeDefinition]]]] object |  | 
|  | [['''MUST''']] return the [CODE(DOMa)@en[[[baseURI]]]] |  | 
|  | of the [CDOE(DOMa)@en[[[ownerDocument]]]] of the |  | 
|  | [CODE(DOMi)@en[[[AttributeDefinition]]]] object. |  | 
|  | Note that it might be [CODE(IDL)@en[[[null]]]]. |  | 
|  |  |  | 
|  | [1] The getter of the [CODE(DOMa)@en[[[nodeName]]]] attribute |  | 
|  | of an [CODE(DOMi)@en[[[AttributeDefinition]]]] object |  | 
|  | [['''MUST''']] return the name of the attribute. |  | 
|  |  |  | 
|  | [2] The getter of the [CODE(DOMa)@en[[[nodeValue]]]] attribute |  | 
|  | of an [CODE(DOMi)@en[[[AttributeDefinition]]]] object |  | 
|  | [['''MUST''']] return the normalized default value |  | 
|  | of the attribute. |  | 
|  |  |  | 
|  | @@ |  | 
|  |  |  | 
|  | [4] The getter of the [CODE(DOMa)@en[[[textContent]]]] |  | 
|  | attribute of an [CODE(DOMi)@en[[[AttributeDefinition]]]] |  | 
|  | object [['''MUST''']] behave as if it were an |  | 
|  | [CODE(DOMi)@en[[[Attr]]]] object. |  | 
|  |  |  | 
|  | The setter of the [CODE(DOMa)@en[[[textContent]]]] attribute |  | 
|  | of an [CODE(DOMi)@en[[[AttributeDefinition]]]] object |  | 
|  | [['''MUST''']] behave as if the following algorithm |  | 
|  | is performed: |  | 
|  | = If the [CODE(DOMi)@en[[[AttributeDefinition]]]] |  | 
|  | object is read-only, then throw an |  | 
|  | [CODE(DOMc)@en[[[NO_MODIFICATION_ALLOWED_ERR]]]]. |  | 
|  | = Remove any child node the node has. |  | 
|  | = If the new value is not empty and not [CODE(IDL)@en[[[null]]]], |  | 
|  | then create a [CODE(DOMi)@en[[[Text]]]] node |  | 
|  | whose [CODE(DOMa)@en[[[data]]]] is the new value |  | 
|  | and append it to the [CODE(DOMi)@en[[[AttributeDefinition]]]]. |  | 
|  | </pre> |  | 
|  |  |  | 
| 880 | <dl> | <dl> | 
| 881 | <dt><dfn id=ownerElementTypeDefinition class=dom-attr><code>ownerElementTypeDefinition</code></dfn> | <dt><dfn id=ownerElementTypeDefinition class=dom-attr><code>ownerElementTypeDefinition</code></dfn> | 
| 882 | of type | of type | 
| 1014 | <em class=rfc2119>MUST</em> set the specified value as the value | <em class=rfc2119>MUST</em> set the specified value as the value | 
| 1015 | associated to this attribute.</p> | associated to this attribute.</p> | 
| 1016 |  |  | 
| 1017 | <p>If the <code>AttributeDefinition</code> node is created during the process | <p>If the | 
| 1018 | to create a <abbr>DOM</abbr> from an <abbr>XML</abbr> document, an | <a href="#AttributeDefinition"><code>AttributeDefinition</code></a> node is | 
| 1019 | appropriate value from the | created during the process to create a <abbr>DOM</abbr> from an | 
| 1020 |  | <abbr>XML</abbr> document, an appropriate value from the | 
| 1021 | <a href="#DefaultValueType"><code>DefaultValueType</code></a> definition | <a href="#DefaultValueType"><code>DefaultValueType</code></a> definition | 
| 1022 | group <em class=rfc2119>MUST</em> be set to the attribute.</p> | group <em class=rfc2119>MUST</em> be set to the attribute.</p> | 
| 1023 |  |  |