18 |
|
|
19 |
<div class="header"> |
<div class="header"> |
20 |
<h1>manakai's <abbr>XML</abbr> Conformance Checking</h1> |
<h1>manakai's <abbr>XML</abbr> Conformance Checking</h1> |
21 |
<h2>Working Draft <time datetime=2007-11-14>14 November 2007</time></h2> |
<h2>Working Draft <time datetime=2007-11-15>15 November 2007</time></h2> |
22 |
|
|
23 |
<dl class="versions-uri"> |
<dl class="versions-uri"> |
24 |
<dt>This Version</dt> |
<dt>This Version</dt> |
120 |
raised is undefined.</p> |
raised is undefined.</p> |
121 |
</div> |
</div> |
122 |
|
|
|
<div class=section id=parsing-xml> |
|
|
<h2>Parsing <abbr>XML</abbr> Document</h2> |
|
|
|
|
|
<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 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> |
|
|
<!-- |
|
|
|
|
|
#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 |
|
|
|
|
|
@@ Need detailed review, but maybe should be in parsing phase |
|
|
|
|
|
#vc-check-rmd Validity constraint: Standalone Document Declaration |
|
|
|
|
|
--> |
|
|
</ul> |
|
|
</div> |
|
|
|
|
|
<div class="section" id=checking-dom> |
|
|
<h2>Checking <abbr>DOM</abbr></h2> |
|
|
|
|
|
<p>The following algorithms and definitions are applied to |
|
|
<abbr>XML</abbr> documents; especially, they are not applied |
|
|
to <abbr>HTML</abbr> documents.<!-- TODO: ref to HTML5 --></p> |
|
123 |
|
|
124 |
<div class=section id=error-categories> |
<div class=section id=error-categories> |
125 |
<h3>Error Classification</h3> |
<h2>Error Classification</h2> |
126 |
|
|
127 |
<p class=ed>If a <code>Document</code> node has no |
<p class=ed>If a <code>Document</code> node has no |
128 |
xml-well-formedness-error, entity-error, and unknown-error, |
xml-well-formedness-error, entity-error, and unknown-error, |
210 |
|
|
211 |
</div> |
</div> |
212 |
|
|
213 |
|
<div class=section id=parsing-xml> |
214 |
|
<h2>Parsing <abbr>XML</abbr> Document</h2> |
215 |
|
|
216 |
|
<ul> |
217 |
|
<li>If the <abbr>XML</abbr> document does not begin with an |
218 |
|
<abbr>XML</abbr> declaration, then raise an |
219 |
|
<a href="#xml-misc-recommentation" id=xmr-xml-decl><code>xml-misc-recommendation</code></a>.</li> |
220 |
|
<li>If the replacement text of an entity declaration is |
221 |
|
<code><</code>, then raise an |
222 |
|
<a href="#xml-misc-warning" id=xmw-entity-value-lt><code>xml-misc-warning</code></a>.<!-- |
223 |
|
"strongly advised to avoid" in a Note in Section 2.3 of [XML10], [XML11]. |
224 |
|
--></li> |
225 |
|
<li>If attribute definition whose <code>Name</code> is |
226 |
|
<code>xml:space</code> has <span class=ed>declared type different from |
227 |
|
(default|preserve), (default), or (preserve)</span>, then raise an |
228 |
|
<a href="#xml-misc-error" id=xme-ad-xml-space><code>xml-misc-error</code></a>. |
229 |
|
<span class=ed>@@ duplication with |
230 |
|
<a href="#xml-at-xml-space">#xml-at-xml-space</a>.<!-- |
231 |
|
<!ATTLIST e xml:space CDATA #IMPLIED xml:space CDATA #IMPLIED> --></span></li> |
232 |
|
<li>If an empty-element tag is used for an element which is <em>not</em> |
233 |
|
declared <code>EMPTY</code>, then raise an |
234 |
|
<a href="#xml-misc-recommentation" id=xmr-emptyelemtag-not-empty><code>xml-misc-recommendation</code></a>.</li> |
235 |
|
<li>If an empty-element tag is <em>not</em> used for an element which is |
236 |
|
declared <code>EMPTY</code>, then raise an |
237 |
|
<a href="#xml-misc-recommentation" id=xmr-empty-not-emptyelemtag><code>xml-misc-recommendation</code></a>.</li> |
238 |
|
<!-- |
239 |
|
|
240 |
|
#vc-PEinMarkupDecl Validity constraint: Proper Declaration/PE Nesting |
241 |
|
#wfc-PEinInternalSubset Well-formedness constraint: PEs in Internal Subset |
242 |
|
#ExtSubset Well-formedness constraint: External Subset |
243 |
|
#PE-between-Decls Well-formedness constraint: PE Between Declarations |
244 |
|
#GIMatch Well-formedness constraint: Element Type Match |
245 |
|
#uniqattspec Well-formedness constraint: Unique Att Spec |
246 |
|
#NoExternalRefs Well-formedness constraint: No External Entity References |
247 |
|
#CleanAttrVals Well-formedness constraint: No < in Attribute Values |
248 |
|
|
249 |
|
@@ Need detailed review, but maybe should be in parsing phase |
250 |
|
|
251 |
|
#vc-check-rmd Validity constraint: Standalone Document Declaration |
252 |
|
|
253 |
|
--> |
254 |
|
</ul> |
255 |
|
</div> |
256 |
|
|
257 |
|
<div class="section" id=checking-dom> |
258 |
|
<h2>Checking <abbr>DOM</abbr></h2> |
259 |
|
|
260 |
|
<p>The following algorithms and definitions are applied to |
261 |
|
<abbr>XML</abbr> documents; especially, they are not applied |
262 |
|
to <abbr>HTML</abbr> documents.<!-- TODO: ref to HTML5 --></p> |
263 |
|
|
264 |
<div class=section id=definitions> |
<div class=section id=definitions> |
265 |
<h3>Definitions</h3> |
<h3>Definitions</h3> |
266 |
|
|
321 |
<span class=ed>@@ except for attribute names <code>xml:lang</code>, |
<span class=ed>@@ except for attribute names <code>xml:lang</code>, |
322 |
<code>xml:space</code>, <code>xml:base</code>, <code>xml:id</code>, |
<code>xml:space</code>, <code>xml:base</code>, <code>xml:id</code>, |
323 |
<code>xmlns</code>, <code>xmlns:<var>*</var></code>, |
<code>xmlns</code>, <code>xmlns:<var>*</var></code>, |
324 |
pi name <code>xml-stylesheet</code>.</span></li> |
pi name <code>xml-stylesheet</code>.</span><!-- |
325 |
|
"names beginning with a match to (('X'|'x')('M'|'m')('L'|'l')) are reserved for standardization in this or future versions of this specification.": |
326 |
|
xml:base and xml:id specifications violate to this sentense! |
327 |
|
--></li> |
328 |
<!-- COLON in Name is a lowercase "should not" in a Note of [XML10], |
<!-- COLON in Name is a lowercase "should not" in a Note of [XML10], |
329 |
[XML11]. --> |
[XML11]. --> |
330 |
<li class=ed>@@</li> |
<li class=ed>@@</li> |
403 |
successor] or an empty string, then xml-misc-warning |
successor] or an empty string, then xml-misc-warning |
404 |
(a "fact"-level error; not an XML error).</li> |
(a "fact"-level error; not an XML error).</li> |
405 |
<li class=ed>@@ <code>specified</code>, |
<li class=ed>@@ <code>specified</code>, |
406 |
<code>manakaiAttributeType</code></li> |
<code>manakaiAttributeType</code> (#ValueType Validity constraint: Attribute Value Type)</li> |
407 |
<!-- xml:space MUST be declared to be valid. --> |
<!-- xml:space MUST be declared to be valid. --> |
408 |
</ol> |
</ol> |
409 |
</dd> |
</dd> |
579 |
<a href="#algorithm-to-check-a-node" title="check a node">check |
<a href="#algorithm-to-check-a-node" title="check a node">check |
580 |
<var>n<sub><var>c</var></sub></var></a> recursively.</li> |
<var>n<sub><var>c</var></sub></var></a> recursively.</li> |
581 |
</ol></li> |
</ol></li> |
582 |
|
<li class=ed>@@ #elementvalid Validity constraint: Element Valid</li> |
583 |
|
<li class=ed>@@ #uniqattspec Well-formedness constraint: Unique Att Spec</li> |
584 |
</ol> |
</ol> |
585 |
</dd> |
</dd> |
586 |
<dt>If <var>n</var> is an <code>ElementTypeDefinition</code> node</dt> |
<dt>If <var>n</var> is an <code>ElementTypeDefinition</code> node</dt> |