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> |
181 |
DocumentType <a href="#createDocumentTypeDefinition">createDocumentTypeDefinition</a> |
DocumentType <a href="#createDocumentTypeDefinition">createDocumentTypeDefinition</a> |
182 |
(in DOMString <a href="#createDocumentTypeDefinition-name"><var>name</var></a>) |
(in DOMString <a href="#createDocumentTypeDefinition-name"><var>name</var></a>) |
183 |
raises (DOMException); |
raises (DOMException); |
184 |
ElementTypeDefinition <a href="#createElementTypeDefinition">createElementTypeDefinition</a> |
<a href="#ElementTypeDefinition">ElementTypeDefinition</a> <a href="#createElementTypeDefinition">createElementTypeDefinition</a> |
185 |
(in DOMString <a href="#createElementTypeDefinition-name"><var>name</var></a>) |
(in DOMString <a href="#createElementTypeDefinition-name"><var>name</var></a>) |
186 |
raises (DOMException); |
raises (DOMException); |
187 |
AttributeDefinition <a href="#createAttributeDefinition">createAttributeDefinition</a> |
<a href="#AttributeDefinition">AttributeDefinition</a> <a href="#createAttributeDefinition">createAttributeDefinition</a> |
188 |
(in DOMString <a href="#createAttributeDefinition-name"><var>name</var></a>) |
(in DOMString <a href="#createAttributeDefinition-name"><var>name</var></a>) |
189 |
raises (DOMException); |
raises (DOMException); |
190 |
Entity <a href="#createGeneralEntity">createGeneralEntityDefinition</a> |
<a href="#Entity">Entity</a> <a href="#createGeneralEntity">createGeneralEntityDefinition</a> |
191 |
(in DOMString <a href="#createGeneralEntity-name"><var>name</var></a>) |
(in DOMString <a href="#createGeneralEntity-name"><var>name</var></a>) |
192 |
raises (DOMException); |
raises (DOMException); |
193 |
Notation <a href="#createNotation">createNotation</a> |
<a href="#Notation">Notation</a> <a href="#createNotation">createNotation</a> |
194 |
(in DOMString <a href="#createNotation-name"><var>name</var></a>) |
(in DOMString <a href="#createNotation-name"><var>name</var></a>) |
195 |
raises (DOMException); |
raises (DOMException); |
196 |
}</code></pre> |
}</code></pre> |
401 |
define it for <code>Document</code> methods.</p> |
define it for <code>Document</code> methods.</p> |
402 |
|
|
403 |
<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> |
|
|
|
|
<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> |
|
404 |
</div> |
</div> |
405 |
|
|
406 |
</div> |
</div> |
413 |
readonly attribute NamedNodeMap <a href="#generalEntities">generalEntities</a>; |
readonly attribute NamedNodeMap <a href="#generalEntities">generalEntities</a>; |
414 |
readonly attribute NamedNodeMap <a href="#notations">notations</a>; |
readonly attribute NamedNodeMap <a href="#notations">notations</a>; |
415 |
|
|
416 |
<span class=ed>more members come here...</span> |
<a href="#ElementTypeDefinition">ElementTypeDefinition</a> <a href="#getElementTypeDefinitionNode">getElementTypeDefinitionNode</a> |
417 |
|
(in DOMString <a href="#getElementTypeDefinitionNode-name"><var>name</var></a>); |
418 |
|
<a href="#Entity">Entity</a> <a href="#getGeneralEntityNode">getGeneralEntityNode</a> |
419 |
|
(in DOMString <a href="#getGeneralEntityNode-name"><var>name</var></a>); |
420 |
|
<a href="#Notation">Notation</a> <a href="#getNotationNode">getNotationNode</a> |
421 |
|
(in DOMString <a href="#getNotationNode-name"><var>name</var></a>); |
422 |
|
|
423 |
|
void <a href="#setElementTypeDefinitionNode">setElementTypeDefinitionNode</a> |
424 |
|
(in DOMString <a href="#setElementTypeDefinitionNode-node"><var>node</var></a>) |
425 |
|
raises (DOMException); |
426 |
|
void <a href="#setGeneralEntityNode">setGeneralEntityNode</a> |
427 |
|
(in DOMString <a href="#setGeneralEntityNode-node"><var>node</var></a>) |
428 |
|
raises (DOMException); |
429 |
|
void <a href="#setNotationNode">setNotationNode</a> |
430 |
|
(in DOMString <a href="#setNotationNode-node"><var>node</var></a>) |
431 |
|
raises (DOMException); |
432 |
}</code></pre> |
}</code></pre> |
433 |
|
|
434 |
<pre class=ed> |
<pre class=ed> |
804 |
<em class=rfc2119>MUST</em> set the specified value as the value |
<em class=rfc2119>MUST</em> set the specified value as the value |
805 |
associated to this attribute.</p> |
associated to this attribute.</p> |
806 |
|
|
807 |
<p>If the <code>AttributeDefinition</code> node is created during the process |
<p>If the |
808 |
to create a <abbr>DOM</abbr> from an <abbr>XML</abbr> document, an |
<a href="#AttributeDefinition"><code>AttributeDefinition</code></a> node is |
809 |
appropriate value from the |
created during the process to create a <abbr>DOM</abbr> from an |
810 |
|
<abbr>XML</abbr> document, an appropriate value from the |
811 |
<a href="#DefaultValueType"><code>DefaultValueType</code></a> definition |
<a href="#DefaultValueType"><code>DefaultValueType</code></a> definition |
812 |
group <em class=rfc2119>MUST</em> be set to the attribute.</p> |
group <em class=rfc2119>MUST</em> be set to the attribute.</p> |
813 |
|
|
859 |
|
|
860 |
</div> |
</div> |
861 |
|
|
862 |
|
<div class=section id=section-documenttype> |
863 |
|
<h3>Modifications to the <code id=DocumentType>DocumentType</code> |
864 |
|
Interface</h3> |
865 |
|
|
866 |
|
<p>A <a href="#DocumentType"><code>DocumentType</code></a> interface |
867 |
|
<em class=rfc2119>MAY</em> contain zero or more |
868 |
|
<a href="#ProcessingInstruction"><code>ProcessingInstruction</code></a> |
869 |
|
nodes in the <code>NodeList</code> object contained in the |
870 |
|
<code>childNodes</code> attribute of the |
871 |
|
<a href="#DocumentType"><code>DocumentType</code></a> node.</p> |
872 |
|
|
873 |
|
<p>If the <a href="#DocumentType"><code>DocumentType</code></a> node is created |
874 |
|
during the process to create a <abbr>DOM</abbr> from an <abbr>XML</abbr> |
875 |
|
document, the <code>NodeList</code> object in the <code>childNodes</code> |
876 |
|
object <em class=rfc2119>MUST</em> contains the |
877 |
|
<a href="#ProcessingInstruction"><code>ProcessingInstruction</code></a> |
878 |
|
nodes representing the processing instructions in the document type |
879 |
|
definition of the document processed <span class=ed>@@ ref</span> by |
880 |
|
the <abbr>XML</abbr> processor. If the |
881 |
|
<a href="#DocumentType"><code>DocumentType</code></a> node is marked |
882 |
|
as read$B!>(Bonly, then all the child nodes <em class=rfc2119>MUST</em> |
883 |
|
also be marked as read$B!>(Bonly.</p> |
884 |
|
|
885 |
|
<p>If a <a href="#DocumentType"><code>DocumentType</code></a> node is created |
886 |
|
from a document type declaration information item <span class=ed>@@ ref</span>, |
887 |
|
the <code>NodeList</code> object in the <code>childNodes</code> attribute |
888 |
|
of the node <em class=rfc2119>MUST</em> contain the |
889 |
|
<a href="#ProcessingInstruction"><code>ProcessingInstruction</code></a> nodes |
890 |
|
created from the processing instruction information items in the list in the |
891 |
|
[children] property of the document type declaration item in the same |
892 |
|
order.</p> |
893 |
|
|
894 |
|
<p>If a <a href="#DocumentType"><code>DocumentType</code></a> node is mapped to |
895 |
|
a document type declaration information item, the list in the [children] |
896 |
|
property <em class=rfc2119>MUST</em> contain the processng instruction |
897 |
|
information items created from the |
898 |
|
<a href="#ProcessingInstruction"><code>ProcessingInstruction</code></a> nodes |
899 |
|
in the <code>NodeList</code> object in the <code>childNodes</code> attribute |
900 |
|
of the <a href="#DocumentType"><code>DocumentType</code></a> node.</p> |
901 |
|
|
902 |
|
<pre class=idl><code>// Modifications to the DocumentType interface |
903 |
|
attribute DOMString <a href="#publicId">publicId</a>; |
904 |
|
attribute DOMString <a href="#systemId">systemId</a>; |
905 |
|
|
906 |
|
attribute DOMString <a href="#internalSubset">internalSubset</a>; |
907 |
|
</code></pre> |
908 |
|
|
909 |
|
<p>The <code id=publicId>publicId</code> attribute and the |
910 |
|
<code id=systemId>systemId</code> attribute of |
911 |
|
<a href="#DocumentType"><code>DocumentType</code></a>, |
912 |
|
<a href="#Entity"><code>Entity</code></a>, and |
913 |
|
<a href="#Notation"><code>Notation</code></a> interfaces are no longer |
914 |
|
read$B!>(Bonly.</p> |
915 |
|
|
916 |
|
<p>On setting, the attribute <em class=rfc2119>MUST</em> raise a |
917 |
|
<code>NO_MODIFICATION_ALLOWED_ERR</code> <span class=ed>@@ ref</span> |
918 |
|
exception if the node is read$B!>(Bonly <span class=ed>@@ ref</span>. |
919 |
|
Otherwise, it <em class=rfc2119>MUST</em> set the specified value as the value |
920 |
|
associated to the attribute. No normalization, relative reference resolution, |
921 |
|
or lexical validation is performed. <span class=ed>@@ If the new |
922 |
|
value is <code>null</code>, ...</span></p> |
923 |
|
|
924 |
|
<div class="note memo"> |
925 |
|
<p>Setting an invalid identifier might make the node unserializable. |
926 |
|
Setting a public identifier while leaveing system identifier unspecified |
927 |
|
would also make the <a href="#DocumentType"><code>DocumentType</code></a> |
928 |
|
or <a href="#Entity"><code>Entity</code></a> node unserializable.</p> |
929 |
|
</div> |
930 |
|
|
931 |
|
<div class=ed> |
932 |
|
<p>ISSUE: In HTML5, Firefox 1.5, and Opera 9, not specifying public or system identifier results in empty strings.</p> |
933 |
|
</div> |
934 |
|
|
935 |
|
<p>The <code id=internalSubset>internalSubset</code> attribute of the |
936 |
|
<a href="#DocumentType"><code>DocumentType</code></a> interface is no longer |
937 |
|
read$B!>(Bonly.</p> |
938 |
|
|
939 |
|
<p>On setting, the attribute <em class=rfc2119>MUST</em> raise a |
940 |
|
<code>NO_MODIFICATION_ALLOWED_ERR</code> <span class=ed>@@ ref</span> |
941 |
|
exception if the node is read$B!>(Bonly <span class=ed>@@ ref</span>. |
942 |
|
Otherwise, it <em class=rfc2119>MUST</em> set the specified value as the value |
943 |
|
associated to the attribute. No normalization, or lexical validation is |
944 |
|
performed. <span class=ed>@@ If the new value is <code>null</code>, |
945 |
|
...</span></p> |
946 |
|
|
947 |
|
</div> |
948 |
|
|
949 |
</div> |
</div> |
950 |
|
|
951 |
|
|