| 1 |
wakaba |
1.1 |
<!DOCTYPE html> |
| 2 |
|
|
<html lang="en" class="formal-specification status-work-in-progress"> |
| 3 |
|
|
<head> |
| 4 |
wakaba |
1.2 |
<title>DOM Document Type Definition Module</title> |
| 5 |
wakaba |
1.1 |
<link rel="stylesheet" href="http://suika.fam.cx/www/style/html/spec"> |
| 6 |
wakaba |
1.4 |
<link rel="stylesheet" href="http://suika.fam.cx/www/style/def/dom"> |
| 7 |
wakaba |
1.1 |
<link rel="license" href="http://suika.fam.cx/c/gnu/fdl"> |
| 8 |
|
|
</head> |
| 9 |
|
|
<body class="has-abstract"> |
| 10 |
|
|
|
| 11 |
|
|
<div class="header"> |
| 12 |
wakaba |
1.2 |
<h1>DOM Document Type Definition Module</h1> |
| 13 |
wakaba |
1.10 |
<h2>Working Draft <time datetime=2007-12-03>3 December 2007</time></h2> |
| 14 |
wakaba |
1.1 |
|
| 15 |
|
|
<dl class="versions-uri"> |
| 16 |
|
|
<dt>This Version</dt> |
| 17 |
wakaba |
1.2 |
<dd><code class="URI"><<a href="http://suika.fam.cx/www/markup/xml/domdtdef/domdtdef-work" |
| 18 |
|
|
>http://suika.fam.cx/www/markup/xml/domdtdef/domdtdef-work</a>></code></dd> |
| 19 |
wakaba |
1.1 |
<dt>Latest Version</dt> |
| 20 |
wakaba |
1.2 |
<dd><code class="URI"><<a href="http://suika.fam.cx/www/markup/xml/domdtdef/domdtdef" |
| 21 |
|
|
>http://suika.fam.cx/www/markup/xml/domdtdef/domdtdef</a>></code></dd> |
| 22 |
wakaba |
1.1 |
<dt>Latest Working Draft</dt> |
| 23 |
wakaba |
1.2 |
<dd><code class="URI"><<a href="http://suika.fam.cx/www/markup/xml/domdtdef/domdtdef-work" |
| 24 |
|
|
>http://suika.fam.cx/www/markup/xml/domdtdef/domdtdef-work</a>></code></dd> |
| 25 |
wakaba |
1.1 |
<!-- <dt>Previous Version</dt> --> |
| 26 |
|
|
<dt>Version History</dt> |
| 27 |
wakaba |
1.2 |
<dd><code class=URI><<a href="http://suika.fam.cx/gate/cvs/markup/xml/domdtdef/domdtdef-work.en.html">http://suika.fam.cx/gate/cvs/markup/xml/domdtdef/domdtdef-work.en.html</a>></code></dd> |
| 28 |
|
|
<dt id=author>Author</dt> |
| 29 |
wakaba |
1.1 |
<dd><a href="http://suika.fam.cx/~wakaba/who?" rel="author" |
| 30 |
|
|
lang=ja>Wakaba</a> |
| 31 |
|
|
<code class="mail"><<a href="mailto:w@suika.fam.cx" rel="author" |
| 32 |
|
|
>w@suika.fam.cx</a>></code></dd> |
| 33 |
|
|
</dl> |
| 34 |
|
|
|
| 35 |
|
|
<p class="copyright" lang="en">© <time>2007</time> <a |
| 36 |
|
|
href="http://suika.fam.cx/~wakaba/who?" rel="author">Wakaba</a>. |
| 37 |
|
|
Permission is granted to copy, distribute and/or modify this document |
| 38 |
|
|
under the terms of the <a rel="license" |
| 39 |
|
|
href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License</a>, |
| 40 |
|
|
Version 1.2 |
| 41 |
|
|
or any later version published by the <a |
| 42 |
|
|
href="http://www.fsf.org/">Free Software Foundation</a>; |
| 43 |
|
|
with no Invariant Sections, no Front$B!>(BCover Texts, and no Back$B!>(BCover |
| 44 |
|
|
Texts. A copy of the license is |
| 45 |
|
|
available at <code class="URI"><<a |
| 46 |
|
|
href="http://www.gnu.org/copyleft/fdl.html" |
| 47 |
|
|
rel="license">http://www.gnu.org/copyleft/fdl.html</a>></code>.</p> |
| 48 |
|
|
</div> |
| 49 |
|
|
|
| 50 |
|
|
<div id="abstract" class="section"> |
| 51 |
|
|
<h2>Abstract</h2> |
| 52 |
|
|
|
| 53 |
|
|
<div class="ed issue">...</div> |
| 54 |
|
|
|
| 55 |
|
|
</div> |
| 56 |
|
|
|
| 57 |
|
|
<div id="status" class="section"> |
| 58 |
|
|
<h2>Status of This Document</h2> |
| 59 |
|
|
|
| 60 |
|
|
<p class=section-info><em>This section describes the status of this document |
| 61 |
|
|
at the time of its publication. Other documents |
| 62 |
|
|
might supersede this document.</em></p> |
| 63 |
|
|
|
| 64 |
|
|
<p>This document is a working draft, produced as part of the |
| 65 |
|
|
<a href="http://suika.fam.cx/www/manakai-core/doc/web/">manakai</a> |
| 66 |
|
|
project. It might be updated, replaced, or obsoleted by |
| 67 |
|
|
other documents at any time. It is inappropriate to |
| 68 |
|
|
cite this document as other than <q>work in progress</q>.</p> |
| 69 |
|
|
|
| 70 |
|
|
<p>Comments on this document are welcome and |
| 71 |
|
|
may be sent to the <a href="#author">author</a>.</p> |
| 72 |
|
|
|
| 73 |
|
|
<p>Translations of thie document might be available. |
| 74 |
|
|
The English version of the document is the only |
| 75 |
|
|
normative version.</p> |
| 76 |
|
|
</div> |
| 77 |
|
|
|
| 78 |
|
|
<div id="introduction" class="section"> |
| 79 |
|
|
<h2>Introduction</h2> |
| 80 |
|
|
|
| 81 |
|
|
<p class=section-info>This section is <em>non$B!>(Bnormative</em>.</p> |
| 82 |
|
|
|
| 83 |
wakaba |
1.2 |
<div class="issue ed"> |
| 84 |
|
|
<p>This is a work-in-progress specification for DOM Document Type |
| 85 |
|
|
Definition module, as implemented by manakai and |
| 86 |
|
|
<a href="http://suika.fam.cx/gate/2005/sw/DOM%20XML%20Document%20Type%20Definition">partially documented in the SuikaWiki</a>.</p> |
| 87 |
|
|
</div> |
| 88 |
wakaba |
1.1 |
|
| 89 |
wakaba |
1.3 |
<p>The <dfn id=term-dom-dtdef><abbr>DOM</abbr> Document Type Definition</dfn> |
| 90 |
|
|
module is a set of <abbr>DOM</abbr> interfaces, including both new |
| 91 |
|
|
interfaces and modifications to existing <abbr>DOM</abbr> interfaces, |
| 92 |
|
|
over which <abbr>DOM</abbr> applications are able to access to the |
| 93 |
|
|
definitions of the document type.</p> |
| 94 |
|
|
|
| 95 |
|
|
<p>Interfaces defined in this specification are partially modeled from |
| 96 |
|
|
early drafts of <abbr>DOM</abbr> level 1 <span class=ed>@@ ref</span>, |
| 97 |
|
|
<abbr>DOM</abbr> Abstract Schema level 3 <span class=ed>@@ ref</span>, and |
| 98 |
|
|
<abbr>XML</abbr> Schema <abbr>API</abbr>, but are not compatible with |
| 99 |
|
|
any of them as a whole.</p> |
| 100 |
wakaba |
1.1 |
</div> |
| 101 |
|
|
|
| 102 |
|
|
<div class="section" id="terminology"> |
| 103 |
|
|
<h2>Terminology</h2> |
| 104 |
|
|
|
| 105 |
|
|
<p>The key words <q><em class="rfc2119">MUST</em></q>, |
| 106 |
|
|
<q><em class="rfc2119">MUST NOT</em></q>, |
| 107 |
|
|
<q><em class="rfc2119">SHOULD</em></q>, |
| 108 |
|
|
<q><em class="rfc2119">SHOULD NOT</em></q>, and |
| 109 |
|
|
<q><em class=rfc2119>MAY</em></q> in this |
| 110 |
|
|
document are to be interpreted as described in |
| 111 |
|
|
<a href="urn:ietf:rfc:2119"><abbr title="Request for Comments">RFC</abbr> |
| 112 |
|
|
2119</a> |
| 113 |
|
|
<cite class="bibref normative">[<a href="#ref-KEYWORDS">KEYWORDS</a>]</cite>.</p> |
| 114 |
|
|
|
| 115 |
|
|
<!-- Strictly speaking the paragraph below is not part of terminology. --> |
| 116 |
|
|
<p>All examples and notes in this specification are non$B!>(Bnormative, |
| 117 |
|
|
as are all sections explicitly marked non$B!>(Bnormative. Everything |
| 118 |
|
|
else in this specification is normative.</p> |
| 119 |
|
|
|
| 120 |
|
|
<p><span class=ed>Algorithm is normative but non-normative</span>. |
| 121 |
|
|
In addition, the order in which <a href="#errors">errors</a> are |
| 122 |
|
|
raised is undefined.</p> |
| 123 |
wakaba |
1.3 |
|
| 124 |
|
|
<p class=ed><var>A</var> object is an object implementing <var>A</var> |
| 125 |
|
|
interface.</p> |
| 126 |
|
|
|
| 127 |
|
|
<p class=ed>@@ ref to DOM Binding Spec</p> |
| 128 |
wakaba |
1.12 |
|
| 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 |
wakaba |
1.3 |
</div> |
| 133 |
|
|
|
| 134 |
|
|
<div class=section id=dom-dtdef> |
| 135 |
|
|
<h2><abbr>DOM</abbr> Document Type Definition Module</h2> |
| 136 |
|
|
|
| 137 |
|
|
<p>The <abbr>DOM</abbr> Document Type Definition module, version 3.0, |
| 138 |
|
|
consists of three interfaces:</p> |
| 139 |
|
|
<ul> |
| 140 |
|
|
<li><a href="#DocumentXDoctype"><code>DocumentXDoctype</code></a></li> |
| 141 |
|
|
<li><a href="#DocumentTypeDefinition"><code>DocumentTypeDefinition</code></a></li> |
| 142 |
|
|
<li><a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a></li> |
| 143 |
|
|
<li><a href="#AttributeDefinition"><code>AttributeDefinition</code></a></li> |
| 144 |
|
|
</ul> |
| 145 |
|
|
|
| 146 |
wakaba |
1.12 |
<p>In addition, it modifies interfaces |
| 147 |
wakaba |
1.3 |
<a href="#Node"><code>Node</code></a>, |
| 148 |
wakaba |
1.12 |
<a href="#DocumentType"><code>DocumentType</code></a>, |
| 149 |
wakaba |
1.3 |
<a href="#Entity"><code>Entity</code></a>, |
| 150 |
wakaba |
1.12 |
<a href="#EntityReference"><code>EntityReference</code></a>, |
| 151 |
|
|
<a href="#Notation"><code>Notation</code></a>, and |
| 152 |
|
|
<a href="#ProcessingInstruction"><code>ProcessingInstruction</code></a>.</p> |
| 153 |
wakaba |
1.3 |
|
| 154 |
|
|
<div class=section id=features> |
| 155 |
|
|
<h3>Feature Name</h3> |
| 156 |
|
|
|
| 157 |
|
|
<p>In a <abbr>DOM</abbr> implementation that supports the version 3.0 of |
| 158 |
|
|
the <abbr>DOM</abbr> Document Type Definition module, the |
| 159 |
|
|
<code>hasFeature</code> method of a <code>DOMImplementation</code> object |
| 160 |
|
|
<em class=rfc2119>MUST</em> return <code>true</code> when the parameters are |
| 161 |
|
|
set to <code>http://suika.fam.cx/www/2006/feature/XDoctype</code> and |
| 162 |
|
|
<code>3.0</code> respectively.</p> |
| 163 |
|
|
|
| 164 |
|
|
<p>In such an implementation, the <code>getFeature</code> method of a |
| 165 |
|
|
<code>Document</code> object <em class=rfc2119>MUST</em> return the (at least |
| 166 |
|
|
conceptually) same object implementing the |
| 167 |
|
|
<a href="#DocumentXDoctype"><code>DocumentXDoctype</code></a> interface when |
| 168 |
|
|
the parameters are set to |
| 169 |
|
|
<code>http://suika.fam.cx/www/2006/feature/XDoctype</code> and |
| 170 |
|
|
<code>3.0</code> respectively. Likewise, any method that takes one or more |
| 171 |
|
|
feature names with or without version number, including the methods |
| 172 |
|
|
<code>hasFeature</code> and <code>getFeature</code>, |
| 173 |
|
|
<em class=rfc2119>MUST</em> behave in a manner consistent with the |
| 174 |
|
|
aforementioned cases.</p> |
| 175 |
wakaba |
1.4 |
</div> |
| 176 |
|
|
|
| 177 |
wakaba |
1.14 |
<div class=section id=section-node> |
| 178 |
|
|
<h3>Modifications to the <code id=Node>Node</code> Interface</h3> |
| 179 |
|
|
|
| 180 |
wakaba |
1.15 |
<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 |
wakaba |
1.14 |
<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 |
wakaba |
1.15 |
<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 |
wakaba |
1.14 |
<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 |
wakaba |
1.15 |
<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 |
wakaba |
1.14 |
<dt class=ed>@@ ...</dt> |
| 306 |
|
|
</dl> |
| 307 |
|
|
|
| 308 |
|
|
</div> |
| 309 |
|
|
|
| 310 |
wakaba |
1.4 |
<div class=section id=section-documentxdoctype> |
| 311 |
wakaba |
1.7 |
<h3>The <code>DocumentXDoctype</code> Interface</h3> |
| 312 |
wakaba |
1.4 |
|
| 313 |
wakaba |
1.15 |
<p>The <a href="#DocumentXDoctype"><code>DocumentXDoctype</code></a> interface |
| 314 |
|
|
<em class=rfc2119>MUST</em> be implemented as following:</p> |
| 315 |
wakaba |
1.4 |
<pre class=idl><code>interface <dfn id=DocumentXDoctype><code>DocumentXDoctype</code></dfn> { |
| 316 |
wakaba |
1.5 |
DocumentType <a href="#createDocumentTypeDefinition">createDocumentTypeDefinition</a> |
| 317 |
|
|
(in DOMString <a href="#createDocumentTypeDefinition-name"><var>name</var></a>) |
| 318 |
|
|
raises (DOMException); |
| 319 |
wakaba |
1.12 |
<a href="#ElementTypeDefinition">ElementTypeDefinition</a> <a href="#createElementTypeDefinition">createElementTypeDefinition</a> |
| 320 |
wakaba |
1.5 |
(in DOMString <a href="#createElementTypeDefinition-name"><var>name</var></a>) |
| 321 |
|
|
raises (DOMException); |
| 322 |
wakaba |
1.12 |
<a href="#AttributeDefinition">AttributeDefinition</a> <a href="#createAttributeDefinition">createAttributeDefinition</a> |
| 323 |
wakaba |
1.5 |
(in DOMString <a href="#createAttributeDefinition-name"><var>name</var></a>) |
| 324 |
|
|
raises (DOMException); |
| 325 |
wakaba |
1.12 |
<a href="#Entity">Entity</a> <a href="#createGeneralEntity">createGeneralEntityDefinition</a> |
| 326 |
wakaba |
1.5 |
(in DOMString <a href="#createGeneralEntity-name"><var>name</var></a>) |
| 327 |
|
|
raises (DOMException); |
| 328 |
wakaba |
1.12 |
<a href="#Notation">Notation</a> <a href="#createNotation">createNotation</a> |
| 329 |
wakaba |
1.5 |
(in DOMString <a href="#createNotation-name"><var>name</var></a>) |
| 330 |
|
|
raises (DOMException); |
| 331 |
wakaba |
1.4 |
}</code></pre> |
| 332 |
|
|
|
| 333 |
wakaba |
1.5 |
<div class=ed>@@ cast definition</div> |
| 334 |
wakaba |
1.4 |
|
| 335 |
wakaba |
1.5 |
<dl> |
| 336 |
|
|
<dt><dfn id=createDocumentTypeDefinition class=dom-method><code>createDocumentTypeDefinition</code></dfn>, |
| 337 |
|
|
method</dt> |
| 338 |
|
|
<dd> |
| 339 |
|
|
<p>This method creates a <code>DocumentType</code> node with the specified |
| 340 |
|
|
name, belonging to the document.</p> |
| 341 |
|
|
<p>The <dfn id=createDocumentTypeDefinition-name class=dom-param><var>name</var></dfn> |
| 342 |
|
|
parameter is the name of the document type.</p> |
| 343 |
|
|
|
| 344 |
|
|
<p>When invoked, the method <em class=rfc2119>MUST</em> create and |
| 345 |
|
|
return a <code>DocumentType</code> node with the following attributes:</p> |
| 346 |
|
|
<dl> |
| 347 |
|
|
<dt><code>attributes</code>, <code>parentNode</code></dt> |
| 348 |
|
|
<dd><code>null</code>.</dd> |
| 349 |
|
|
<dt><code>elementTypes</code>, <code>generalEntities</code>, and |
| 350 |
|
|
<code>notations</code></dt> |
| 351 |
|
|
<dd>Empty <code>NamedNodeMap</code> objects.</dd> |
| 352 |
|
|
<dt><code>entities</code></dt> |
| 353 |
|
|
<dd>The same value as the <code>generalEntities</code> attribute.</dd> |
| 354 |
|
|
<dt><code>childNodes</code></dt> |
| 355 |
|
|
<dd>An empty <code>NodeList</code> object.</dd> |
| 356 |
|
|
<dt><code>internalSubset</code>, <code>publicId</code>, and |
| 357 |
|
|
<code>systemId</code></dt> |
| 358 |
|
|
<dd>Empty strings.</dd> |
| 359 |
|
|
<dt><code>manakaiReadOnly</code> <span class=ed>[manakai]</span></dt> |
| 360 |
|
|
<dd><code>false</code>.</dd> |
| 361 |
|
|
<dt><code>nodeName</code></dt> |
| 362 |
|
|
<dd><a href="#createDocumentTypeDefinition-name"><var>name</var></a>.</dd> |
| 363 |
|
|
<dt><code>ownerDocument</code></dt> |
| 364 |
|
|
<dd>The <code>Document</code> over which the method is invoked.</dd> |
| 365 |
|
|
</dl> |
| 366 |
|
|
<p>In addition, the method <em class=rfc2119>MUST</em> be marked as |
| 367 |
|
|
containing five general entity declarations: <code>amp</code>, |
| 368 |
|
|
<code>lt</code>, <code>gt</code>, <code>quot</code>, and |
| 369 |
|
|
<code>apos</code>.</p> |
| 370 |
|
|
</dd> |
| 371 |
|
|
<dt><dfn id=createElementTypeDefinition class=dom-method><code>createElementTypeDefinition</code></dfn>, |
| 372 |
|
|
method</dt> |
| 373 |
|
|
<dd> |
| 374 |
|
|
<p>This method creates a <code>ElementTypeDefinition</code> node with the |
| 375 |
|
|
specified name, belonging to the document.</p> |
| 376 |
|
|
<p>The <dfn id=createElementTypeDefinition-name class=dom-param><var>name</var></dfn> |
| 377 |
|
|
parameter is the name of the element type defined by the element |
| 378 |
|
|
type definition.</p> |
| 379 |
wakaba |
1.6 |
|
| 380 |
|
|
<p>When invoked, the method <em class=rfc2119>MUST</em> create and |
| 381 |
|
|
return an |
| 382 |
|
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> |
| 383 |
|
|
node with the following attributes:</p> |
| 384 |
|
|
<dl> |
| 385 |
|
|
<dt><a href="#attributeDefinitions"><code>attributeDefinitions</code></a></dt> |
| 386 |
|
|
<dd>An empty <code>NamedNodeMap</code> object.</dd> |
| 387 |
|
|
<dt><code>attributes</code>, <code>parentNode</code></dt> |
| 388 |
|
|
<dd><code>null</code>.</dd> |
| 389 |
|
|
<dt><code>childNodes</code></dt> |
| 390 |
|
|
<dd>An empty <code>NodeList</code> object.</dd> |
| 391 |
|
|
<dt><code>manakaiReadOnly</code> <span class=ed>[manakai]</span></dt> |
| 392 |
|
|
<dd><code>false</code>.</dd> |
| 393 |
|
|
<dt><code>nodeName</code></dt> |
| 394 |
|
|
<dd><a href="#createElementTypeDefinition-name"><var>name</var></a>.</dd> |
| 395 |
|
|
<dt><code>ownerDocument</code></dt> |
| 396 |
|
|
<dd>The <code>Document</code> node over which the method is invoked.</dd> |
| 397 |
|
|
<dt><a href="#ownerDocumentTypeDefinition"><code>ownerDocumentTypeDefinition</code></a></dt> |
| 398 |
|
|
<dd><code>null</code>.</dd> |
| 399 |
|
|
<dt class=ed>@@ Ensure all attributes are defined</dt> |
| 400 |
|
|
</dl> |
| 401 |
wakaba |
1.5 |
</dd> |
| 402 |
|
|
<dt><dfn id=createAttributeDefinition class=dom-method><code>createAttributeDefinition</code></dfn>, |
| 403 |
|
|
method</dt> |
| 404 |
|
|
<dd> |
| 405 |
|
|
<p>This method creates a <code>AttributeDefinition</code> node with the |
| 406 |
|
|
specified name, belonging to the document.</p> |
| 407 |
|
|
<p>The <dfn id=createAttributeDefinition-name class=dom-param><var>name</var></dfn> |
| 408 |
|
|
parameter is the name of the attribute defined by the attribute |
| 409 |
|
|
definition.</p> |
| 410 |
wakaba |
1.6 |
|
| 411 |
|
|
<p>When invoked, the method <em class=rfc2119>MUST</em> create and |
| 412 |
|
|
return an |
| 413 |
|
|
<a href="#AttributeDefinition"><code>AttributeDefinition</code></a> |
| 414 |
|
|
node with the following attributes:</p> |
| 415 |
|
|
<dl> |
| 416 |
|
|
<dt><code>allowedTokens</code></dt> |
| 417 |
|
|
<dd>An empty <code>DOMStringList</code> object.</dd> |
| 418 |
|
|
<dt><code>attributes</code>, |
| 419 |
|
|
<a href="#ownerElementTypeDefinition"><code>ownerElementTypeDefinition</code></a>, |
| 420 |
|
|
and <code>parentNode</code></dt> |
| 421 |
|
|
<dd><code>null</code>.</dd> |
| 422 |
|
|
<dt><code>childNodes</code></dt> |
| 423 |
|
|
<dd>An empty <code>NodeList</code> object.</dd> |
| 424 |
|
|
<dt><code>declaredType</code></dt> |
| 425 |
|
|
<dd><a href="#NO_TYPE_ATTR"><code>NO_TYPE_ATTR</code></a>.</dd> |
| 426 |
|
|
<dt><code>defaultType</code></dt> |
| 427 |
|
|
<dd><a href="#UNKNOWN_DEFAULT"><code>UNKNOWN_DEFAULT</code></a>.</dd> |
| 428 |
|
|
<dt><code>manakaiReadOnly</code> <span class=ed>[manakai]</span></dt> |
| 429 |
|
|
<dd><code>false</code>.</dd> |
| 430 |
|
|
<dt><code>nodeName</code></dt> |
| 431 |
|
|
<dd><a href="#createAttributeDefinition-name"><var>name</var></a>.</dd> |
| 432 |
|
|
<dt><code>ownerDocument</code></dt> |
| 433 |
|
|
<dd>The <code>Document</code> node over which the method is invoked.</dd> |
| 434 |
|
|
<dt class=ed>@@ Ensure all attributes are defined</dt> |
| 435 |
|
|
</dl> |
| 436 |
|
|
|
| 437 |
|
|
<div class=ed> |
| 438 |
|
|
<p>@@ Should we keep these statements?: |
| 439 |
|
|
However, if the <cfg::cfg|xml-id> configuration |
| 440 |
|
|
parameter is set to <code>true</code> and the <var>name</var> |
| 441 |
|
|
is <code>xml:id</code>, then the [CODE(DOMa)@en[[[declaredType]]]] |
| 442 |
|
|
attribute is set to <code>ID_ATTR</code>. |
| 443 |
|
|
[CODE(DOMa)@en[[[defaultType]]]]?</p> |
| 444 |
|
|
</div> |
| 445 |
wakaba |
1.5 |
</dd> |
| 446 |
|
|
<dt><dfn id=createGeneralEntity class=dom-method><code>createGeneralEntity</code></dfn>, |
| 447 |
|
|
method</dt> |
| 448 |
|
|
<dd> |
| 449 |
wakaba |
1.7 |
<p>This method creates a <a href="#Entity"><code>Entity</code></a> node |
| 450 |
|
|
with the specified name, which represents a general entity, belonging to |
| 451 |
|
|
the document.</p> |
| 452 |
wakaba |
1.5 |
<p>The <dfn id=createGeneralEntity-name class=dom-param><var>name</var></dfn> |
| 453 |
|
|
parameter is the name of the general entity.</p> |
| 454 |
wakaba |
1.7 |
|
| 455 |
|
|
<p>When invoked, the method <em class=rfc2119>MUST</em> create and return |
| 456 |
|
|
an <a href="#Entity"><code>Entity</code></a> node with the following |
| 457 |
|
|
attributes:</p> |
| 458 |
|
|
<dl> |
| 459 |
|
|
<dt><code>attributes</code>, <code>notationName</code>, |
| 460 |
|
|
<a href="#ownerDocumentTypeDefinition"><code>ownerDocumentTypeDefinition</code></a>, |
| 461 |
|
|
and <code>parentNode</code></dt> |
| 462 |
|
|
<dd><code>null</code>.</dd> |
| 463 |
|
|
<dt><code>childNodes</code></dt> |
| 464 |
|
|
<dd>An empty <code>NodeList</code> object.</dd> |
| 465 |
|
|
<dt><code>manakaiDeclarationBaseURI</code>, |
| 466 |
|
|
<code>manakaiEntityBaseURI</code>, and |
| 467 |
|
|
<code>manakaiEntityURI</code> <span class=ed>@@ ref</span></dt> |
| 468 |
|
|
<dd>No explicit value is set.</dd> |
| 469 |
|
|
<dt><code>manakaiHasReplacementTree</code> and |
| 470 |
|
|
<code>manakaiReadOnly</code> <span class=ed>[manakai]</span></dt> |
| 471 |
|
|
<dd><code>false</code>.</dd> |
| 472 |
|
|
<dt><code>nodeName</code></dt> |
| 473 |
|
|
<dd><a href="#createGeneralEntity-name"><var>name</var></a>.</dd> |
| 474 |
|
|
<dd> |
| 475 |
|
|
<div class="note memo"> |
| 476 |
|
|
<p>It is not an error for |
| 477 |
|
|
<a href="#createGeneralEntity-name"><var>name</var></a> matching |
| 478 |
|
|
to the name of one of predefined general parsed entities in |
| 479 |
|
|
<abbr>XML</abbr> or <abbr>HTML</abbr>. For example, |
| 480 |
|
|
<a href="#createGeneralEntity-name"><var>name</var></a> might be |
| 481 |
|
|
<code>amp</code>, resulting in an |
| 482 |
|
|
<a href="#Entity"><code>Entity</code></a> node |
| 483 |
|
|
with its <code>nodeName</code> attribute set to <code>amp</code>.</p> |
| 484 |
|
|
</div> |
| 485 |
|
|
</dd> |
| 486 |
|
|
<dt><code>ownerDocument</code></dt> |
| 487 |
|
|
<dd>The <code>Document</code> node over which the method is invoked.</dd> |
| 488 |
|
|
<dt><code>publicId</code>, and <code>systemId</code></dt> |
| 489 |
|
|
<dd><code>null</code>.</dd> |
| 490 |
|
|
<dd class=ed>@@ publicId and systemId should be empty string?</dd> |
| 491 |
|
|
<dt class=ed>@@ Ensure all attributes are defined</dd> |
| 492 |
|
|
</dl> |
| 493 |
wakaba |
1.5 |
</dd> |
| 494 |
|
|
<dt><dfn id=createNotation class=dom-method><code>createNotation</code></dfn>, |
| 495 |
|
|
method</dt> |
| 496 |
|
|
<dd> |
| 497 |
|
|
<p>This method creates a <code>Notation</code> node with the |
| 498 |
|
|
specified name, belonging to the document.</p> |
| 499 |
|
|
<p>The <dfn id=createNotation-name class=dom-param><var>name</var></dfn> |
| 500 |
|
|
parameter is the name of the notation.</p> |
| 501 |
wakaba |
1.7 |
|
| 502 |
|
|
<p>When invoked, the method <em class=rfc2119>MUST</em> create and return |
| 503 |
|
|
a <code>Notation</code> node with the following attributes:</p> |
| 504 |
|
|
<dl> |
| 505 |
|
|
<dt><code>attributes</code>, |
| 506 |
|
|
<a href="#ownerDocumentTypeDefinition"><code>ownerDocumentTypeDefinition</code></a>, |
| 507 |
|
|
and <code>parentNode</code></dt> |
| 508 |
|
|
<dd><code>null</code>.</dd> |
| 509 |
|
|
<dt><code>childNodes</code></dt> |
| 510 |
|
|
<dd>An empty <code>NodeList</code> object.</dd> |
| 511 |
|
|
<dt><code>manakaiDeclarationBaseURI</code></dt> |
| 512 |
|
|
<dd>No explicit value is set.</dd> |
| 513 |
|
|
<dt><code>manakaiReadOnly</code> <span class=ed>[manakai]</span></dt> |
| 514 |
|
|
<dd><code>false</code>.</dd> |
| 515 |
|
|
<dt><code>nodeName</code></dt> |
| 516 |
|
|
<dd><a href="#createNotation-name"><var>name</var></a>.</dd> |
| 517 |
|
|
<dt><code>ownerDocument</code></dt> |
| 518 |
|
|
<dd>The <code>Document</code> node over which the method is invoked.</dd> |
| 519 |
|
|
<dt><code>publicId</code> and <code>systemId</code></dt> |
| 520 |
|
|
<dd><code>null</code>.</dd> |
| 521 |
|
|
<dd class=ed>@@ publicId and systemId should be empty string?</dd> |
| 522 |
|
|
<dt class=ed>@@ Ensure all attributes are defined</dt> |
| 523 |
|
|
</dl> |
| 524 |
wakaba |
1.5 |
</dd> |
| 525 |
|
|
</dl> |
| 526 |
wakaba |
1.4 |
|
| 527 |
wakaba |
1.7 |
<p>These methods <em class=rfc2119>MUST</em> raise an |
| 528 |
|
|
<code>INVALID_CHARACTER_ERR</code> exception <span class=ed>@@ ref</span> |
| 529 |
|
|
if <var>name</var> is <em>not</em> a legal <code>Name</code> according to |
| 530 |
|
|
the <abbr>XML</abbr> version in use, as specified in the |
| 531 |
|
|
<code>xmlVersion</code> attribute of the <code>Document</code> node.</p> |
| 532 |
|
|
|
| 533 |
|
|
<div class="note memo"> |
| 534 |
|
|
<p>Non$B!>(B<abbr>XML</abbr> case is intentionally left unspecified for now, |
| 535 |
|
|
since <abbr>DOM3</abbr> specification <span class=ed>@@ ref</span> does not |
| 536 |
|
|
define it for <code>Document</code> methods.</p> |
| 537 |
|
|
|
| 538 |
|
|
<p><var>name</var> does not have to be a namespace qualified name.</p> |
| 539 |
|
|
</div> |
| 540 |
wakaba |
1.4 |
|
| 541 |
|
|
</div> |
| 542 |
|
|
|
| 543 |
|
|
<div class=section id=section-documenttypedefinition> |
| 544 |
wakaba |
1.7 |
<h3>The <code>DocumentTypeDefinition</code> Interface</h3> |
| 545 |
wakaba |
1.4 |
|
| 546 |
wakaba |
1.15 |
<p>The |
| 547 |
|
|
<a href="#DocumentTypeDefinition"><code>DocumentTypeDefinition</code></a> |
| 548 |
|
|
interface <em class=rfc2119>MUST</em> be implemented as following:</p> |
| 549 |
wakaba |
1.4 |
<pre class=idl><code>interface <dfn id=DocumentTypeDefinition><code>DocumentTypeDefinition</code></dfn> { |
| 550 |
wakaba |
1.8 |
readonly attribute NamedNodeMap <a href="#elementTypes">elementTypes</a>; |
| 551 |
|
|
readonly attribute NamedNodeMap <a href="#generalEntities">generalEntities</a>; |
| 552 |
|
|
readonly attribute NamedNodeMap <a href="#notations">notations</a>; |
| 553 |
|
|
|
| 554 |
wakaba |
1.13 |
<a href="#ElementTypeDefinition">ElementTypeDefinition</a> <a href="#getElementTypeDefinitionNode">getElementTypeDefinitionNode</a> |
| 555 |
|
|
(in DOMString <a href="#getElementTypeDefinitionNode-name"><var>name</var></a>); |
| 556 |
|
|
<a href="#Entity">Entity</a> <a href="#getGeneralEntityNode">getGeneralEntityNode</a> |
| 557 |
|
|
(in DOMString <a href="#getGeneralEntityNode-name"><var>name</var></a>); |
| 558 |
|
|
<a href="#Notation">Notation</a> <a href="#getNotationNode">getNotationNode</a> |
| 559 |
|
|
(in DOMString <a href="#getNotationNode-name"><var>name</var></a>); |
| 560 |
|
|
|
| 561 |
|
|
void <a href="#setElementTypeDefinitionNode">setElementTypeDefinitionNode</a> |
| 562 |
|
|
(in DOMString <a href="#setElementTypeDefinitionNode-node"><var>node</var></a>) |
| 563 |
|
|
raises (DOMException); |
| 564 |
|
|
void <a href="#setGeneralEntityNode">setGeneralEntityNode</a> |
| 565 |
|
|
(in DOMString <a href="#setGeneralEntityNode-node"><var>node</var></a>) |
| 566 |
|
|
raises (DOMException); |
| 567 |
|
|
void <a href="#setNotationNode">setNotationNode</a> |
| 568 |
|
|
(in DOMString <a href="#setNotationNode-node"><var>node</var></a>) |
| 569 |
|
|
raises (DOMException); |
| 570 |
wakaba |
1.4 |
}</code></pre> |
| 571 |
|
|
|
| 572 |
|
|
<pre class=ed> |
| 573 |
|
|
[1] In an implementation that supports the |
| 574 |
|
|
[CODE(URI)@en[[[http://suika.fam.cx/www/2006/feature/XDoctype]]]] |
| 575 |
|
|
feature, a [CODE(DOMi)@en[[[DocumentType]]]] node |
| 576 |
|
|
must implement the [CODE(DOMi)@en[[[DocumentTypeDefinition]]]] |
| 577 |
|
|
interface. See [[DOM XML Document Type Definition]>>3] for |
| 578 |
|
|
details. |
| 579 |
wakaba |
1.8 |
</pre> |
| 580 |
wakaba |
1.4 |
|
| 581 |
wakaba |
1.8 |
<dl> |
| 582 |
|
|
<dt><dfn id=elementTypes class=dom-attr><code>elementTypes</code></dfn> of |
| 583 |
|
|
type <code>NamedNodeMap</code>, read$B!>(Bonly</dt> |
| 584 |
|
|
<dd><p>A live <code>NamedNodeMap</code> object that contains all the element |
| 585 |
|
|
type definitions belonging to the <code>DocumentType</code> node.</p> |
| 586 |
|
|
|
| 587 |
|
|
<p>On getting, the attribute <em class=rfc2119>MUST</em> return the |
| 588 |
|
|
<code>NamedNodeMap</code> object that contains all the |
| 589 |
|
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> |
| 590 |
|
|
nodes belonging to the <code>DocumentType</code> node. The |
| 591 |
|
|
<code>NamedNodeMap</code> object <em class=rfc2119>MUST</em> be read$B!>(Bonly |
| 592 |
|
|
if and only if the node is read$B!>(Bonly. The <code>NamedNodeMap</code> |
| 593 |
|
|
object <em class=rfc2119>MUST</em> be live and the same object |
| 594 |
|
|
<em class=rfc2119>MUST</em> be returned for any invocation.</p> |
| 595 |
|
|
|
| 596 |
|
|
<p>If the <code>DocumentType</code> node is created during the process |
| 597 |
|
|
to create a <abbr>DOM</abbr> from an <abbr>XML</abbr> document, the following |
| 598 |
|
|
requirements are applied: The <code>NamedNodeMap</code> object in the |
| 599 |
|
|
<a href="#elementTypes"><code>elementType</code></a> attribute |
| 600 |
|
|
<em class=rfc2119>MUST</em> be so transformed that the object contains |
| 601 |
|
|
the <code>ElementTypeDefinition</code> nodes for the element types |
| 602 |
|
|
whose name is presented as the <code>Name</code> of the element type or |
| 603 |
|
|
attribute definition list declarations processed by the <abbr>XML</abbr> |
| 604 |
|
|
processor. If there is more than one element type declarations for an |
| 605 |
|
|
element type, then the declarations other than the first one |
| 606 |
|
|
<em class=rfc2119>MUST</em> be ignored for the purpose of constructing the |
| 607 |
|
|
<code>NamedNodeMap</code> object.</p></dd> |
| 608 |
|
|
<dt><dfn id=generalEntities class=dom-attr><code>generalEntities</code></dfn> |
| 609 |
|
|
of type <code>NamedNodeMap</code>, read$B!>(Bonly</dt> |
| 610 |
|
|
<dd><p>A live <code>NamedNodeMap</code> object that contains all the general |
| 611 |
|
|
entities belonging to the <code>DocumentType</code> node.</p> |
| 612 |
|
|
|
| 613 |
|
|
<p>On getting, the attribute <em class=rfc2119>MUST</em> return the |
| 614 |
|
|
same value as the <code>entities</code> attribute (defined in the |
| 615 |
|
|
<code>DocumentType</code> interface) of the same node.</p> |
| 616 |
|
|
|
| 617 |
|
|
<div class="note memo"> |
| 618 |
|
|
<p>This attribute is part of the interface for historical reason.</p> |
| 619 |
|
|
</div></dd> |
| 620 |
|
|
<!-- |
| 621 |
wakaba |
1.4 |
All entities declared in the document type definition |
| 622 |
|
|
contained in or referenced from the document entity |
| 623 |
|
|
might not be exposed through this collection, depending |
| 624 |
|
|
on the information provided by the XML processor for |
| 625 |
|
|
the DOM implementation. In particular, it might not |
| 626 |
|
|
contain any entity if entity references are expanded |
| 627 |
|
|
at the parse time. An implementation [['''MUST NOT''']] |
| 628 |
|
|
expose an [CODE(DOMi)@en[[[Entity]]]] node whose [CODE(DOMa)@en[[[nodeName]]]] |
| 629 |
|
|
is equal to the name of one of five predefined general entities in |
| 630 |
|
|
XML through the collection as the result of parsing of an XML |
| 631 |
|
|
document that has no error. Duplicate entity declarations are also discarded. |
| 632 |
|
|
|
| 633 |
|
|
The attribute [['''MUST''']] return the [CODE(DOMi)@en[[[NamedNodeMap]]]] |
| 634 |
|
|
object that contains all the [CODE(DOMi)@en[[[Entity]]]] nodes |
| 635 |
|
|
representing general entities belong to the node. The returned |
| 636 |
|
|
[CODE(DOMi)@en[[[NamedNodeMap]]]] object [['''MUST''']] be read-only if and only if |
| 637 |
|
|
the node is read-only. Note that the [CODE(DOMi)@en[[[NamedNodeMap]]]] object is live |
| 638 |
|
|
and therefore any change of read-only flag on the node is immediately |
| 639 |
|
|
reflected by that of the object. |
| 640 |
wakaba |
1.8 |
--> |
| 641 |
|
|
<dt><dfn id=notations class=dom-attr><code>notations</code></dfn> of type |
| 642 |
|
|
<code>notations</code>, read$B!>(Bonly</code> |
| 643 |
|
|
<dd><p>A live <code>NamedNodeMap</code> object that contains all the |
| 644 |
|
|
notations belonging to the <code>DocumentType</code> node.</p> |
| 645 |
|
|
|
| 646 |
|
|
<p>On getting, the attribute <em class=rfc2119>MUST</em> return the |
| 647 |
|
|
same value as the <code>notations</code> attribute (defined in the |
| 648 |
|
|
<code>DocumentType</code> interface) of the same node.</p> |
| 649 |
|
|
|
| 650 |
|
|
<div class="note memo"> |
| 651 |
|
|
<p>This attribute is part of the interface for historical reason.</p> |
| 652 |
|
|
<p>Implementations are not required to implement the |
| 653 |
|
|
<code>notations</code> attribute twice (for <code>DocumentType</code> |
| 654 |
|
|
and <code>DocumentTypeDefinition</code> interfaces); they share exactly |
| 655 |
|
|
same definition.</p> |
| 656 |
|
|
</div></dd> |
| 657 |
|
|
<!-- |
| 658 |
wakaba |
1.4 |
If the [CODE(DOMi)@en[[[DocumentTypeDefinition]]]] node is |
| 659 |
|
|
created from an XML document, duplicate notation declarations, if any, in DTD |
| 660 |
|
|
[['''MUST NOT''']] result in a node in the [CODE(DOMi)@en[[[NamedNodeMap]]]] |
| 661 |
|
|
object and only the first declaration [['''MUST''']] be |
| 662 |
|
|
made available as a [CODE(DOMi)@en[[[Notation]]]] node. |
| 663 |
|
|
|
| 664 |
|
|
;; This definition is based on one for the |
| 665 |
|
|
[CODE(DOMa)@en[[[notations]]]] attribute of the |
| 666 |
|
|
[CODE(DOMi)@en[[[DocumentType]]]] interface in DOM XML module. |
| 667 |
|
|
Since duplication is violation to the Validity Constraint, |
| 668 |
|
|
XML parsers might vary on how notations are notified to |
| 669 |
|
|
the application. In particular, [CODE(InfoProp)@en[[[notations]]]] |
| 670 |
|
|
property of the document information item in XML Information Set |
| 671 |
|
|
is so defined that in case ''any'' notation is declared for |
| 672 |
|
|
multiple times then the property has no value. |
| 673 |
|
|
|
| 674 |
|
|
The attribute [['''MUST''']] return the [CODE(DOMi)@en[[[NamedNodeMap]]]] |
| 675 |
|
|
object that contains all the [CODE(DOMi)@en[[[Notation]]]] nodes |
| 676 |
|
|
representing notations belong to the node. The returned |
| 677 |
|
|
[CODE(DOMi)@en[[[NamedNodeMap]]]] object [['''MUST''']] be read-only if and only if |
| 678 |
|
|
the node is read-only. Note that the [CODE(DOMi)@en[[[NamedNodeMap]]]] object is live |
| 679 |
|
|
and therefore any change of read-only flag on the node is immediately |
| 680 |
|
|
reflected by that of the object. |
| 681 |
wakaba |
1.8 |
--> |
| 682 |
wakaba |
1.4 |
|
| 683 |
wakaba |
1.8 |
<dt class=ed>@@ other members... |
| 684 |
|
|
</dl> |
| 685 |
wakaba |
1.4 |
|
| 686 |
wakaba |
1.8 |
<div class=ed> |
| 687 |
|
|
<p>A future version of this interface might define the |
| 688 |
|
|
<code>parameterEntities</code> and getter/setter for parameter entities. |
| 689 |
|
|
</div> |
| 690 |
wakaba |
1.4 |
|
| 691 |
|
|
</div> |
| 692 |
|
|
|
| 693 |
|
|
<div class=section id=section-elementtypedefinition> |
| 694 |
wakaba |
1.7 |
<h3>The <code>ElementTypeDefinition</code> Interface</h3> |
| 695 |
wakaba |
1.4 |
|
| 696 |
wakaba |
1.15 |
<p>The <a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> |
| 697 |
|
|
interface <em class=rfc2119>MUST</em> be implemented as following:</p> |
| 698 |
wakaba |
1.10 |
<pre class=idl><code>interface <dfn id=ElementTypeDefinition><code>ElementTypeDefinition</code></dfn> : <a href="#Node">Node</a> { |
| 699 |
|
|
readonly attribute <a href="#ownerDocumentTypeDefinition">ownerDocumentTypeDefinition</a>; |
| 700 |
|
|
|
| 701 |
|
|
<span class=ed>@@ more</span> |
| 702 |
wakaba |
1.4 |
}</code></pre> |
| 703 |
|
|
|
| 704 |
wakaba |
1.15 |
<pre class=ed> |
| 705 |
wakaba |
1.4 |
[DFN@en[[CODE(DOMa)@en[[[ownerDocumentTypeDefinition]]]] attribute]] |
| 706 |
|
|
of the [CODE(DOMi)@en[[[ElementTypeDefinition]]]] |
| 707 |
|
|
interface is defined in [[manakai//DOM Extensions]>>50].</pre> |
| 708 |
|
|
</div> |
| 709 |
|
|
|
| 710 |
|
|
<div class=section id=section-attributedefinition> |
| 711 |
wakaba |
1.7 |
<h3>The <code>AttributeDefinition</code> Interface</h3> |
| 712 |
wakaba |
1.4 |
|
| 713 |
wakaba |
1.15 |
<p>The <a href="#AttributeDefinition"><code>AttributeDefinition</code></a> |
| 714 |
|
|
interface <em class=rfc2119>MUST</em> be implemented as following:</p> |
| 715 |
wakaba |
1.10 |
<pre class=idl><code>interface <dfn id=AttributeDefinition><code>AttributeDefinition</code></dfn> : <a href="#Node">Node</a> { |
| 716 |
wakaba |
1.9 |
<span class=comment>// <a href="#DeclaredValueType">DeclaredValueType</a></span> |
| 717 |
|
|
const unsigned short <a href="#NO_TYPE_ATTR">NO_TYPE_ATTR</a> = 0; |
| 718 |
|
|
const unsigned short <a href="#CDATA_ATTR">CDATA_ATTR</a> = 1; |
| 719 |
|
|
const unsigned short <a href="#ID_ATTR">ID_ATTR</a> = 2; |
| 720 |
|
|
const unsigned short <a href="#IDREF_ATTR">IDREF_ATTR</a> = 3; |
| 721 |
|
|
const unsigned short <a href="#IDREFS_ATTR">IDREFS_ATTR</a> = 4; |
| 722 |
|
|
const unsigned short <a href="#ENTITY_ATTR">ENTITY_ATTR</a> = 5; |
| 723 |
|
|
const unsigned short <a href="#ENTITIES_ATTR">ENTITIES_ATTR</a> = 6; |
| 724 |
|
|
const unsigned short <a href="#NMTOKEN_ATTR">NMTOKEN_ATTR</a> = 7; |
| 725 |
|
|
const unsigned short <a href="#NMTOKENS_ATTR">NMTOKENS_ATTR</a> = 8; |
| 726 |
|
|
const unsigned short <a href="#NOTATION_ATTR">NOTATION_ATTR</a> = 9; |
| 727 |
|
|
const unsigned short <a href="#ENUMERATION_ATTR">ENUMERATION_ATTR</a> = 10; |
| 728 |
|
|
const unsigned short <a href="#UNKNOWN_ATTR">UNKNOWN_ATTR</a> = 11; |
| 729 |
wakaba |
1.4 |
|
| 730 |
wakaba |
1.10 |
readonly attribute <a href="#ElementTypeDefinition">ElementTypeDefinition</a> <a href="#ownerElementTypeDefinition">ownerElementTypeDefinition</a>; |
| 731 |
|
|
|
| 732 |
|
|
readonly attribute unsigned short <a href="#declaredType">declaredType</a>; |
| 733 |
|
|
readonly attribute unsigned short <a href="#defaultType">defaultType</a>; |
| 734 |
|
|
|
| 735 |
wakaba |
1.9 |
<span class=ed>...</span> |
| 736 |
wakaba |
1.4 |
}</code></pre> |
| 737 |
|
|
|
| 738 |
wakaba |
1.11 |
<dl> |
| 739 |
|
|
<dt><dfn id=ownerElementTypeDefinition class=dom-attr><code>ownerElementTypeDefinition</code></dfn> |
| 740 |
|
|
of type |
| 741 |
|
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a>, |
| 742 |
|
|
read$B!>(Bonly</dt> |
| 743 |
|
|
<dd><p>The |
| 744 |
|
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> to |
| 745 |
|
|
which the <a href="#AttributeDefinition"><code>AttributeDefinition</code></a> |
| 746 |
|
|
node belongs.</p> |
| 747 |
|
|
|
| 748 |
|
|
<p>On getting, the attribute <em class=rfc2119>MUST</em> return an |
| 749 |
|
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> node. |
| 750 |
|
|
It <em class=rfc2119>MUST</em> be such a node that whose |
| 751 |
|
|
<a href="#attributeDefinitons"><code>attributeDefinitions</code></a> |
| 752 |
|
|
attribute contains the <code>NamedNodeMap</code> object that contains |
| 753 |
|
|
the <a href="#AttributeDefinition"><code>AttributeDefinition</code></a> |
| 754 |
|
|
node. If there is no such an |
| 755 |
|
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> node, |
| 756 |
|
|
then <code>null</code> <em class=rfc2119>MUST</em> be returned.</p> |
| 757 |
|
|
<dt><dfn id=declaredType class=dom-attr><code>declaredType</code></dfn> of type |
| 758 |
|
|
<code>unsigned short</code></dt> |
| 759 |
|
|
<dd><p>The declared type <span class=ed>@@ ref</span> of the attribute. |
| 760 |
|
|
It is expected that this attribute contains a value from the definition group |
| 761 |
|
|
<a href="#DeclaredValueType"><code>DeclaredValueType</code></a>.</p> |
| 762 |
|
|
|
| 763 |
|
|
<p>On getting, the attribute <em class=rfc2119>MUST</em> return the |
| 764 |
|
|
value associated to this attribute.</p> |
| 765 |
|
|
|
| 766 |
|
|
<p>On setting, the attribute <em class=rfc2119>MUST</em> raise a |
| 767 |
|
|
<code>NO_MODIFICATION_ALLOWED_ERR</code> <span class=ed>@@ ref</span> |
| 768 |
|
|
exception if the |
| 769 |
|
|
<a href="#AttributeDefinition"><code>AttributeDefinition</code></a> node |
| 770 |
|
|
is read$B!>(Bonly <span class=ed>@@ ref</span>. Otherwise, it |
| 771 |
|
|
<em class=rfc2119>MUST</em> set the specified value as the value |
| 772 |
|
|
associated to this attribute.</p> |
| 773 |
|
|
|
| 774 |
|
|
<p>If the <code>AttributeDefinition</code> node is created during the process |
| 775 |
|
|
to create a <abbr>DOM</abbr> from an <abbr>XML</abbr> document, an |
| 776 |
|
|
appropriate value from the |
| 777 |
|
|
<a href="#DeclaredValueType"><code>DeclaredValueType</code></a> constant |
| 778 |
|
|
group <em class=rfc2119>MUST</em> be set to the attribute.</p> |
| 779 |
|
|
|
| 780 |
|
|
<!-- DeclaredValueType --> |
| 781 |
wakaba |
1.9 |
<p>The definition group |
| 782 |
|
|
<dfn id=DeclaredValueType><code>DeclaredValueType</code></dfn> contains |
| 783 |
wakaba |
1.11 |
integers indicating the declared type of attributes. The definition |
| 784 |
|
|
group contains the following constants:</p> |
| 785 |
wakaba |
1.9 |
|
| 786 |
|
|
<table> |
| 787 |
|
|
<thead> |
| 788 |
|
|
<tr><th scope=col>Name<th scope=col>Value<th scope=col>Description</tr> |
| 789 |
|
|
</thead> |
| 790 |
|
|
<tbody> |
| 791 |
|
|
<tr> |
| 792 |
|
|
<th scope=row><dfn id=NO_TYPE_ATTR class=dom-const><code>NO_TYPE_ATTR</code> |
| 793 |
|
|
<td><code>0</code><td>No value <span class=ed>[INFOSET]</span>.</tr> |
| 794 |
|
|
<tr> |
| 795 |
|
|
<th scope=row><dfn id=CDATA_ATTR class=dom-const><code>CDATA_ATTR</code> |
| 796 |
|
|
<td><code>1</code><td><code>CDATA</code> <span class=ed>[XML]</span>.</tr> |
| 797 |
|
|
<tr> |
| 798 |
|
|
<th scope=row><dfn id=ID_ATTR class=dom-const><code>ID_ATTR</code> |
| 799 |
|
|
<td><code>2</code><td><code>ID</code> <span class=ed>[XML]</span>.</tr> |
| 800 |
|
|
<tr> |
| 801 |
|
|
<th scope=row><dfn id=IDREF_ATTR class=dom-const><code>IDREF_ATTR</code> |
| 802 |
|
|
<td><code>3</code><td><code>IDREF</code> <span class=ed>[XML]</span>.</tr> |
| 803 |
|
|
<tr> |
| 804 |
|
|
<th scope=row><dfn id=IDREFS_ATTR class=dom-const><code>IDREFS_ATTR</code> |
| 805 |
|
|
<td><code>4</code><td><code>IDREFS</code> <span class=ed>[XML]</span>.</tr> |
| 806 |
|
|
<tr> |
| 807 |
|
|
<th scope=row><dfn id=ENTITY_ATTR class=dom-const><code>ENTITY_ATTR</code> |
| 808 |
|
|
<td><code>5</code><td><code>ENTITY</code> <span class=ed>[XML]</span>.</tr> |
| 809 |
|
|
<tr> |
| 810 |
|
|
<th scope=row><dfn id=ENTITIES_ATTR class=dom-const><code>ENTITIES_ATTR</code> |
| 811 |
|
|
<td><code>6</code><td><code>ENTITIES</code> <span class=ed>[XML]</span>.</tr> |
| 812 |
|
|
<tr> |
| 813 |
|
|
<th scope=row><dfn id=NMTOKEN_ATTR class=dom-const><code>NMTOKEN_ATTR</code> |
| 814 |
|
|
<td><code>7</code><td><code>NMTOKEN</code> <span class=ed>[XML]</span>.</tr> |
| 815 |
|
|
<tr> |
| 816 |
|
|
<th scope=row><dfn id=NMTOKENS_ATTR class=dom-const><code>NMTOKENS_ATTR</code> |
| 817 |
|
|
<td><code>8</code><td><code>NMTOKENS</code> <span class=ed>[XML]</span>.</tr> |
| 818 |
|
|
<tr> |
| 819 |
|
|
<th scope=row><dfn id=NOTATION_ATTR class=dom-const><code>NOTATION_ATTR</code> |
| 820 |
|
|
<td><code>9</code><td><code>NOTATION</code> <span class=ed>[XML]</span>.</tr> |
| 821 |
|
|
<tr> |
| 822 |
|
|
<th scope=row><dfn id=ENUMERATION_ATTR class=dom-const><code>ENUMERATION_ATTR</code> |
| 823 |
|
|
<td><code>10</code><td>Enumeration <span class=ed>[XML]</span>.</tr> |
| 824 |
|
|
<tr> |
| 825 |
|
|
<th scope=row><dfn id=UNKNOWN_ATTR class=dom-const><code>UNKNOWN_ATTR</code> |
| 826 |
|
|
<td><code>11</code><td>Unknown, because no declaration for the attribute |
| 827 |
|
|
has been read but the [all declaration processed] property |
| 828 |
|
|
<span class=ed>[INFOSET]</span> would be false.</tr> |
| 829 |
|
|
</tbody> |
| 830 |
|
|
</table> |
| 831 |
|
|
|
| 832 |
|
|
<p>If no attribute type information is available, or if the source |
| 833 |
|
|
of the information does not distinguish <q>no value</q> and <q>unknown</q> |
| 834 |
|
|
<span class=ed>[INFOSET]</span>, then the value |
| 835 |
|
|
<a href="#NO_TYPE_ATTR"><code>NO_TYPE_ATTR</code></a> |
| 836 |
|
|
<em class=rfc2119>MUST</em> be used.</p> |
| 837 |
|
|
|
| 838 |
|
|
<div class="note memo"> |
| 839 |
|
|
<p>An <a href="#AttributeDefinition"><code>AttributeDefinition</code></a> node |
| 840 |
|
|
created by the |
| 841 |
|
|
<a href="#createAttributeDefinition"><code>createAttributeDefinition</code></a> |
| 842 |
|
|
method has its <a href="#declaredType"><code>declaredType</code></a> attribute |
| 843 |
|
|
set to <a href="#NO_TYPE_ATTR"><code>NO_TYPE_ATTR</code></a>.</p> |
| 844 |
|
|
</div> |
| 845 |
|
|
|
| 846 |
|
|
<p>If the source of the information does not distinguish <q>no value</q> |
| 847 |
wakaba |
1.11 |
and/or <q>unknown</q> <span class=ed>[INFOSET]</span> and |
| 848 |
wakaba |
1.9 |
<code>CDATA</code> <span class=ed>[XML]</span>, then the value |
| 849 |
|
|
<a href="#CDATA_ATTR"><code>CDATA_ATTR</code></a> <em class=rfc2119>MUST</em> |
| 850 |
|
|
be used.</p> |
| 851 |
|
|
|
| 852 |
|
|
<p>In Perl binding <span class=ed>[PERLBINDING]</span>, the |
| 853 |
|
|
<code>Attr</code> nodes <em class=rfc2119>MUST</em> implement the |
| 854 |
|
|
<a href="#DeclaredValueType"><code>DeclaredValueType</code></a> |
| 855 |
wakaba |
1.11 |
definition group.</p> |
| 856 |
wakaba |
1.4 |
|
| 857 |
wakaba |
1.11 |
</dd> |
| 858 |
wakaba |
1.10 |
<dt><dfn id=defaultType class=dom-attr><code>defaultType</code></dfn> of |
| 859 |
|
|
type <code>unsigned short</code></dt> |
| 860 |
|
|
<dd><p>The type of the default for the attribute. It is expected that this |
| 861 |
|
|
attribute contains a value from the definition group |
| 862 |
|
|
<a href="#DefaultValueType"><code>DefaultValueType</code></a>.</p> |
| 863 |
|
|
|
| 864 |
|
|
<p>On getting, the attribute <em class=rfc2119>MUST</em> return |
| 865 |
|
|
the value associated to this attribute.</p> |
| 866 |
|
|
|
| 867 |
|
|
<p>On setting, the attribute <em class=rfc2119>MUST</em> raise a |
| 868 |
|
|
<code>NO_MODIFICATION_ALLOWED_ERR</code> <span class=ed>@@ ref</span> |
| 869 |
|
|
exception if the |
| 870 |
|
|
<a href="#AttributeDefinition"><code>AttributeDefinition</code></a> node |
| 871 |
|
|
is read$B!>(Bonly <span class=ed>@@ ref</span>. Otherwise, it |
| 872 |
|
|
<em class=rfc2119>MUST</em> set the specified value as the value |
| 873 |
|
|
associated to this attribute.</p> |
| 874 |
|
|
|
| 875 |
wakaba |
1.12 |
<p>If the |
| 876 |
|
|
<a href="#AttributeDefinition"><code>AttributeDefinition</code></a> node is |
| 877 |
|
|
created during the process to create a <abbr>DOM</abbr> from an |
| 878 |
|
|
<abbr>XML</abbr> document, an appropriate value from the |
| 879 |
wakaba |
1.11 |
<a href="#DefaultValueType"><code>DefaultValueType</code></a> definition |
| 880 |
|
|
group <em class=rfc2119>MUST</em> be set to the attribute.</p> |
| 881 |
|
|
|
| 882 |
|
|
<!-- DefaultValueType --> |
| 883 |
|
|
<p>The definition group |
| 884 |
|
|
<dfn id=DefaultValueType><code>DefaultValueType</code></dfn> |
| 885 |
|
|
contains integers indicating the type of the default for the attribute. |
| 886 |
|
|
The definition group contains the following constans:</p> |
| 887 |
|
|
|
| 888 |
|
|
<table> |
| 889 |
|
|
<thead> |
| 890 |
|
|
<tr><th scope=col>Name<th scope=col>Value<th scope=col>Description</tr> |
| 891 |
|
|
</thead> |
| 892 |
|
|
<tbody> |
| 893 |
|
|
<tr> |
| 894 |
|
|
<th scope=row><dfn id=UNKNOWN_DEFAULT class=dom-const><code>UNKNOWN_DEFAULT</code></dfn> |
| 895 |
|
|
<td><code>0</code><td>Unknown.</tr> |
| 896 |
|
|
<tr> |
| 897 |
|
|
<th scope=row><dfn id=FIXED_DEFAULT class=dom-const><code>FIXED_DEFAULT</code></dfn> |
| 898 |
|
|
<td><code>1</code><td>Provided explicitly and fixed |
| 899 |
|
|
<span class=ed>@@ ref</span> to that value.</tr> |
| 900 |
|
|
<tr> |
| 901 |
|
|
<th scope=row><dfn id=REQUIRED_DEFAULT class=dom-const><code>REQUIRED_DEFAULT</code></dfn> |
| 902 |
|
|
<td><code>2</code><td>No default value and the attribute have to be |
| 903 |
|
|
explicitly specified.</tr> |
| 904 |
|
|
<tr> |
| 905 |
|
|
<th scope=row><dfn id=IMPLIED_DEFAULT class=dom-const><code>IMPLIED_DEFAULT</code></dfn> |
| 906 |
|
|
<td><code>3</code><td>Implied <span class=ed>@@ ref</span>.</tr> |
| 907 |
|
|
<tr> |
| 908 |
|
|
<th scope=row><dfn id=EXPLICIT_DEFAULT class=dom-const><code>EXPLICIT_DEFAULT</code></dfn> |
| 909 |
|
|
<td><code>4</code><td>Provided explicitly.</tr> |
| 910 |
|
|
</tbody> |
| 911 |
|
|
</table> |
| 912 |
|
|
|
| 913 |
|
|
<p>If the source of the default type does not distinguish |
| 914 |
|
|
implied and unknown default types, then the value |
| 915 |
|
|
<a href="#IMPLIED_DEFAULT"><code>IMPLIED_DEFAULT</code></a> |
| 916 |
|
|
<em class=rfc2119>MUST</em> be used.</p> |
| 917 |
|
|
|
| 918 |
|
|
<div class="note memo"> |
| 919 |
|
|
<p>An <a href="#AttributeDefinition"><code>AttributeDefinition</code></a> |
| 920 |
|
|
node created by the |
| 921 |
|
|
<a href="#createAttributeDefinition"><code>createAttributeDefinition</code></a> |
| 922 |
|
|
method has its <a href="#defaultType"><code>defaultType</code></a> |
| 923 |
|
|
attribute set to |
| 924 |
|
|
<a href="#UNKNOWN_DEFAULT"><code>UNKNOWN_DEFAULT</code></a>.</p> |
| 925 |
|
|
</div></dd> |
| 926 |
wakaba |
1.10 |
</dl> |
| 927 |
wakaba |
1.12 |
|
| 928 |
|
|
</div> |
| 929 |
|
|
|
| 930 |
|
|
<div class=section id=section-documenttype> |
| 931 |
|
|
<h3>Modifications to the <code id=DocumentType>DocumentType</code> |
| 932 |
|
|
Interface</h3> |
| 933 |
|
|
|
| 934 |
|
|
<p>A <a href="#DocumentType"><code>DocumentType</code></a> interface |
| 935 |
|
|
<em class=rfc2119>MAY</em> contain zero or more |
| 936 |
|
|
<a href="#ProcessingInstruction"><code>ProcessingInstruction</code></a> |
| 937 |
|
|
nodes in the <code>NodeList</code> object contained in the |
| 938 |
|
|
<code>childNodes</code> attribute of the |
| 939 |
|
|
<a href="#DocumentType"><code>DocumentType</code></a> node.</p> |
| 940 |
|
|
|
| 941 |
|
|
<p>If the <a href="#DocumentType"><code>DocumentType</code></a> node is created |
| 942 |
|
|
during the process to create a <abbr>DOM</abbr> from an <abbr>XML</abbr> |
| 943 |
|
|
document, the <code>NodeList</code> object in the <code>childNodes</code> |
| 944 |
|
|
object <em class=rfc2119>MUST</em> contains the |
| 945 |
|
|
<a href="#ProcessingInstruction"><code>ProcessingInstruction</code></a> |
| 946 |
|
|
nodes representing the processing instructions in the document type |
| 947 |
|
|
definition of the document processed <span class=ed>@@ ref</span> by |
| 948 |
|
|
the <abbr>XML</abbr> processor. If the |
| 949 |
|
|
<a href="#DocumentType"><code>DocumentType</code></a> node is marked |
| 950 |
|
|
as read$B!>(Bonly, then all the child nodes <em class=rfc2119>MUST</em> |
| 951 |
|
|
also be marked as read$B!>(Bonly.</p> |
| 952 |
|
|
|
| 953 |
|
|
<p>If a <a href="#DocumentType"><code>DocumentType</code></a> node is created |
| 954 |
|
|
from a document type declaration information item <span class=ed>@@ ref</span>, |
| 955 |
|
|
the <code>NodeList</code> object in the <code>childNodes</code> attribute |
| 956 |
|
|
of the node <em class=rfc2119>MUST</em> contain the |
| 957 |
|
|
<a href="#ProcessingInstruction"><code>ProcessingInstruction</code></a> nodes |
| 958 |
|
|
created from the processing instruction information items in the list in the |
| 959 |
|
|
[children] property of the document type declaration item in the same |
| 960 |
|
|
order.</p> |
| 961 |
|
|
|
| 962 |
|
|
<p>If a <a href="#DocumentType"><code>DocumentType</code></a> node is mapped to |
| 963 |
|
|
a document type declaration information item, the list in the [children] |
| 964 |
|
|
property <em class=rfc2119>MUST</em> contain the processng instruction |
| 965 |
|
|
information items created from the |
| 966 |
|
|
<a href="#ProcessingInstruction"><code>ProcessingInstruction</code></a> nodes |
| 967 |
|
|
in the <code>NodeList</code> object in the <code>childNodes</code> attribute |
| 968 |
|
|
of the <a href="#DocumentType"><code>DocumentType</code></a> node.</p> |
| 969 |
|
|
|
| 970 |
wakaba |
1.15 |
<p>The implementation of the |
| 971 |
|
|
<a href="#DocumentType"><code>DocumentType</code></a> interface |
| 972 |
|
|
<em class=rfc2119>MUST</em> be modified as following:</p> |
| 973 |
wakaba |
1.12 |
<pre class=idl><code>// Modifications to the DocumentType interface |
| 974 |
|
|
attribute DOMString <a href="#publicId">publicId</a>; |
| 975 |
|
|
attribute DOMString <a href="#systemId">systemId</a>; |
| 976 |
wakaba |
1.13 |
|
| 977 |
|
|
attribute DOMString <a href="#internalSubset">internalSubset</a>; |
| 978 |
wakaba |
1.12 |
</code></pre> |
| 979 |
|
|
|
| 980 |
wakaba |
1.13 |
<p>The <code id=publicId>publicId</code> attribute and the |
| 981 |
|
|
<code id=systemId>systemId</code> attribute of |
| 982 |
|
|
<a href="#DocumentType"><code>DocumentType</code></a>, |
| 983 |
|
|
<a href="#Entity"><code>Entity</code></a>, and |
| 984 |
|
|
<a href="#Notation"><code>Notation</code></a> interfaces are no longer |
| 985 |
|
|
read$B!>(Bonly.</p> |
| 986 |
|
|
|
| 987 |
|
|
<p>On setting, the attribute <em class=rfc2119>MUST</em> raise a |
| 988 |
|
|
<code>NO_MODIFICATION_ALLOWED_ERR</code> <span class=ed>@@ ref</span> |
| 989 |
|
|
exception if the node is read$B!>(Bonly <span class=ed>@@ ref</span>. |
| 990 |
|
|
Otherwise, it <em class=rfc2119>MUST</em> set the specified value as the value |
| 991 |
|
|
associated to the attribute. No normalization, relative reference resolution, |
| 992 |
|
|
or lexical validation is performed. <span class=ed>@@ If the new |
| 993 |
|
|
value is <code>null</code>, ...</span></p> |
| 994 |
wakaba |
1.12 |
|
| 995 |
wakaba |
1.13 |
<div class="note memo"> |
| 996 |
|
|
<p>Setting an invalid identifier might make the node unserializable. |
| 997 |
|
|
Setting a public identifier while leaveing system identifier unspecified |
| 998 |
|
|
would also make the <a href="#DocumentType"><code>DocumentType</code></a> |
| 999 |
|
|
or <a href="#Entity"><code>Entity</code></a> node unserializable.</p> |
| 1000 |
|
|
</div> |
| 1001 |
wakaba |
1.12 |
|
| 1002 |
wakaba |
1.13 |
<div class=ed> |
| 1003 |
|
|
<p>ISSUE: In HTML5, Firefox 1.5, and Opera 9, not specifying public or system identifier results in empty strings.</p> |
| 1004 |
|
|
</div> |
| 1005 |
wakaba |
1.12 |
|
| 1006 |
wakaba |
1.13 |
<p>The <code id=internalSubset>internalSubset</code> attribute of the |
| 1007 |
|
|
<a href="#DocumentType"><code>DocumentType</code></a> interface is no longer |
| 1008 |
|
|
read$B!>(Bonly.</p> |
| 1009 |
|
|
|
| 1010 |
|
|
<p>On setting, the attribute <em class=rfc2119>MUST</em> raise a |
| 1011 |
|
|
<code>NO_MODIFICATION_ALLOWED_ERR</code> <span class=ed>@@ ref</span> |
| 1012 |
|
|
exception if the node is read$B!>(Bonly <span class=ed>@@ ref</span>. |
| 1013 |
|
|
Otherwise, it <em class=rfc2119>MUST</em> set the specified value as the value |
| 1014 |
|
|
associated to the attribute. No normalization, or lexical validation is |
| 1015 |
|
|
performed. <span class=ed>@@ If the new value is <code>null</code>, |
| 1016 |
|
|
...</span></p> |
| 1017 |
wakaba |
1.4 |
|
| 1018 |
wakaba |
1.3 |
</div> |
| 1019 |
|
|
|
| 1020 |
wakaba |
1.1 |
</div> |
| 1021 |
wakaba |
1.3 |
|
| 1022 |
|
|
|
| 1023 |
wakaba |
1.1 |
|
| 1024 |
|
|
|
| 1025 |
|
|
|
| 1026 |
|
|
<div id="references" class="section reference"> |
| 1027 |
|
|
<h2>References</h2> |
| 1028 |
|
|
|
| 1029 |
|
|
<div id="normative-references" class="section normative reference"> |
| 1030 |
|
|
<h3>Normative References</h3> |
| 1031 |
|
|
|
| 1032 |
|
|
<dl> |
| 1033 |
|
|
<dt id=ref-DOM3CORE>DOM3CORE</dt> |
| 1034 |
|
|
<dd class=ed>@@ W3C DOM Level 3 Core</dd> |
| 1035 |
|
|
<dt id=ref-DOMDTDEF>DOMDTDEF</dt> |
| 1036 |
|
|
<dd class=ed>@@ manakai's extension to DOM for document type definitions</dd> |
| 1037 |
|
|
<dt id="ref-KEYWORDS">KEYWORDS</dt> |
| 1038 |
|
|
<dd><cite><a href="urn:ietf:rfc:2119">Key words for use in |
| 1039 |
|
|
<abbr>RFCs</abbr> to Indicate Requirement Levels</a></cite>, |
| 1040 |
|
|
<abbr title="Internet Engineering Task Force">IETF</abbr> |
| 1041 |
|
|
<a href="urn:ietf:bcp:14"><abbr title="Best Current Practice">BCP</abbr> |
| 1042 |
|
|
14</a>, <abbr title="Request for Comments">RFC</abbr> 2119, |
| 1043 |
|
|
<time datetime=1997-03>March 1997</time>. |
| 1044 |
|
|
<em>This</em> version of the specification is referenced.</dd> |
| 1045 |
|
|
<dt id=ref-INFOSET>INFOSET</dt> |
| 1046 |
|
|
<dd class=ed>@@</dd> |
| 1047 |
|
|
<dt id=ref-XML10">XML10</dt> |
| 1048 |
|
|
<dd><cite><a href="http://www.w3.org/TR/2006/REC-xml-20060816">Extensible |
| 1049 |
|
|
Markup Language (<abbr>XML</abbr>) 1.0 (Fourth Edition)</a></cite>, |
| 1050 |
|
|
<abbr>W3C</abbr> Recommendation, <time datetime=2006-08-16>16 August |
| 1051 |
|
|
2006</time>, edited in place <time datetime=2006-09-29>29 September |
| 1052 |
|
|
2006</time>. Tje latest version of the specification is available at |
| 1053 |
|
|
<code class=uri><<a href="http://www.w3.org/TR/xml">http://www.w3.org/TR/xml</a>></code>. |
| 1054 |
|
|
<em>This</em> version of the specification is referenced.</dd> |
| 1055 |
|
|
<dt id=ref-XML11>XML11</dt> |
| 1056 |
|
|
<dd class=ed>@@</dd> |
| 1057 |
|
|
</dl> |
| 1058 |
|
|
</div> |
| 1059 |
|
|
|
| 1060 |
|
|
<div id="informative-references" class="section informative reference"> |
| 1061 |
|
|
<h3>Non$B!>(Bnormative References</h3> |
| 1062 |
|
|
|
| 1063 |
|
|
<dl class=ed> |
| 1064 |
|
|
<dt id=ref-CSS>CSS</dt> |
| 1065 |
|
|
<dd><cite><a href="http://www.w3.org/TR/2007/CR-CSS21-20070719">Cascading |
| 1066 |
|
|
Style Sheets Level 2 Revision 1 (<abbr>CSS</abbr> 2.1) |
| 1067 |
|
|
Specification</a></cite>, |
| 1068 |
|
|
<abbr title="World Wide Web Consortium">W3C</abbr> Candidate |
| 1069 |
|
|
Recommendation, <time datetime=2007-07-19>19 July 2007</time>. |
| 1070 |
|
|
Work in progress. The latest version of the specification is |
| 1071 |
|
|
available at |
| 1072 |
|
|
<code class=URI><<a href="http://www.w3.org/TR/CSS21">http://www.w3.org/TR/CSS21</a>></code>.</dd> |
| 1073 |
|
|
<dt id=ref-CSSOM>CSSOM</dt> |
| 1074 |
|
|
<dd><cite><a href="http://dev.w3.org/cvsweb/~checkout~/csswg/cssom/Overview.html?rev=1.55&content-type=text/html;%20charset=utf-8">Cascading |
| 1075 |
|
|
Style Sheets Object Model (<abbr>CSSOM</abbr>)</a></cite>, |
| 1076 |
|
|
<abbr title="World Wide Web Consortium">W3C</abbr> Editor's Draft, |
| 1077 |
|
|
<time datetime=2007-06-18>18 June 2007</time>. Work in progress. |
| 1078 |
|
|
The latest Editor's Draft of the specification is available at |
| 1079 |
|
|
<code class=URI><<a href="http://dev.w3.org/csswg/cssom/Overview.html">http://dev.w3.org/csswg/cssom/Overview.html</a>></code>.</dd> |
| 1080 |
|
|
<dt id=ref-HTML5>HTML5</dt> |
| 1081 |
|
|
<dd><cite><a href="http://whatwg.org/html5"><abbr>HTML</abbr> 5</a></cite>, |
| 1082 |
|
|
<abbr title="Web Hypertext Application Technology Working Group">WHATWG</abbr> |
| 1083 |
|
|
Working Draft. Work in progress.</dd> |
| 1084 |
|
|
<dt id=ref-SAPI>SAPI</dt> |
| 1085 |
|
|
<dd><cite><a href="http://dev.w3.org/cvsweb/~checkout~/2006/webapi/selectors-api/Overview.html?rev=1.28&content-type=text/html;%20charset=utf-8">Selectors <abbr>API</abbr></a></cite>, |
| 1086 |
|
|
<abbr title="World Wide Web Consortium">W3C</abbr> Editor's Draft, |
| 1087 |
|
|
<time datetime=2007-08-29>29 August 2007</time>. Work in progress. |
| 1088 |
|
|
The latest Editor's Draft of the specification is available at |
| 1089 |
|
|
<code class=URI><<a href="http://dev.w3.org/2006/webapi/selectors-api/Overview.html">http://dev.w3.org/2006/webapi/selectors-api/Overview.html</a>></code>. |
| 1090 |
|
|
The latest published version of the specification is available at |
| 1091 |
|
|
<code class=URI><<a href="http://www.w3.org/TR/selectors-api/">http://www.w3.org/TR/selectors-api/</a>></code>.</dd> |
| 1092 |
|
|
<dt id=XBL2>XBL2</dt> |
| 1093 |
|
|
<dd><cite><a href="http://www.mozilla.org/projects/xbl/xbl2.html"><abbr>XBL</abbr> |
| 1094 |
|
|
2.0</a></cite>, Mozilla.org, <time datetime=2007-03-15>15 Mar 2007</time>. |
| 1095 |
|
|
Work in progress. The latest |
| 1096 |
|
|
<abbr title="World Wide Web Consortium">W3C</abbr>$B!>(Bpublished |
| 1097 |
|
|
version of the specification is available at |
| 1098 |
|
|
<code class=URI><<a href="http://www.w3.org/TR/xbl/">http://www.w3.org/TR/xbl/</a>></code>.</dd> |
| 1099 |
|
|
<dt id=ref-XML5>XML5</dt> |
| 1100 |
|
|
<dd class=ed>@@</dd> |
| 1101 |
|
|
</dl> |
| 1102 |
|
|
</div> |
| 1103 |
|
|
|
| 1104 |
|
|
</div> |
| 1105 |
|
|
|
| 1106 |
|
|
</body> |
| 1107 |
|
|
</html> |