1 |
<!DOCTYPE html> |
<!DOCTYPE html> |
2 |
<html lang="en" class="formal-specification status-work-in-progress"> |
<html lang="en" class="formal-specification"><!-- status-work-in-progress"--> |
3 |
<head> |
<head> |
4 |
<title>manakai's XML Conformance Checking</title> |
<title>DOM Document Type Definition Module</title> |
5 |
<link rel="stylesheet" href="http://suika.fam.cx/www/style/html/spec"> |
<link rel="stylesheet" href="http://suika.fam.cx/www/style/html/spec"> |
6 |
|
<link rel="stylesheet" href="http://suika.fam.cx/www/style/def/dom"> |
7 |
<link rel="license" href="http://suika.fam.cx/c/gnu/fdl"> |
<link rel="license" href="http://suika.fam.cx/c/gnu/fdl"> |
|
<style> |
|
|
a[id]::before { |
|
|
content: "[" attr(id) "]"; |
|
|
color: gray; |
|
|
font-size: 70%; |
|
|
font-family: Courier New, monospace; |
|
|
vertical-align: 60%; |
|
|
} |
|
|
</style> |
|
8 |
</head> |
</head> |
9 |
<body class="has-abstract"> |
<body class="has-abstract"> |
10 |
|
|
11 |
<div class="header"> |
<div class="header"> |
12 |
<h1>manakai's <abbr>XML</abbr> Conformance Checking</h1> |
<h1>DOM Document Type Definition Module</h1> |
13 |
<h2>Working Draft <time datetime=2007-12-01>1 December 2007</time></h2> |
<h2>First Edition <!-- Working Draft --> |
14 |
|
<time datetime=2007-12-09>9 December 2007</time></h2> |
15 |
|
|
16 |
<dl class="versions-uri"> |
<dl class="versions-uri"> |
17 |
<dt>This Version</dt> |
<dt>This Version</dt> |
18 |
<dd><code class="URI"><<a href="http://suika.fam.cx/www/markup/xml/xmlcc/xmlcc-work" |
<dd><code class="URI"><<a href="http://suika.fam.cx/www/markup/xml/domdtdef/domdtdef-20071209" |
19 |
>http://suika.fam.cx/www/markup/xml/xmlcc/xmlcc-work</a>></code></dd> |
>http://suika.fam.cx/www/markup/xml/domdtdef/domdtdef-20071209</a>></code></dd> |
20 |
|
<!-- |
21 |
|
<dd><code class="URI"><<a href="http://suika.fam.cx/www/markup/xml/domdtdef/domdtdef-work" |
22 |
|
>http://suika.fam.cx/www/markup/xml/domdtdef/domdtdef-work</a>></code></dd> |
23 |
|
--> |
24 |
<dt>Latest Version</dt> |
<dt>Latest Version</dt> |
25 |
<dd><code class="URI"><<a href="http://suika.fam.cx/www/markup/xml/xmlcc/xmlcc" |
<dd><code class="URI"><<a href="http://suika.fam.cx/www/markup/xml/domdtdef/domdtdef" |
26 |
>http://suika.fam.cx/www/markup/xml/xmlcc/xmlcc</a>></code></dd> |
>http://suika.fam.cx/www/markup/xml/domdtdef/domdtdef</a>></code></dd> |
27 |
<dt>Latest Working Draft</dt> |
<dt>Latest Working Draft</dt> |
28 |
<dd><code class="URI"><<a href="http://suika.fam.cx/www/markup/xml/xmlcc/xmlcc-work" |
<dd><code class="URI"><<a href="http://suika.fam.cx/www/markup/xml/domdtdef/domdtdef-work" |
29 |
>http://suika.fam.cx/www/markup/xml/xmlcc/xmlcc-work</a>></code></dd> |
>http://suika.fam.cx/www/markup/xml/domdtdef/domdtdef-work</a>></code></dd> |
30 |
<!-- <dt>Previous Version</dt> --> |
<!-- <dt>Previous Version</dt> --> |
31 |
<dt>Version History</dt> |
<dt>Version History</dt> |
32 |
<dd><code class=URI><<a href="http://suika.fam.cx/gate/cvs/markup/xml/xmlcc/xmlcc-work.en.html">http://suika.fam.cx/gate/cvs/markup/xml/xmlcc/xmlcc-work.en.html</a>></code></dd> |
<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> |
33 |
</dl> |
<dt id=author>Author</dt> |
|
<dl class="authors" id="author"> |
|
|
<dt>Author</dt> |
|
34 |
<dd><a href="http://suika.fam.cx/~wakaba/who?" rel="author" |
<dd><a href="http://suika.fam.cx/~wakaba/who?" rel="author" |
35 |
lang=ja>Wakaba</a> |
lang=ja>Wakaba</a> |
36 |
<code class="mail"><<a href="mailto:w@suika.fam.cx" rel="author" |
<code class="mail"><<a href="mailto:w@suika.fam.cx" rel="author" |
55 |
<div id="abstract" class="section"> |
<div id="abstract" class="section"> |
56 |
<h2>Abstract</h2> |
<h2>Abstract</h2> |
57 |
|
|
58 |
<div class="ed issue">...</div> |
<p>The <abbr>DOM</abbr> Document Type Definition module is a set of |
59 |
|
<abbr>DOM</abbr> interfaces, including both new interfaces and modifications |
60 |
|
to existing <abbr>DOM</abbr> interfaces, over which <abbr>DOM</abbr> |
61 |
|
applications are able to access to the definitions of the document type.</p> |
62 |
</div> |
</div> |
63 |
|
|
64 |
<div id="status" class="section"> |
<div id="status" class="section"> |
65 |
<h2>Status of This Document</h2> |
<h2>Status of This Document</h2> |
66 |
|
|
67 |
<p class=section-info><em>This section describes the status of this document |
<p class=section-info>This section describes the status of this document at the |
68 |
at the time of its publication. Other documents |
time of its publication. Other documents might supersede this document.</p> |
69 |
might supersede this document.</em></p> |
|
70 |
|
<p>This document is a specification<!-- working draft -->, |
71 |
<p>This document is a working draft, produced as part of the |
produced as part of the |
72 |
<a href="http://suika.fam.cx/www/markup/html/whatpm/readme">Whatpm</a> |
<a href="http://suika.fam.cx/www/manakai-core/doc/web/">manakai</a> project. |
73 |
subproject of the |
It might be updated, replaced, or obsoleted by other documents at any time. |
74 |
<a href="http://suika.fam.cx/www/manakai-core/doc/web/">manakai</a> |
<!-- It is inappropriate to cite this document as other than |
75 |
project. It might be updated, replaced, or obsoleted by |
<q>work in progress</q>. --></p> |
|
other documents at any time. It is inappropriate to |
|
|
cite this document as other than <q>work in progress</q>.</p> |
|
76 |
|
|
77 |
<p>Comments on this document are welcome and |
<p>Comments on this document are welcome and |
78 |
may be sent to the <a href="#author">author</a>.</p> |
may be sent to the <a href="#author">author</a>.</p> |
79 |
|
|
80 |
<p>Translations of thie document might be available. |
<p>Translations of this document might be available. |
81 |
The English version of the document is the only |
The English version of the document is the only |
82 |
normative version.</p> |
normative version.</p> |
83 |
</div> |
</div> |
87 |
|
|
88 |
<p class=section-info>This section is <em>non$B!>(Bnormative</em>.</p> |
<p class=section-info>This section is <em>non$B!>(Bnormative</em>.</p> |
89 |
|
|
90 |
<div class="issue ed">...</div> |
<p>The <dfn id=term-dom-dtdef><abbr>DOM</abbr> Document Type Definition</dfn> |
91 |
|
module is a set of <abbr>DOM</abbr> interfaces, including both new |
92 |
|
interfaces and modifications to existing <abbr>DOM</abbr> interfaces, |
93 |
|
over which <abbr>DOM</abbr> applications are able to access to the |
94 |
|
definitions of the document type.</p> |
95 |
|
|
96 |
|
<p>Interfaces defined in this document are partially modeled and inspired by |
97 |
|
early drafts of <abbr>DOM</abbr> Level 1 |
98 |
|
<cite class="bibref informative">[<a href="#ref-DOM1WD">DOM1WD</a>]</cite>, |
99 |
|
<abbr>DOM</abbr> Level 3 Abstract Schemas <abbr>W3C</abbr> Note |
100 |
|
<cite class="bibref informative">[<a href="#ref-DOM3AS">DOM3AS</a>]</cite>, |
101 |
|
and <abbr>XML</abbr> Schema <abbr>API</abbr> specification |
102 |
|
<cite class="bibref informative">[<a href="#ref-XSAPI">XSAPI</a>]</cite>, but |
103 |
|
they are not compatible with any of them as a whole.</p> |
104 |
|
</div> |
105 |
|
|
106 |
|
<div class="section" id=conformance> |
107 |
|
<h2>Conformance Requirements</h2> |
108 |
|
|
109 |
|
<div class=section id=terminology> |
110 |
|
<h3>Terminology</h3> |
111 |
|
|
112 |
</div> |
<p>All examples and notes in this specification are non$B!>(Bnormative, |
113 |
|
as are all sections explicitly marked non$B!>(Bnormative.</p> |
114 |
|
|
115 |
|
<p class=ed>Known issues are marked like this. They are non$B!>(Bnormative. <!-- |
116 |
|
However, this paragraph itself is normative. One may argue that this paragraph |
117 |
|
is non$B!>(Bnormative, because this paragraph is marked as an editor's note. |
118 |
|
Anyway, the other editor's notes are non$B!>(Bnormative. --></p> |
119 |
|
|
120 |
<div class="section" id="terminology"> |
<p>Everything else in this document is normative.</p> |
|
<h2>Terminology</h2> |
|
121 |
|
|
122 |
<p>The key words <q><em class="rfc2119">MUST</em></q>, |
<p>The key words <q><em class="rfc2119">MUST</em></q>, |
123 |
<q><em class="rfc2119">MUST NOT</em></q>, |
<q><em class="rfc2119">MUST NOT</em></q>, and <q><em class=rfc2119>MAY</em></q> |
124 |
<q><em class="rfc2119">SHOULD</em></q>, |
in this document are to be interpreted as described in |
|
<q><em class="rfc2119">SHOULD NOT</em></q>, and |
|
|
<q><em class=rfc2119>MAY</em></q> in this |
|
|
document are to be interpreted as described in |
|
125 |
<a href="urn:ietf:rfc:2119"><abbr title="Request for Comments">RFC</abbr> |
<a href="urn:ietf:rfc:2119"><abbr title="Request for Comments">RFC</abbr> |
126 |
2119</a> |
2119</a> |
127 |
<cite class="bibref normative">[<a href="#ref-KEYWORDS">KEYWORDS</a>]</cite>.</p> |
<cite class="bibref normative">[<a href="#ref-KEYWORDS">KEYWORDS</a>]</cite>.</p> |
128 |
|
|
129 |
<!-- Strictly speaking the paragraph below is not part of terminology. --> |
<p>Conformance requirements phrased as algorithms or specific steps |
130 |
<p>All examples and notes in this specification are non$B!>(Bnormative, |
<em class=rfc2119>MAY</em> be implemented in any manner, so long as the end |
131 |
as are all sections explicitly marked non$B!>(Bnormative. Everything |
result is equivalent. Requirements phrased in the imperative as part of |
132 |
else in this specification is normative.</p> |
algorithms are to be interpreted with the meaning of the key word used in |
133 |
|
introducing the algorithm.</p> |
134 |
<p><span class=ed>Algorithm is normative but non-normative</span>. |
|
135 |
In addition, the order in which <a href="#errors">errors</a> are |
<p>Sometimes an exception is phrased as being required to be raised. As |
136 |
raised is undefined.</p> |
specified in the <abbr>DOM</abbr> Core specification |
137 |
|
<cite class="bibref normative">[<a href="#ref-DOM3CORE">DOM3CORE</a>]</cite>, |
138 |
|
when the value of the <code>strictErrorChecking</code> attribute of the |
139 |
|
<a href="#Document"><code>Document</code></a> node is <code>false</code>, |
140 |
|
then the exception is not have to be raised.</p> |
141 |
|
|
142 |
|
<p>Some conformance requirements are phrased as requirements on interfaces, |
143 |
|
attributes, methods, or objects. Such requirements are applied to |
144 |
|
implementations.</p> |
145 |
|
|
146 |
|
<p>The construction <q>a <code><var>Foo</var></code> object</q>, where |
147 |
|
<code><var>Foo</var></code> is an interface, is used instead of the more |
148 |
|
accurate <q>an object implementing the interface |
149 |
|
<code><var>Foo</var></code></q>.</p> |
150 |
|
|
151 |
|
<p>The construction <q>raise a <code><var>Bar</var></code></q>, where |
152 |
|
<code><var>Bar</var></code> is an exception code, is used instead of the more |
153 |
|
accurate <q>raise an exception implementing the interface |
154 |
|
<code>DOMException</code> |
155 |
|
<cite class="bibref normative">[<a href="#ref-DOM3CORE">DOM3CORE</a>]</cite> |
156 |
|
with its <code>code</code> attribute set to |
157 |
|
<code><var>Bar</var></code></q>.</p> |
158 |
|
|
159 |
|
<p>The terms |
160 |
|
<em id=live><a href="http://www.whatwg.org/specs/web-apps/current-work/#live">live</a></em> |
161 |
|
and <em id=setting>setting</em> and <em id=getting>getting</em> of an attribute |
162 |
|
is defined in the HTML5 specification |
163 |
|
<cite class="bibref normative">[<a href="#ref-HTML5">HTML5</a>]</cite>.</p> |
164 |
|
|
165 |
|
<p>The term |
166 |
|
<em id=read-only><a href="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/glossary.html#dt-readonly-node">read$B!>(Bonly (node)</a></em> |
167 |
|
is defined in the <abbr>DOM</abbr> Level 3 Core specification |
168 |
|
<cite class="bibref normative">[<a href="#ref-DOM3CORE">DOM3CORE</a>]</cite>.</p> |
169 |
|
|
170 |
|
<p>The <em id=idl-fragment><abbr>IDL</abbr> fragments</em> in this document are |
171 |
|
to be interpreted as described in the <cite>Language Bindings for |
172 |
|
<abbr>DOM</abbr> Specifications</cite> specification |
173 |
|
<cite class="bibref normative">[<a href="#ref-DOMBIND">DOMBIND</a>]</cite>.</p> |
174 |
|
|
175 |
|
<p>Some <abbr>IDL</abbr> fragments are presented as <i>patch</i> to an |
176 |
|
<abbr>IDL</abbr> fragment defined in another document. They are to be |
177 |
|
interpreted as an instance of |
178 |
|
<a href="http://www.w3.org/TR/2007/WD-DOM-Bindings-20071017/#proddef-InterfaceMembers"><code>InterfaceMembers</code></a> |
179 |
|
<cite class="bibref normative">[<a href="#ref-DOMBIND">DOMBIND</a>]</cite>. |
180 |
|
If the <abbr>IDL</abbr> fragment to which the <i>patch</i> is applied has any |
181 |
|
instance of |
182 |
|
<a href="http://www.w3.org/TR/2007/WD-DOM-Bindings-20071017/#proddef-InterfaceMember"><code>InterfaceMember</code></a> |
183 |
|
with same |
184 |
|
<a href="http://www.w3.org/TR/2007/WD-DOM-Bindings-20071017/#prod-identifier"><code>identifier</code></a> |
185 |
|
part as that of any instance of |
186 |
|
<a href="http://www.w3.org/TR/2007/WD-DOM-Bindings-20071017/#proddef-InterfaceMember"><code>InterfaceMember</code></a> |
187 |
|
in the <i>patch</i>, then the former instance of |
188 |
|
<a href="http://www.w3.org/TR/2007/WD-DOM-Bindings-20071017/#proddef-InterfaceMember"><code>InterfaceMember</code></a> |
189 |
|
<em class=rfc2119>MUST</em> be ignored.</p> |
190 |
</div> |
</div> |
191 |
|
|
192 |
|
<div class=section id=conformance-categories> |
193 |
|
<h3>Conformance Categories</h3> |
194 |
|
|
195 |
<div class=section id=error-categories> |
<p>There are several kinds of products that can be claim to conform to |
196 |
<h2>Error Classification</h2> |
this specification:</p> |
197 |
|
<dl> |
198 |
|
<dt id=category-dom-implementation><abbr>DOM</abbr> Implementation</dt> |
199 |
|
<dd>A <abbr>DOM</abbr> implementation (or just written as |
200 |
|
<q>implementation</q> in this document) provides a way to access |
201 |
|
<abbr>DOM</abbr> trees for applications by implementing interfaces defined |
202 |
|
by this and other documents. Unless otherwise noted, requirements in this |
203 |
|
document are applied to <abbr>DOM</abbr> implementations. To implement |
204 |
|
all the features in this document, the implementation have to implement |
205 |
|
some version of <abbr>DOM</abbr> Core (e.g. <abbr>DOM</abbr> Level 3 Core |
206 |
|
<cite class="bibref normative">[<a href="#ref-DOM3CORE">DOM3CORE</a>]</cite>) |
207 |
|
with one or more language binding (e.g. ECMAScript and Java bindings |
208 |
|
<cite class="bibref normative">[<a href="#ref-DOMBIND">DOMBIND</a>]</cite> |
209 |
|
or Perl binding |
210 |
|
<cite class="bibref normative">[<a href="#ref-DOMPERL">DOMPERL</a>]</cite>). |
211 |
|
A conforming implementation <em class=rfc2119>MUST</em> also be a |
212 |
|
<a href="http://www.w3.org/TR/2007/WD-DOM-Bindings-20071017/#dfn-conforming-implementation">conforming |
213 |
|
implementation</a> of the <abbr>IDL</abbr> fragments in this document, as |
214 |
|
described in the <cite>Language Bindings for <abbr>DOM</abbr> |
215 |
|
Specifications</cite> specification |
216 |
|
<cite class="bibref normative">[<a href="#ref-DOMBIND">DOMBIND</a>]</cite>.</dd> |
217 |
|
<dt id=category-xml-parser><abbr>XML</abbr> Parser (<abbr>XML</abbr> document |
218 |
|
to <abbr>DOM</abbr> tree converter)</dt> |
219 |
|
<dd>A software component that converts |
220 |
|
<abbr>XML</abbr> 1.0 or 1.1 document |
221 |
|
<cite class="bibref normative">[<a href="#ref-XML10">XML10</a>, |
222 |
|
<a href="#ref-XML11">XML11</a>]</cite> (or fragment thereof) into a |
223 |
|
<abbr>DOM</abbr> tree (or fragment thereof) in the context of this |
224 |
|
document. Note that this document does not define any particular way to |
225 |
|
parse an <abbr>XML</abbr> document or to construct an <abbr>DOM</abbr> |
226 |
|
document, but it defines constraints for such processing.</dd> |
227 |
|
<dt id=category-xml-serializer><abbr>XML</abbr> Serializer (<abbr>DOM</abbr> |
228 |
|
tree to <abbr>XML</abbr> document converter)</dt> |
229 |
|
<dd>A software component that converts |
230 |
|
<abbr>DOM</abbr> tree (or fragment thereof) into an <abbr>XML</abbr> 1.0 or |
231 |
|
1.1 document (or fragment thereof). Note that this document does not define |
232 |
|
any particular way to serialize a <abbr>DOM</abbr> tree, but it defines |
233 |
|
constraints for such processing.</dd> |
234 |
|
<dt id=category-infoset-dom><abbr>XML</abbr> Information Set to |
235 |
|
<abbr>DOM</abbr> Tree Converter</dt> |
236 |
|
<dd>A software component that converts an <abbr>XML</abbr> information set |
237 |
|
<cite class="bibref normative">[<a href="#ref-INFOSET">INFOSET</a>]</cite> |
238 |
|
into a <abbr>DOM</abbr> tree. Note that this document does not define |
239 |
|
any particular way for the conversion, but it defines constraints for |
240 |
|
such processing.</dd> |
241 |
|
<dt id=category-dom-infoset><abbr>DOM</abbr> Tree to <abbr>XML</abbr> |
242 |
|
Information Set Converter</dt> |
243 |
|
<dd>A software component that converts a <abbr>DOM</abbr> tree into |
244 |
|
an <abbr>XML</abbr> information set. Note that this document does not define |
245 |
|
any particular way for the conversion, but it defines constraints for |
246 |
|
such processing.</dd> |
247 |
|
</dl> |
248 |
|
</div> |
249 |
|
</div> |
250 |
|
|
251 |
<p class=ed>If a <code>Document</code> node has no |
<div class=section id=dom-dtdef> |
252 |
xml-well-formedness-error, entity-error, and unknown-error, |
<h2><abbr>DOM</abbr> Document Type Definition Module</h2> |
|
then it is well-formed. If a well-formed <code>Document</code> |
|
|
node has no xml-validity-error, it is valid.</p> |
|
253 |
|
|
254 |
<div class="note memo"> |
<p>The <abbr>DOM</abbr> Document Type Definition module, version 3.0, |
255 |
<p>A well$B!>(Bformed <code>Document</code> can be safely serialized |
introduces four interfaces: |
256 |
into a well$B!>(Bformed XML document. A valid <code>Document</code> |
<a href="#DocumentXDoctype"><code>DocumentXDoctype</code></a>, |
257 |
can be easily serialized into a valid XML document.</p> |
<a href="#DocumentTypeDefinition"><code>DocumentTypeDefinition</code></a>, |
258 |
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a>, |
259 |
|
and <a href="#AttributeDefinition"><code>AttributeDefinition</code></a>. |
260 |
|
In addition, it modifies existing interfaces |
261 |
|
<a href="#Node"><code>Node</code></a>, |
262 |
|
<a href="#Document"><code>Document</code></a>, |
263 |
|
<a href="#DocumentType"><code>DocumentType</code></a>, |
264 |
|
<a href="#Entity"><code>Entity</code></a>, and |
265 |
|
<a href="#Notation"><code>Notation</code></a> |
266 |
|
<cite class="bibref normative">[<a href="#ref-DOM3CORE">DOM3CORE</a>]</cite>.</p> |
267 |
|
|
268 |
|
<div class=section id=features> |
269 |
|
<h3>Feature String</h3> |
270 |
|
|
271 |
|
<p>In a <abbr>DOM</abbr> implementation that supports the version 3.0 of |
272 |
|
the <abbr>DOM</abbr> Document Type Definition module, the |
273 |
|
<code>hasFeature</code> method of a <code>DOMImplementation</code> object |
274 |
|
<cite class="bibref normative">[<a href="#ref-DOM3CORE">DOM3CORE</a>]</cite> |
275 |
|
<em class=rfc2119>MUST</em> return <code>true</code> when the parameters are |
276 |
|
set to |
277 |
|
<dfn id=feature-XDoctype><code>http://suika.fam.cx/www/2006/feature/XDoctype</code></dfn> |
278 |
|
and <dfn id=feature-XDoctype-3.0><code>3.0</code></dfn> respectively. Any |
279 |
|
method that takes one or more feature names, with or without version number, |
280 |
|
such as <code>hasFeature</code> or <code>getFeature</code>, |
281 |
|
<em class=rfc2119>MUST</em> behave in a manner consistent with it.</p> |
282 |
</div> |
</div> |
283 |
|
|
284 |
<p class=ed>To be a conforming <a href="http://www.w3.org/TR/2006/REC-xml-20060816/#dt-validating">validating XML processor</a>, |
<div class=section id=section-node> |
285 |
...</p> |
<h3>Modifications to the <code id=Node>Node</code> Interface</h3> |
286 |
|
|
287 |
<p>Errors are classified into these |
<p>The implementation of the |
288 |
<dfn id=error-category title="error category">error categories</dfn>:</p> |
<a href="#Node"><code>Node</code></a> interface |
289 |
|
<em class=rfc2119>MUST</em> be modified as the following |
290 |
|
<a href="#idl-fragment"><abbr>IDL</abbr> fragment</a>:</p> |
291 |
|
<pre class=idl><code>// Additions to the Node interface |
292 |
|
|
293 |
|
// Additions to the NodeType definition group |
294 |
|
const unsigned short <a href="#ELEMENT_TYPE_DEFINITION_NODE">ELEMENT_TYPE_DEFINITION_NODE</a> = 81001; |
295 |
|
const unsigned short <a href="#ATTRIBUTE_DEFINITION_NODE">ATTRIBUTE_DEFINITION_NODE</a> = 81002; |
296 |
|
</pre> |
297 |
|
|
298 |
|
<p>This specification adds two new types (subinterfaces) of |
299 |
|
<a href="#Node"><code>Node</code></a>: element type definition (node type |
300 |
|
<a href="#ELEMENT_TYPE_DEFINITION_NODE"><code>ELEMENT_TYPE_DEFINITION_NODE</code></a>, |
301 |
|
interface |
302 |
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a>) and |
303 |
|
attribute definition (node type |
304 |
|
<a href="#ATTRIBUTE_DEFINITION_NODE"><code>ATTRIBUTE_DEFINITION_NODE</code></a>, |
305 |
|
interface |
306 |
|
<a href="#AttributeDefinition"><code>AttributeDefinition</code></a>). For |
307 |
|
these kinds of nodes, methods and attributes in the |
308 |
|
<a href="#Node"><code>Node</code></a> interface must behave as following:</p> |
309 |
|
|
310 |
<dl id=errors> |
<dl> |
311 |
<dt><dfn id=entity-error><code>entity-error</code></dfn></dt> |
<dt><code id=attributes>attributes</code>, |
312 |
|
<code id=localName>localName</code>, |
313 |
|
<code id=namespaceURI>namespaceURI</code>, and |
314 |
|
<code id=prefix>prefix</code></dt> |
315 |
|
<dd> |
316 |
|
<p>On getting, the attributes <em class=rfc2119>MUST</em> return |
317 |
|
<code>null</code>.</p> |
318 |
|
</dd> |
319 |
|
<dt><code id=baseURI>baseURI</code></dt> |
320 |
<dd> |
<dd> |
321 |
<p class=ed>@@</p> |
<p>On getting, the attribute <em class=rfc2119>MUST</em> return the |
322 |
<div class="note memo"> |
value of the <a href="#baseURI"><code>baseURI</code></a> attribute |
323 |
<p>This <span class=ed>algorithm</span> does not support |
of the node in the <code>ownerDocument</code> attribute of the node. |
324 |
<abbr>DOM</abbr> tree with one or more <code>EntityReference</code> |
Note that the value might be <code>null</code>.</p> |
|
nodes. It is expected that any entity references are expanded |
|
|
at the parse time and any unexpandable entity references |
|
|
make parse time errors raised so that never result in |
|
|
<abbr>DOM</abbr> tree with <code>EntityReference</code> nodes.</p> |
|
|
</div> |
|
325 |
</dd> |
</dd> |
326 |
<dt><dfn id=round-trip-error><code>round-trip-error</code></dfn></dt> |
<dt><code id=cloneNode>cloneNode</code></dt> |
327 |
<dd class=ed>@@</dd> |
<dd class=ed> |
328 |
<dt><dfn id=round-trip-warning><code>round-trip-warning</code></dfn></dt> |
<p>A future version of the specification is expected to define the |
329 |
|
behavior of the <a href="#cloneNode"><code>cloneNode</code></a> method |
330 |
|
for those kinds of nodes. In addition, it might revise behavior of |
331 |
|
the method for <a href="#Entity"><code>Entity</code></a>, |
332 |
|
<a href="#Notation"><code>Notation</code></a>, and/or |
333 |
|
<a href="#DocumentType"><code>DocumentType</code></a> nodes.</p> |
334 |
|
</dd> |
335 |
|
<!-- |
336 |
|
<dd class=ed>@@ If Attr and AttributeDefinition is inconsistent, then ...</dd> |
337 |
|
--> |
338 |
|
<dt><code id=compareDocumentPosition>compareDocumentPosition</code></dt> |
339 |
|
<dd class=ed> |
340 |
|
<p>A future version of the specification is expected to define the |
341 |
|
behavior of the method |
342 |
|
for those kinds of nodes. In addition, it might revise behavior of |
343 |
|
the method for <a href="#Entity"><code>Entity</code></a>, |
344 |
|
<a href="#Notation"><code>Notation</code></a>, and/or |
345 |
|
<a href="#DocumentType"><code>DocumentType</code></a> nodes.</p> |
346 |
|
</dd> |
347 |
|
<dt><code id=isDefaultNamespace>isDefaultNamespace</code></dt> |
348 |
|
<dd><p>When invoked, the method <em class=rfc2119>MUST</em> return |
349 |
|
<code>false</code>.</p></dd> |
350 |
|
<dt><code id=isEqualNode>isEqualNode</code></dt> |
351 |
|
<dd><p>For the <a href="#isEqualNode"><code>isEqualNode</code></a> method, |
352 |
|
following items are added to the list of conditions for equality:</p> |
353 |
|
|
354 |
|
<ul> |
355 |
|
<li> |
356 |
|
<p>If the nodes are <a href="#DocumentType"><code>DocumentType</code></a> |
357 |
|
and at least one of them has the support for the feature |
358 |
|
<a href="#feature-XDoctype"><code>http://suika.fam.cx/www/2006/feature/XDoctype</code></a>:</p> |
359 |
|
<ul> |
360 |
|
<li>they are equal according to <abbr>DOM</abbr> Level 3 Core definition |
361 |
|
<cite class="bibref normative">[<a href="#ref-DOM3CORE">DOM3CORE</a>]</cite>, |
362 |
|
and |
363 |
|
<li>either: |
364 |
|
<ul><!-- |
365 |
|
<li>both of them does not support the feature |
366 |
|
<a href="#feature-XDoctype"><code>http://suika.fam.cx/www/2006/feature/XDoctype</code></a>,</li>--> |
367 |
|
<li>exactly one of them support the feature |
368 |
|
<a href="#feature-XDoctype"><code>http://suika.fam.cx/www/2006/feature/XDoctype</code></a> |
369 |
|
and the <code>length</code> attribute of the <code>NamedNodeMap</code> |
370 |
|
object in the <a href="#elementTypes"><code>elementTypes</code></a> |
371 |
|
attribute of it is equal to <code>0</code>, or</li> |
372 |
|
<li>both of them support the feature |
373 |
|
<a href="#feature-XDoctype"><code>http://suika.fam.cx/www/2006/feature/XDoctype</code></a> |
374 |
|
and the values of the |
375 |
|
<a href="#elementTypes"><code>elementTypes</code></a> attributes are |
376 |
|
equal (equality of the |
377 |
|
<a href="#elementTypes"><code>elementTypes</code></a> attribute is same |
378 |
|
as that for the <code>attributes</code> attribute).</li> |
379 |
|
</ul> |
380 |
|
</li> |
381 |
|
</ul> |
382 |
|
</li> |
383 |
|
|
384 |
|
<li><p>If the nodes are |
385 |
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a>, |
386 |
|
the values of the |
387 |
|
<a href="#attributeDefinitions"><code>attributeDefinitions</code></a> |
388 |
|
attributes are equal (equality of the |
389 |
|
<a href="#attributeDefinitions"><code>attributeDefinitions</code></a> |
390 |
|
attribute is same as that for the <code>attributes</code> attribute).</p></li> |
391 |
|
|
392 |
|
<li><p>If the nodes are |
393 |
|
<a href="#AttributeDefinition"><code>AttributeDefinition</code></a>, |
394 |
|
the values of the <a href="#declaredType"><code>declaredType</code></a> and |
395 |
|
the <a href="#defaultType"><code>defaultType</code></a> attributes are |
396 |
|
equal respectively.</p></li> |
397 |
|
|
398 |
|
<li><p>If the nodes are |
399 |
|
<a href="#AttributeDefinition"><code>AttributeDefinition</code></a>, |
400 |
|
the values of the <code>DOMStringList</code> objects in the |
401 |
|
<a href="#allowedTokens"><code>allowedTokens</code></a> attributes |
402 |
|
are equal, i.e. their <code>length</code> attribute values are equal and |
403 |
|
each string exists in a list is contained in another list (their indecies |
404 |
|
may be different), with an additional constraint that the number of the |
405 |
|
items that are equal to a string in a list is equal to the number |
406 |
|
of the items equal to the string in another list.</p></li> |
407 |
|
</ul></dd> |
408 |
|
<dt><code id=manakaiLocalName>manakaiLocalName</code> |
409 |
|
<cite class="bibref normative">[<a href="#ref-MANAKAI">MANAKAI</a>]</cite></dt> |
410 |
|
<dd><p class=section-info>This entry is applied only to implementations |
411 |
|
that support this attribute.</p> |
412 |
|
|
413 |
|
<p>On getting, the attributes <em class=rfc2119>MUST</em> return |
414 |
|
<code>null</code>.</p></dd> |
415 |
|
<dt><code id=lookupNamespaceURI>lookupNamespaceURI</code> and |
416 |
|
<code id=lookupPrefix>lookupPrefix</code></dt> |
417 |
|
<dd><p>When invoked, the methods <em class=rfc2119>MUST</em> return |
418 |
|
<code>null</code>.</p></dd> |
419 |
|
<dt><code id=nodeName>nodeName</code></dt> |
420 |
<dd> |
<dd> |
421 |
<p>A <a href="#round-trip-warning"><code>round-trip-warning</code></a> |
<p>If the node is an |
422 |
will be raised when a construct, which might not be restored to the same |
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a>: |
423 |
construct when it is serialized and then re-parsed by a conforming |
On getting, the attribute <em class=rfc2119>MUST</em> return the |
424 |
processor, is encountered.</p> |
name of the element type definition represented by the node.</p> |
425 |
<div class="example memo"> |
|
426 |
<p>For a <code>Comment</code> node a |
<p>If the node is an |
427 |
<a href="#round-trip-warning"><code>round-trip-warning</code></a> will |
<a href="#AttributeDefinition"><code>AttributeDefinition</code></a>: |
428 |
be raised, since <abbr>XML</abbr> processors are not required to |
On getting, the attribute <em class=rfc2119>MUST</em> return the |
429 |
report texts of comments for applications.</p> |
name of the attribute definition represented by the node.</p> |
|
</div> |
|
430 |
</dd> |
</dd> |
431 |
<dt class=ed><dfn id=unknown-error><code>unknown-error</code></dfn>?</dt> |
<dt><code id=nodeType>nodeType</code></dt> |
|
<dd class=ed>@@</dd> |
|
|
<dt><dfn id=xml-misc-error><code>xml-misc-error</code></dt> |
|
|
<dd>An <abbr>XML</abbr> <i>error</i> (<abbr>XML</abbr> 1.0 |
|
|
<cite class="bibref normative">[<a href="#ref-XML10">XML10</a>]</cite> |
|
|
<a href="http://www.w3.org/TR/2006/REC-xml-20060816/#dt-error">error</a> / |
|
|
<abbr>XML</abbr> 1.1 |
|
|
<cite class="bibref normative">[<a href="#ref-XML11">XML11</a>]</cite> |
|
|
<a href="@@/#dt-error">error</a>) |
|
|
that is not classified to any other <a href="#error-category">error |
|
|
category</a>.</dd> |
|
|
<dt><dfn id=xml-misc-fatal-error><code>xml-misc-fatal-error</code></dt> |
|
|
<dd>An <abbr>XML</abbr> <i>fatal error</i> (<abbr>XML</abbr> 1.0 |
|
|
<cite class="bibref normative">[<a href="#ref-XML10">XML10</a>]</cite> |
|
|
<a href="http://www.w3.org/TR/2006/REC-xml-20060816/#dt-fatal">fatal |
|
|
error</a> / <abbr>XML</abbr> 1.1 |
|
|
<cite class="bibref normative">[<a href="#ref-XML11">XML11</a>]</cite> |
|
|
<a href="@@/#dt-fatal">fatal error</a>) |
|
|
that is not classified to any other <a href="#error-category">error |
|
|
category</a>. <span class=ed>@@ What errors fall into this category?</span></dd> |
|
|
<dt><dfn id=xml-misc-recommendation><code>xml-misc-recommendation</code></dfn></dt> |
|
432 |
<dd> |
<dd> |
433 |
<p>An |
<p>On getting, the attribute <!--<em class=rfc2119>MUST</em>--> returns |
434 |
<a href="#xml-misc-recommendation"><code>xml-misc-recommendation</code></a> |
<!-- NOTE: No MUST, to avoid circular reference (nodeType==8100[12] |
435 |
will be raised if a <em class=rfc2119>SHOULD</em>$B!>(Blevel requirement |
is defined that they MUST implement ElementType|AttributeDefinition). --> |
436 |
in <abbr>XML</abbr> specification is not met.</p> |
<a href="#ELEMENT_TYPE_DEFINITION_NODE"><code>ELEMENT_TYPE_DEFINITION_NODE</code></a> |
437 |
|
(if the node is an |
438 |
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a>) or |
439 |
|
<a href="#ATTRIBUTE_DEFINITION_NODE"><code>ATTRIBUTE_DEFINITION_NODE</code></a> |
440 |
|
(if the node is an |
441 |
|
<a href="#AttributeDefinition"><code>AttributeDefinition</code></a>).</p> |
442 |
|
|
443 |
|
<!-- NodeType --> |
444 |
|
<p>Two constants are added to the <code id=NodeType>NodeType</code> |
445 |
|
definition group of the <a href="#Node"><code>Node</code></a> interface as |
446 |
|
following:</p> |
447 |
|
<table> |
448 |
|
<thead> |
449 |
|
<tr><th scope=col>Name<th scope=col>Value<th scope=col>Description</tr> |
450 |
|
</thead> |
451 |
|
<tbody> |
452 |
|
<tr> |
453 |
|
<th scope=row><dfn id=ELEMENT_TYPE_DEFINITION_NODE class=dom-const><code>ELEMENT_TYPE_DEFINITION_NODE</code></dfn> |
454 |
|
<td><code>81001</code><td>The node is an |
455 |
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a>.</tr> |
456 |
|
<tr> |
457 |
|
<th scope=row><dfn id=ATTRIBUTE_DEFINITION_NODE class=dom-const><code>ATTRIBUTE_DEFINITION_NODE</code></dfn> |
458 |
|
<td><code>81002</code><td>The node is an |
459 |
|
<a href="#ElementTypeDefinition"><code>AttributeDefinition</code></a>.</tr> |
460 |
|
</tbody> |
461 |
|
</table> |
462 |
</dd> |
</dd> |
463 |
<dt><dfn id=xml-validity-error><code>xml-validity-error</code></dfn></dt> |
<dt><code id=nodeValue>nodeValue</code> and |
464 |
<dd>A violation of validity constraint in XML document.</dd> |
<code id=textContent>textContent</code></dt> |
465 |
<dt><dfn id=xml-well-formedness-error><code>xml-well-formedness-error</code></dfn></dt> |
<dd> |
466 |
<dd><p>If an <code>xml-well-formedness-error</code> is raised, |
<p>If the node is an |
467 |
it would not be possible to generate an XML serialization that |
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a>: |
468 |
would match to the appropriate production rule and that would not |
On getting, the attributes <em class=rfc2119>MUST</em> return |
469 |
violate to any well$B!>(Bformedness constraint in XML |
<code>null</code>.</p> |
470 |
specification <cite class="bibref normative">[<a href="#ref-XML10">XML10</a>, |
|
471 |
<a href="#ref-XML11">XML11</a>]</cite>.</p></dd> |
<div class="note memo"> |
472 |
|
<p>Thus, on setting the attributes does nothing |
473 |
|
<cite class="bibref normative">[<a href="#ref-DOM3CORE">DOM3CORE</a>]</cite>.</p> |
474 |
|
</div> |
475 |
|
|
476 |
|
<p>If the node is an |
477 |
|
<a href="#AttributeDefinition"><code>AttributeDefinition</code></a>: |
478 |
|
The attribute <em class=rfc2119>MUST</em> behave as if the node |
479 |
|
were <code>Attr</code> |
480 |
|
<cite class="bibref normative">[<a href="#ref-DOM3CORE">DOM3CORE</a>]</cite>.</p></dd> |
481 |
|
<dt><code id=normalize>normalize</code></dt> |
482 |
|
<dd><p>When a <a href="#DocumentType"><code>DocumentType</code></a> is |
483 |
|
normalized, any nodes in the <code>NamedNodeMap</code> object in the |
484 |
|
<a href="#elementTypes"><code>elementTypes</code></a> attribute |
485 |
|
<em class=rfc2119>MUST</em> be normalized as well.</p> |
486 |
|
|
487 |
|
<p>When an |
488 |
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> node |
489 |
|
is normalized, any nodes in the <code>NamedNodeMap</code> object in the |
490 |
|
<a href="#attributeDefinitions"><code>attributeDefinitions</code></a> |
491 |
|
attribute <em class=rfc2119>MUST</em> be normalized as well.</p></dd> |
492 |
</dl> |
</dl> |
493 |
|
|
|
<div class=ed><p>@@ TODO: #dt-atuseroption at user option |
|
|
(MAY or MUST), #dt-compat for compatibility, |
|
|
#dt-interop for interoperability</p></div> |
|
|
|
|
494 |
</div> |
</div> |
495 |
|
|
496 |
<div class=section id=parsing-xml> |
<div class=section id=section-document> |
497 |
<h2>Parsing <abbr>XML</abbr> Document</h2> |
<h3>Modifications to the <code id=Document>Document</code> Interface</h3> |
|
|
|
|
<ul> |
|
|
<li>If the <abbr>XML</abbr> document does not begin with an |
|
|
<abbr>XML</abbr> declaration, then raise an |
|
|
<a href="#xml-misc-recommentation" id=xmr-xml-decl><code>xml-misc-recommendation</code></a>.</li> |
|
|
<li>If the replacement text of an entity declaration is |
|
|
<code><</code>, then raise an |
|
|
<a href="#xml-misc-warning" id=xmw-entity-value-lt><code>xml-misc-warning</code></a>.<!-- |
|
|
"strongly advised to avoid" in a Note in Section 2.3 of [XML10], [XML11]. |
|
|
--></li> |
|
|
<li>If there is an element type declaration whose <code>Name</code> |
|
|
value is already declared, then raise an |
|
|
<a href="#xml-validity-error" id=vc-edunique><code>xml-validity-error</code></a>.</li> |
|
|
<li>If attribute definition whose <code>Name</code> is |
|
|
<code>xml:space</code> has <span class=ed>declared type different from |
|
|
(default|preserve), (default), or (preserve)</span>, then raise an |
|
|
<a href="#xml-misc-error" id=xme-ad-xml-space><code>xml-misc-error</code></a>. |
|
|
<span class=ed>@@ duplication with |
|
|
<a href="#xml-at-xml-space">#xml-at-xml-space</a>.<!-- |
|
|
<!ATTLIST e xml:space CDATA #IMPLIED xml:space CDATA #IMPLIED> --></span></li> |
|
|
<li>If an empty-element tag is used for an element which is <em>not</em> |
|
|
declared <code>EMPTY</code>, then raise an |
|
|
<a href="#xml-misc-recommentation" id=xmr-emptyelemtag-not-empty><code>xml-misc-recommendation</code></a>.</li> |
|
|
<li>If an empty-element tag is <em>not</em> used for an element which is |
|
|
declared <code>EMPTY</code>, then raise an |
|
|
<a href="#xml-misc-recommentation" id=xmr-empty-not-emptyelemtag><code>xml-misc-recommendation</code></a>.</li> |
|
|
<!-- |
|
|
|
|
|
#vc-PEinMarkupDecl Validity constraint: Proper Declaration/PE Nesting |
|
|
#wfc-PEinInternalSubset Well-formedness constraint: PEs in Internal Subset |
|
|
#ExtSubset Well-formedness constraint: External Subset |
|
|
#PE-between-Decls Well-formedness constraint: PE Between Declarations |
|
|
#GIMatch Well-formedness constraint: Element Type Match |
|
|
#uniqattspec Well-formedness constraint: Unique Att Spec |
|
|
#NoExternalRefs Well-formedness constraint: No External Entity References |
|
|
#CleanAttrVals Well-formedness constraint: No < in Attribute Values |
|
|
#vc-PEinGroup Validity constraint: Proper Group/PE Nesting |
|
|
"For interoperability, if a parameter-entity reference appears in a choice, seq, or Mixed construct, its replacement text SHOULD contain at least one non-blank character, and neither the first nor last non-blank character of the replacement text SHOULD be a connector (| or ,)." |
|
|
"For interoperability, an XML processor MAY at user option issue a warning when more than one attribute-list declaration is provided for a given element type, or more than one attribute definition is provided for a given attribute, but this is not an error." |
|
|
#condsec-nesting Validity constraint: Proper Conditional Section/PE Nesting |
|
|
#wf-Legalchar Well-formedness constraint: Legal Character |
|
|
#textent Well-formedness constraint: Parsed Entity |
|
|
#norecursion Well-formedness constraint: No Recursion |
|
|
#indtd Well-formedness constraint: In DTD |
|
|
"External parsed entities SHOULD each begin with a text declaration." |
|
|
"It is an error for a reference to an unparsed entity to appear in the EntityValue in an entity declaration." |
|
|
#UniqueNotationName Validity constraint: Unique Notation Name |
|
|
|
|
|
@@ Need detailed review, but maybe should be in parsing phase |
|
|
|
|
|
#vc-check-rmd Validity constraint: Standalone Document Declaration |
|
|
|
|
|
@@ Need dtailed review |
|
|
|
|
|
#wf-entdeclared Well-formedness constraint: Entity Declared |
|
|
#vc-entdeclared Validity constraint: Entity Declared |
|
|
"For interoperability, valid documents SHOULD declare the entities amp, lt, gt, apos, quot, in the form specified in 4.6 Predefined Entities." |
|
|
"If the entities lt or amp are declared, they MUST be declared as internal entities whose replacement text is a character reference to the respective character (less-than sign or ampersand) being escaped; the double escaping is REQUIRED for these entities so that references to them produce a well-formed result. If the entities gt, apos, or quot are declared, they MUST be declared as internal entities whose replacement text is the single character being escaped (or a character reference to that character; the double escaping here is OPTIONAL but harmless)." |
|
|
|
|
|
@@ flaged and then reported in DOM check phase |
|
|
|
|
|
"Entities encoded in UTF-16 MUST and entities encoded in UTF-8 MAY begin with the Byte Order Mark" |
|
|
"In the absence of external character encoding information (such as MIME headers), parsed entities which are stored in an encoding other than UTF-8 or UTF-16 MUST begin with a text declaration" |
|
|
"In an encoding declaration, the values "UTF-8", "UTF-16", "ISO-10646-UCS-2", and "ISO-10646-UCS-4" SHOULD be used for the various encodings and transformations of Unicode / ISO/IEC 10646, the values "ISO-8859-1", "ISO-8859-2", ... "ISO-8859-n" (where n is the part number) SHOULD be used for the parts of ISO 8859, and the values "ISO-2022-JP", "Shift_JIS", and "EUC-JP" SHOULD be used for the various encoded forms of JIS X-0208-1997. It is RECOMMENDED that character encodings registered (as charsets) with the Internet Assigned Numbers Authority [IANA-CHARSETS], other than those just listed, be referred to using their registered names; other encodings SHOULD use names starting with an "x-" prefix." |
|
|
|
|
|
@@ in parsing phase |
|
|
|
|
|
"It is a fatal error when an XML processor encounters an entity with an encoding that it is unable to process. It is a fatal error if an XML entity is determined (via default, encoding declaration, or higher-level protocol) to be in a certain encoding but contains byte sequences that are not legal in that encoding." |
|
498 |
|
|
499 |
|
<!-- |
500 |
|
<p>If an attempt is made to adopt an |
501 |
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> or |
502 |
|
<a href="#AttributeDefinition"><code>AttributeDefinition</code></a> node, |
503 |
|
the <code id=adoptNode>adoptNode</code> method <em class=rfc2119>MUST</em> |
504 |
|
raise a <code>NOT_SUPPORTED_ERR</code> exception <span class=ed>@@ |
505 |
|
ref</span>.</p> |
506 |
--> |
--> |
|
</ul> |
|
|
</div> |
|
|
|
|
|
<div class="section" id=checking-dom> |
|
|
<h2>Checking <abbr>DOM</abbr></h2> |
|
507 |
|
|
508 |
<p>The following algorithms and definitions are applied to |
<div class=ed> |
509 |
<abbr>XML</abbr> documents; especially, they are not applied |
<p>Future version of the specification is expected to define what should |
510 |
to <abbr>HTML</abbr> documents.<!-- TODO: ref to HTML5 --></p> |
be done if <code>adoptNode</code> or <code>importNode</code> method have to |
511 |
|
adopt or import an |
512 |
<div class=section id=definitions> |
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> or |
513 |
<h3>Definitions</h3> |
<a href="#AttributeDefinition"><code>AttributeDefinition</code></a> node. |
514 |
|
In addition it might revise behavior of those methods for |
515 |
<p>The <dfn id=xml-version><abbr>XML</abbr> version</dfn> of a node is |
<a href="#Entity"><code>Entity</code></a>, |
516 |
the <abbr>XML</abbr> version of the document to which the node belongs. |
<a href="#Notation"><code>Notation</code></a>, and/or |
517 |
For a <code>Documemt</code> node, the <abbr>XML</abbr> version |
<a href="#DocumentType"><code>DocumentType</code></a> nodes. |
518 |
of the document is the value of the <code>xmlVersion</code> |
Behavior of <code>normalizeDocument</code> method for these kinds of |
519 |
attribute of the node. For a <code>DocumentType</code> node whose |
nodes might also be defined in some day.</p> |
520 |
<code>ownerDocument</code> attribute is set to <code>null</code>, |
</div> |
|
the <abbr>XML</abbr> version of the document is <code>1.0</code><!-- |
|
|
since createDocumentType [DOM3CORE] assumes XML 1.0 [XML10TE] -->. |
|
|
For any other node, the <abbr>XML</abbr> version of the document |
|
|
is that of the <code>Document</code> node contained in the |
|
|
<code>ownerDocument</code> attribute of the node.</p> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
<div class=section id=checking-components> |
|
|
<h3>Conformance Checking Algorithms for Components</h3> |
|
|
|
|
|
<p>To |
|
|
<dfn id=algorithm-to-validate-an-xml-character-data title="validate an XML string">to |
|
|
validate an <abbr>XML</abbr> string (<dfn id=var-s><var>s</var></dfn>)</dfn>, |
|
|
the following algorithm <em class=rfc2119>MUST</em> be used:</p> |
|
|
<ol> |
|
|
<li>If <var>s</var> contains a character that is <em>not</em> in |
|
|
the character class <a href="#class-Char10"><code>Char10</code></a>, |
|
|
then raise an |
|
|
<a href="#xml-well-formedness-error" id=wfe-illegal-char><code>xml-well-formedness-error</code></a>.</li> |
|
|
<li>If <var>s</var> contains a character that is in the character |
|
|
class <a href="#class-CompatChar10"><code>CompatChar10</code></a>, |
|
|
then raise an |
|
|
<a href="#xml-misc-warning" id=xmw-compat-char><code>xml-misc-warning</code></a>.</li> |
|
|
<li>If <var>s</var> contains a character that is in the character |
|
|
class <a href="#class-ControlChar10"><code>ControlChar10</code></a>, |
|
|
then raise an |
|
|
<a href="#xml-misc-warning" id=xmw-control-char><code>xml-misc-warning</code></a>.</li> |
|
|
<li class=ed>@@ XML 1.1 support</li> |
|
|
<li>If <var>s</var> contains a <code class=char>U+000D</code> |
|
|
<code class=charname>CARRIAGE RETURN</code> character, then |
|
|
raise a |
|
|
<a href="#round-trip-error" id=rte-cr><code>round-trip-error</code></a>. |
|
|
<span class=ed>@@ We should not raise duplicate errors for U+000D |
|
|
in attribute values. In addition, we should support a mode where |
|
|
U+000D will be serialized as 
 (so that no round-trip-error |
|
|
will be raised).</span></li> |
|
|
</ol> |
|
|
|
|
|
<p>To |
|
|
<dfn id=algorithm-to-validate-a-name title="validate a Name">validate a |
|
|
<code>Name</code> (<dfn id=var-name-s><var>s</var></dfn>)</dfn>, the following |
|
|
algorithm <em class=rfc2119>MUST</em> be used:</p> |
|
|
<ol> |
|
|
<li>If <var>s</var> is an empty string, then raise an |
|
|
<a href="#xml-well-formedness-error" id=wfe-name-empty><code>xml-well-formedness-error</code></a>. |
|
|
Abort these steps.</li> |
|
|
<li><a href="#algorithm-to-validate-an-xml-character-data" title="validate an XML string">Validate |
|
|
<var>s</var> as an <abbr>XML</abbr> string</a>.</li> |
|
|
<li>If the first character in <var>s</var> is a character that is |
|
|
<em>not</em> in the character class |
|
|
<a href="#class-NameStartChar10"><code>NameStartChar10</code></a>, then raise |
|
|
an |
|
|
<a href="#xml-well-formedness-error" id=wfe-name-startchar><code>xml-well-formedness-error</code></a>.</li> |
|
|
<li>If a character other than the first character in <var>s</var> is a |
|
|
character that is <em>not</em> in the character class |
|
|
<a href="#class-NameChar10"><code>NameChar10</code></a>, then raise an |
|
|
<a href="#xml-well-formedness-error" id=wfe-name-char><code>xml-well-formedness-error</code></a>.</li> |
|
|
<li>If <var>s</var> begins with the string <code>xml</code> (in any |
|
|
case combination), then raise an |
|
|
<a href="#xml-misc-warning" id=xmw-reserved-name><code>xml-misc-warning</code></a>. |
|
|
<span class=ed>@@ except for attribute names <code>xml:lang</code>, |
|
|
<code>xml:space</code>, <code>xml:base</code>, <code>xml:id</code>, |
|
|
<code>xmlns</code>, <code>xmlns:<var>*</var></code>, |
|
|
pi name <code>xml-stylesheet</code>.</span><!-- |
|
|
"names beginning with a match to (('X'|'x')('M'|'m')('L'|'l')) are reserved for standardization in this or future versions of this specification.": |
|
|
xmlns, xml-stylesheet, xml:base and xml:id specifications violate to this sentense! |
|
|
--></li> |
|
|
<!-- COLON in Name is a lowercase "should not" in a Note of [XML10], |
|
|
[XML11]. --> |
|
|
<li class=ed>@@ XML 1.1 support</li> |
|
|
</ol> |
|
|
|
|
|
<p>To |
|
|
<dfn id=algorithm-to-validate-an-ncname title="validate an NCName">validate |
|
|
an <code>NCName</code> (<dfn id=var-ncname-s><var>s</var></dfn>)</dfn>, the |
|
|
following algorithm <em class=rfc2119>MUST</em> be used:</p> |
|
|
<ol> |
|
|
<li><a href="#algorithm-to-validate-a-name" title="validate a Name">Validate |
|
|
<var>s</var> as a <code>Name</code></a>.</li> |
|
|
<li class=ed>@@</li> |
|
|
</ol> |
|
|
|
|
|
<p>To |
|
|
<dfn id=algorithm-to-validate-a-public-identifier title="validate a public identifier">validate |
|
|
a public identifier (<dfn id=var-pid><var>pid</var></dfn>)</dfn>, the |
|
|
following algorithm <em class=rfc2119>MUST</em> be used:</p> |
|
|
<ol> |
|
|
<li>If <var>pid</var> is <code>null</code>, abort these steps.</li> |
|
|
<li>If <var>pid</var> contains a character that is <em>not</em> in the |
|
|
character class <a href="#class-PubidChar"><code>PubidChar</code></a>, then |
|
|
raise an |
|
|
<a href="#xml-well-formedness-error" id=wfe-pubid-char><code>xml-well-formedness-error</code></a>.</li> |
|
|
<li>If <var>pid</var> contains one of <code class=char>U+0009</code> |
|
|
<code class=charname>CHARACTER TABULATION</code>, |
|
|
<code class=char>U+000A</code> <code class=charname>CARRIAGE RETURN</code>, |
|
|
and <code class=char>U+000D</code> <code class=charname>LINE FEED</code> |
|
|
characters, if the first character of <var>pid</var> is |
|
|
<code class=char>U+0020</code> <code class=charname>SPACE</code> character, |
|
|
if the last character of <var>pid</var> is <code class=char>U+0020</code> |
|
|
<code class=charname>SPACE</code> character, or if there is a |
|
|
<code class=char>U+0020</code> <code class=charname>SPACE</code> character |
|
|
immediately followed by another <code class=char>U+0020</code> |
|
|
<code class=charname>SPACE</code> character in <var>pid</var>, then it is a |
|
|
<a href="#round-trip-error" id=rte-pubid-space><code>round-trip-error</code></a>. |
|
|
<span class=ed>Is this really a roundtripness problem? XML spec |
|
|
does only define the way to match public identifiers in fact, no |
|
|
canonical form.</span></li> |
|
|
</ol> |
|
|
|
|
|
<p>To |
|
|
<dfn id=algorithm-to-validate-a-system-identifier title="validate a system identifier">validate |
|
|
a system identifier (<dfn id=var-sid><var>sid</var></dfn>)</dfn>, the |
|
|
following algorithm <em class=rfc2119>MUST</em> be used:</p> |
|
|
<ol> |
|
|
<li>If <var>sid</var> is <code>null</code>, abort these steps.</li> |
|
|
<li><a href="#algorithm-to-validate-an-xml-character-data" title="validate an XML string">Validate |
|
|
<var>sid</var> as an <abbr>XML</abbr> string</a>.</li> |
|
|
<li>If <var>sid</var> contains both <code class=char>U+0022</code> |
|
|
<code class=charname>QUOTATION MARK</code> (<code class=char>"</code>) and |
|
|
<code class=char>U+0027</code> <code class=charname>APOSTROPHE</code> |
|
|
(<code class=char>'</code>) characters, raise an |
|
|
<a href="#xml-well-formedness-error" id=wfe-sid-lit><code>xml-well-formedness-error</code></a>.</li> |
|
|
<li>If <var>sid</var> contains at least one <code class=char>U+0023</code> |
|
|
<code class=charname>NUMBER SIGN</code> (<code class=char>#</code>) |
|
|
character, then raise an |
|
|
<a href="#xml-misc-error" id=xme-sid-fragment><code>xml-misc-error</code></a>.</li> |
|
|
<li class=ed>@@ If <var>sid</var> cannot be converted to a URI |
|
|
reference, then raise a fact-level error (xml-misc-warning?).<!-- |
|
|
XML 1.0 has no conformance language for system identifier being |
|
|
a URI reference. --></li> |
|
|
</ol> |
|
521 |
|
|
522 |
</div> |
</div> |
523 |
|
|
524 |
<div class=section id=checking-node> |
<div class=section id=section-documentxdoctype> |
525 |
<h3>Checking <code>Node</code></h3> |
<h3>The <code>DocumentXDoctype</code> Interface</h3> |
526 |
|
|
527 |
<p>The algorithm <dfn title="to check a node" id=algorithm-to-check-a-node>to |
<p>The <a href="#Document"><code>Document</code></a> nodes |
528 |
check a node (<dfn id=var-n><var>n</var></dfn>)</dfn> is defined as |
<em class=rfc2119>MUST</em> also implement the |
529 |
following:</p> |
<a href="#DocumentXDoctype"><code>DocumentXDoctype</code></a> interface.</p> |
530 |
<dl class=switch> |
|
531 |
<dt>If <var>n</var> is an <code>Attr</code> node</dt> |
<p>An instance of the |
532 |
<dd> |
<a href="#DocumentXDoctype"><code>DocumentXDoctype</code></a> |
533 |
<ol> |
interface <em class=rfc2119>MUST</em> be able to be obtained by using |
534 |
<li><a href="#algorithm-to-validate-an-ncname">Validate the |
binding$B!>(Bspecific casting methods on an instance of the |
535 |
<code>localName</code> attribute value as an <code>NCName</code></a>.</li> |
<a href="#Document"><code>Document</code></a> interface (if such |
536 |
<li>If the <code>prefix</code> attribute value is different from |
casting methods are available) or by using the method <code>getFeature</code> |
537 |
<code>null</code>, then <a href="#algorithm-to-validate-an-ncname">validate |
with parameter values |
538 |
the <code>prefix</code> attribute value as an <code>NCName</code></a>.</li> |
<a href="#feature-XDoctype"><code>http://suika.fam.cx/www/2006/feature/XDoctype</code></a> |
539 |
<li>For each node <dfn id=var-attr-nc><var>n<sub><var>c</var></sub></var></dfn> in the |
and <a href="#feature-XDoctype-3.0"><code>3.0</code></a> respectively (if the |
540 |
<code>childNodes</code> list of <var>n</var>, |
<a href="#Document"><code>Document</code></a> node supports the |
541 |
<ol> |
feature <code>Core</code> version <code>3.0</code> |
542 |
<li>If <var>n<sub><var>c</var></sub></var> is <em>not</em> a |
<cite class="bibref normative">[<a href="#ref-DOM3CORE">DOM3CORE</a>]</cite>).</p> |
543 |
<code>Text</code> or <code>EntityReference</code> node, then it is an |
|
544 |
<a href="#xml-well-formedness-error" id=wfe-attr-child><code>xml-well-formedness-error</code></a>.</li> |
<p>The <a href="#DocumentXDoctype"><code>DocumentXDoctype</code></a> interface |
545 |
<li>Otherwise, if <var>n<sub><var>c</var></sub></var> is an |
<em class=rfc2119>MUST</em> be implemented as the following |
546 |
<code>EntityReference</code> node, then it is an |
<a href="#idl-fragment"><abbr>IDL</abbr> fragment</a>:</p> |
547 |
<a href="#entity-error" id=ee-attr-er><code>entity-error</code></a>.</li> |
<pre class=idl><code>interface <dfn id=DocumentXDoctype><code>DocumentXDoctype</code></dfn> { |
548 |
<li>Otherwise, |
DocumentType <a href="#createDocumentTypeDefinition">createDocumentTypeDefinition</a> |
549 |
<a href="#algorithm-to-check-a-node" title="check a node">check |
(in DOMString <a href="#createDocumentTypeDefinition-name"><var>name</var></a>) |
550 |
<var>n<sub><var>c</var></sub></var></a> recusrively.</li> |
raises (DOMException); |
551 |
</ol></li> |
<a href="#ElementTypeDefinition">ElementTypeDefinition</a> <a href="#createElementTypeDefinition">createElementTypeDefinition</a> |
552 |
<li>If <code>nodeName</code> attribute of <var>n</var> is |
(in DOMString <a href="#createElementTypeDefinition-name"><var>name</var></a>) |
553 |
<code>xml:space</code> <span class=ed>@@ or {xml namespace}:space ?</span> |
raises (DOMException); |
554 |
and <code>value</code> attribute of <var>n</var> is neither |
<a href="#AttributeDefinition">AttributeDefinition</a> <a href="#createAttributeDefinition">createAttributeDefinition</a> |
555 |
<code>default</code> nor <code>preserve</code>, then it is an |
(in DOMString <a href="#createAttributeDefinition-name"><var>name</var></a>) |
556 |
<a href="#xml-misc-error" id=xme-attr-xml-space><code>xml-misc-error</code></a>.<!-- |
raises (DOMException); |
557 |
Note that <!ATTLIST e xml:space (default|preserve) "a">... |
<a href="#Entity">Entity</a> <a href="#createGeneralEntity">createGeneralEntityDefinition</a> |
558 |
<e xml:space="default"/> is conforming and valid. --></li> |
(in DOMString <a href="#createGeneralEntity-name"><var>name</var></a>) |
559 |
<li class=ed>@@ xml:lang value is not a language tag [RFC 3066 or its |
raises (DOMException); |
560 |
successor] or an empty string, then xml-misc-warning |
<a href="#Notation">Notation</a> <a href="#createNotation">createNotation</a> |
561 |
(a "fact"-level error; not an XML error).</li> |
(in DOMString <a href="#createNotation-name"><var>name</var></a>) |
562 |
<li class=ed>@@ <code>specified</code>, |
raises (DOMException); |
563 |
<code>manakaiAttributeType</code> (#ValueType Validity constraint: Attribute Value Type)</li> |
}</code></pre> |
564 |
<!-- xml:space MUST be declared to be valid. --> |
|
565 |
<li>Let <dfn id=var-v><var>v</var></dfn> be the value of the |
<dl> |
566 |
attribute <code>value</code> of <var>n</var>.</li> |
<dt><dfn id=createDocumentTypeDefinition class=dom-method><code>createDocumentTypeDefinition</code></dfn>, |
567 |
<li>Validate the <var>n</var> against the <span class=ed>declared |
method</dt> |
|
type</span> as following: |
|
|
<dl class=switch> |
|
|
<dt class=ed><code>ID_ATTR</code></dt> |
|
|
<dd> |
|
|
<ol> |
|
|
<li><span class=ed>Validate <var>v</var> as an |
|
|
<code>Name</code>.</span> If it fails, then raise an |
|
|
<a href="#xml-validity-error" id=vc-id-name><code>xml-validity-error</code></a>.</li> |
|
|
<li><span class=ed>If <code>ID</code> <var>v</var> is defined,</span> |
|
|
then raise an |
|
|
<a href="#xml-validity-error" id=vc-id-duplication><code>xml-validity-error</code></a>.</li> |
|
|
</ol> |
|
|
</dd> |
|
|
<dt class=ed>IDREF_ATTR</dt> |
|
|
<dd> |
|
|
<ol> |
|
|
<li><span class=ed>Validate <var>v</var> as an |
|
|
<code>Name</code>.</span> If it fails, then raise an |
|
|
<a href="#xml-validity-error" id=vc-idref-name><code>xml-validity-error</code></a>.</li> |
|
|
<li><span class=ed>If <code>ID</code> <var>v</var> is NOT |
|
|
defined,</span> then raise an |
|
|
<a href="#xml-validity-error" id=vc-idref-match><code>xml-validity-error</code></a>.</li> |
|
|
</ol> |
|
|
</dd> |
|
|
<dt class=ed>IDREFS_ATTR</dt> |
|
|
<dd class=ed>@@</dd> |
|
|
<dt class=ed>ENTITY_ATTR</dt> |
|
|
<dd> |
|
|
<ol> |
|
|
<li><span class=ed>Validate <var>v</var> as an |
|
|
<code>Name</code>.</span> If it fails, then raise an |
|
|
<a href="#xml-validity-error" id=vc-entname-name><code>xml-validity-error</code></a>.</li> |
|
|
<li><span class=ed>If <code>Entity</code> <var>v</var> is NOT |
|
|
defined,</span> then raise an |
|
|
<a href="#xml-validity-error" id=vc-entname-match><code>xml-validity-error</code></a>.</li> |
|
|
</ol> |
|
|
</dd> |
|
|
<dt class=ed>ENTITIES_ATTR</dt> |
|
|
<dd class=ed>@@</dd> |
|
|
<dt class=ed>NMTOKEN_ATTR</dt> |
|
|
<dd> |
|
|
<ol> |
|
|
<li><span class=ed>Validate <var>v</var> as an |
|
|
<code>Nmtoken</code>.</span> If it fails, then raise an |
|
|
<a href="#xml-validity-error" id=vc-nmtok-name><code>xml-validity-error</code></a>.</li> |
|
|
</ol> |
|
|
</dd> |
|
|
<dt class=ed>NMTOKENS_ATTR</dt> |
|
|
<dd class=ed>@@</dd> |
|
|
<dt class=ed>NOTATION_ATTR</dt> |
|
|
<dd class=ed><var>v</var> must be one of enumerated values. |
|
|
If not, then raise an |
|
|
<a href="#xml-validity-error" id=vc-notatn-match><code>xml-validity-error</code></a>.</dd> |
|
|
<dt class=ed>ENUMERATED_ATTR</dt> |
|
|
<dd class=ed><var>v</var> must be one of enumerated values. |
|
|
If not, then raise an |
|
|
<a href="#xml-validity-error" id=vc-enum><code>xml-validity-error</code></a>.</dd> |
|
|
<dt class=ed>@@</dt> |
|
|
</dl> |
|
|
</li> |
|
|
<li>If <span class=ed>type ID and default is NOT #IMPLIED or #REQUIRED</span>, then |
|
|
raise an |
|
|
<a href="#xml-validity-error" id=vc-id-default><code>xml-validity-error</code></a>.</li> |
|
|
<li class=ed>@@ #FixedAttr Validity constraint: Fixed Attribute Default</li> |
|
|
<li class=ed>@@ strict serialization error for U+000D, U+000A, and |
|
|
U+0009 characters, leading/trailing U+0020, and U+0020{2,} string?</li> |
|
|
</ol> |
|
|
</dd> |
|
|
<dt>If <var>n</var> is an <code>AttributeDefinition</code> node</dt> |
|
|
<dd> |
|
|
<ol> |
|
|
<li class=ed></li> |
|
|
<li>If <code>nodeName</code> attribute of <var>n</var> is |
|
|
<code>xml:space</code> <span class=ed>@@ or {xml namespace}:space ?</span> |
|
|
and <span class=ed>its declared type is different from (default|preserve), |
|
|
(default), or (preserve)</span>, then raise an |
|
|
<a href="#xml-misc-error" id=xme-at-xml-space><code>xml-misc-error</code></a>.</li> |
|
|
<li>For each node <dfn id=var-ad-nc><var>n<sub><var>c</var></sub></var></dfn> in the |
|
|
<code>childNodes</code> list of <var>n</var>, |
|
|
<ol> |
|
|
<li>If <var>n<sub><var>c</var></sub></var> is <em>not</em> a |
|
|
<code>Text</code> or <code>EntityReference</code> node, then it is an |
|
|
<a href="#xml-well-formedness-error" id=wfe-at-child><code>xml-well-formedness-error</code></a>.</li> |
|
|
<li>Otherwise, if <var>n<sub><var>c</var></sub></var> is an |
|
|
<code>EntityReference</code> node, then it is an |
|
|
<a href="#entity-error" id=ee-at-er><code>entity-error</code></a>.</li> |
|
|
<li>Otherwise, |
|
|
<a href="#algorithm-to-check-a-node" title="check a node">check |
|
|
<var>n<sub><var>c</var></sub></var></a> recusrively.</li> |
|
|
</ol></li> |
|
|
<li class=ed>If <code>NOTATION_ATTR</code>, enumerated values MUST |
|
|
be declared. If not, then raise an |
|
|
<a href="#xml-validity-error" id=vc-notatn-declared><code>xml-validity-error</code></a>.</li> |
|
|
<li class=ed>If <code>NOTATION_ATTR</code> or <code>ENUMERATED_ATTR</code>, |
|
|
values MUST all be distinct. If not, then raise an |
|
|
<a href="#xml-validity-error" id=vc-no-duplicate-tokens><code>xml-validity-error</code></a>.</li> |
|
|
<li class=ed>If <code>NOTATION_ATTR</code> on an <code>EMPTY</code> |
|
|
element, then raise an |
|
|
<a href="#xml-validity-error" id=vc-no-notation-empty><code>xml-validity-error</code></a>.</li> |
|
|
<li class=ed>@@ #defattrvalid Validity constraint: Attribute Default Value Syntactically Correct</li> |
|
|
</ol> |
|
|
</dd> |
|
|
<dt>If <var>n</var> is a <code>CDATASection</code> node</dt> |
|
|
<dd> |
|
|
<ol> |
|
|
<li><a href="#algorithm-to-validate-an-xml-character-data" title="validate an XML string">Validate the |
|
|
<code>data</code> attribute value as an <abbr>XML</abbr> character |
|
|
data</a>.</li> |
|
|
<li>If the <code>data</code> attribute value contains |
|
|
a string <code>]]></code>, then raise an |
|
|
<a href="#xml-well-formedness-error" id=wfe-cs-mse><code>xml-well-formedness-error</code></a>.<!-- "for compatibility" --></li> |
|
|
<li>If the <code>childNodes</code> list of <var>n</var> contains |
|
|
any nodes, they are in |
|
|
<a href="#xml-well-formedness-error" id=wfe-cs-child><code>xml-well-formedness-error</code></a>.</li> |
|
|
</ol> |
|
|
</dd> |
|
|
<dt>If <var>n</var> is a <code>Comment</code> node</dt> |
|
|
<dd> |
|
|
<ol> |
|
|
<li>Raise an |
|
|
<a href="#round-trip-warning" id=rtw-comment><code>round-trip-warning</code></a>.</li> |
|
|
<li><a href="#algorithm-to-validate-an-xml-character-data" title="validate an XML string">Validate the |
|
|
<code>data</code> attribute value as an <abbr>XML</abbr> character |
|
|
data</a>.</li> |
|
|
<li>If the <code>data</code> attribute value contains |
|
|
a string <code>--</code>, or if it ends with a character |
|
|
<code>-</code>, then raise an |
|
|
<a href="#xml-well-formedness-error" id=wfe-comment-com><code>xml-well-formedness-error</code></a>.<!-- |
|
|
"for compatibility" --></li> |
|
|
<li>If the <code>childNodes</code> list of <var>n</var> contains |
|
|
any nodes, they are in |
|
|
<a href="#xml-well-formedness-error" id=wfe-comment-child><code>xml-well-formedness-error</code></a>.</li> |
|
|
</ol> |
|
|
</dd> |
|
|
<dt>If <var>n</var> is a <code>Document</code> node</dt> |
|
|
<dd> |
|
|
<ol> |
|
|
<li>If <a href="#xml-version"><abbr>XML</abbr> version</a> of <var>n</var> |
|
|
is different from <code>1.0</code> or <code>1.1</code>, |
|
|
then it is an <code class=ed>unknown-error?</code>.</li> |
|
|
<li>If the <code>xmlEncoding</code> attribute value does <em>not</em> |
|
|
match to <code>[A-Za-z] ([A-Za-z0-9._] | '-')*</code> |
|
|
<span class=ed>@@ formal def</span>, then it is an |
|
|
<a href="#xml-well-formedness-error" id=wfe-encoding><code>xml-well-formedness-error</code></a>.</li> |
|
|
<li>The <code>childNodes</code> list of <var>n</var> have to |
|
|
consist of zero or more <code>Comment</code> and/or |
|
|
<code>ProcessingInstruction</code> nodes, followed by |
|
|
an optional <code>DocumentType</code> node, followed |
|
|
by zero or more <code>Comment</code> and/or |
|
|
<code>ProcessingInstruction</code> nodes, followed by |
|
|
an <code>Element</code> node, followed |
|
|
by zero or more <code>Comment</code> and/or |
|
|
<code>ProcessingInstruction</code> nodes. Any violation to this is an |
|
|
<a href="#xml-well-formedness-error" id=wfe-document-child><code>xml-well-formedness-error</code></a>.</li> |
|
|
<li>For each node <dfn id=var-document-nc><var>n<sub><var>c</var></sub></var></dfn> |
|
|
in the <code>childNodes</code> list of <var>n</var>, |
|
|
<ol> |
|
|
<li>If <var>n<sub><var>c</var></sub></var> is <em>not</em> an |
|
|
<code>EntityReference</code> node, then |
|
|
<a href="#algorithm-to-check-a-node" title="check a node">check |
|
|
<var>n<sub><var>c</var></sub></var></a> recursively.</li> |
|
|
</ol></li> |
|
|
<li class=ed>@@ <code>allDeclarationsProcessed</code></li> |
|
|
</ol> |
|
|
</dd> |
|
|
<dt>If <var>n</var> is a <code>DocumentFragment</code> node</dt> |
|
|
<dd> |
|
|
<ol> |
|
|
<li>For each node <dfn id=var-df-nc><var>n<sub><var>c</var></sub></var></dfn> |
|
|
in the <code>childNodes</code> list of <var>n</var>, |
|
|
<ol> |
|
|
<li>If <var>n<sub><var>c</var></sub></var> is <em>not</em> an |
|
|
<code>Element</code>, <code>Text</code>, <code>CDATASection</code>, |
|
|
<code>Comment</code>, <code>ProcessingInstruction</code>, or |
|
|
<code>EntityReference</code> node, then it is an |
|
|
<a href="#xml-well-formedness-error" id=wfe-df-child><code>xml-well-formedness-error</code></a>.</li> |
|
|
<li>Otherwise, if <var>n<sub><var>c</var></sub></var> is an |
|
|
<code>EntityReference</code> node, then it is an |
|
|
<a href="#entity-error" id=ee-df-er><code>entity-error</code></a>.</li> |
|
|
<li>Otherwise, |
|
|
<a href="#algorithm-to-check-a-node" title="check a node">check |
|
|
<var>n<sub><var>c</var></sub></var></a> recursively.</li> |
|
|
</ol></li> |
|
|
</ol> |
|
|
</dd> |
|
|
<dt>If <var>n</var> is a <code>DocumentType</code> node</dt> |
|
|
<dd> |
|
|
<ol> |
|
|
<li><a href="#algorithm-to-validate-an-ncname">Validate the |
|
|
<code>nodeName</code> attribute value as an <code>NCName</code></a>.</li> |
|
|
<li>Follow the following substeps: |
|
|
<ol> |
|
|
<li>If <code>ownerDocument</code> attribute of <var>n</var> is |
|
|
<code>null</code>, then abort these substeps.</li> |
|
|
<li>If <code>documentElement</code> attribute of the node |
|
|
set to <code>ownerDocument</code> attribute of <var>n</var> is |
|
|
<code>null</code>, then abort these substeps.</li> |
|
|
<li>If <code>nodeName</code> attribute of the node set to |
|
|
<code>documentElement</code> attribute of the node set to |
|
|
<code>ownerDocument</code> attribute of <var>n</var> is |
|
|
different from <code>nodeName</code> of <var>n</var>, |
|
|
then raise an |
|
|
<a href="#xml-validity-error" id=vc-roottype><code>xml-validity-error</code></a>.</li></li> |
|
|
</ol> |
|
|
</li> |
|
|
<li><a href="#algorithm-to-validate-a-public-identifier" title="validate a public identifier">Validate |
|
|
the <code>publicId</code> attribute value as a public identifier</a>.</li> |
|
|
<li><a href="#algorithm-to-validate-a-system-identifier" title="validate a system identifier">Validate |
|
|
the <code>systemId</code> attribute value as a system identifier</a>.</li> |
|
|
<li>If the <code>publicId</code> attribute value of <var>n</var> is |
|
|
<em>not</em> <code>null</code> and the <code>systemId</code> attribute |
|
|
value of <var>n</var> is <code>null</code>, then raise an |
|
|
<a href="#xml-well-formedness-error" id=wfe-dt-sid><code>xml-well-formedness-error</code></a>. |
|
|
<span class=ed>@@ publicId == null? Or, publicId == ""</span></li> |
|
|
<li>For each node <dfn id=var-dt-nc><var>n<sub><var>c</var></sub></var></dfn> |
|
|
in the <code>childNodes</code> list of <var>n</var>, |
|
|
<ol> |
|
|
<li>If <var>n<sub><var>c</var></sub></var> is <em>not</em> a |
|
|
<code>ProcessingInstruction</code> node, then it is an |
|
|
<a href="#xml-well-formedness-error" id=wfe-dt-child><code>xml-well-formedness-error</code></a>. |
|
|
<span class=ed>@@ ref to manakai's extensions</span></li> |
|
|
<li>Otherwise, <!-- if n_c is not an EntityReference node, --> |
|
|
<a href="#algorithm-to-check-a-node" title="check a node">check |
|
|
<var>n<sub><var>c</var></sub></var></a> recusrively.</li> |
|
|
</ol></li> |
|
|
<li>For each node in the <code>entities</code>, <code>notations</code>, |
|
|
and <code>elementTypes</code> lists of <var>n</var>, |
|
|
<a href="#algorithm-to-check-a-node" title="check a node">check the |
|
|
node</a> recursively.</li> |
|
|
<li class=ed>@@ externally declared?</li> |
|
|
</ol> |
|
|
</dd> |
|
|
<dt>If <var>n</var> is an <code>Element</code> node</dt> |
|
|
<dd> |
|
|
<ol> |
|
|
<li><a href="#algorithm-to-validate-an-ncname">Validate the |
|
|
<code>localName</code> attribute value as an <code>NCName</code></a>.</li> |
|
|
<li>If the <code>prefix</code> attribute value is different from |
|
|
<code>null</code>, then <a href="#algorithm-to-validate-an-ncname">validate |
|
|
the <code>prefix</code> attribute value as an <code>NCName</code></a>.</li> |
|
|
<li>For each node <dfn id=var-element-nc><var>n<sub><var>c</var></sub></var></dfn> |
|
|
in the <code>childNodes</code> list of <var>n</var>, |
|
|
<ol> |
|
|
<li>If <var>n<sub><var>c</var></sub></var> is <em>not</em> an |
|
|
<code>Element</code>, |
|
|
<code>Text</code>, <code>CDATASection</code>, <code>Comment</code>, |
|
|
<code>ProcessingInstruction</code>, or |
|
|
<code>EntityReference</code> node, then it is an |
|
|
<a href="#xml-well-formedness-error" id=wfe-element-child><code>xml-well-formedness-error</code></a>.</li> |
|
|
<li>Otherwise, if <var>n<sub><var>c</var></sub></var> is an |
|
|
<code>EntityReference</code> node, then it is an |
|
|
<a href="#entity-error" id=ee-element-er><code>entity-error</code></a>.</li> |
|
|
<li>Otherwise, |
|
|
<a href="#algorithm-to-check-a-node" title="check a node">check |
|
|
<var>n<sub><var>c</var></sub></var></a> recursively.</li> |
|
|
</ol></li> |
|
|
<li class=ed>@@ #elementvalid Validity constraint: Element Valid</li> |
|
|
<li>Let <var>attrs</var> be the value of the <code>attribute</code> |
|
|
attribute of <var>n</var>. Check conformance of <var>attrs</var> |
|
|
as following: |
|
|
<ol> |
|
|
<li>If <var>attrs</var> contains an <code>Attr</code> node whose |
|
|
<code>nodeName</code> attribute value is equal to that of another |
|
|
<code>Attr</code> node in <var>attrs</var>, then raise an |
|
|
<a href="#xml-well-formedness-error" id=wfe-uniqattspec><code>xml-well-formedness-error</code></a>.<!-- |
|
|
#uniqattspec Well-formedness constraint: Unique Att Spec --></li> |
|
|
<li class=ed>@@ #RequiredAttr Validity constraint: Required Attribute</li> |
|
|
</ol> |
|
|
</li> |
|
|
</ol> |
|
|
</dd> |
|
|
<dt>If <var>n</var> is an <code>ElementTypeDefinition</code> node</dt> |
|
|
<dd> |
|
|
<ol> |
|
|
<li class=ed></li> |
|
|
<li>If the <code>childNodes</code> list of <var>n</var> contains |
|
|
any nodes, they are in |
|
|
<a href="#xml-well-formedness-error" id=wfe-et-child><code>xml-well-formedness-error</code></a>.</li> |
|
|
<li class=ed>@@ <q cite="http://www.w3.org/TR/2006/REC-xml-20060816/#elemdecls">At user option, an XML processor MAY issue a warning when a declaration mentions an element type for which no declaration is provided, but this is not an error.</q></li> |
|
|
<li class=ed>@@ <q cite="http://www.w3.org/TR/2006/REC-xml-20060816/#sec-element-content">For compatibility, it is an error if the content model allows an element to match more than one occurrence of an element type in the content model. </q></li> |
|
|
<li class=ed>@@ #vc-MixedChildrenUnique |
|
|
Validity constraint: No Duplicate Types</li> |
|
|
<li class=ed>@@ <q cite="http://www.w3.org/TR/2006/REC-xml-20060816/#attdecls">At user option, an XML processor MAY issue a warning if attributes are declared for an element type not itself declared, but this is not an error.</q></li> |
|
|
<li>If there is more than one <code>AttributeDefinition</code> node |
|
|
with <span class=ed>attribute type <code>ID</code></span> in the |
|
|
<code>NamedNodeMap</code> list contained in the |
|
|
<code>attributeDefinitions</code> attribute of <var>n</var>, then raise an |
|
|
<a href="#xml-validity-error" id=vc-one-id-per-el><code>xml-validity-error</code></a>.</li> |
|
|
<li>If there is more than one <code>AttributeDefinition</code> node |
|
|
with <span class=ed>attribute type <code>NOTATION</code></span> in the |
|
|
<code>NamedNodeMap</code> list contained in the |
|
|
<code>attributeDefinitions</code> attribute of <var>n</var>, then raise an |
|
|
<a href="#xml-validity-error" id=vc-one-notation-per><code>xml-validity-error</code></a>.</li> |
|
|
<li class=ed>"For interoperability, the same Nmtoken SHOULD NOT occur more than once in the enumerated attribute types of a single element type."</li> |
|
|
</ol> |
|
|
</dd> |
|
|
<dt>If <var>n</var> is an <code>Entity</code> node whose |
|
|
<code>notationName</code> attribute value is <code>null</code> (i.e. a |
|
|
parsed entity)</dt> |
|
|
<dd> |
|
|
<ol> |
|
|
<li>Raise an |
|
|
<a href="#entity-error" id=ee-entity-node><code>entity-error</code></a>.</li> |
|
|
<li><a href="#algorithm-to-validate-an-ncname">Validate the |
|
|
<code>nodeName</code> attribute value as an <code>NCName</code></a>.</li> |
|
|
<li><a href="#algorithm-to-validate-a-public-identifier" title="validate a public identifier">Validate |
|
|
the <code>publicId</code> attribute value as a public identifier</a>.</li> |
|
|
<li><a href="#algorithm-to-validate-a-system-identifier" title="validate a system identifier">Validate |
|
|
the <code>systemId</code> attribute value as a system identifier</a>.</li> |
|
|
<li>If the <code>publicId</code> attribute value of <var>n</var> is |
|
|
<em>not</em> <code>null</code> and the <code>systemId</code> attribute |
|
|
value of <var>n</var> is <code>null</code>, then raise an |
|
|
<a href="#xml-well-formedness-error" id=wfe-entity-sid><code>xml-well-formedness-error</code></a>.</li> |
|
|
<li>For each node <dfn id=var-entity-nc><var>n<sub><var>c</var></sub></var></dfn> |
|
|
in the <code>childNodes</code> list of <var>n</var>, |
|
|
<ol> |
|
|
<li>If <var>n<sub><var>c</var></sub></var> is <em>not</em> an |
|
|
<code>Element</code>, |
|
|
<code>Text</code>, <code>CDATASection</code>, <code>Comment</code>, |
|
|
<code>ProcessingInstruction</code>, or <code>EntityReference</code> |
|
|
node, then it is an |
|
|
<a href="#xml-well-formedness-error" id=wfe-entity-child><code>xml-well-formedness-error</code></a>.</li> |
|
|
<li>Otherwise, if <var>n<sub><var>c</var></sub></var> is an |
|
|
<code>EntityReference</code> node, then it is an |
|
|
<a href="#entity-error" id=ee-er-er><code>entity-error</code></a>.</li> |
|
|
<li>Otherwise, |
|
|
<a href="#algorithm-to-check-a-node" title="check a node">check |
|
|
<var>n<sub><var>c</var></sub></var></a> recursively.</li> |
|
|
</ol></li> |
|
|
</ol> |
|
|
</dd> |
|
|
<dt>If <var>n</var> is an <code>Entity</code> node whose |
|
|
<code>notationName</code> attribute value is <em>not</em> <code>null</code> |
|
|
(i.e. an unparsed entity)</dt> |
|
568 |
<dd> |
<dd> |
569 |
<ol> |
<p>This method creates a <code>DocumentType</code> node with the specified |
570 |
<li><a href="#algorithm-to-validate-an-ncname">Validate the |
name, belonging to the document.</p> |
571 |
<code>nodeName</code> attribute value as an <code>NCName</code></a>.</li> |
<p>The |
572 |
<li><a href="#algorithm-to-validate-a-public-identifier" title="validate a public identifier">Validate |
<dfn id=createDocumentTypeDefinition-name class=dom-param><var>name</var></dfn> |
573 |
the <code>publicId</code> attribute value as a public identifier</a>.</li> |
parameter is the name of the document type.</p> |
574 |
<li><a href="#algorithm-to-validate-a-system-identifier" title="validate a system identifier">Validate |
|
575 |
the <code>systemId</code> attribute value as a system identifier</a>.</li> |
<p>When invoked, the method <em class=rfc2119>MUST</em> create and |
576 |
<li>If the <code>systemId</code> attribute value of <var>n</var> is |
return a <a href="#DocumentType"><code>DocumentType</code></a> node with |
577 |
<code>null</code>, then raise an |
the following attributes:</p> |
578 |
<a href="#xml-well-formedness-error" id=wfe-uentity-sid><code>xml-well-formedness-error</code></a>.</li> |
<dl> |
579 |
<li><a href="#algorithm-to-validate-an-ncname">Validate the |
<dt><code>attributes</code>, <code>parentNode</code></dt> |
580 |
<code>notationName</code> attribute value of <var>n</var> as an |
<dd><code>null</code>.</dd> |
581 |
<code>NCName</code></a>.</li> |
<dt><a href="#elementTypes"><code>elementTypes</code></a>, |
582 |
<li class=ed>@@ #not-declared Validity constraint: Notation Declared</li> |
<a href="#entities"><code>entities</code></a>, and |
583 |
<li>If the <code>childNodes</code> list of <var>n</var> contains |
<a href="#notations"><code>notations</code></a></dt> |
584 |
any nodes, they are in |
<dd>Empty <code>NamedNodeMap</code> objects respectively.</dd> |
585 |
<a href="#xml-well-formedness-error" id=wfe-uentity-child><code>xml-well-formedness-error</code></a>.</li> |
<dt><code>childNodes</code></dt> |
586 |
</ol> |
<dd>An empty <code>NodeList</code> object.</dd> |
587 |
|
<dt><a href="#internalSubset"><code>internalSubset</code></a>, |
588 |
|
<a href="#publicId"><code>publicId</code></a>, and |
589 |
|
<a href="#systemId"><code>systemId</code></a></dt> |
590 |
|
<dd>Empty strings.</dd> |
591 |
|
<dt><code>nodeName</code></dt> |
592 |
|
<dd><a href="#createDocumentTypeDefinition-name"><var>name</var></a>.</dd> |
593 |
|
<dt><code>ownerDocument</code></dt> |
594 |
|
<dd>The <a href="#Document"><code>Document</code></a> node over which the |
595 |
|
method is invoked.</dd> |
596 |
|
</dl> |
597 |
|
<p>The returned node <em class=rfc2119>MUST NOT</em> be marked as |
598 |
|
<a href="#read-only">read$B!>(Bonly</a>.</p> |
599 |
|
<p>In addition, the method <em class=rfc2119>MUST</em> be marked as |
600 |
|
containing five general entity declarations: <code>amp</code>, |
601 |
|
<code>lt</code>, <code>gt</code>, <code>quot</code>, and |
602 |
|
<code>apos</code>.</p> |
603 |
</dd> |
</dd> |
604 |
<dt>If <var>n</var> is an <code>EntityReference</code> node</dt> |
<dt><dfn id=createElementTypeDefinition class=dom-method><code>createElementTypeDefinition</code></dfn>, |
605 |
|
method</dt> |
606 |
<dd> |
<dd> |
607 |
<ol> |
<p>This method creates a <code>ElementTypeDefinition</code> node with the |
608 |
<li>An <a href="#entity-error" id=ee-er-node><code>entity-error</code></a>.</li> |
specified name, belonging to the document.</p> |
609 |
<li><a href="#algorithm-to-validate-an-ncname">Validate the |
<p>The <dfn id=createElementTypeDefinition-name class=dom-param><var>name</var></dfn> |
610 |
<code>nodeName</code> attribute value as an <code>NCName</code></a>.</li> |
parameter is the name of the element type defined by the element |
611 |
<li>For each node <dfn id=var-er-nc><var>n<sub><var>c</var></sub></var></dfn> |
type definition.</p> |
612 |
in the <code>childNodes</code> list of <var>n</var>, |
|
613 |
<ol> |
<p>When invoked, the method <em class=rfc2119>MUST</em> create and |
614 |
<li>If <var>n<sub><var>c</var></sub></var> is <em>not</em> an |
return an |
615 |
<code>Element</code>, |
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> |
616 |
<code>Text</code>, <code>CDATASection</code>, <code>Comment</code>, |
node with the following attributes:</p> |
617 |
<code>ProcessingInstruction</code>, or <code>EntityReference</code> |
<dl> |
618 |
node, then it is an |
<dt><a href="#attributeDefinitions"><code>attributeDefinitions</code></a></dt> |
619 |
<a href="#xml-well-formedness-error" id=wfe-er-child><code>xml-well-formedness-error</code></a>.</li> |
<dd>An empty <code>NamedNodeMap</code> object.</dd> |
620 |
<li>Otherwise, if <var>n<sub><var>c</var></sub></var> is <em>not</em> an |
<dt><code>childNodes</code></dt> |
621 |
<code>EntityReference</code> node, then it is an |
<dd>An empty <code>NodeList</code> object.</dd> |
622 |
<a href="#entity-error" id=ee-entity-er><code>entity-error</code></a>.</li> |
<dt><a href="#nodeName"><code>nodeName</code></a></dt> |
623 |
<li>Otherwise, |
<dd><a href="#createElementTypeDefinition-name"><var>name</var></a>.</dd> |
624 |
<a href="#algorithm-to-check-a-node" title="check a node">check |
<dt><code>ownerDocument</code></dt> |
625 |
<var>n<sub><var>c</var></sub></var></a> recursively.</li> |
<dd>The <code>Document</code> node over which the method is invoked.</dd> |
626 |
</ol></li> |
<dt><a href="#ownerDocumentTypeDefinition"><code>ownerDocumentTypeDefinition</code></a> |
627 |
</ol> |
and <code>parentNode</code></dt> |
628 |
|
<dd><code>null</code>.</dd> |
629 |
|
</dl> |
630 |
|
<p>The returned node <em class=rfc2119>MUST NOT</em> be marked as |
631 |
|
<a href="#read-only">read$B!>(Bonly</a>.</p> |
632 |
</dd> |
</dd> |
633 |
<dt>If <var>n</var> is a <code>Notation</code> node</dt> |
<dt><dfn id=createAttributeDefinition class=dom-method><code>createAttributeDefinition</code></dfn>, |
634 |
|
method</dt> |
635 |
<dd> |
<dd> |
636 |
<ol> |
<p>This method creates a <code>AttributeDefinition</code> node with the |
637 |
<li><a href="#algorithm-to-validate-an-ncname">Validate the |
specified name, belonging to the document.</p> |
638 |
<code>nodeName</code> attribute value as an <code>NCName</code></a>.</li> |
<p>The <dfn id=createAttributeDefinition-name class=dom-param><var>name</var></dfn> |
639 |
<li><a href="#algorithm-to-validate-a-public-identifier" title="validate a public identifier">Validate |
parameter is the name of the attribute defined by the attribute |
640 |
the <code>publicId</code> attribute value as a public identifier</a>.</li> |
definition.</p> |
641 |
<li><a href="#algorithm-to-validate-a-system-identifier" title="validate a system identifier">Validate |
|
642 |
the <code>systemId</code> attribute value as a system identifier</a>.</li> |
<p>When invoked, the method <em class=rfc2119>MUST</em> create and |
643 |
<li>If the <code>childNodes</code> list of <var>n</var> contains |
return an |
644 |
any nodes, they are in |
<a href="#AttributeDefinition"><code>AttributeDefinition</code></a> |
645 |
<a href="#xml-well-formedness-error" id=wfe-notation-child><code>xml-well-formedness-error</code></a>.</li> |
node with the following attributes:</p> |
646 |
</ol> |
<dl> |
647 |
|
<dt><a href="#allowedTokens"><code>allowedTokens</code></a></dt> |
648 |
|
<dd>An empty <code>DOMStringList</code> object.</dd> |
649 |
|
<dt><code>childNodes</code></dt> |
650 |
|
<dd>An empty <code>NodeList</code> object.</dd> |
651 |
|
<dt><a href="#declaredType"><code>declaredType</code></a></dt> |
652 |
|
<dd><a href="#NO_TYPE_ATTR"><code>NO_TYPE_ATTR</code></a>.</dd> |
653 |
|
<dt><a href="#defaultType"><code>defaultType</code></a></dt> |
654 |
|
<dd><a href="#UNKNOWN_DEFAULT"><code>UNKNOWN_DEFAULT</code></a>.</dd> |
655 |
|
<dt><a href="#nodeName"><code>nodeName</code></a></dt> |
656 |
|
<dd><a href="#createAttributeDefinition-name"><var>name</var></a>.</dd> |
657 |
|
<dt><code>ownerDocument</code></dt> |
658 |
|
<dd>The <code>Document</code> node over which the method is invoked.</dd> |
659 |
|
<dt><a href="#ownerElementTypeDefinition"><code>ownerElementTypeDefinition</code></a> |
660 |
|
and <code>parentNode</code></dt> |
661 |
|
<dd><code>null</code>.</dd> |
662 |
|
</dl> |
663 |
|
<p>The returned node <em class=rfc2119>MUST NOT</em> be marked as |
664 |
|
<a href="#read-only">read$B!>(Bonly</a>.</p> |
665 |
|
|
666 |
|
<!-- This requirement, if not droped, should be part of xml-id spec. |
667 |
|
<div class=ed> |
668 |
|
<p>@@ Should we keep these statements?: |
669 |
|
However, if the <cfg::cfg|xml-id> configuration |
670 |
|
parameter is set to <code>true</code> and the <var>name</var> |
671 |
|
is <code>xml:id</code>, then the [CODE(DOMa)@en[[[declaredType]]]] |
672 |
|
attribute is set to <code>ID_ATTR</code>. |
673 |
|
[CODE(DOMa)@en[[[defaultType]]]]?</p> |
674 |
|
</div>--> |
675 |
</dd> |
</dd> |
676 |
<dt>If <var>n</var> is a <code>ProcessingInstruction</code> node</dt> |
<dt><dfn id=createGeneralEntity class=dom-method><code>createGeneralEntity</code></dfn>, |
677 |
|
method</dt> |
678 |
<dd> |
<dd> |
679 |
<ol> |
<p>This method creates a <a href="#Entity"><code>Entity</code></a> node |
680 |
<li>If the <code>target</code> attribute value matches to the string |
with the specified name, which represents a general entity, belonging to |
681 |
<code>xml</code> in any case combination, then raise a |
the document.</p> |
682 |
<a href="#xml-well-formedness-error" id=wfe-pi-xml><code>xml-well-formedness-error</code></a>.</li> |
<p>The <dfn id=createGeneralEntity-name class=dom-param><var>name</var></dfn> |
683 |
<li>Otherwise, <a href="#algorithm-to-validate-an-ncname">validate the |
parameter is the name of the general entity.</p> |
684 |
<code>target</code> attribute value as an <code>NCName</code></a>.</li> |
|
685 |
<li>Then, |
<p>When invoked, the method <em class=rfc2119>MUST</em> create and return |
686 |
<a href="#algorithm-to-validate-an-xml-character-data" title="validate an XML string">validate |
an <a href="#Entity"><code>Entity</code></a> node with the following |
687 |
the <code>data</code> attribute value as an <abbr>XML</abbr> character |
attributes:</p> |
688 |
data</a>.</li> |
<dl> |
689 |
<li>If the <code>data</code> attribute value contains a string |
<dt><code>childNodes</code></dt> |
690 |
<code>?></code>, then raise a |
<dd>An empty <code>NodeList</code> object.</dd> |
691 |
<a href="#xml-well-formedness-error" id=wfe-pi-pic><code>xml-well-formedness-error</code></a>.</li> |
<dt><code>manakaiDeclarationBaseURI</code>, |
692 |
<li>If the <code>data</code> attribute value starts with either |
<code>manakaiEntityBaseURI</code>, and <code>manakaiEntityURI</code> |
693 |
<code class=char>U+0009</code> <code class=charname>CHARACTER |
<cite class="bibref normative">[<a href="#ref-MANAKAI">MANAKAI</a>]</cite></dt> |
694 |
TABULATION</code>, <code class=char>U+000A</code> <code class=charname>LINE |
<dd><p class=section-info>This entry is applied only to implementations |
695 |
FEED</code>, <code class=char>U+000D</code> <code class=charname>CARRIAGE |
that support these attributes.</p> |
696 |
RETURN</code>, or <code class=char>U+0020</code> |
|
697 |
<code class=charname>SPACE</code> character, then raise a |
<p>No explicit value is set.</p></dd> |
698 |
<a href="#round-trip-error" id=rte-pi-s><code>round-trip-error</code></a>.</li> |
<dt><a href="#hasReplacementTree"><code>hasReplacementTree</code></a> and |
699 |
<li>If the <code>childNodes</code> list of <var>n</var> contains |
<a href="#isExternallyDeclared"><code>isExternallyDeclared</code></a></dt> |
700 |
any nodes, then raise an |
<dd><p><code>false</code>.</p></dd> |
701 |
<a href="#xml-well-formedness-error" id=wfe-pi-child><code>xml-well-formedness-error</code></a>.</li> |
<dt><code>nodeName</code></dt> |
702 |
</ol> |
<dd><a href="#createGeneralEntity-name"><var>name</var></a>.</dd> |
703 |
</dd> |
<dd> |
704 |
<dt>If <var>n</var> is a <code>Text</code> node</dt> |
<div class="note memo"> |
705 |
|
<p>It is not an error for |
706 |
|
<a href="#createGeneralEntity-name"><var>name</var></a> matching |
707 |
|
to the name of one of predefined general parsed entities in |
708 |
|
<abbr>XML</abbr> or <abbr>HTML</abbr>. For example, |
709 |
|
<a href="#createGeneralEntity-name"><var>name</var></a> might be |
710 |
|
<code>amp</code>, resulting in an |
711 |
|
<a href="#Entity"><code>Entity</code></a> node |
712 |
|
with its <code>nodeName</code> attribute set to <code>amp</code>.</p> |
713 |
|
</div> |
714 |
|
</dd> |
715 |
|
<dt><a href="#notationName"><code>notationName</code></a>, |
716 |
|
<a href="#ownerDocumentTypeDefinition"><code>ownerDocumentTypeDefinition</code></a>, |
717 |
|
and <code>parentNode</code></dt> |
718 |
|
<dd><code>null</code>.</dd> |
719 |
|
<dt><code>ownerDocument</code></dt> |
720 |
|
<dd>The <code>Document</code> node over which the method is invoked.</dd> |
721 |
|
<dt><a href="#publicId"><code>publicId</code></a> and |
722 |
|
<a href="#systemId"><code>systemId</code></a></dt> |
723 |
|
<dd><code>null</code>.</dd> |
724 |
|
<dd class=ed>@@ publicId and systemId should be empty string?</dd> |
725 |
|
</dl> |
726 |
|
<p>The returned node <em class=rfc2119>MUST NOT</em> be marked as |
727 |
|
<a href="#read-only">read$B!>(Bonly</a>.</p></dd> |
728 |
|
<dt><dfn id=createNotation class=dom-method><code>createNotation</code></dfn>, |
729 |
|
method</dt> |
730 |
<dd> |
<dd> |
731 |
<ol> |
<p>This method creates a <code>Notation</code> node with the |
732 |
<li><a href="#algorithm-to-validate-an-xml-character-data" title="validate an XML string">Validate the |
specified name, belonging to the document.</p> |
733 |
<code>data</code> attribute value as an <abbr>XML</abbr> character |
<p>The <dfn id=createNotation-name class=dom-param><var>name</var></dfn> |
734 |
data</a>.</li> |
parameter is the name of the notation.</p> |
735 |
<li>If the <code>childNodes</code> list of <var>n</var> contains |
|
736 |
any nodes, they are in |
<p>When invoked, the method <em class=rfc2119>MUST</em> create and return |
737 |
<a href="#xml-well-formedness-error" id=wfe-text-child><code>xml-well-formedness-error</code></a>.</li> |
a <code>Notation</code> node with the following attributes:</p> |
738 |
</ol> |
<dl> |
739 |
</dd> |
<dt><code>childNodes</code></dt> |
740 |
<dt>Otherwise</dt> |
<dd>An empty <code>NodeList</code> object.</dd> |
741 |
<dd><span class=ed>xml-well-formedness-error? unknown-error?</span></dd> |
<dt><code>manakaiDeclarationBaseURI</code> |
742 |
|
<cite class="bibref normative">[<a href="#ref-MANAKAI">MANAKAI</a>]</cite></dt> |
743 |
|
<dd><p class=section-info>This entry is applied only to implementations |
744 |
|
that support these attributes.</p> |
745 |
|
|
746 |
|
<p>No explicit value is set.</p></dd> |
747 |
|
<dt><code>nodeName</code></dt> |
748 |
|
<dd><a href="#createNotation-name"><var>name</var></a>.</dd> |
749 |
|
<dt><code>ownerDocument</code></dt> |
750 |
|
<dd><p>The <a href="#Document"><code>Document</code></a> node over which |
751 |
|
the method is invoked.</p></dd> |
752 |
|
<dt><a href="#ownerDocumentTypeDefinition"><code>ownerDocumentTypeDefinition</code></a> |
753 |
|
and <code>parentNode</code></dt> |
754 |
|
<dd><code>null</code>.</dd> |
755 |
|
<dt><a href="#publicId"><code>publicId</code></a> and |
756 |
|
<a href="#systemId"><code>systemId</code></a></dt> |
757 |
|
<dd><code>null</code>.</dd> |
758 |
|
<dd class=ed>@@ publicId and systemId should be empty string?</dd> |
759 |
|
</dl> |
760 |
|
<p>The returned node <em class=rfc2119>MUST NOT</em> be marked as |
761 |
|
<a href="#read-only">read$B!>(Bonly</a>.</p></dd> |
762 |
</dl> |
</dl> |
763 |
|
|
764 |
|
<p>These methods <em class=rfc2119>MUST</em> raise an |
765 |
|
<code>INVALID_CHARACTER_ERR</code> if <var>name</var> is <em>not</em> a legal |
766 |
|
<code>Name</code> |
767 |
|
<cite class="bibref normative">[<a href="#ref-XML10">XML10</a>, |
768 |
|
<a href="#ref-XML11">XML11</a>]</cite> according to the <abbr>XML</abbr> |
769 |
|
version specified in the <code>xmlVersion</code> attribute of the |
770 |
|
<a href="#Document"><code>Document</code></a> node.</p> |
771 |
|
|
772 |
|
<div class="note memo"> |
773 |
|
<p>Non$B!>(B<abbr>XML</abbr> case is intentionally left unspecified for now, |
774 |
|
since <abbr>DOM</abbr> Level 3 Core specification |
775 |
|
<cite class="bibref normative">[<a href="#ref-DOM3CORE">DOM3CORE</a>]</cite> |
776 |
|
does not define it for <a href="#Document"><code>Document</code></a> |
777 |
|
methods.</p> |
778 |
|
|
779 |
|
<p><var>name</var> does not have to be a namespace qualified name.</p> |
780 |
</div> |
</div> |
781 |
|
|
782 |
</div> |
</div> |
783 |
|
|
|
<div id=classes class=section> |
|
|
<h2>Character Classes</h2> |
|
784 |
|
|
785 |
<p>This section defines a couple of character classes. |
<div class=section id=section-documenttype> |
786 |
These classes are referred to by algorithms specified above.</p> |
<h3>Modifications to the <code id=DocumentType>DocumentType</code> |
787 |
|
Interface</h3> |
788 |
|
|
789 |
|
<p>A <a href="#DocumentType"><code>DocumentType</code></a> interface |
790 |
|
<em class=rfc2119>MAY</em> contain zero or more |
791 |
|
<code>ProcessingInstruction</code> nodes in the <code>NodeList</code> object |
792 |
|
contained in the <code>childNodes</code> attribute of the |
793 |
|
<a href="#DocumentType"><code>DocumentType</code></a> node.</p> |
794 |
|
|
795 |
|
<p>If the <a href="#DocumentType"><code>DocumentType</code></a> node is created |
796 |
|
during the process to create a <abbr>DOM</abbr> from an <abbr>XML</abbr> |
797 |
|
document, the <code>NodeList</code> object in the <code>childNodes</code> |
798 |
|
object <em class=rfc2119>MUST</em> contains the |
799 |
|
<code>ProcessingInstruction</code> nodes representing the processing |
800 |
|
instructions in the document type definition of the document processed |
801 |
|
<cite class="bibref normative">[<a href="#ref-XML10">XML10</a>, |
802 |
|
<a href="#ref-XML11">XML11</a>]</cite> by the <abbr>XML</abbr> processor. If |
803 |
|
the <a href="#DocumentType"><code>DocumentType</code></a> node is marked as |
804 |
|
<a href="#read-only">read$B!>(Bonly</a>, then all the child nodes |
805 |
|
<em class=rfc2119>MUST</em> also be marked as |
806 |
|
<a href="#read-only">read$B!>(Bonly</a>.</p> |
807 |
|
|
808 |
|
<p>If a <a href="#DocumentType"><code>DocumentType</code></a> node is created |
809 |
|
from a |
810 |
|
<a href="http://www.w3.org/TR/2004/REC-xml-infoset-20040204/#infoitem.doctype">document |
811 |
|
type declaration information item</a> |
812 |
|
<cite class="bibref normative">[<a href="#ref-INFOSET">INFOSET</a>]</cite>, |
813 |
|
the <code>NodeList</code> object in the <code>childNodes</code> attribute |
814 |
|
of the node <em class=rfc2119>MUST</em> contain the |
815 |
|
<code>ProcessingInstruction</code> nodes created from any |
816 |
|
<a href="http://www.w3.org/TR/2004/REC-xml-infoset-20040204/#infoitem.pi">processing |
817 |
|
instruction information items</a> in the list in the [children] property of the |
818 |
|
<a href="http://www.w3.org/TR/2004/REC-xml-infoset-20040204/#infoitem.doctype">document |
819 |
|
type declaration item</a> in the same order.</p> |
820 |
|
|
821 |
|
<p>If a <a href="#DocumentType"><code>DocumentType</code></a> node is mapped to |
822 |
|
a document type declaration information item, the list in the [children] |
823 |
|
property <em class=rfc2119>MUST</em> contain the processng instruction |
824 |
|
information items created from the <code>ProcessingInstruction</code> nodes |
825 |
|
in the <code>NodeList</code> object in the <code>childNodes</code> attribute |
826 |
|
of the <a href="#DocumentType"><code>DocumentType</code></a> node.</p> |
827 |
|
|
828 |
|
<p>The implementation of the |
829 |
|
<a href="#DocumentType"><code>DocumentType</code></a> interface |
830 |
|
<em class=rfc2119>MUST</em> be modified as the following |
831 |
|
<a href="#idl-fragment"><abbr>IDL</abbr> fragment</a>:</p> |
832 |
|
<pre class=idl><code>// Modifications to the DocumentType interface |
833 |
|
attribute DOMString <a href="#publicId">publicId</a>; |
834 |
|
attribute DOMString <a href="#systemId">systemId</a>; |
835 |
|
|
836 |
|
attribute DOMString <a href="#internalSubset">internalSubset</a>; |
837 |
|
</code></pre> |
838 |
|
|
839 |
|
<p>The <code id=publicId>publicId</code> attribute and the |
840 |
|
<code id=systemId>systemId</code> attribute of |
841 |
|
<a href="#DocumentType"><code>DocumentType</code></a>, |
842 |
|
<a href="#Entity"><code>Entity</code></a>, and |
843 |
|
<a href="#Notation"><code>Notation</code></a> interfaces are no longer |
844 |
|
read$B!>(Bonly.</p> |
845 |
|
|
846 |
|
<p>On setting, the attribute <em class=rfc2119>MUST</em> raise a |
847 |
|
<code>NO_MODIFICATION_ALLOWED_ERR</code> if the node is |
848 |
|
<a href="#read-only">read$B!>(Bonly</a>. Otherwise, it <em class=rfc2119>MUST</em> |
849 |
|
set the specified value as the value associated to the attribute. No |
850 |
|
normalization, relative reference resolution, or lexical validation is |
851 |
|
performed. <span class=ed>@@ If the new value is <code>null</code>, should an |
852 |
|
empty string be set?</span></p> |
853 |
|
|
|
<p>Character class <dfn id=class-Char10><code>Char10</code></dfn> |
|
|
contains the following characters:</p> |
|
|
<ul> |
|
|
<li><code class=char>U+0009</code> <code class=charname>CHARACTER |
|
|
TABULATION</code></li> |
|
|
<li><code class=char>U+000A</code> <code class=charname>LINE FEED</code></li> |
|
|
<li><code class=char>U+000D</code> <code class=charname>CARRIAGE |
|
|
RETURN</code></li> |
|
|
<li><code class=char>U+0020</code> <code class=charname>SPACE</code> |
|
|
.. <code class=char>U+D7FF</code></li> |
|
|
<li><code class=char>U+E000</code> .. <code class=char>U+FFFD</code> |
|
|
<code class=charname>REPLACEMENT CHARACTER</code></li> |
|
|
<li><code class=char>U+10000</code> .. <code class=char>U+10FFFF</code></li> |
|
|
</ul> |
|
|
<div class="note memo"> |
|
|
<p>This character class contains all characters allowed in the production rule |
|
|
<a href="http://www.w3.org/TR/2006/REC-xml-20060816/#NT-Char"><code>Char</code></a> |
|
|
of <abbr>XML</abbr> 1.0 |
|
|
<cite class="bibref normative">[<a href="#ref-XML10">XML10</a>]</cite>.</p> |
|
|
</div> |
|
|
|
|
|
<p>Character class <dfn id=class-CompatChar10><code>CompatChar10</code></dfn> |
|
|
contains the following characters:</p> |
|
|
<ul> |
|
|
<li class=ed>@@ <q>Document authors are encouraged to avoid "compatibility characters", as defined in section 6.8 of [Unicode @@ Unicode 2.0 @@] (see also D21 in section 3.6 of [Unicode3]).</q></li> |
|
|
</ul> |
|
|
|
|
|
<p>Character class <dfn id=class-ControlChar10><code>ControlChar10</code></dfn> |
|
|
contains the following characters:</p> |
|
|
<ul> |
|
|
<li><code class=char>U+007F</code> <code class=charname>DELETE</code> .. |
|
|
<code class=char>U+0084</code> <code class=charname>INDEX</code></li> |
|
|
<li><code class=char>U+0086</code> <code class=charname>START OF SELECTED |
|
|
AREA</code> .. <code class=char>U+009F</code> <code class=charname>APPLICATION |
|
|
PROGRAM COMMAND</code></li> |
|
|
<li><code class=char>U+FDD0</code> .. <code class=char>U+FDEF</code></li> |
|
|
<li><code class=char>U+1FFFE</code> .. <code class=char>U+1FFFF</code></li> |
|
|
<li><code class=char>U+2FFFE</code> .. <code class=char>U+2FFFF</code></li> |
|
|
<li><code class=char>U+3FFFE</code> .. <code class=char>U+3FFFF</code></li> |
|
|
<li><code class=char>U+4FFFE</code> .. <code class=char>U+4FFFF</code></li> |
|
|
<li><code class=char>U+5FFFE</code> .. <code class=char>U+5FFFF</code></li> |
|
|
<li><code class=char>U+6FFFE</code> .. <code class=char>U+6FFFF</code></li> |
|
|
<li><code class=char>U+7FFFE</code> .. <code class=char>U+7FFFF</code></li> |
|
|
<li><code class=char>U+8FFFE</code> .. <code class=char>U+8FFFF</code></li> |
|
|
<li><code class=char>U+9FFFE</code> .. <code class=char>U+9FFFF</code></li> |
|
|
<li><code class=char>U+AFFFE</code> .. <code class=char>U+AFFFF</code></li> |
|
|
<li><code class=char>U+BFFFE</code> .. <code class=char>U+BFFFF</code></li> |
|
|
<li><code class=char>U+CFFFE</code> .. <code class=char>U+CFFFF</code></li> |
|
|
<li><code class=char>U+DFFFE</code> .. <code class=char>U+DFFFF</code></li> |
|
|
<li><code class=char>U+EFFFE</code> .. <code class=char>U+EFFFF</code></li> |
|
|
<li><code class=char>U+FFFFE</code> .. <code class=char>U+FFFFF</code></li> |
|
|
<li><code class=char>U+10FFFE</code> .. <code class=char>U+10FFFF</code></li> |
|
|
</ul> |
|
854 |
<div class="note memo"> |
<div class="note memo"> |
855 |
<p>This character class contains the characters listed in the Note in |
<p>Setting an invalid identifier might make the node unserializable. |
856 |
<a href="http://www.w3.org/TR/2006/REC-xml-20060816/#charsets">Section 2.2</a> |
Setting a public identifier while leaving system identifier unspecified |
857 |
of <abbr>XML</abbr> 1.0 |
would also make the <a href="#DocumentType"><code>DocumentType</code></a> |
858 |
<cite class="bibref normative">[<a href="#ref-XML10">XML10</a>]</cite>, |
or <a href="#Entity"><code>Entity</code></a> node unserializable.</p> |
|
as amended by |
|
|
<a href="http://www.w3.org/XML/xml-V10-4e-errata#E02">errata</a>.</p> |
|
859 |
</div> |
</div> |
860 |
|
|
861 |
<p>The character class <dfn id=class-NameStartChar10><code>NameStartChar10</code></dfn> |
<div class=ed> |
862 |
contains the following characters:</p> |
<p>ISSUE: In HTML5, Firefox 1.5, and Opera 9, not specifying public or system identifier results in empty strings.</p> |
|
<ul class=ed> |
|
|
</ul> |
|
|
<div class="note memo"> |
|
|
<p>This character class contains all characters allowed as the first character |
|
|
of a string matching to the production rule |
|
|
<a href="http://www.w3.org/TR/2006/REC-xml-20060816/#NT-Name"><code>Name</code></a> |
|
|
of <abbr>XML</abbr> 1.0 |
|
|
<cite class="bibref normative">[<a href="#ref-XML10">XML10</a>]</cite>.</p> |
|
863 |
</div> |
</div> |
864 |
|
|
865 |
<p>The character class <dfn id=class-NameChar10><code>NameChar10</code></dfn> |
<p>The <code id=internalSubset>internalSubset</code> attribute of the |
866 |
contains the following characters:</p> |
<a href="#DocumentType"><code>DocumentType</code></a> interface is no longer |
867 |
<ul> |
read$B!>(Bonly.</p> |
868 |
<li>The characters in the character class |
|
869 |
<a href="#class-NameStartChar10">NameStartChar10</a>.</li> |
<p>On setting, the attribute <em class=rfc2119>MUST</em> raise a |
870 |
<li class=ed></li> |
<code>NO_MODIFICATION_ALLOWED_ERR</code> if the node is |
871 |
</ul> |
<a href="#read-only">read$B!>(Bonly</a>. Otherwise, it <em class=rfc2119>MUST</em> |
872 |
<div class="note memo"> |
set the specified value as the value associated to the attribute. No |
873 |
<p>This character class contains all characters allowed as the second |
normalization, or lexical validation is performed. <span class=ed>@@ If the |
874 |
character of a string matching to the production rule |
new value is <code>null</code>, should an empty string be set?</span></p> |
875 |
<a href="http://www.w3.org/TR/2006/REC-xml-20060816/#NT-Name"><code>Name</code></a> |
|
876 |
of <abbr>XML</abbr> 1.0 |
</div> |
877 |
<cite class="bibref normative">[<a href="#ref-XML10">XML10</a>]</cite>.</p> |
|
878 |
</div> |
<div class=section id=section-documenttypedefinition> |
879 |
|
<h3>The <code>DocumentTypeDefinition</code> Interface</h3> |
880 |
<p>The character class <dfn id=class-PubidChar><code>PubidChar</code></dfn> |
|
881 |
contains the following characters:</p> |
<p>The <a href="#DocumentType"><code>DocumentType</code></a> nodes |
882 |
<ul> |
<em class=rfc2119>MUST</em> also implement the |
883 |
<li><code class=char>U+0009</code> <code class=charname>CHARACTER |
<a href="#DocumentTypeDefinition"><code>DocumentTypeDefinition</code></a> |
884 |
TABULATION</code></li> |
interface.</p> |
885 |
<li><code class=char>U+000A</code> <code class=charname>LINE FEED</code></li> |
|
886 |
<li><code class=char>U+000D</code> <code class=charname>CARRIAGE |
<p>An instance of the |
887 |
RETURN</code></li> |
<a href="#DocumentTypeDefinition"><code>DocumentTypeDefinition</code></a> |
888 |
<li><code class=char>U+0020</code> <code class=charname>SPACE</code></li> |
interface <em class=rfc2119>MUST</em> be able to be obtained by using |
889 |
<li><code class=char>U+0021</code> <code class=charname>EXCLAMATION MARK</code> |
binding$B!>(Bspecific casting methods on an instance of the |
890 |
(<code class=char>!</code>)</li> |
<a href="#DocumentType"><code>DocumentType</code></a> interface (if such |
891 |
<li><code class=char>U+0023</code> <code class=charname>DOLLAR SIGN</code> |
casting methods are available) or by using the method <code>getFeature</code> |
892 |
(<code class=char>$</code>)</li> |
with parameter values |
893 |
<li><code class=char>U+0024</code> <code class=charname>NUMBER SIGN</code> |
<a href="#feature-XDoctype"><code>http://suika.fam.cx/www/2006/feature/XDoctype</code></a> |
894 |
(<code class=char>#</code>)</li> |
and <a href="#feature-XDoctype-3.0"><code>3.0</code></a> respectively (if the |
895 |
<li><code class=char>U+0025</code> <code class=charname>PERCENT SIGN</code> |
<a href="#DocumentType"><code>DocumentType</code></a> node supports the |
896 |
(<code class=char>%</code>)</li> |
feature <code>Core</code> version <code>3.0</code> |
897 |
<li><code class=char>U+0027</code> <code class=charname>APOSTROPHE</code> |
<cite class="bibref normative">[<a href="#ref-DOM3CORE">DOM3CORE</a>]</cite>).</p> |
898 |
(<code class=char>'</code>)</li> |
|
899 |
<li><code class=char>U+0028</code> <code class=charname>LEFT PARENTHESIS</code> |
<p>The |
900 |
(<code class=char>(</code>)</li> |
<a href="#DocumentTypeDefinition"><code>DocumentTypeDefinition</code></a> |
901 |
<li><code class=char>U+0029</code> <code class=charname>RIGHT |
interface <em class=rfc2119>MUST</em> be implemented as the following |
902 |
PARENTHESIS</code> (<code class=char>)</code>)</li> |
<a href="#idl-fragment"><abbr>IDL</abbr> fragment</a>:</p> |
903 |
<li><code class=char>U+002A</code> <code class=charname>ASTERISK</code> |
<pre class=idl><code>interface <dfn id=DocumentTypeDefinition><code>DocumentTypeDefinition</code></dfn> { |
904 |
(<code class=char>*</code>)</li> |
readonly attribute NamedNodeMap <a href="#elementTypes">elementTypes</a>; |
905 |
<li><code class=char>U+002B</code> <code class=charname>PLUS SIGN</code> |
readonly attribute NamedNodeMap <a href="#generalEntities">generalEntities</a>; |
906 |
(<code class=char>+</code>)</li> |
readonly attribute NamedNodeMap <a href="#notations">notations</a>; |
907 |
<li><code class=char>U+002C</code> <code class=charname>COMMA</code> |
|
908 |
(<code class=char>,</code>)</li> |
<a href="#ElementTypeDefinition">ElementTypeDefinition</a> <a href="#getElementTypeDefinitionNode">getElementTypeDefinitionNode</a> |
909 |
<li><code class=char>U+002D</code> <code class=charname>HYPHEN-MINUS</code> |
(in DOMString <a href="#getElementTypeDefinitionNode-name"><var>name</var></a>); |
910 |
(<code class=char>-</code>)</li> |
<a href="#Entity">Entity</a> <a href="#getGeneralEntityNode">getGeneralEntityNode</a> |
911 |
<li><code class=char>U+002E</code> <code class=charname>FULL STOP</code> |
(in DOMString <a href="#getGeneralEntityNode-name"><var>name</var></a>); |
912 |
(<code class=char>.</code>)</li> |
<a href="#Notation">Notation</a> <a href="#getNotationNode">getNotationNode</a> |
913 |
<li><code class=char>U+002F</code> <code class=charname>SOLIDUS</code> |
(in DOMString <a href="#getNotationNode-name"><var>name</var></a>); |
914 |
(<code class=char>/</code>)</li> |
|
915 |
<li><code class=char>U+0030</code> <code class=charname>DIGIT ZERO</code> |
void <a href="#setElementTypeDefinitionNode">setElementTypeDefinitionNode</a> |
916 |
(<code class=char>0</code>) .. <code class=char>U+0039</code> |
(in DOMString <a href="#setElementTypeDefinitionNode-node"><var>node</var></a>) |
917 |
<code class=charname>DIGIT NINE</code> (<code class=char>9</code>)</li> |
raises (DOMException); |
918 |
<li><code class=char>U+003A</code> <code class=charname>COLON</code> |
void <a href="#setGeneralEntityNode">setGeneralEntityNode</a> |
919 |
(<code class=char>:</code>)</li> |
(in DOMString <a href="#setGeneralEntityNode-node"><var>node</var></a>) |
920 |
<li><code class=char>U+003B</code> <code class=charname>SEMICOLON</code> |
raises (DOMException); |
921 |
(<code class=char>;</code>)</li> |
void <a href="#setNotationNode">setNotationNode</a> |
922 |
<li><code class=char>U+003D</code> <code class=charname>EQUAL SIGN</code> |
(in DOMString <a href="#setNotationNode-node"><var>node</var></a>) |
923 |
(<code class=char>=</code>)</li> |
raises (DOMException); |
924 |
<li><code class=char>U+003F</code> <code class=charname>QUESTION MARK</code> |
}</code></pre> |
925 |
(<code class=char>?</code>)</li> |
|
926 |
<li><code class=char>U+0040</code> <code class=charname>COMMERCIAL AT</code> |
<dl> |
927 |
(<code class=char>@</code>)</li> |
<dt><dfn id=elementTypes class=dom-attr><code>elementTypes</code></dfn> of |
928 |
<li><code class=char>U+0041</code> <code class=charname>LATIN CAPITAL LETTER |
type <code>NamedNodeMap</code>, read$B!>(Bonly</dt> |
929 |
A</code> (<code class=char>A</code>) .. <code class=char>U+005A</code> |
<dd><p>A <a href="#live">live</a> <code>NamedNodeMap</code> object that |
930 |
<code class=charname>LATIN CAPITAL LETTER Z</code> |
contains all the element type definitions belonging to the |
931 |
(<code class=char>Z</code>)</li> |
<a href="#DocumentType"><code>DocumentType</code></a> node.</p> |
932 |
<li><code class=char>U+005F</code> <code class=charname>LOW LINE</code> |
|
933 |
(<code class=char>_</code>)</li> |
<p>On getting, the attribute <em class=rfc2119>MUST</em> return the |
934 |
<li><code class=char>U+0061</code> <code class=charname>LATIN CAPITAL LETTER |
<code>NamedNodeMap</code> object that contains all the |
935 |
A</code> (<code class=char>A</code>) .. <code class=char>U+007A</code> |
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> |
936 |
<code class=charname>LATIN CAPITAL LETTER Z</code> |
nodes belonging to the <code>DocumentType</code> node. The |
937 |
(<code class=char>Z</code>)</li> |
<code>NamedNodeMap</code> object <em class=rfc2119>MUST</em> be read$B!>(Bonly |
938 |
</ul> |
if and only if the node is <a href="#read-only">read$B!>(Bonly</a>. The |
939 |
|
<code>NamedNodeMap</code> object <em class=rfc2119>MUST</em> be |
940 |
|
<a href="#live">live</a>.</p> |
941 |
|
|
942 |
|
<p>If the <code>DocumentType</code> node is created during the process |
943 |
|
to create a <abbr>DOM</abbr> from an <abbr>XML</abbr> document, the following |
944 |
|
requirements are applied: The <code>NamedNodeMap</code> object in the |
945 |
|
<a href="#elementTypes"><code>elementType</code></a> attribute |
946 |
|
<em class=rfc2119>MUST</em> be so transformed that the object contains |
947 |
|
the <code>ElementTypeDefinition</code> nodes for the element types |
948 |
|
whose name is presented as the <code>Name</code> of the element type or |
949 |
|
attribute definition list declarations processed |
950 |
|
<cite class="bibref normative">[<a href="#ref-XML10">XML10</a>, |
951 |
|
<a href="#ref-XML11">XML11</a>]</cite> by the <abbr>XML</abbr> |
952 |
|
processor. If there are more than one element type declarations for an |
953 |
|
element type, then the declarations other than the first one |
954 |
|
<em class=rfc2119>MUST</em> be ignored for the purpose of constructing the |
955 |
|
<code>NamedNodeMap</code> object.</p></dd> |
956 |
|
<dt><dfn id=generalEntities class=dom-attr><code>generalEntities</code></dfn> |
957 |
|
of type <code>NamedNodeMap</code>, read$B!>(Bonly</dt> |
958 |
|
<dd><p>A <a href="#live">live</a> <code>NamedNodeMap</code> object that |
959 |
|
contains all the general entities belonging to the |
960 |
|
<a href="#DocumentType"><code>DocumentType</code></a> node.</p> |
961 |
|
|
962 |
|
<p>On getting, the attribute <em class=rfc2119>MUST</em> return the |
963 |
|
same value as the <code id=entities>entities</code> attribute (defined in the |
964 |
|
<a href="#DocumentType"><code>DocumentType</code></a> interface) of the same |
965 |
|
node.</p> |
966 |
|
|
967 |
|
<div class="note memo"> |
968 |
|
<p>This attribute is part of the interface for historical reason.</p> |
969 |
|
</div></dd> |
970 |
|
<!-- |
971 |
|
All entities declared in the document type definition |
972 |
|
contained in or referenced from the document entity |
973 |
|
might not be exposed through this collection, depending |
974 |
|
on the information provided by the XML processor for |
975 |
|
the DOM implementation. In particular, it might not |
976 |
|
contain any entity if entity references are expanded |
977 |
|
at the parse time. An implementation [['''MUST NOT''']] |
978 |
|
expose an [CODE(DOMi)@en[[[Entity]]]] node whose [CODE(DOMa)@en[[[nodeName]]]] |
979 |
|
is equal to the name of one of five predefined general entities in |
980 |
|
XML through the collection as the result of parsing of an XML |
981 |
|
document that has no error. Duplicate entity declarations are also discarded. |
982 |
|
|
983 |
|
The attribute [['''MUST''']] return the [CODE(DOMi)@en[[[NamedNodeMap]]]] |
984 |
|
object that contains all the [CODE(DOMi)@en[[[Entity]]]] nodes |
985 |
|
representing general entities belong to the node. The returned |
986 |
|
[CODE(DOMi)@en[[[NamedNodeMap]]]] object [['''MUST''']] be read-only if and only if |
987 |
|
the node is read-only. Note that the [CODE(DOMi)@en[[[NamedNodeMap]]]] object is live |
988 |
|
and therefore any change of read-only flag on the node is immediately |
989 |
|
reflected by that of the object. |
990 |
|
--> |
991 |
|
<dt><dfn id=notations class=dom-attr><code>notations</code></dfn> of type |
992 |
|
<code>notations</code>, read$B!>(Bonly</code> |
993 |
|
<dd><p>A <a href="#live">live</a> <code>NamedNodeMap</code> object that |
994 |
|
contains all the notations belonging to the |
995 |
|
<a href="#DocumentType"><code>DocumentType</code></a> node.</p> |
996 |
|
|
997 |
|
<p>On getting, the attribute <em class=rfc2119>MUST</em> return the |
998 |
|
same value as the <code>notations</code> attribute (defined in the |
999 |
|
<a href="#DocumentType"><code>DocumentType</code></a> interface) of the same |
1000 |
|
node.</p> |
1001 |
|
|
1002 |
|
<div class="note memo"> |
1003 |
|
<p>This attribute is part of the interface for historical reason.</p> |
1004 |
|
<p>Implementations are not required to implement the |
1005 |
|
<code>notations</code> attribute twice (for |
1006 |
|
<a href="#DocumentType"><code>DocumentType</code></a> and |
1007 |
|
<a href="#DocumentTypeDefinition"><code>DocumentTypeDefinition</code></a> |
1008 |
|
interfaces); they share exactly same definition.</p> |
1009 |
|
</div></dd> |
1010 |
|
<!-- |
1011 |
|
If the [CODE(DOMi)@en[[[DocumentTypeDefinition]]]] node is |
1012 |
|
created from an XML document, duplicate notation declarations, if any, in DTD |
1013 |
|
[['''MUST NOT''']] result in a node in the [CODE(DOMi)@en[[[NamedNodeMap]]]] |
1014 |
|
object and only the first declaration [['''MUST''']] be |
1015 |
|
made available as a [CODE(DOMi)@en[[[Notation]]]] node. |
1016 |
|
|
1017 |
|
;; This definition is based on one for the |
1018 |
|
[CODE(DOMa)@en[[[notations]]]] attribute of the |
1019 |
|
[CODE(DOMi)@en[[[DocumentType]]]] interface in DOM XML module. |
1020 |
|
Since duplication is violation to the Validity Constraint, |
1021 |
|
XML parsers might vary on how notations are notified to |
1022 |
|
the application. In particular, [CODE(InfoProp)@en[[[notations]]]] |
1023 |
|
property of the document information item in XML Information Set |
1024 |
|
is so defined that in case ''any'' notation is declared for |
1025 |
|
multiple times then the property has no value. |
1026 |
|
|
1027 |
|
The attribute [['''MUST''']] return the [CODE(DOMi)@en[[[NamedNodeMap]]]] |
1028 |
|
object that contains all the [CODE(DOMi)@en[[[Notation]]]] nodes |
1029 |
|
representing notations belong to the node. The returned |
1030 |
|
[CODE(DOMi)@en[[[NamedNodeMap]]]] object [['''MUST''']] be read-only if and only if |
1031 |
|
the node is read-only. Note that the [CODE(DOMi)@en[[[NamedNodeMap]]]] object is live |
1032 |
|
and therefore any change of read-only flag on the node is immediately |
1033 |
|
reflected by that of the object. |
1034 |
|
--> |
1035 |
|
<dt><dfn id=getElementTypeDefinitionNode class=dom-method><code>getElementTypeDefinitionNode</code></dfn>, |
1036 |
|
method</dt> |
1037 |
|
<dd><p>Returns the |
1038 |
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> node |
1039 |
|
with the specified name.</p> |
1040 |
|
|
1041 |
|
<p>The |
1042 |
|
<dfn id=getElementTypeDefinitionNode-name class=dom-param><var>name</var></dfn> |
1043 |
|
parameter is the name of the element type.</p> |
1044 |
|
|
1045 |
|
<p>When invoked, the method <em class=rfc2119>MUST</em> return the |
1046 |
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> node, |
1047 |
|
whose <a href="#nodeName"><code>nodeName</code></a> is equal to |
1048 |
|
<a href="#getElementTypeDefinitionNode-name"><var>name</var></a>, in the |
1049 |
|
<code>NamedNodeMap</code> object in the |
1050 |
|
<a href="#elementTypes"><code>elementTypes</code></a> attribute of the |
1051 |
|
node. If there is no such node, it <em class=rfc2119>MUST</em> return |
1052 |
|
<code>null</code>.</p></dd> |
1053 |
|
<dt><dfn id=getGeneralEntityNode class=dom-method><code>getGeneralEntityNode</code></dfn>, |
1054 |
|
method</dt> |
1055 |
|
<dd><p>Returns the <a href="#Entity"><code>Entity</code></a> node |
1056 |
|
with the specified name.</p> |
1057 |
|
|
1058 |
|
<p>The |
1059 |
|
<dfn id=getGeneralEntityNode-name class=dom-param><var>name</var></dfn> |
1060 |
|
parameter is the name of the general entity.</p> |
1061 |
|
|
1062 |
|
<p>When invoked, the method <em class=rfc2119>MUST</em> return the |
1063 |
|
<a href="#Entity"><code>Entity</code></a> node, |
1064 |
|
whose <a href="#nodeName"><code>nodeName</code></a> is equal to |
1065 |
|
<a href="#getGeneralEntityNode-name"><var>name</var></a>, in the |
1066 |
|
<code>NamedNodeMap</code> object in the |
1067 |
|
<a href="#entities"><code>entities</code></a> attribute of the |
1068 |
|
node. If there is no such node, it <em class=rfc2119>MUST</em> return |
1069 |
|
<code>null</code>.</p></dd> |
1070 |
|
<dt><dfn id=getNotationNode class=dom-method><code>getNotationNode</code></dfn>, |
1071 |
|
method</dt> |
1072 |
|
<dd><p>Returns the <a href="#Notation"><code>Notation</code></a> node |
1073 |
|
with the specified name.</p> |
1074 |
|
|
1075 |
|
<p>The |
1076 |
|
<dfn id=getNotationNode-name class=dom-param><var>name</var></dfn> |
1077 |
|
parameter is the name of the notation.</p> |
1078 |
|
|
1079 |
|
<p>When invoked, the method <em class=rfc2119>MUST</em> return the |
1080 |
|
<a href="#Notation"><code>Notation</code></a> node, |
1081 |
|
whose <a href="#nodeName"><code>nodeName</code></a> is equal to |
1082 |
|
<a href="#getNotationNode-name"><var>name</var></a>, in the |
1083 |
|
<code>NamedNodeMap</code> object in the |
1084 |
|
<a href="#notations"><code>notations</code></a> attribute of the |
1085 |
|
node. If there is no such node, it <em class=rfc2119>MUST</em> return |
1086 |
|
<code>null</code>.</p></dd> |
1087 |
|
<dt><dfn id=setElementTypeDefinitionNode class=dom-method><code>setElementTypeDefinitionNode</code></dfn>, |
1088 |
|
method</dt> |
1089 |
|
<dd><p>Associate an |
1090 |
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> |
1091 |
|
node with the <a href="#DocumentType"><code>DocumentType</code></a> node.</p> |
1092 |
|
|
1093 |
|
<p>The |
1094 |
|
<dfn id=setElementTypeDefinitionNode-node class=dom-param><var>node</var></dfn> |
1095 |
|
parameter is the node to associate.</p> |
1096 |
|
|
1097 |
|
<p>When invoked, the method <em class=rfc2119>MUST</em> follow the rules |
1098 |
|
to <a href="#algorithm-attach-node">attach a node</a>, where |
1099 |
|
<a href="#attach-node-n"><var>n</var></a> is the |
1100 |
|
<a href="#DocumentType"><code>DocumentType</code></a> node, |
1101 |
|
<a href="#attach-node-l"><var>l</var></a> is the |
1102 |
|
<a href="#elementTypes"><code>elementTypes</code></a> attribute value of the |
1103 |
|
<a href="#DocumentType"><code>DocumentType</code></a> node, |
1104 |
|
<a href="#attach-node-node"><var>node</var></a> is the |
1105 |
|
<a href="#setElementTypeDefinitionNode-node"><var>node</var></a>, and |
1106 |
|
<a href="#attach-node-owner-attr"><var>owner-attr</var></a> is the |
1107 |
|
<a href="#ownerDocumentTypeDefinition"><code>ownerDocumentTypeDefinition</code></a> |
1108 |
|
attribute.</p></dd> |
1109 |
|
<dt><dfn id=setGeneralEntityNode class=dom-method><code>setGeneralEntityNode</code></dfn>, |
1110 |
|
method</dt> |
1111 |
|
<dd><p>Associate an <a href="#Entity"><code>Entity</code></a> |
1112 |
|
node with the <a href="#DocumentType"><code>DocumentType</code></a> node.</p> |
1113 |
|
|
1114 |
|
<p>The |
1115 |
|
<dfn id=setGeneralEntityNode-node class=dom-param><var>node</var></dfn> |
1116 |
|
parameter is the node to associate.</p> |
1117 |
|
|
1118 |
|
<p>When invoked, the method <em class=rfc2119>MUST</em> follow the rules |
1119 |
|
to <a href="#algorithm-attach-node">attach a node</a>, where |
1120 |
|
<a href="#attach-node-n"><var>n</var></a> is the |
1121 |
|
<a href="#DocumentType"><code>DocumentType</code></a> node, |
1122 |
|
<a href="#attach-node-l"><var>l</var></a> is the |
1123 |
|
<a href="#entities"><code>entities</code></a> attribute value of the |
1124 |
|
<a href="#DocumentType"><code>DocumentType</code></a> node, |
1125 |
|
<a href="#attach-node-node"><var>node</var></a> is the |
1126 |
|
<a href="#setGeneralEntityNode-node"><var>node</var></a>, and |
1127 |
|
<a href="#attach-node-owner-attr"><var>owner-attr</var></a> is the |
1128 |
|
<a href="#ownerDocumentTypeDefinition"><code>ownerDocumentTypeDefinition</code></a> |
1129 |
|
attribute.</p></dd> |
1130 |
|
<dt><dfn id=setNotationNode class=dom-method><code>setNotationNode</code></dfn>, |
1131 |
|
method</dt> |
1132 |
|
<dd><p>Associate an <a href="#Notation"><code>Notation</code></a> |
1133 |
|
node with the <a href="#DocumentType"><code>DocumentType</code></a> node.</p> |
1134 |
|
|
1135 |
|
<p>The <dfn id=setNotationNode-node class=dom-param><var>node</var></dfn> |
1136 |
|
parameter is the node to associate.</p> |
1137 |
|
|
1138 |
|
<p>When invoked, the method <em class=rfc2119>MUST</em> follow the rules |
1139 |
|
to <a href="#algorithm-attach-node">attach a node</a>, where |
1140 |
|
<a href="#attach-node-n"><var>n</var></a> is the |
1141 |
|
<a href="#DocumentType"><code>DocumentType</code></a> node, |
1142 |
|
<a href="#attach-node-l"><var>l</var></a> is the |
1143 |
|
<a href="#notations"><code>notations</code></a> attribute value of the |
1144 |
|
<a href="#DocumentType"><code>DocumentType</code></a> node, |
1145 |
|
<a href="#attach-node-node"><var>node</var></a> is the |
1146 |
|
<a href="#setNotationNode-node"><var>node</var></a>, and |
1147 |
|
<a href="#attach-node-owner-attr"><var>owner-attr</var></a> is the |
1148 |
|
<a href="#ownerDocumentTypeDefinition"><code>ownerDocumentTypeDefinition</code></a> |
1149 |
|
attribute.</p></dd> |
1150 |
|
</dl> |
1151 |
|
|
1152 |
|
<p>When a <dfn id=algorithm-attach-node title="attach a node">node is |
1153 |
|
attached</dfn>, the rules below, with parameters |
1154 |
|
<dfn id=attach-node-n><var>n</var></dfn>, |
1155 |
|
<dfn id=attach-node-l><var>l</var></dfn>, |
1156 |
|
<dfn id=attach-node-node><var>node</var></dfn>, and |
1157 |
|
<dfn id=attach-node-owner-attr><var>owner-attr</var></dfn>, |
1158 |
|
<em class=rfc2119>MUST</em> be followed:</p> |
1159 |
|
<ol> |
1160 |
|
<li><p>Let |
1161 |
|
<dfn id=attach-node-r><var>r</var></dfn> be the node in |
1162 |
|
<var>l</var> whose <code>nodeName</code> attribute value is equal to the |
1163 |
|
<code>nodeName</code> attribute value of <var>node</var>, if any.</p></li> |
1164 |
|
<li><p>If <var>r</var> is different from <code>null</code> and <var>r</var> |
1165 |
|
is same node as <var>node</var>, then abort these steps.</p></li> |
1166 |
|
<li><p>If <var>n</var> is <a href="#read-only">read$B!>(Bonly</a>, then raise a |
1167 |
|
<code>NO_MODIFICATION_ALLOWED_ERR</code> and abort these steps.</p></li> |
1168 |
|
<li><p>If the <code>ownerDocument</code> attribute value of <var>node</var> |
1169 |
|
is different from that of <var>n</var>, then raise a |
1170 |
|
<code>WRONG_DOCUMENT_ERR</code> and abort these steps.</p></li> |
1171 |
|
<li><p>If the value of the attribute <var>owner-attr</var> of <var>node</var> |
1172 |
|
is different from <code>null</code>, then raise a |
1173 |
|
<code>HIERARCHY_REQUEST_ERR</code> and abort these steps.</p></li> |
1174 |
|
<li><p>If <var>r</var> is a node, then remove it from <var>r</var>.</p> |
1175 |
|
|
1176 |
|
<div class="note memo"> |
1177 |
|
<p>By the removal of <var>r</var>, the attribute <var>owner-attr</var> of |
1178 |
|
<var>r</var> is set to <code>null</code>.</p> |
1179 |
|
</div></li> |
1180 |
|
<li><p>Add <var>node</var> to <var>l</var>.</p> |
1181 |
|
|
1182 |
|
<div class="note memo"> |
1183 |
|
<p>By the addition of <var>node</var>, the attribute <var>owner-attr</var> of |
1184 |
|
<var>node</var> is set to <var>n</var>.</p> |
1185 |
|
</div></li> |
1186 |
|
</ol> |
1187 |
|
|
1188 |
|
<div class=ed> |
1189 |
|
<p>A future version of this interface might define the |
1190 |
|
<code>parameterEntities</code> and getter/setter for parameter entities. |
1191 |
|
</div> |
1192 |
|
|
1193 |
|
</div> |
1194 |
|
|
1195 |
|
<div class=section id=section-elementtypedefinition> |
1196 |
|
<h3>The <code>ElementTypeDefinition</code> Interface</h3> |
1197 |
|
|
1198 |
|
<p>The nodes of type |
1199 |
|
<a href="#ELEMENT_TYPE_DEFINITION_NODE"><code>ELEMENT_TYPE_DEFINITION_NODE</code></a> |
1200 |
|
represents an element type definition. Such a node |
1201 |
|
<em class=rfc2119>MUST</em> implement the |
1202 |
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> |
1203 |
|
interface, which extends the <a href="#Node"><code>Node</code></a> |
1204 |
|
interface.</p> |
1205 |
|
|
1206 |
|
<p>An element type definition represents a definition of the element type. |
1207 |
|
It is corresponding to the element type declaration in <abbr>DTD</abbr>. |
1208 |
|
However, an |
1209 |
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> node |
1210 |
|
does not represent the element type definition in <abbr>DTD</abbr> itself. |
1211 |
|
Even if there are more than one element type declarations for an element type |
1212 |
|
in <abbr>DTD</abbr>, the result <abbr>DOM</abbr> will contain only an |
1213 |
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> |
1214 |
|
node for that element type. In addition, if there are attribute definition |
1215 |
|
declarations for an element type, even when there is no element type |
1216 |
|
declaration for that element type, the <abbr>DOM</abbr> will contain an |
1217 |
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> |
1218 |
|
node for that element type.</p> |
1219 |
|
|
1220 |
|
<p>An <a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> |
1221 |
|
node cannot be a child of any node. An |
1222 |
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> node |
1223 |
|
cannot have any child node.</p> |
1224 |
|
|
1225 |
|
<p>The <a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> |
1226 |
|
interface <em class=rfc2119>MUST</em> be implemented as the following |
1227 |
|
<a href="#idl-fragment"><abbr>IDL</abbr> fragment</a>:</p> |
1228 |
|
<pre class=idl><code>interface <dfn id=ElementTypeDefinition><code>ElementTypeDefinition</code></dfn> : <a href="#Node">Node</a> { |
1229 |
|
readonly attribute <a href="#DocumentType">DocumentType</a> <a href="#ownerDocumentTypeDefinition">ownerDocumentTypeDefinition</a>; |
1230 |
|
|
1231 |
|
readonly attribute NamedNodeMap <a href="#attributeDefinitions">attributeDefinitions</a>; |
1232 |
|
<a href="#AttributeDefinition">AttributeDefinition</a> <a href="#getAttributeDefinitionNode">getAttributeDefinitionNode</a> |
1233 |
|
(in DOMString <a href="#getAttributeDefinitionNode-name"><var>name</var></a>); |
1234 |
|
void <a href="#setAttributeDefinitionNode">setAttributeDefinitionNode</a> |
1235 |
|
(in <a href="#AttributeDefinition">AttributeDefinition</a> <a href="#setAttributeDefinitionNode-node"><var>node</var></a>) |
1236 |
|
raises (DOMException); |
1237 |
|
}</code></pre> |
1238 |
|
|
1239 |
|
<dl> |
1240 |
|
<dt><dfn id=ownerDocumentTypeDefinition class=dom-attr><code>ownerDocumentTypeDefinition</code></dfn> |
1241 |
|
of type <a href="#DocumentType"><code>DocumentType</code></a>, read$B!>(Bonly</dt> |
1242 |
|
<dd><p>The |
1243 |
|
<a href="#ownerDocumentTypeDefinition"><code>ownerDocumentTypeDefinition</code></a> |
1244 |
|
attribute of |
1245 |
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a>, |
1246 |
|
<a href="#Entity"><code>Entity</code></a>, and |
1247 |
|
<a href="#Notation"><code>Notation</code></a> interfaces contain the |
1248 |
|
<a href="#DocumentType"><code>DocumentType</code></a> node to which the node |
1249 |
|
is attached.</p> |
1250 |
|
|
1251 |
|
<p>On getting, the attribute <em class=rfc2119>MUST</em> return a |
1252 |
|
<a href="#DocumentType"><code>DocumentType</code></a> node. It |
1253 |
|
<em class=rfc2119>MUST</em> be such a node that whose |
1254 |
|
<a href="#elementTypes"><code>elementTypes</code></a> (for an |
1255 |
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> |
1256 |
|
node), <a href="#entities"><code>entities</code></a> (for an |
1257 |
|
<a href="#Entity"><code>Entity</code></a> node), or |
1258 |
|
<a href="#notations"><code>notations</code></a> (for a |
1259 |
|
<a href="#Notation"><code>Notation</code></a> node) attribute contains the |
1260 |
|
<code>NamedNodeMap</code> object that contains the node. If there is no such |
1261 |
|
a <a href="#DocumentType"><code>DocumentType</code></a> node, |
1262 |
|
then <code>null</code> <em class=rfc2119>MUST</em> be returned.</p></dd> |
1263 |
|
<dt><dfn id=attributeDefinitions class=dom-attr><code>attributeDefinitions</code></dfn> |
1264 |
|
of type NamedNodeMap, read$B!>(Bonly</dt> |
1265 |
|
<dd><p>A <a href="#live">live</a> <code>NamedNodeMap</code> object that |
1266 |
|
contains all the attribute definitions belonging to the |
1267 |
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> |
1268 |
|
node.</p> |
1269 |
|
|
1270 |
|
<p>On getting, the attribute <em class=rfc2119>MUST</em> return the |
1271 |
|
<code>NamedNodeMap</code> object that contains all the |
1272 |
|
<a href="#AttributeDefinition"><code>AttributeDefinition</code></a> node |
1273 |
|
belonging to the |
1274 |
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> node. |
1275 |
|
The <code>NamedNodeMap</code> object <em class=rfc2119>MUST</em> be |
1276 |
|
read$B!>(Bonly if and only if the node is <a href="#read-only">read$B!>(Bonly</a>. |
1277 |
|
The <code>NamedNodeMap</code> object <em class=rfc2119>MUST</em> be |
1278 |
|
<a href="#live">live</a>.</p> |
1279 |
|
|
1280 |
|
<p>If the |
1281 |
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> node |
1282 |
|
is created during the process to create a <abbr>DOM</abbr> from an |
1283 |
|
<abbr>XML</abbr> document, the following requirements are applied: The |
1284 |
|
<code>NamedNodeMap</code> object in the |
1285 |
|
<a href="#attributeDefinitions"><code>attributeDefinitions</code></a> |
1286 |
|
attribute <em class=rfc2119>MUST</em> be so transformed that the object |
1287 |
|
contains the |
1288 |
|
<a href="#AttributeDefinition"><code>AttributeDefinition</code></a> node |
1289 |
|
corresponding to the attribute definitions in the attribute definition |
1290 |
|
list declarations processed |
1291 |
|
<cite class="bibref normative">[<a href="#ref-XML10">XML10</a>, |
1292 |
|
<a href="#ref-XML11">XML11</a>]</cite> by the <abbr>XML</abbr> processor and |
1293 |
|
associated to the element type represented by the node. If there are more |
1294 |
|
than one attribute definitions for an attribute, then the definitions other |
1295 |
|
than the first one <em class=rfc2119>MUST</em> be ignored for the purpose |
1296 |
|
of constructing the <code>NamedNodeMap</code> object.</p></dd> |
1297 |
|
<dt><dfn id=getAttributeDefinitionNode class=dom-method><code>getAttributeDefinitionNode</code></dfn>, |
1298 |
|
method</dt> |
1299 |
|
<dd><p>Return the |
1300 |
|
<a href="#AttributeDefinition"><code>AttributeDefinition</code></a> node |
1301 |
|
with the specified name.</p> |
1302 |
|
|
1303 |
|
<p>The |
1304 |
|
<dfn id=getAttributeDefinitionNode-name class=dom-param><var>name</var></dfn> |
1305 |
|
parameter is the name of the attribute.</p> |
1306 |
|
|
1307 |
|
<p>When invoked, the method <em class=rfc2119>MUST</em> return the |
1308 |
|
<a href="#AttributeDefinition"><code>AttributeDefinition</code></a> node, |
1309 |
|
whose <a href="#nodeName"><code>nodeName</code></a> attribute value is |
1310 |
|
equal to <a href="#getAttributeDefinitionNode-name"><var>name</var></a>, |
1311 |
|
in the <code>NamedNodeMap</code> in the |
1312 |
|
<a href="#attributeDefinitions"><code>attributeDefinitions</code></a> |
1313 |
|
attribute of the node. If there is no such node, it |
1314 |
|
<em class=rfc2119>MUST</em> return <code>null</code>.</p></dd> |
1315 |
|
<dt><dfn id=setAttributeDefinitionNode class=dom-method><code>setAttributeDefinitionNode</code></dfn>, |
1316 |
|
method</dt> |
1317 |
|
<dd><p>Associate an |
1318 |
|
<a href="#AttributeDefinition"><code>AttributeDefinition</code></a> node with |
1319 |
|
the |
1320 |
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> |
1321 |
|
node.</p> |
1322 |
|
|
1323 |
|
<p>The |
1324 |
|
<dfn id=setAttributeDefinitionNode-node class=dom-param><var>node</var></dfn> |
1325 |
|
parameter is the node to associate.</p> |
1326 |
|
|
1327 |
|
<p>When invoked, the method <em class=rfc2119>MUST</em> follow the rules |
1328 |
|
to <a href="#algorithm-attach-node">attach a node</a>, where |
1329 |
|
<a href="#attach-node-n"><var>n</var></a> is the |
1330 |
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> |
1331 |
|
node, <a href="#attach-node-l"><var>l</var></a> is the |
1332 |
|
<a href="#attributeDefinitions"><code>attributeDefinitions</code></a> |
1333 |
|
attribute value of the |
1334 |
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> node, |
1335 |
|
<a href="#attach-node-node"><var>node</var></a> is the |
1336 |
|
<a href="#setAttributeDefinitionNode-node"><var>node</var></a>, and |
1337 |
|
<a href="#attach-node-owner-attr"><var>owner-attr</var></a> is the |
1338 |
|
<a href="#ownerElementTypeDefinition"><code>ownerElementTypeDefinition</code></a> |
1339 |
|
attribute.</p></dd> |
1340 |
|
</dl> |
1341 |
|
|
1342 |
|
<div class=ed> |
1343 |
|
<p>A future version of the specification might define a set of attributes |
1344 |
|
and methods for representing and accessing to the content model of the |
1345 |
|
element type.</p> |
1346 |
|
</div> |
1347 |
|
</div> |
1348 |
|
|
1349 |
|
<div class=section id=section-attributedefinition> |
1350 |
|
<h3>The <code>AttributeDefinition</code> Interface</h3> |
1351 |
|
|
1352 |
|
<p>The nodes of type |
1353 |
|
<a href="#ATTRIBUTE_DEFINITION_NODE"><code>ATTRIBUTE_DEFINITION_NODE</code></a> |
1354 |
|
represents an attribute definition. Such a node |
1355 |
|
<em class=rfc2119>MUST</em> implement the |
1356 |
|
<a href="#AttributeDefinition"><code>AttributeDefinition</code></a> interface, |
1357 |
|
which extends the <a href="#Node"><code>Node</code></a> interface.</p> |
1358 |
|
|
1359 |
|
<p>An attribute definition represents a definition of the attribute |
1360 |
|
associated to an element type. It is corresponding to the attribute definition |
1361 |
|
in the attribute list declaration in <abbr>DTD</abbr>. However, an |
1362 |
|
<a href="#AttributeDefinition"><code>AttributeDefinition</code></a> node does |
1363 |
|
not represent the attribute definition in <abbr>DTD</abbr> itself. Even if |
1364 |
|
there are more than one attribute definitions for an attribute of an element |
1365 |
|
type in <abbr>DTD</abbr>, the result <abbr>DOM</abbr> will contain only an |
1366 |
|
<a href="#AttributeDefinition"><code>AttributeDefinition</code></a> node for |
1367 |
|
that attribute.</p> |
1368 |
|
|
1369 |
|
<p>An <a href="#AttributeDefinition"><code>AttributeDefinition</code></a> |
1370 |
|
node cannot be a child of any node. An |
1371 |
|
<a href="#AttributeDefinition"><code>AttributeDefinition</code></a> node |
1372 |
|
can have zero or more child nodes of same kinds as those allowed for |
1373 |
|
<code>Attr</code> nodes |
1374 |
|
<cite class="bibref normative">[<a href="#ref-DOM3CORE">DOM3CORE</a>]</cite>.</p> |
1375 |
|
|
1376 |
|
<p>The <a href="#AttributeDefinition"><code>AttributeDefinition</code></a> |
1377 |
|
interface <em class=rfc2119>MUST</em> be implemented as the following |
1378 |
|
<a href="#idl-fragment"><abbr>IDL</abbr> fragment</a>:</p> |
1379 |
|
<pre class=idl><code>interface <dfn id=AttributeDefinition><code>AttributeDefinition</code></dfn> : <a href="#Node">Node</a> { |
1380 |
|
<span class=comment>// <a href="#DeclaredValueType">DeclaredValueType</a></span> |
1381 |
|
const unsigned short <a href="#NO_TYPE_ATTR">NO_TYPE_ATTR</a> = 0; |
1382 |
|
const unsigned short <a href="#CDATA_ATTR">CDATA_ATTR</a> = 1; |
1383 |
|
const unsigned short <a href="#ID_ATTR">ID_ATTR</a> = 2; |
1384 |
|
const unsigned short <a href="#IDREF_ATTR">IDREF_ATTR</a> = 3; |
1385 |
|
const unsigned short <a href="#IDREFS_ATTR">IDREFS_ATTR</a> = 4; |
1386 |
|
const unsigned short <a href="#ENTITY_ATTR">ENTITY_ATTR</a> = 5; |
1387 |
|
const unsigned short <a href="#ENTITIES_ATTR">ENTITIES_ATTR</a> = 6; |
1388 |
|
const unsigned short <a href="#NMTOKEN_ATTR">NMTOKEN_ATTR</a> = 7; |
1389 |
|
const unsigned short <a href="#NMTOKENS_ATTR">NMTOKENS_ATTR</a> = 8; |
1390 |
|
const unsigned short <a href="#NOTATION_ATTR">NOTATION_ATTR</a> = 9; |
1391 |
|
const unsigned short <a href="#ENUMERATION_ATTR">ENUMERATION_ATTR</a> = 10; |
1392 |
|
const unsigned short <a href="#UNKNOWN_ATTR">UNKNOWN_ATTR</a> = 11; |
1393 |
|
|
1394 |
|
<span class=comment>// <a href="#DefaultValueType">DefaultValueType</a></span> |
1395 |
|
const unsigned short <a href="#UNKNOWN_DEFAULT">UNKNOWN_DEFAULT</a> = 0; |
1396 |
|
const unsigned short <a href="#FIXED_DEFAULT">FIXED_DEFAULT</a> = 1; |
1397 |
|
const unsigned short <a href="#REQUIRED_DEFAULT">REQUIRED_DEFAULT</a> = 2; |
1398 |
|
const unsigned short <a href="#IMPLIED_DEFAULT">IMPLIED_DEFAULT</a> = 3; |
1399 |
|
const unsigned short <a href="#EXPLICIT_DEFAULT">EXPLICIT_DEFAULT</a> = 4; |
1400 |
|
|
1401 |
|
readonly attribute <a href="#ElementTypeDefinition">ElementTypeDefinition</a> <a href="#ownerElementTypeDefinition">ownerElementTypeDefinition</a>; |
1402 |
|
|
1403 |
|
readonly attribute unsigned short <a href="#declaredType">declaredType</a>; |
1404 |
|
readonly attribute DOMStringList <a href="#allowedTokens">allowedTokens</a>; |
1405 |
|
readonly attribute unsigned short <a href="#defaultType">defaultType</a>; |
1406 |
|
}</code></pre> |
1407 |
|
|
1408 |
|
<dl> |
1409 |
|
<dt><dfn id=ownerElementTypeDefinition class=dom-attr><code>ownerElementTypeDefinition</code></dfn> |
1410 |
|
of type |
1411 |
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a>, |
1412 |
|
read$B!>(Bonly</dt> |
1413 |
|
<dd><p>The |
1414 |
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> to |
1415 |
|
which the <a href="#AttributeDefinition"><code>AttributeDefinition</code></a> |
1416 |
|
node belongs.</p> |
1417 |
|
|
1418 |
|
<p>On getting, the attribute <em class=rfc2119>MUST</em> return an |
1419 |
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> node. |
1420 |
|
It <em class=rfc2119>MUST</em> be such a node that whose |
1421 |
|
<a href="#attributeDefinitions"><code>attributeDefinitions</code></a> |
1422 |
|
attribute contains the <code>NamedNodeMap</code> object that contains |
1423 |
|
the <a href="#AttributeDefinition"><code>AttributeDefinition</code></a> |
1424 |
|
node. If there is no such an |
1425 |
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> node, |
1426 |
|
then <code>null</code> <em class=rfc2119>MUST</em> be returned.</p> |
1427 |
|
<dt><dfn id=declaredType class=dom-attr><code>declaredType</code></dfn> of type |
1428 |
|
<code>unsigned short</code></dt> |
1429 |
|
<dd><p>The declared type |
1430 |
|
<cite class="bibref normative">[<a href="#ref-XML10">XML10</a>, |
1431 |
|
<a href="#ref-XML11">XML11</a>]</cite> of the attribute. It is expected that |
1432 |
|
this attribute contains a value from the definition group |
1433 |
|
<a href="#DeclaredValueType"><code>DeclaredValueType</code></a>.</p> |
1434 |
|
|
1435 |
|
<p>On getting, the attribute <em class=rfc2119>MUST</em> return the |
1436 |
|
value associated to this attribute.</p> |
1437 |
|
|
1438 |
|
<p>On setting, the attribute <em class=rfc2119>MUST</em> raise a |
1439 |
|
<code>NO_MODIFICATION_ALLOWED_ERR</code> if the |
1440 |
|
<a href="#AttributeDefinition"><code>AttributeDefinition</code></a> node |
1441 |
|
is <a href="#read-only">read$B!>(Bonly</a>. Otherwise, it |
1442 |
|
<em class=rfc2119>MUST</em> set the specified value as the value |
1443 |
|
associated to this attribute.</p> |
1444 |
|
|
1445 |
|
<p>If the <code>AttributeDefinition</code> node is created during the process |
1446 |
|
to create a <abbr>DOM</abbr> from an <abbr>XML</abbr> document, an |
1447 |
|
appropriate value from the |
1448 |
|
<a href="#DeclaredValueType"><code>DeclaredValueType</code></a> constant |
1449 |
|
group <em class=rfc2119>MUST</em> be set to the attribute.</p> |
1450 |
|
|
1451 |
|
<!-- DeclaredValueType --> |
1452 |
|
<p>The definition group |
1453 |
|
<dfn id=DeclaredValueType><code>DeclaredValueType</code></dfn> contains |
1454 |
|
integers indicating the declared type of attributes. The definition |
1455 |
|
group contains the following constants:</p> |
1456 |
|
|
1457 |
|
<table> |
1458 |
|
<thead> |
1459 |
|
<tr><th scope=col>Name<th scope=col>Value<th scope=col>Description</tr> |
1460 |
|
</thead> |
1461 |
|
<tbody> |
1462 |
|
<tr> |
1463 |
|
<th scope=row><dfn id=NO_TYPE_ATTR class=dom-const><code>NO_TYPE_ATTR</code> |
1464 |
|
<td><code>0</code><td><a href="http://www.w3.org/TR/2004/REC-xml-infoset-20040204/#intro.null">No |
1465 |
|
value</a> |
1466 |
|
<cite class="bibref normative">[<a href="#ref-INFOSET">INFOSET</a>]</cite>.</tr> |
1467 |
|
<tr> |
1468 |
|
<th scope=row><dfn id=CDATA_ATTR class=dom-const><code>CDATA_ATTR</code> |
1469 |
|
<td><code>1</code><td><code>CDATA</code> |
1470 |
|
<cite class="bibref normative">[<a href="#ref-XML10">XML10</a>, |
1471 |
|
<a href="#ref-XML11">XML11</a>]</cite>.</tr> |
1472 |
|
<tr> |
1473 |
|
<th scope=row><dfn id=ID_ATTR class=dom-const><code>ID_ATTR</code> |
1474 |
|
<td><code>2</code><td><code>ID</code> |
1475 |
|
<cite class="bibref normative">[<a href="#ref-XML10">XML10</a>, |
1476 |
|
<a href="#ref-XML11">XML11</a>]</cite>.</tr> |
1477 |
|
<tr> |
1478 |
|
<th scope=row><dfn id=IDREF_ATTR class=dom-const><code>IDREF_ATTR</code> |
1479 |
|
<td><code>3</code><td><code>IDREF</code> |
1480 |
|
<cite class="bibref normative">[<a href="#ref-XML10">XML10</a>, |
1481 |
|
<a href="#ref-XML11">XML11</a>]</cite>.</tr> |
1482 |
|
<tr> |
1483 |
|
<th scope=row><dfn id=IDREFS_ATTR class=dom-const><code>IDREFS_ATTR</code> |
1484 |
|
<td><code>4</code><td><code>IDREFS</code> |
1485 |
|
<cite class="bibref normative">[<a href="#ref-XML10">XML10</a>, |
1486 |
|
<a href="#ref-XML11">XML11</a>]</cite>.</tr> |
1487 |
|
<tr> |
1488 |
|
<th scope=row><dfn id=ENTITY_ATTR class=dom-const><code>ENTITY_ATTR</code> |
1489 |
|
<td><code>5</code><td><code>ENTITY</code> |
1490 |
|
<cite class="bibref normative">[<a href="#ref-XML10">XML10</a>, |
1491 |
|
<a href="#ref-XML11">XML11</a>]</cite>.</tr> |
1492 |
|
<tr> |
1493 |
|
<th scope=row><dfn id=ENTITIES_ATTR class=dom-const><code>ENTITIES_ATTR</code> |
1494 |
|
<td><code>6</code><td><code>ENTITIES</code> |
1495 |
|
<cite class="bibref normative">[<a href="#ref-XML10">XML10</a>, |
1496 |
|
<a href="#ref-XML11">XML11</a>]</cite>.</tr> |
1497 |
|
<tr> |
1498 |
|
<th scope=row><dfn id=NMTOKEN_ATTR class=dom-const><code>NMTOKEN_ATTR</code> |
1499 |
|
<td><code>7</code><td><code>NMTOKEN</code> |
1500 |
|
<cite class="bibref normative">[<a href="#ref-XML10">XML10</a>, |
1501 |
|
<a href="#ref-XML11">XML11</a>]</cite>.</tr> |
1502 |
|
<tr> |
1503 |
|
<th scope=row><dfn id=NMTOKENS_ATTR class=dom-const><code>NMTOKENS_ATTR</code> |
1504 |
|
<td><code>8</code><td><code>NMTOKENS</code> |
1505 |
|
<cite class="bibref normative">[<a href="#ref-XML10">XML10</a>, |
1506 |
|
<a href="#ref-XML11">XML11</a>]</cite>.</tr> |
1507 |
|
<tr> |
1508 |
|
<th scope=row><dfn id=NOTATION_ATTR class=dom-const><code>NOTATION_ATTR</code> |
1509 |
|
<td><code>9</code><td><code>NOTATION</code> |
1510 |
|
<cite class="bibref normative">[<a href="#ref-XML10">XML10</a>, |
1511 |
|
<a href="#ref-XML11">XML11</a>]</cite>.</tr> |
1512 |
|
<tr> |
1513 |
|
<th scope=row><dfn id=ENUMERATION_ATTR class=dom-const><code>ENUMERATION_ATTR</code> |
1514 |
|
<td><code>10</code><td>Enumeration |
1515 |
|
<cite class="bibref normative">[<a href="#ref-XML10">XML10</a>, |
1516 |
|
<a href="#ref-XML11">XML11</a>]</cite>.</tr> |
1517 |
|
<tr> |
1518 |
|
<th scope=row><dfn id=UNKNOWN_ATTR class=dom-const><code>UNKNOWN_ATTR</code> |
1519 |
|
<td><code>11</code><td><a href="http://www.w3.org/TR/2004/REC-xml-infoset-20040204/#intro.null">Unknown</a>, |
1520 |
|
because no declaration for the attribute has been read but the |
1521 |
|
<a href="http://www.w3.org/TR/2004/REC-xml-infoset-20040204/#infoitem.document">[all declaration processed]</a> |
1522 |
|
property |
1523 |
|
<cite class="bibref normative">[<a href="#ref-INFOSET">INFOSET</a>]</cite> |
1524 |
|
would be false.</tr> |
1525 |
|
</tbody> |
1526 |
|
</table> |
1527 |
|
|
1528 |
|
<p>If no attribute type information is available, or if the source |
1529 |
|
of the information does not distinguish |
1530 |
|
<a href="http://www.w3.org/TR/2004/REC-xml-infoset-20040204/#intro.null">no |
1531 |
|
value</a> and |
1532 |
|
<a href="http://www.w3.org/TR/2004/REC-xml-infoset-20040204/#intro.null">unknown</a> |
1533 |
|
<cite class="bibref normative">[<a href="#ref-INFOSET">INFOSET</a>]</cite>, |
1534 |
|
then the value |
1535 |
|
<a href="#NO_TYPE_ATTR"><code>NO_TYPE_ATTR</code></a> |
1536 |
|
<em class=rfc2119>MUST</em> be used.</p> |
1537 |
|
|
1538 |
<div class="note memo"> |
<div class="note memo"> |
1539 |
<p>This character class contains all characters allowed in the production rule |
<p>An <a href="#AttributeDefinition"><code>AttributeDefinition</code></a> node |
1540 |
<a href="http://www.w3.org/TR/2006/REC-xml-20060816/#NT-PubidChar"><code>PubidChar</code></a> |
created by the |
1541 |
of <abbr>XML</abbr> 1.0 |
<a href="#createAttributeDefinition"><code>createAttributeDefinition</code></a> |
1542 |
<cite class="bibref normative">[<a href="#ref-XML10">XML10</a>]</cite>.</p> |
method has its <a href="#declaredType"><code>declaredType</code></a> attribute |
1543 |
|
set to <a href="#NO_TYPE_ATTR"><code>NO_TYPE_ATTR</code></a>.</p> |
1544 |
|
</div> |
1545 |
|
|
1546 |
|
<p>If the source of the information does not distinguish |
1547 |
|
<a href="http://www.w3.org/TR/2004/REC-xml-infoset-20040204/#intro.null">no |
1548 |
|
value</a> and/or |
1549 |
|
<a href="http://www.w3.org/TR/2004/REC-xml-infoset-20040204/#intro.null">unknown</a> |
1550 |
|
<cite class="bibref normative">[<a href="#ref-INFOSET">INFOSET</a>]</cite> and |
1551 |
|
<code>CDATA</code> |
1552 |
|
<cite class="bibref normative">[<a href="#ref-XML10">XML10</a>, |
1553 |
|
<a href="#ref-XML11">XML11</a>]</cite>, then the value |
1554 |
|
<a href="#CDATA_ATTR"><code>CDATA_ATTR</code></a> <em class=rfc2119>MUST</em> |
1555 |
|
be used.</p> |
1556 |
|
|
1557 |
|
<p>In Perl binding |
1558 |
|
<cite class="bibref normative">[<a href="#ref-DOMPERL">DOMPERL</a>]</cite>, the |
1559 |
|
<code>Attr</code> nodes <em class=rfc2119>MUST</em> implement the |
1560 |
|
<a href="#DeclaredValueType"><code>DeclaredValueType</code></a> |
1561 |
|
definition group.</p> |
1562 |
|
|
1563 |
|
</dd> |
1564 |
|
<dt><dfn id=allowedTokens class=dom-attr><code>allowedTokens</code></dfn> of |
1565 |
|
type <code>DOMStringList</code>, read$B!>(Bonly</dt> |
1566 |
|
<dd><p>The list of allowed attribute values.</p> |
1567 |
|
|
1568 |
|
<p>On getting, the attribute <em class=rfc2119>MUST</em> return the |
1569 |
|
<code>DOMStringList</code> object associated to this attribute. The object |
1570 |
|
<em class=rfc2119>MAY</em> contain zero or more ordered strings, consist of |
1571 |
|
zero or more characters respectively, possibly with duplications. The |
1572 |
|
object <em class=rfc2119>MUST</em> be read$B!>(Bonly if and only if the node |
1573 |
|
is <a href="#read-only">read$B!>(Bonly</a>.</p> |
1574 |
|
|
1575 |
|
<p>If the <a href="#AttributeDefinition"><code>AttributeDefinition</code></a> |
1576 |
|
node is created during the process to create a <abbr>DOM</abbr> from an |
1577 |
|
<abbr>XML</abbr> document, the object <em class=rfc2119>MUST</em> contain |
1578 |
|
the names or name tokens allowed for the attribute defined by the node. |
1579 |
|
If the document is well$B!>(Bformed, the object will be empty unless |
1580 |
|
the <a href="#declaredType"><code>declaredType</code></a> is |
1581 |
|
<a href="#ENUMERATION_ATTR"><code>ENUMERATION_ATTR</code></a> or |
1582 |
|
<a href="#NOTATION_ATTR"><code>NOTATION_ATTR</code></a>.</p> |
1583 |
|
|
1584 |
|
<p>If the <a href="#declaredType"><code>declaredType</code></a> is different |
1585 |
|
from <a href="#ENUMERATION_ATTR"><code>ENUMERATION_ATTR</code></a> or |
1586 |
|
<a href="#NOTATION_ATTR"><code>NOTATION_ATTR</code></a>, this attribute |
1587 |
|
<em class=rfc2119>MUST</em> be ignored for the purpose of serializing |
1588 |
|
into (part of) <abbr>XML</abbr> document.</p> |
1589 |
|
|
1590 |
|
<div class="note memo"> |
1591 |
|
<p>When serializing the node it should be noted that the object might |
1592 |
|
be empty, might contain duplications, and might contain strings that are |
1593 |
|
not names or name tokens.</p> |
1594 |
|
</div></dd> |
1595 |
|
<dt><dfn id=defaultType class=dom-attr><code>defaultType</code></dfn> of |
1596 |
|
type <code>unsigned short</code></dt> |
1597 |
|
<dd><p>The type of the default for the attribute. It is expected that this |
1598 |
|
attribute contains a value from the definition group |
1599 |
|
<a href="#DefaultValueType"><code>DefaultValueType</code></a>.</p> |
1600 |
|
|
1601 |
|
<p>On getting, the attribute <em class=rfc2119>MUST</em> return |
1602 |
|
the value associated to this attribute.</p> |
1603 |
|
|
1604 |
|
<p>On setting, the attribute <em class=rfc2119>MUST</em> raise a |
1605 |
|
<code>NO_MODIFICATION_ALLOWED_ERR</code> if the |
1606 |
|
<a href="#AttributeDefinition"><code>AttributeDefinition</code></a> node |
1607 |
|
is <a href="#read-only">read$B!>(Bonly</a>. Otherwise, it |
1608 |
|
<em class=rfc2119>MUST</em> set the specified value as the value |
1609 |
|
associated to this attribute.</p> |
1610 |
|
|
1611 |
|
<p>If the |
1612 |
|
<a href="#AttributeDefinition"><code>AttributeDefinition</code></a> node is |
1613 |
|
created during the process to create a <abbr>DOM</abbr> from an |
1614 |
|
<abbr>XML</abbr> document, an appropriate value from the |
1615 |
|
<a href="#DefaultValueType"><code>DefaultValueType</code></a> definition |
1616 |
|
group <em class=rfc2119>MUST</em> be set to the attribute.</p> |
1617 |
|
|
1618 |
|
<!-- DefaultValueType --> |
1619 |
|
<p>The definition group |
1620 |
|
<dfn id=DefaultValueType><code>DefaultValueType</code></dfn> |
1621 |
|
contains integers indicating the type of the default for the attribute. |
1622 |
|
The definition group contains the following constants:</p> |
1623 |
|
|
1624 |
|
<table> |
1625 |
|
<thead> |
1626 |
|
<tr><th scope=col>Name<th scope=col>Value<th scope=col>Description</tr> |
1627 |
|
</thead> |
1628 |
|
<tbody> |
1629 |
|
<tr> |
1630 |
|
<th scope=row><dfn id=UNKNOWN_DEFAULT class=dom-const><code>UNKNOWN_DEFAULT</code></dfn> |
1631 |
|
<td><code>0</code><td>Unknown.</tr> |
1632 |
|
<tr> |
1633 |
|
<th scope=row><dfn id=FIXED_DEFAULT class=dom-const><code>FIXED_DEFAULT</code></dfn> |
1634 |
|
<td><code>1</code><td>Provided explicitly and only the value is allowed. |
1635 |
|
<cite class="bibref normative">[<a href="#ref-XML10">XML10</a>, |
1636 |
|
<a href="#ref-XML11">XML11</a>]</cite>.</tr> |
1637 |
|
<tr> |
1638 |
|
<th scope=row><dfn id=REQUIRED_DEFAULT class=dom-const><code>REQUIRED_DEFAULT</code></dfn> |
1639 |
|
<td><code>2</code><td>No default value and the attribute have to be |
1640 |
|
explicitly specified.</tr> |
1641 |
|
<tr> |
1642 |
|
<th scope=row><dfn id=IMPLIED_DEFAULT class=dom-const><code>IMPLIED_DEFAULT</code></dfn> |
1643 |
|
<td><code>3</code><td>Implied |
1644 |
|
<cite class="bibref normative">[<a href="#ref-XML10">XML10</a>, |
1645 |
|
<a href="#ref-XML11">XML11</a>]</cite>.</tr> |
1646 |
|
<tr> |
1647 |
|
<th scope=row><dfn id=EXPLICIT_DEFAULT class=dom-const><code>EXPLICIT_DEFAULT</code></dfn> |
1648 |
|
<td><code>4</code><td>Provided explicitly.</tr> |
1649 |
|
</tbody> |
1650 |
|
</table> |
1651 |
|
|
1652 |
|
<p>If the source of the default type does not distinguish |
1653 |
|
implied and unknown default types, then the value |
1654 |
|
<a href="#IMPLIED_DEFAULT"><code>IMPLIED_DEFAULT</code></a> |
1655 |
|
<em class=rfc2119>MUST</em> be used.</p> |
1656 |
|
|
1657 |
|
<div class="note memo"> |
1658 |
|
<p>An <a href="#AttributeDefinition"><code>AttributeDefinition</code></a> |
1659 |
|
node created by the |
1660 |
|
<a href="#createAttributeDefinition"><code>createAttributeDefinition</code></a> |
1661 |
|
method has its <a href="#defaultType"><code>defaultType</code></a> |
1662 |
|
attribute set to |
1663 |
|
<a href="#UNKNOWN_DEFAULT"><code>UNKNOWN_DEFAULT</code></a>.</p> |
1664 |
|
</div></dd> |
1665 |
|
</dl> |
1666 |
|
|
1667 |
|
</div> |
1668 |
|
|
1669 |
|
<div class=section id=section-entity> |
1670 |
|
<h3>Modifications to the <code id=Entity>Entity</code> Interface</h3> |
1671 |
|
|
1672 |
|
<p>The implementation of the <a href="#Entity"><code>Entity</code></a> |
1673 |
|
interface <em class=rfc2119>MUST</em> be modified as the following |
1674 |
|
<a href="#idl-fragment"><abbr>IDL</abbr> fragment</a>:</p> |
1675 |
|
<pre class=idl><code>// Modifications to the Entity interface |
1676 |
|
attribute DOMString <a href="#publicId">publicId</a>; |
1677 |
|
attribute DOMString <a href="#systemId">systemId</a>; |
1678 |
|
attribute DOMString <a href="#notationName">notationName</a>; |
1679 |
|
|
1680 |
|
// Additions to the Entity interface |
1681 |
|
attribute DOMString <a href="#hasReplacementTree">hasReplacementTree</a>; |
1682 |
|
readonly attribute <a href="#DocumentType">DocumentType</a> <a href="#ownerDocumentTypeDefinition">ownerDocumentTypeDefinition</a>; |
1683 |
|
|
1684 |
|
attribute boolean <a href="#isExternallyDeclared">isExternallyDeclared</a>; |
1685 |
|
</code></pre> |
1686 |
|
|
1687 |
|
<p>The <code id=notationName>notationName</code> attribute of the |
1688 |
|
<a href="#Entity"><code>Entity</code></a> interface is no longer |
1689 |
|
read$B!>(Bonly.</p> |
1690 |
|
|
1691 |
|
<p>On setting, the attribute <em class=rfc2119>MUST</em> raise a |
1692 |
|
<code>NO_MODIFICATION_ALLOWED_ERR</code> if the node is |
1693 |
|
<a href="#read-only">read$B!>(Bonly</a>. Otherwise, it <em class=rfc2119>MUST</em> |
1694 |
|
set the specified value as the value associated to the attribute. No lexical |
1695 |
|
validation is performed. The new value <em class=rfc2119>MAY</em> be |
1696 |
|
<code>null</code>.</p> |
1697 |
|
|
1698 |
|
<dl> |
1699 |
|
<dt><dfn id=hasReplacementTree class=dom-attr><code>hasReplacementTree</code></dfn> |
1700 |
|
of type boolean</dt> |
1701 |
|
<dd><p>Whether the structure of the replacement text of the entity |
1702 |
|
is available via the <code>NodeList</code> object in the |
1703 |
|
<code>childNodes</code> attribute of the entity.</p> |
1704 |
|
|
1705 |
|
<p>On getting, the attribute <em class=rfc2119>MUST</em> return |
1706 |
|
the value associated to this attribute.</p> |
1707 |
|
|
1708 |
|
<p>On setting, the attribute <em class=rfc2119>MUST</em> raise a |
1709 |
|
<code>NO_MODIFICATION_ALLOWED_ERR</code> if the node is |
1710 |
|
<a href="#read-only">read$B!>(Bonly</a>. Otherwise, it |
1711 |
|
<em class=rfc2119>MUST</em> set the specified value as the |
1712 |
|
value associated to this attribute.</p> |
1713 |
|
|
1714 |
|
<div class="note memo"> |
1715 |
|
<p>The attribute can be set to <code>false</code> even if the |
1716 |
|
<a href="#Entity"><code>Entity</code></a> node has any child node. |
1717 |
|
If the attribute is set to <code>false</code>, then any child node of |
1718 |
|
the <a href="#Entity"><code>Entity</code></a> node ought to be ignored, |
1719 |
|
say, for the purpose of serialization.</p> |
1720 |
|
</div> |
1721 |
|
|
1722 |
|
<p>When an <code>EntityReference</code> node is created by cloning |
1723 |
|
the replacement subtree of the <a href="#Entity"><code>Entity</code></a> |
1724 |
|
node, if the attribute is set to <code>false</code>, then any descendant |
1725 |
|
of the node <em class=rfc2119>MUST</em> be ignored.</p> |
1726 |
|
|
1727 |
|
<p>If the <a href="#Entity"><code>Entity</code></a> node is created during |
1728 |
|
the process to create a <abbr>DOM</abbr> from an <abbr>XML</abbr> document, |
1729 |
|
the following requirements are applied: If the entity is an unparsed |
1730 |
|
entity, then the attribute <em class=rfc2119>MUST</em> be set to |
1731 |
|
<code>false</code>. Otherwise, if the entity is an external entity whose |
1732 |
|
replacement text is not available, or whose replacement text is not converted |
1733 |
|
to a replacement tree, then the attribute <em class=rfc2119>MUST</em> be set |
1734 |
|
to <code>false</code>. Otherwise, the attribute |
1735 |
|
<em class=rfc2119>MUST</em> be set to <code>true</code>.</p> |
1736 |
|
|
1737 |
|
<div class="note memo"> |
1738 |
|
<p>An <a href="#Entity"><code>Entity</code></a> node created by the |
1739 |
|
<a href="#createGeneralEntity"><code>createGeneralEntity</code></a> method |
1740 |
|
has its <a href="#hasReplacementTree"><code>hasReplacementTree</code></a> |
1741 |
|
attribute set to <code>false</code>.</p> |
1742 |
|
</div></dd> |
1743 |
|
<dt><dfn id=isExternallyDeclared class=dom-attr><code>isExternallyDeclared</code></dfn> |
1744 |
|
of type boolean</dt> |
1745 |
|
<dd><p>Whether the entity is declared by an external entity declaration or |
1746 |
|
not. If the value is <code>true</code>, the entity is declared in an entity |
1747 |
|
declaration in the external subset entity or in an external parameter entity. |
1748 |
|
If the value is <code>false</code>, the entity is declared in an entity |
1749 |
|
declaration in the internal subset, or the node is created in memory.</p> |
1750 |
|
|
1751 |
|
<p>On getting, the attribute <em class=rfc2119>MUST</em> return |
1752 |
|
the value associated to this attribute.</p> |
1753 |
|
|
1754 |
|
<p>On setting, the attribute <em class=rfc2119>MUST</em> raise a |
1755 |
|
<code>NO_MODIFICATION_ALLOWED_ERR</code> if the node is |
1756 |
|
<a href="#read-only">read$B!>(Bonly</a>. Otherwise, it |
1757 |
|
<em class=rfc2119>MUST</em> set the specified value as the value associated |
1758 |
|
to this attribute.</p> |
1759 |
|
|
1760 |
|
<p>If the <a href="#Entity"><code>Entity</code></a> node is created during |
1761 |
|
the process to create a <abbr>DOM</abbr> from an <abbr>XML</abbr> document, |
1762 |
|
the following requirements are applied: If the entity is an unparsed |
1763 |
|
entity, then the attribute <em class=rfc2119>MUST</em> be set to |
1764 |
|
<code>false</code>. Otherwise, i.e. the entity is a parsed entity, then the |
1765 |
|
attribute <em class=rfc2119>MUST</em> be set to the value of whether the |
1766 |
|
entity is declared by an external markup declaration or not.</p></dd> |
1767 |
|
</dl> |
1768 |
|
</div> |
1769 |
|
|
1770 |
|
<div class=section id=section-notation> |
1771 |
|
<h3>Modifications to the <code id=Notation>Notation</code> Interface</h3> |
1772 |
|
|
1773 |
|
<p>The implementation of the <a href="#Notation"><code>Notation</code></a> |
1774 |
|
interface <em class=rfc2119>MUST</em> be modified as the following |
1775 |
|
<a href="#idl-fragment"><abbr>IDL</abbr> fragment</a>:</p> |
1776 |
|
<pre class=idl><code>// Modifications to the Notation interface |
1777 |
|
attribute DOMString <a href="#publicId">publicId</a>; |
1778 |
|
attribute DOMString <a href="#systemId">systemId</a>; |
1779 |
|
|
1780 |
|
// Addition to the Notation interface |
1781 |
|
readonly attribute <a href="#DocumentType">DocumentType</a> <a href="#ownerDocumentTypeDefinition">ownerDocumentTypeDefinition</a>; |
1782 |
|
</code></pre> |
1783 |
</div> |
</div> |
1784 |
|
|
1785 |
</div> |
</div> |
1792 |
|
|
1793 |
<dl> |
<dl> |
1794 |
<dt id=ref-DOM3CORE>DOM3CORE</dt> |
<dt id=ref-DOM3CORE>DOM3CORE</dt> |
1795 |
<dd class=ed>@@ W3C DOM Level 3 Core</dd> |
<dd><cite><a href="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407">Document |
1796 |
<dt id=ref-DOMDTDEF>DOMDTDEF</dt> |
Object Model (<abbr>DOM</abbr>) Level 3 Core Specification, Version |
1797 |
<dd class=ed>@@ manakai's extension to DOM for document type definitions</dd> |
1.0</a></cite>, <abbr>W3C</abbr> Recommendation, <time datetime=2004-04-07>7 |
1798 |
|
April 2004</time>. <em>This</em> version of the specification is referenced. |
1799 |
|
The latest version of the specification is available at |
1800 |
|
<code class=uri><<a href="http://www.w3.org/TR/DOM-Level-3-Core">http://www.w3.org/TR/DOM-Level-3-Core</a>></code>.</dd> |
1801 |
|
<dt id=ref-DOMBIND>DOMBIND</dt> |
1802 |
|
<dd><cite><a href="http://www.w3.org/TR/2007/WD-DOM-Bindings-20071017/">Language |
1803 |
|
Bindings for <abbr>DOM</abbr> Specifications</a></cite>, <abbr>W3C</abbr> |
1804 |
|
Working Draft, <time datetime=2007-10-17>17 October 2007</time>. |
1805 |
|
<em>This</em> version of the specification is referenced. The latest version |
1806 |
|
of the specification is available at |
1807 |
|
<code class=uri><<a href="http://www.w3.org/TR/DOM-Bindings/">http://www.w3.org/TR/DOM-Bindings/</a>></code>.</dd> |
1808 |
|
<dt id=ref-DOMPERL>DOMPERL</dt> |
1809 |
|
<dd><cite><a href="http://suika.fam.cx/gate/2005/sw/manakai/DOM%20Perl%20Binding">manakai's |
1810 |
|
<abbr>DOM</abbr> Perl Binding</a></cite>, editor's draft. Work in |
1811 |
|
progress.</dd> |
1812 |
|
<dt id=ref-HTML5>HTML5</dt> |
1813 |
|
<dd><cite><a href="http://whatwg.org/html5"><abbr>HTML</abbr> 5</a></cite>, |
1814 |
|
<abbr title="Web Hypertext Application Technology Working Group">WHATWG</abbr> |
1815 |
|
Working Draft. Work in progress.</dd> |
1816 |
|
<dt id=ref-INFOSET>INFOSET</dt> |
1817 |
|
<dd><cite><a href="http://www.w3.org/TR/2004/REC-xml-infoset-20040204"><abbr>XML</abbr> |
1818 |
|
Information Set (Second Edition)</a></cite>, <abbr>W3C</abbr> Recommendation, |
1819 |
|
<time datetime=2004-02-04>4 February 2004</time>. <em>This</em> version of |
1820 |
|
the specification is referenced. The latest version of the specification is |
1821 |
|
available at |
1822 |
|
<code class=uri><<a href="http://www.w3.org/TR/xml-infoset">http://www.w3.org/TR/xml-infoset</a>></code>.</dd> |
1823 |
<dt id="ref-KEYWORDS">KEYWORDS</dt> |
<dt id="ref-KEYWORDS">KEYWORDS</dt> |
1824 |
<dd><cite><a href="urn:ietf:rfc:2119">Key words for use in |
<dd><cite><a href="urn:ietf:rfc:2119">Key words for use in |
1825 |
<abbr>RFCs</abbr> to Indicate Requirement Levels</a></cite>, |
<abbr>RFCs</abbr> to Indicate Requirement Levels</a></cite>, |
1828 |
14</a>, <abbr title="Request for Comments">RFC</abbr> 2119, |
14</a>, <abbr title="Request for Comments">RFC</abbr> 2119, |
1829 |
<time datetime=1997-03>March 1997</time>. |
<time datetime=1997-03>March 1997</time>. |
1830 |
<em>This</em> version of the specification is referenced.</dd> |
<em>This</em> version of the specification is referenced.</dd> |
1831 |
<dt id=ref-INFOSET>INFOSET</dt> |
<dt id=ref-MANAKAI>MANAKAI</dt> |
1832 |
<dd class=ed>@@</dd> |
<dd><cite><a href="http://suika.fam.cx/gate/2005/sw/manakai/DOM%20Extensions"> |
1833 |
<dt id=ref-XML10">XML10</dt> |
manakai's <abbr>DOM</abbr> Extensions</a></cite>, editor's draft. Work in |
1834 |
|
progress.</dd> |
1835 |
|
<dt id=ref-XML10>XML10</dt> |
1836 |
<dd><cite><a href="http://www.w3.org/TR/2006/REC-xml-20060816">Extensible |
<dd><cite><a href="http://www.w3.org/TR/2006/REC-xml-20060816">Extensible |
1837 |
Markup Language (<abbr>XML</abbr>) 1.0 (Fourth Edition)</a></cite>, |
Markup Language (<abbr>XML</abbr>) 1.0 (Fourth Edition)</a></cite>, |
1838 |
<abbr>W3C</abbr> Recommendation, <time datetime=2006-08-16>16 August |
<abbr>W3C</abbr> Recommendation, <time datetime=2006-08-16>16 August |
1839 |
2006</time>, edited in place <time datetime=2006-09-29>29 September |
2006</time>, edited in place <time datetime=2006-09-29>29 September |
1840 |
2006</time>. Tje latest version of the specification is available at |
2006</time>. <em>This</em> version of the specification is referenced. The |
1841 |
<code class=uri><<a href="http://www.w3.org/TR/xml">http://www.w3.org/TR/xml</a>></code>. |
latest version of the specification is available at |
1842 |
<em>This</em> version of the specification is referenced.</dd> |
<code class=uri><<a href="http://www.w3.org/TR/xml">http://www.w3.org/TR/xml</a>></code>.</dd> |
1843 |
<dt id=ref-XML11>XML11</dt> |
<dt id=ref-XML11>XML11</dt> |
1844 |
<dd class=ed>@@</dd> |
<dd><cite><a href="http://www.w3.org/TR/2006/REC-xml11-20060816/">Extensible |
1845 |
|
Markup Language (<abbr>XML</abbr>) 1.1 (Second Edition)</a></cite>, |
1846 |
|
<abbr>W3C</abbr> Recommendation, <time datetime=2006-08-16>16 August |
1847 |
|
2006</time>, edited in place <time datetime=2006-09-29>29 September |
1848 |
|
2006</time>. <em>This</em> version of the specification is referenced. The |
1849 |
|
latest version of the specification is available at |
1850 |
|
<code class=uri><<a href="http://www.w3.org/TR/xml11">http://www.w3.org/TR/xml11</a>></code>.</dd> |
1851 |
</dl> |
</dl> |
1852 |
</div> |
</div> |
1853 |
|
|
1854 |
<div id="informative-references" class="section informative reference"> |
<div id="informative-references" class="section informative reference"> |
1855 |
<h3>Non$B!>(Bnormative References</h3> |
<h3>Non$B!>(Bnormative References</h3> |
1856 |
|
|
1857 |
<dl class=ed> |
<dl> |
1858 |
<dt id=ref-CSS>CSS</dt> |
<dt id=ref-DOM1WD>DOM1WD</dt> |
1859 |
<dd><cite><a href="http://www.w3.org/TR/2007/CR-CSS21-20070719">Cascading |
<dd><cite><a href="http://www.w3.org/TR/WD-DOM-971209/">Document Object |
1860 |
Style Sheets Level 2 Revision 1 (<abbr>CSS</abbr> 2.1) |
Model Specification</a></cite>, <abbr>W3C</abbr> Working Draft, |
1861 |
Specification</a></cite>, |
<time datetime=1997-12-09>9 December 1997</time>.</dd> |
1862 |
<abbr title="World Wide Web Consortium">W3C</abbr> Candidate |
<dd><cite><a href="http://www.w3.org/TR/WD-DOM-19980318/">Document Object |
1863 |
Recommendation, <time datetime=2007-07-19>19 July 2007</time>. |
Model Specification</a></cite>, <abbr>W3C</abbr> Working Draft, |
1864 |
Work in progress. The latest version of the specification is |
<time datetime=1998-03-18>18 March 1998</time>.</dd> |
1865 |
available at |
<dd><cite><a href="http://www.w3.org/TR/1998/WD-DOM-19980416/">Document |
1866 |
<code class=URI><<a href="http://www.w3.org/TR/CSS21">http://www.w3.org/TR/CSS21</a>></code>.</dd> |
Object Model Specification, Version 1.0</a></cite>, <abbr>W3C</abbr> Working |
1867 |
<dt id=ref-CSSOM>CSSOM</dt> |
Draft, <time datetime=1998-04-16>16 April 1998</time>.</dd> |
1868 |
<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 |
<dt id=ref-DOM3AS>DOM3AS</dt> |
1869 |
Style Sheets Object Model (<abbr>CSSOM</abbr>)</a></cite>, |
<dd><cite><a href="http://www.w3.org/TR/2002/NOTE-DOM-Level-3-AS-20020725/">Document |
1870 |
<abbr title="World Wide Web Consortium">W3C</abbr> Editor's Draft, |
Object Model (<abbr>DOM</abbr>) Level 3 Abstract Schemas Specification, |
1871 |
<time datetime=2007-06-18>18 June 2007</time>. Work in progress. |
Version 1.0</a></cite>, <abbr>W3C</abbr> Note, <time datetime=2002-07-25>25 |
1872 |
The latest Editor's Draft of the specification is available at |
July 2002</time>. The latest version of the specification is available at |
1873 |
<code class=URI><<a href="http://dev.w3.org/csswg/cssom/Overview.html">http://dev.w3.org/csswg/cssom/Overview.html</a>></code>.</dd> |
<code class=uri><<a href="http://www.w3.org/TR/DOM-Level-3-AS">http://www.w3.org/TR/DOM-Level-3-AS</a>></code>.</dd> |
1874 |
<dt id=ref-HTML5>HTML5</dt> |
<dt id=ref-XSAPI>XSAPI</dt> |
1875 |
<dd><cite><a href="http://whatwg.org/html5"><abbr>HTML</abbr> 5</a></cite>, |
<dd><cite><a href="http://www.w3.org/Submission/2004/SUBM-xmlschema-api-20040309/"><abbr>XML</abbr> |
1876 |
<abbr title="Web Hypertext Application Technology Working Group">WHATWG</abbr> |
Schema <abbr>API</abbr></a></cite>, <abbr>W3C</abbr> Member Submission, |
1877 |
Working Draft. Work in progress.</dd> |
<time datetime=2004-03-09>9 March 2004</time>. The latest version of the |
1878 |
<dt id=ref-SAPI>SAPI</dt> |
specification is available at |
1879 |
<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>, |
<code class=uri><<a href="http://www.w3.org/Submission/xmlschema-api/">http://www.w3.org/Submission/xmlschema-api/</a>></code>.</dd> |
|
<abbr title="World Wide Web Consortium">W3C</abbr> Editor's Draft, |
|
|
<time datetime=2007-08-29>29 August 2007</time>. Work in progress. |
|
|
The latest Editor's Draft of the specification is available at |
|
|
<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>. |
|
|
The latest published version of the specification is available at |
|
|
<code class=URI><<a href="http://www.w3.org/TR/selectors-api/">http://www.w3.org/TR/selectors-api/</a>></code>.</dd> |
|
|
<dt id=XBL2>XBL2</dt> |
|
|
<dd><cite><a href="http://www.mozilla.org/projects/xbl/xbl2.html"><abbr>XBL</abbr> |
|
|
2.0</a></cite>, Mozilla.org, <time datetime=2007-03-15>15 Mar 2007</time>. |
|
|
Work in progress. The latest |
|
|
<abbr title="World Wide Web Consortium">W3C</abbr>$B!>(Bpublished |
|
|
version of the specification is available at |
|
|
<code class=URI><<a href="http://www.w3.org/TR/xbl/">http://www.w3.org/TR/xbl/</a>></code>.</dd> |
|
|
<dt id=ref-XML5>XML5</dt> |
|
|
<dd class=ed>@@</dd> |
|
1880 |
</dl> |
</dl> |
1881 |
</div> |
</div> |
1882 |
|
|