| 141 |
<h2><abbr>DOM</abbr> Document Type Definition Module</h2> |
<h2><abbr>DOM</abbr> Document Type Definition Module</h2> |
| 142 |
|
|
| 143 |
<p>The <abbr>DOM</abbr> Document Type Definition module, version 3.0, |
<p>The <abbr>DOM</abbr> Document Type Definition module, version 3.0, |
| 144 |
consists of three interfaces:</p> |
introduces four interfaces: |
| 145 |
<ul> |
<a href="#DocumentXDoctype"><code>DocumentXDoctype</code></a>, |
| 146 |
<li><a href="#DocumentXDoctype"><code>DocumentXDoctype</code></a></li> |
<a href="#DocumentTypeDefinition"><code>DocumentTypeDefinition</code></a>, |
| 147 |
<li><a href="#DocumentTypeDefinition"><code>DocumentTypeDefinition</code></a></li> |
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a>, |
| 148 |
<li><a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a></li> |
and <a href="#AttributeDefinition"><code>AttributeDefinition</code></a>. |
| 149 |
<li><a href="#AttributeDefinition"><code>AttributeDefinition</code></a></li> |
In addition, it modifies existing interfaces |
|
</ul> |
|
|
|
|
|
<p>In addition, it modifies interfaces |
|
| 150 |
<a href="#Node"><code>Node</code></a>, |
<a href="#Node"><code>Node</code></a>, |
| 151 |
|
<a href="#Document"><code>Document</code></a>, |
| 152 |
<a href="#DocumentType"><code>DocumentType</code></a>, |
<a href="#DocumentType"><code>DocumentType</code></a>, |
| 153 |
<a href="#Entity"><code>Entity</code></a>, |
<a href="#Entity"><code>Entity</code></a>, and |
| 154 |
<a href="#EntityReference"><code>EntityReference</code></a>, |
<a href="#Notation"><code>Notation</code></a>.</p> |
|
<a href="#Notation"><code>Notation</code></a>, and |
|
|
<a href="#ProcessingInstruction"><code>ProcessingInstruction</code></a>.</p> |
|
| 155 |
|
|
| 156 |
<div class=section id=features> |
<div class=section id=features> |
| 157 |
<h3>Feature Name</h3> |
<h3>Feature Name</h3> |
| 215 |
of the node in the <code>ownerDocument</code> attribute of the node. |
of the node in the <code>ownerDocument</code> attribute of the node. |
| 216 |
Note that the value might be <code>null</code>.</p> |
Note that the value might be <code>null</code>.</p> |
| 217 |
</dd> |
</dd> |
| 218 |
|
<dt><code id=cloneNode>cloneNode</code></dt> |
| 219 |
|
<dd class=ed>@@</dd> |
| 220 |
|
<dd class=ed>@@ If Attr and AttributeDefinition is inconsistent, then ...</dd> |
| 221 |
|
<dt><code id=compareDocumentPosition>compareDocumentPosition</code></dt> |
| 222 |
|
<dd class=ed>@@</dd> |
| 223 |
|
<dt><code id=isDefaultNamespace>isDefaultNamespace</code></dt> |
| 224 |
|
<dd><p>When invoked, the method <em class=rfc2119>MUST</em> return |
| 225 |
|
<code>false</code>.</p></dd> |
| 226 |
<dt><code id=isEqualNode>isEqualNode</code></dt> |
<dt><code id=isEqualNode>isEqualNode</code></dt> |
| 227 |
<dd><p>For the <a href="#isEqualNode"><code>isEqualNode</code></a> method, |
<dd><p>For the <a href="#isEqualNode"><code>isEqualNode</code></a> method, |
| 228 |
following items are added to the list of conditions for equality:</p> |
following items are added to the list of conditions for equality:</p> |
| 280 |
items that are equal to a string in a list is equal to the number |
items that are equal to a string in a list is equal to the number |
| 281 |
of the items equal to the string in another list.</p></li> |
of the items equal to the string in another list.</p></li> |
| 282 |
</ul></dd> |
</ul></dd> |
| 283 |
|
<dt><code id=lookupNamespaceURI>lookupNamespaceURI</code> and |
| 284 |
|
<code id=lookupPrefix>lookupPrefix</code></dt> |
| 285 |
|
<dd><p>When invoked, the methods <em class=rfc2119>MUST</em> return |
| 286 |
|
<code>null</code>.</p></dd> |
| 287 |
<dt><code id=nodeName>nodeName</code></dt> |
<dt><code id=nodeName>nodeName</code></dt> |
| 288 |
<dd> |
<dd> |
| 289 |
<p>If the node is an |
<p>If the node is an |
| 374 |
and append it to the [CODE(DOMi)@en[[[AttributeDefinition]]]]. |
and append it to the [CODE(DOMi)@en[[[AttributeDefinition]]]]. |
| 375 |
</pre> |
</pre> |
| 376 |
</dd> |
</dd> |
| 377 |
|
<dt><code id=normalize>normalize</code></dt> |
| 378 |
|
<dd><p>When a <a href="#DocumentType"><code>DocumentType</code></a> is |
| 379 |
|
normalized, any nodes in the <code>NamedNodeMap</code> object in the |
| 380 |
|
<a href="#elementTypes"><code>elementTypes</code></a> attribute |
| 381 |
|
<em class=rfc2119>MUST</em> be normalized as well.</p> |
| 382 |
|
|
| 383 |
|
<p>When an |
| 384 |
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> node |
| 385 |
|
is normalized, any nodes in the <code>NamedNodeMap</code> object in the |
| 386 |
|
<a href="#attributeDefinitions"><code>attributeDefinitions</code></a> |
| 387 |
|
attribute <em class=rfc2119>MUST</em> be normalized as well.</p></dd> |
| 388 |
<dt class=ed>@@ ...</dt> |
<dt class=ed>@@ ...</dt> |
| 389 |
</dl> |
</dl> |
| 390 |
|
|
| 391 |
</div> |
</div> |
| 392 |
|
|
| 393 |
|
<div class=section id=section-document> |
| 394 |
|
<h3>Modifications to the <code id=Document>Document</code> Interface</h3> |
| 395 |
|
|
| 396 |
|
<p>If an attempt is made to adopt an |
| 397 |
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> or |
| 398 |
|
<a href="#AttributeDefinition"><code>AttributeDefinition</code></a> node, |
| 399 |
|
the <code id=adoptNode>adoptNode</code> method <em class=rfc2119>MUST</em> |
| 400 |
|
raise a <code>NOT_SUPPORTED_ERR</code> exception <span class=ed>@@ |
| 401 |
|
ref</span>.</p> |
| 402 |
|
</div> |
| 403 |
|
|
| 404 |
<div class=section id=section-documentxdoctype> |
<div class=section id=section-documentxdoctype> |
| 405 |
<h3>The <code>DocumentXDoctype</code> Interface</h3> |
<h3>The <code>DocumentXDoctype</code> Interface</h3> |
| 406 |
|
|
| 871 |
and therefore any change of read-only flag on the node is immediately |
and therefore any change of read-only flag on the node is immediately |
| 872 |
reflected by that of the object. |
reflected by that of the object. |
| 873 |
--> |
--> |
| 874 |
|
<dt><dfn id=getElementTypeDefinitionNode class=dom-method><code>getElementTypeDefinitionNode</code></dfn>, |
| 875 |
|
method</dt> |
| 876 |
|
<dd><p>Returns the |
| 877 |
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> node |
| 878 |
|
with the specified name.</p> |
| 879 |
|
|
| 880 |
|
<p>The |
| 881 |
|
<dfn id=getElementTypeDefinitionNode-name class=dom-param><var>name</var></dfn> |
| 882 |
|
parameter is the name of the element type.</p> |
| 883 |
|
|
| 884 |
|
<p>When invoked, the method <em class=rfc2119>MUST</em> return the |
| 885 |
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> node, |
| 886 |
|
whose <a href="#nodeName"><code>nodeName</code></a> is equal to |
| 887 |
|
<a href="#getElementTypeDefinitionNode-name"><var>name</var></a>, in the |
| 888 |
|
<code>NamedNodeMap</code> object in the |
| 889 |
|
<a href="#elementTypes"><code>elementTypes</code></a> attribute of the |
| 890 |
|
node. If there is no such node, it <em class=rfc2119>MUST</em> return |
| 891 |
|
<code>null</code>.</p></dd> |
| 892 |
|
<dt><dfn id=getElementTypeDefinitionNode class=dom-method><code>getElementTypeDefinitionNode</code></dfn>, |
| 893 |
|
method</dt> |
| 894 |
|
<dd><p>Returns the |
| 895 |
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> node |
| 896 |
|
with the specified name.</p> |
| 897 |
|
|
| 898 |
|
<p>The |
| 899 |
|
<dfn id=getElementTypeDefinitionNode-name class=dom-param><var>name</var></dfn> |
| 900 |
|
parameter is the name of the element type.</p> |
| 901 |
|
|
| 902 |
|
<p>When invoked, the method <em class=rfc2119>MUST</em> return the |
| 903 |
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> node, |
| 904 |
|
whose <a href="#nodeName"><code>nodeName</code></a> is equal to |
| 905 |
|
<a href="#getElementTypeDefinitionNode-name"><var>name</var></a>, in the |
| 906 |
|
<code>NamedNodeMap</code> object in the |
| 907 |
|
<a href="#elementTypes"><code>elementTypes</code></a> attribute of the |
| 908 |
|
node. If there is no such node, it <em class=rfc2119>MUST</em> return |
| 909 |
|
<code>null</code>.</p></dd> |
| 910 |
|
<dt><dfn id=getGeneralEntityNode class=dom-method><code>getGeneralEntityNode</code></dfn>, |
| 911 |
|
method</dt> |
| 912 |
|
<dd><p>Returns the <a href="#Entity"><code>Entity</code></a> node |
| 913 |
|
with the specified name.</p> |
| 914 |
|
|
| 915 |
|
<p>The <dfn id=getEntityNode-name class=dom-param><var>name</var></dfn> |
| 916 |
|
parameter is the name of the general entity.</p> |
| 917 |
|
|
| 918 |
|
<p>When invoked, the method <em class=rfc2119>MUST</em> return the |
| 919 |
|
<a href="#Entity"><code>Entity</code></a> node, |
| 920 |
|
whose <a href="#nodeName"><code>nodeName</code></a> is equal to |
| 921 |
|
<a href="#getEntityNode-name"><var>name</var></a>, in the |
| 922 |
|
<code>NamedNodeMap</code> object in the |
| 923 |
|
<a href="#entities"><code>entities</code></a> attribute of the |
| 924 |
|
node. If there is no such node, it <em class=rfc2119>MUST</em> return |
| 925 |
|
<code>null</code>.</p></dd> |
| 926 |
|
<dt><dfn id=getNotationNode class=dom-method><code>getNotationNode</code></dfn>, |
| 927 |
|
method</dt> |
| 928 |
|
<dd><p>Returns the <a href="#Notation"><code>Notation>/code></a> node |
| 929 |
|
with the specified name.</p> |
| 930 |
|
|
| 931 |
<dt class=ed>@@ other members... |
<p>The |
| 932 |
|
<dfn id=getNotationNode-name class=dom-param><var>name</var></dfn> |
| 933 |
|
parameter is the name of the notation.</p> |
| 934 |
|
|
| 935 |
|
<p>When invoked, the method <em class=rfc2119>MUST</em> return the |
| 936 |
|
<a href="#Notation"><code>Notation</code></a> node, |
| 937 |
|
whose <a href="#nodeName"><code>nodeName</code></a> is equal to |
| 938 |
|
<a href="#getNotationNode-name"><var>name</var></a>, in the |
| 939 |
|
<code>NamedNodeMap</code> object in the |
| 940 |
|
<a href="#notations"><code>notations</code></a> attribute of the |
| 941 |
|
node. If there is no such node, it <em class=rfc2119>MUST</em> return |
| 942 |
|
<code>null</code>.</p></dd> |
| 943 |
|
<dt><dfn id=setElementTypeDefinitionNode class=dom-method><code>setElementTypeDefinitionNode</code></dfn>, |
| 944 |
|
method</dt> |
| 945 |
|
<dd class=ed>@@</dd> |
| 946 |
|
<dt><dfn id=setGeneralEntityNode class=dom-method><code>setGeneralEntityNode</code></dfn>, |
| 947 |
|
method</dt> |
| 948 |
|
<dd class=ed>@@</dd> |
| 949 |
|
<dt><dfn id=setNotationNode class=dom-method><code>setNotationNode</code></dfn>, |
| 950 |
|
method</dt> |
| 951 |
|
<dd class=ed>@@</dd> |
| 952 |
</dl> |
</dl> |
| 953 |
|
|
| 954 |
<div class=ed> |
<div class=ed> |
| 1015 |
a <a href="#DocumentType"><code>DocumentType</code></a> node, |
a <a href="#DocumentType"><code>DocumentType</code></a> node, |
| 1016 |
then <code>null</code> <em class=rfc2119>MUST</em> be returned.</p></dd> |
then <code>null</code> <em class=rfc2119>MUST</em> be returned.</p></dd> |
| 1017 |
</dl> |
</dl> |
| 1018 |
|
|
| 1019 |
|
<div class=ed> |
| 1020 |
|
<p>A future version of the specification might define a set of attributes |
| 1021 |
|
and methods for representing and accessing to the content model of the |
| 1022 |
|
element type.</p> |
| 1023 |
|
</div> |
| 1024 |
</div> |
</div> |
| 1025 |
|
|
| 1026 |
<div class=section id=section-attributedefinition> |
<div class=section id=section-attributedefinition> |
| 1279 |
// Additions to the Entity interface |
// Additions to the Entity interface |
| 1280 |
attribute DOMString <a href="#hasReplacementTree">hasReplacementTree</a>; |
attribute DOMString <a href="#hasReplacementTree">hasReplacementTree</a>; |
| 1281 |
readonly attribute <a href="#DocumentType">DocumentType</a> <a href="#ownerDocumentTypeDefinition">ownerDocumentTypeDefinition</a>; |
readonly attribute <a href="#DocumentType">DocumentType</a> <a href="#ownerDocumentTypeDefinition">ownerDocumentTypeDefinition</a>; |
| 1282 |
|
|
| 1283 |
|
attribute boolean <a href="#isExternallyDeclared">isExternallyDeclared</a>; |
| 1284 |
</code></pre> |
</code></pre> |
| 1285 |
|
|
| 1286 |
<p>The <code id=notationName>notationName</code> attribute of the |
<p>The <code id=notationName>notationName</code> attribute of the |
| 1339 |
has its <a href="#hasReplacementTree"><code>hasReplacementTree</code></a> |
has its <a href="#hasReplacementTree"><code>hasReplacementTree</code></a> |
| 1340 |
attribute set to <code>false</code>.</p> |
attribute set to <code>false</code>.</p> |
| 1341 |
</div></dd> |
</div></dd> |
| 1342 |
|
<dt><dfn id=isExternallyDeclared class=dom-attr><code>isExternallyDeclared</code></dfn> |
| 1343 |
|
of type boolean</dt> |
| 1344 |
|
<dd><p>Whether the entity is declared by an external entity declaration or |
| 1345 |
|
not. If the value is <code>true</code>, the entity is declared in an entity |
| 1346 |
|
declaration in the external subset entity or in an external parameter entity. |
| 1347 |
|
If the value is <code>false</code>, the entity is declared in an entity |
| 1348 |
|
declaration in the internal subset, or the node is created in memory.</p> |
| 1349 |
|
|
| 1350 |
|
<p>On getting, the attribute <em class=rfc2119>MUST</em> return |
| 1351 |
|
the value associated to this attribute.</p> |
| 1352 |
|
|
| 1353 |
|
<p>On setting, the attribute <em class=rfc2119>MUST</em> raise a |
| 1354 |
|
<code>NO_MODIFICATION_ALLOWED_ERR</code> <span class=ed>@@ ref</span> |
| 1355 |
|
exception if the node is read$B!>(Bonly <span class=ed>@@ ref</span>. |
| 1356 |
|
Otherwise, it <em class=rfc2119>MUST</em> set the specified value as the |
| 1357 |
|
value associated to this attribute.</p> |
| 1358 |
|
|
| 1359 |
|
<p>If the <a href="#Entity"><code>Entity</code></a> node is created during |
| 1360 |
|
the process to create a <abbr>DOM</abbr> from an <abbr>XML</abbr> document, |
| 1361 |
|
the following requirements are applied: If the entity is an unparsed |
| 1362 |
|
entity, then the attribute <em class=rfc2119>MUST</em> be set to |
| 1363 |
|
<code>false</code>. Otherwise, i.e. the entity is a parsed entity, then the |
| 1364 |
|
attribute <em class=rfc2119>MUST</em> be set to the value of whether the |
| 1365 |
|
entity is declared by an external markup declaration or not.</p></dd> |
| 1366 |
</dl> |
</dl> |
| 1367 |
</div> |
</div> |
| 1368 |
|
|
| 1380 |
</code></pre> |
</code></pre> |
| 1381 |
</div> |
</div> |
| 1382 |
|
|
|
<div class=section id=section-processinginstruction> |
|
|
<h3>Modifications to the |
|
|
<code id=ProcessingInstruction>ProcessingInstruction</code> Interface</h3> |
|
|
|
|
|
<div class=ed>...</div> |
|
|
</div> |
|
|
|
|
| 1383 |
</div> |
</div> |
| 1384 |
|
|
| 1385 |
<div id="references" class="section reference"> |
<div id="references" class="section reference"> |