134 |
|
|
135 |
<dl id=errors> |
<dl id=errors> |
136 |
<dt><dfn id=entity-error><code>entity-error</code></dfn></dt> |
<dt><dfn id=entity-error><code>entity-error</code></dfn></dt> |
137 |
<dd class=ed>@@</dd> |
<dd> |
138 |
|
<p class=ed>@@</p> |
139 |
|
<div class="note memo"> |
140 |
|
<p>This <span class=ed>algorithm</span> does not support |
141 |
|
<abbr>DOM</abbr> tree with one or more <code>EntityReference</code> |
142 |
|
nodes. It is expected that any entity references are expanded |
143 |
|
at the parse time and any unexpandable entity references |
144 |
|
make parse time errors raised so that never result in |
145 |
|
<abbr>DOM</abbr> tree with <code>EntityReference</code> nodes.</p> |
146 |
|
</div> |
147 |
|
</dd> |
148 |
<dt><dfn id=round-trip-error><code>round-trip-error</code></dfn></dt> |
<dt><dfn id=round-trip-error><code>round-trip-error</code></dfn></dt> |
149 |
<dd class=ed>@@</dd> |
<dd class=ed>@@</dd> |
150 |
<dt class=ed><dfn id=unknown-error><code>unknown-error</code></dfn>?</dt> |
<dt class=ed><dfn id=unknown-error><code>unknown-error</code></dfn>?</dt> |
212 |
<li>If the <code>childNodes</code> list of <var>n</var> contains |
<li>If the <code>childNodes</code> list of <var>n</var> contains |
213 |
an <code>EntityReference</code> node, it is an |
an <code>EntityReference</code> node, it is an |
214 |
<a href="#entity-error" id=ee-er-in-attr><code>entity-error</code></a>.</li> |
<a href="#entity-error" id=ee-er-in-attr><code>entity-error</code></a>.</li> |
215 |
<li><a href="#algorithm-to-check-a-node">Check each node</a> |
<li><a href="#algorithm-to-check-a-node">Check each node</a>, in |
216 |
which is different from <code>EntityReference</code> in |
<code>childNodes</code> list of <var>n</var>, |
217 |
<code>childNodes</code> list of <var>n</var> recursively.</li> |
which is different from <code>EntityReference</code> recursively.</li> |
218 |
<li class=ed>@@ <code>specified</code>, |
<li class=ed>@@ <code>specified</code>, |
219 |
<code>manakaiAttributeType</code></li> |
<code>manakaiAttributeType</code></li> |
220 |
</ol> |
</ol> |
270 |
by zero or more <code>Comment</code> and/or |
by zero or more <code>Comment</code> and/or |
271 |
<code>ProcessingInstruction</code> nodes. Any violation to this is a |
<code>ProcessingInstruction</code> nodes. Any violation to this is a |
272 |
<a href="#xml-well-formedness-error" id=wfe-document-child><code>xml-well-formedness-error</code></a>.</li> |
<a href="#xml-well-formedness-error" id=wfe-document-child><code>xml-well-formedness-error</code></a>.</li> |
273 |
<li><a href="#algorithm-to-check-a-node">Check each node</a> |
<li><a href="#algorithm-to-check-a-node">Check each node</a>, in |
274 |
which is different from <code>EntityReference</code> in |
<code>childNodes</code> list of <var>n</var>, |
275 |
<code>childNodes</code> list of <var>n</var> recursively.</li> |
which is different from <code>EntityReference</code> recursively.</li> |
276 |
<li class=ed>@@ <code>allDeclarationsProcessed</code></li> |
<li class=ed>@@ <code>allDeclarationsProcessed</code></li> |
277 |
</ol> |
</ol> |
278 |
</dd> |
</dd> |
288 |
<li>If the <code>childNodes</code> list of <var>n</var> contains |
<li>If the <code>childNodes</code> list of <var>n</var> contains |
289 |
an <code>EntityReference</code> node, it is an |
an <code>EntityReference</code> node, it is an |
290 |
<a href="#entity-error" id=ee-er-in-df><code>entity-error</code></a>.</li> |
<a href="#entity-error" id=ee-er-in-df><code>entity-error</code></a>.</li> |
291 |
<li><a href="#algorithm-to-check-a-node">Check each node</a> |
<li><a href="#algorithm-to-check-a-node">Check each node</a>, in |
292 |
which is different from <code>EntityReference</code> in |
<code>childNodes</code> list of <var>n</var> |
293 |
<code>childNodes</code> list of <var>n</var> recursively.</li> |
which is different from <code>EntityReference</code> recursively.</li> |
294 |
</ol> |
</ol> |
295 |
</dd> |
</dd> |
296 |
<dt>If <var>n</var> is a <code>DocumentType</code> node</dt> |
<dt>If <var>n</var> is a <code>DocumentType</code> node</dt> |
298 |
<ol> |
<ol> |
299 |
<li><a href="#algorithm-to-validate-a-ncname">Validate the |
<li><a href="#algorithm-to-validate-a-ncname">Validate the |
300 |
<code>nodeName</code> attribute value as an <code>NCName</code></a>.</li> |
<code>nodeName</code> attribute value as an <code>NCName</code></a>.</li> |
301 |
<li>If the <code>publicId</code> attribute value contains any character |
<li><a href="#algorithm-to-validate-a-public-identifier" title="validate a public identifier">Validate |
302 |
that is outside of the range of <code>#x20 | <!--#xD | #xA |--> |
the <code>publicId</code> attribute value as a public identifier</a>.</li> |
|
[a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]</code><!-- @@ TODO: formal def -->, |
|
|
or contains a leading <code class=char>U+0020</code> character, |
|
|
a trailing <code class=char>U+0020</code> character, or a |
|
|
sequence of two or more <code class=char>U+0020</code> characters, |
|
|
then it is a |
|
|
<a href="#xml-well-formedness-error" id=wfe-dt-public-id><code>xml-well-formedness-error</code></a>.</li> |
|
303 |
<li>If the <code>systemId</code> attribute value contains |
<li>If the <code>systemId</code> attribute value contains |
304 |
both <code>"</code> and <code>'</code> characters, it is a |
both <code>"</code> and <code>'</code> characters, it is a |
305 |
<a href="#xml-well-formedness-error" id=wfe-dt-system-id><code>xml-well-formedness-error</code></a>.</li> |
<a href="#xml-well-formedness-error" id=wfe-dt-system-id><code>xml-well-formedness-error</code></a>.</li> |
309 |
then it is a |
then it is a |
310 |
<a href="#xml-well-formedness-error" id=wfe-dt-child><code>xml-well-formedness-error</code></a>. |
<a href="#xml-well-formedness-error" id=wfe-dt-child><code>xml-well-formedness-error</code></a>. |
311 |
<span class=ed>@@ ref to manakai's extensions</span></li> |
<span class=ed>@@ ref to manakai's extensions</span></li> |
312 |
<li><a href="#algorithm-to-check-a-node">Check each node</a> |
<li><a href="#algorithm-to-check-a-node">Check each node</a>, in |
313 |
which is different from <code>EntityReference</code> in |
<code>childNodes</code> list of <var>n</var>, |
314 |
<code>childNodes</code> list of <var>n</var> recursively.</li> |
which is different from <code>EntityReference</code> recursively.</li> |
315 |
<li class=ed>@@ <code>entities</code>, <code>notations</code>, |
<li class=ed>@@ <code>entities</code>, <code>notations</code>, |
316 |
<code>elementTypes</code>, externally declared?</li> |
<code>elementTypes</code>, externally declared?</li> |
317 |
</ol> |
</ol> |
333 |
<li>If the <code>childNodes</code> list of <var>n</var> contains |
<li>If the <code>childNodes</code> list of <var>n</var> contains |
334 |
an <code>EntityReference</code> node, it is an |
an <code>EntityReference</code> node, it is an |
335 |
<a href="#entity-error" id=ee-er-in-element><code>entity-error</code></a>.</li> |
<a href="#entity-error" id=ee-er-in-element><code>entity-error</code></a>.</li> |
336 |
<li><a href="#algorithm-to-check-a-node">Check each node</a> |
<li><a href="#algorithm-to-check-a-node">Check each node</a>, in |
337 |
which is different from <code>EntityReference</code> in |
<code>childNodes</code> list of <var>n</var>, |
338 |
<code>childNodes</code> list of <var>n</var> recursively.</li> |
which is different from <code>EntityReference</code> recursively.</li> |
339 |
</ol> |
</ol> |
340 |
</dd> |
</dd> |
341 |
<dt>If <var>n</var> is an <code>ElementTypeDefinition</code> node</dt> |
<dt>If <var>n</var> is an <code>ElementTypeDefinition</code> node</dt> |
346 |
<li>An <a href="#entity-error" id=ee-entity-node><code>entity-error</code></a> <span class=ed>@@ if !notationName</span>.</li> |
<li>An <a href="#entity-error" id=ee-entity-node><code>entity-error</code></a> <span class=ed>@@ if !notationName</span>.</li> |
347 |
<li><a href="#algorithm-to-validate-a-ncname">Validate the |
<li><a href="#algorithm-to-validate-a-ncname">Validate the |
348 |
<code>nodeName</code> attribute value as an <code>NCName</code></a>.</li> |
<code>nodeName</code> attribute value as an <code>NCName</code></a>.</li> |
349 |
<li>If the <code>publicId</code> attribute value contains any character |
<li><a href="#algorithm-to-validate-a-public-identifier" title="validate a public identifier">Validate |
350 |
that is outside of the range of <code>#x20 | <!--#xD | #xA |--> |
the <code>publicId</code> attribute value as a public identifier</a>.</li> |
|
[a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]</code><!-- @@ TODO: formal def -->, |
|
|
or contains a leading <code class=char>U+0020</code> character, |
|
|
a trailing <code class=char>U+0020</code> character, or a |
|
|
sequence of two or more <code class=char>U+0020</code> characters, |
|
|
then it is a |
|
|
<a href="#xml-well-formedness-error" id=wfe-dt-public-id><code>xml-well-formedness-error</code></a>.</li> |
|
351 |
<li>If the <code>systemId</code> attribute value contains |
<li>If the <code>systemId</code> attribute value contains |
352 |
both <code>"</code> and <code>'</code> characters, it is a |
both <code>"</code> and <code>'</code> characters, it is a |
353 |
<a href="#xml-well-formedness-error" id=wfe-dt-system-id><code>xml-well-formedness-error</code></a>.</li> |
<a href="#xml-well-formedness-error" id=wfe-dt-system-id><code>xml-well-formedness-error</code></a>.</li> |
362 |
<li>If the <code>childNodes</code> list of <var>n</var> contains |
<li>If the <code>childNodes</code> list of <var>n</var> contains |
363 |
an <code>EntityReference</code> node, it is an |
an <code>EntityReference</code> node, it is an |
364 |
<a href="#entity-error" id=ee-er-in-er><code>entity-error</code></a>.</li> |
<a href="#entity-error" id=ee-er-in-er><code>entity-error</code></a>.</li> |
365 |
<li><a href="#algorithm-to-check-a-node">Check each node</a> |
<li><a href="#algorithm-to-check-a-node">Check each node</a>, in |
366 |
which is different from <code>EntityReference</code> in |
<code>childNodes</code> list of <var>n</var>, |
367 |
<code>childNodes</code> list of <var>n</var> recursively.</li> |
which is different from <code>EntityReference</code> recursively.</li> |
368 |
</ol> |
</ol> |
369 |
</dd> |
</dd> |
370 |
<dt>If <var>n</var> is an <code>EntityReference</code> node</dt> |
<dt>If <var>n</var> is an <code>EntityReference</code> node</dt> |
382 |
<li>If the <code>childNodes</code> list of <var>n</var> contains |
<li>If the <code>childNodes</code> list of <var>n</var> contains |
383 |
an <code>EntityReference</code> node, it is an |
an <code>EntityReference</code> node, it is an |
384 |
<a href="#entity-error" id=ee-er-in-entity><code>entity-error</code></a>.</li> |
<a href="#entity-error" id=ee-er-in-entity><code>entity-error</code></a>.</li> |
385 |
<li><a href="#algorithm-to-check-a-node">Check each node</a> |
<li><a href="#algorithm-to-check-a-node">Check each node</a>, in |
386 |
which is different from <code>EntityReference</code> in |
<code>childNodes</code> list of <var>n</var>, |
387 |
<code>childNodes</code> list of <var>n</var> recursively.</li> |
which is different from <code>EntityReference</code> recursively.</li> |
388 |
</ol> |
</ol> |
389 |
</dd> |
</dd> |
390 |
<dt>If <var>n</var> is a <code>Notation</code> node</dt> |
<dt>If <var>n</var> is a <code>Notation</code> node</dt> |
392 |
<ol> |
<ol> |
393 |
<li><a href="#algorithm-to-validate-a-ncname">Validate the |
<li><a href="#algorithm-to-validate-a-ncname">Validate the |
394 |
<code>nodeName</code> attribute value as an <code>NCName</code></a>.</li> |
<code>nodeName</code> attribute value as an <code>NCName</code></a>.</li> |
395 |
<li>If the <code>publicId</code> attribute value contains any character |
<li><a href="#algorithm-to-validate-a-public-identifier" title="validate a public identifier">Validate |
396 |
that is outside of the range of <code>#x20 | <!--#xD | #xA |--> |
the <code>publicId</code> attribute value as a public identifier</a>.</li> |
|
[a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]</code><!-- @@ TODO: formal def -->, |
|
|
or contains a leading <code class=char>U+0020</code> character, |
|
|
a trailing <code class=char>U+0020</code> character, or a |
|
|
sequence of two or more <code class=char>U+0020</code> characters, |
|
|
then it is a |
|
|
<a href="#xml-well-formedness-error" id=wfe-dt-public-id><code>xml-well-formedness-error</code></a>.</li> |
|
397 |
<li>If the <code>systemId</code> attribute value contains |
<li>If the <code>systemId</code> attribute value contains |
398 |
both <code>"</code> and <code>'</code> characters, it is a |
both <code>"</code> and <code>'</code> characters, it is a |
399 |
<a href="#xml-well-formedness-error" id=wfe-dt-system-id><code>xml-well-formedness-error</code></a>.</li> |
<a href="#xml-well-formedness-error" id=wfe-dt-system-id><code>xml-well-formedness-error</code></a>.</li> |
463 |
<li class=ed>@@</li> |
<li class=ed>@@</li> |
464 |
</ol> |
</ol> |
465 |
|
|
466 |
|
<p>To <dfn id=algorithm-to-validate-a-public-identifier title="validate a public identifier">validate |
467 |
|
a public identifier (<dfn id=var-pid><var>pid</var></dfn>)</dfn>, the |
468 |
|
algorithm below <em class=rfc2119>MUST</em> be used:</p> |
469 |
|
<ol> |
470 |
|
<li>If <var>pid</var> contains any character |
471 |
|
that is outside of the range of <code>#x20 | <!--#xD | #xA |--> |
472 |
|
[a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]</code><!-- @@ TODO: formal def -->, |
473 |
|
or contains a leading <code class=char>U+0020</code> character, |
474 |
|
a trailing <code class=char>U+0020</code> character, or a |
475 |
|
sequence of two or more <code class=char>U+0020</code> characters, |
476 |
|
then it is a |
477 |
|
<a href="#xml-well-formedness-error" id=wfe-dt-public-id><code>xml-well-formedness-error</code></a>.</li> |
478 |
|
</ol> |
479 |
|
|
480 |
</div> |
</div> |
481 |
|
|
482 |
<div class="section" id="examples"> |
<div class="section" id="examples"> |