/[suikacvs]/markup/xml/xmlcc/xmlcc-work.en.html
Suika

Contents of /markup/xml/xmlcc/xmlcc-work.en.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (hide annotations) (download) (as text)
Mon Nov 12 13:14:13 2007 UTC (17 years ago) by wakaba
Branch: MAIN
Changes since 1.5: +27 -8 lines
File MIME type: text/html
public id validation revised

1 wakaba 1.1 <!DOCTYPE html>
2     <html lang="en" class="formal-specification status-work-in-progress">
3     <head>
4 wakaba 1.2 <title>manakai's XML Conformance Checking</title>
5 wakaba 1.1 <link rel="stylesheet" href="http://suika.fam.cx/www/style/html/spec">
6     <link rel="license" href="http://suika.fam.cx/c/gnu/fdl">
7 wakaba 1.6 <style>
8     a[id]::before {
9     content: "[" attr(id) "]";
10     color: gray;
11     font-size: 70%;
12     font-family: Courier New, monospace;
13     vertical-align: 60%;
14     }
15     </style>
16 wakaba 1.1 </head>
17     <body class="has-abstract">
18    
19     <div class="header">
20 wakaba 1.2 <h1>manakai's XML Conformance Checking</h1>
21     <h2>Working Draft <time datetime=2007-11-12>12 November 2007</time></h2>
22 wakaba 1.1
23 wakaba 1.2 <dl class="versions-uri">
24 wakaba 1.1 <dt>This Version</dt>
25 wakaba 1.2 <dd><code class="URI">&lt;<a href="http://suika.fam.cx/www/markup/xml/xmlcc/xmlcc-work"
26     >http://suika.fam.cx/www/markup/xml/xmlcc/xmlcc-work</a>&gt;</code></dd>
27 wakaba 1.1 <dt>Latest Version</dt>
28 wakaba 1.2 <dd><code class="URI">&lt;<a href="http://suika.fam.cx/www/markup/xml/xmlcc/xmlcc"
29     >http://suika.fam.cx/www/markup/xml/xmlcc/xmlcc</a>&gt;</code></dd>
30 wakaba 1.1 <dt>Latest Working Draft</dt>
31 wakaba 1.2 <dd><code class="URI">&lt;<a href="http://suika.fam.cx/www/markup/xml/xmlcc/xmlcc-work"
32     >http://suika.fam.cx/www/markup/xml/xmlcc/xmlcc-work</a>&gt;</code></dd>
33 wakaba 1.1 <!-- <dt>Previous Version</dt> -->
34     <dt>Version History</dt>
35 wakaba 1.2 <dd><code class=URI>&lt;<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>&gt;</code></dd>
36 wakaba 1.1 </dl>
37     <dl class="authors" id="author">
38     <dt>Author</dt>
39     <dd><a href="http://suika.fam.cx/~wakaba/who?" rel="author"
40     lang=ja>Wakaba</a>
41     <code class="mail">&lt;<a href="mailto:w@suika.fam.cx" rel="author"
42     >w@suika.fam.cx</a>&gt;</code></dd>
43     </dl>
44    
45     <p class="copyright" lang="en">&#xA9; <time>2007</time> <a
46     href="http://suika.fam.cx/~wakaba/who?" rel="author">Wakaba</a>.
47     Permission is granted to copy, distribute and/or modify this document
48     under the terms of the <a rel="license"
49     href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License</a>,
50     Version 1.2
51     or any later version published by the <a
52     href="http://www.fsf.org/">Free Software Foundation</a>;
53     with no Invariant Sections, no Front$B!>(BCover Texts, and no Back$B!>(BCover
54     Texts. A copy of the license is
55     available at <code class="URI">&lt;<a
56     href="http://www.gnu.org/copyleft/fdl.html"
57     rel="license">http://www.gnu.org/copyleft/fdl.html</a>&gt;</code>.</p>
58     </div>
59    
60     <div id="abstract" class="section">
61     <h2>Abstract</h2>
62    
63     <div class="ed issue">...</div>
64    
65     </div>
66    
67     <div id="status" class="section">
68     <h2>Status of This Document</h2>
69    
70     <p class=section-info><em>This section describes the status of this document
71     at the time of its publication. Other documents
72     might supersede this document.</em></p>
73    
74     <p>This document is a working draft, produced as part of the
75     <a href="http://suika.fam.cx/www/markup/html/whatpm/readme">Whatpm</a>
76     subproject of the
77     <a href="http://suika.fam.cx/www/manakai-core/doc/web/">manakai</a>
78     project. It might be updated, replaced, or obsoleted by
79     other documents at any time. It is inappropriate to
80     cite this document as other than <q>work in progress</q>.</p>
81    
82     <p>Comments on this document are welcome and
83     may be sent to the <a href="#author">author</a>.</p>
84    
85     <p>Translations of thie document might be available.
86     The English version of the document is the only
87     normative version.</p>
88     </div>
89    
90     <div id="introduction" class="section">
91     <h2>Introduction</h2>
92    
93     <p class=section-info>This section is <em>non$B!>(Bnormative</em>.</p>
94    
95     <div class="issue ed">...</div>
96    
97    
98     </div>
99    
100     <div class="section" id="terminology">
101     <h2>Terminology</h2>
102    
103     <p>The key words <q><em class="rfc2119">MUST</em></q>,
104     <q><em class="rfc2119">MUST NOT</em></q>,
105     <q><em class="rfc2119">SHOULD</em></q>,
106     <q><em class="rfc2119">SHOULD NOT</em></q>, and
107     <q><em class=rfc2119>MAY</em></q> in this
108     document are to be interpreted as described in
109     <a href="urn:ietf:rfc:2119"><abbr title="Request for Comments">RFC</abbr>
110     2119</a>
111     <cite class="bibref normative">[<a href="#ref-KEYWORDS">KEYWORDS</a>]</cite>.</p>
112    
113     <!-- Strictly speaking the paragraph below is not part of terminology. -->
114     <p>All examples and notes in this specification are non$B!>(Bnormative,
115     as are all sections explicitly marked non$B!>(Bnormative. Everything
116     else in this specification is normative.</p>
117    
118     <p><span class=ed>Algorithm is normative but non-normative</span>.
119     In addition, the order in which <a href="#errors">errors</a> are
120     raised is undefined.</p>
121     </div>
122    
123     <div class="section">
124     <h2 class=ed>Algorithms</h2>
125    
126     <p>The following algorithms and definitions are applied to
127     <abbr>XML</abbr> documents; especially, they are not applied
128     to <abbr>HTML</abbr> documents.<!-- TODO: ref to HTML5 --></p>
129    
130     <p class=ed>If a <code>Document</code> node has no
131     xml-well-formedness-error, entity-error, and unknown-error,
132     then it is well-formed. If a well-formed <code>Document</code>
133     node has no xml-validity-error, it is valid.</p>
134    
135     <div class="note memo">
136     <p>A well$B!>(Bformed <code>Document</code> can be safely serialized
137     into a well$B!>(Bformed XML document. A valid <code>Document</code>
138     can be easily serialized into a valid XML document.</p>
139     </div>
140    
141     <p>Errors are classified into these
142     <dfn id=error-category title="error category">error categories</dfn>:</p>
143    
144     <dl id=errors>
145     <dt><dfn id=entity-error><code>entity-error</code></dfn></dt>
146 wakaba 1.4 <dd>
147     <p class=ed>@@</p>
148     <div class="note memo">
149     <p>This <span class=ed>algorithm</span> does not support
150     <abbr>DOM</abbr> tree with one or more <code>EntityReference</code>
151     nodes. It is expected that any entity references are expanded
152     at the parse time and any unexpandable entity references
153     make parse time errors raised so that never result in
154     <abbr>DOM</abbr> tree with <code>EntityReference</code> nodes.</p>
155     </div>
156     </dd>
157 wakaba 1.1 <dt><dfn id=round-trip-error><code>round-trip-error</code></dfn></dt>
158     <dd class=ed>@@</dd>
159     <dt class=ed><dfn id=unknown-error><code>unknown-error</code></dfn>?</dt>
160     <dd class=ed>@@</dd>
161     <dt><dfn id=xml-misc-error><code>xml-misc-error</code></dt>
162     <dd>An <abbr>XML</abbr> <i>error</i> (<abbr>XML</abbr> 1.0
163     <cite class="bibref normative">[<a href="#ref-XML10">XML10</a>]</cite>
164     <a href="http://www.w3.org/TR/2006/REC-xml-20060816/#dt-error">error</a> /
165     <abbr>XML</abbr> 1.1
166     <cite class="bibref normative">[<a href="#ref-XML11">XML11</a>]</cite>
167     <a href="@@/#dt-error">error</a>)
168     that is not classified to any other <a href="#error-category">error
169     category</a>.</dd>
170     <dt><dfn id=xml-misc-fatal-error><code>xml-misc-fatal-error</code></dt>
171     <dd>An <abbr>XML</abbr> <i>fatal error</i> (<abbr>XML</abbr> 1.0
172     <cite class="bibref normative">[<a href="#ref-XML10">XML10</a>]</cite>
173     <a href="http://www.w3.org/TR/2006/REC-xml-20060816/#dt-fatal">fatal
174     error</a> / <abbr>XML</abbr> 1.1
175     <cite class="bibref normative">[<a href="#ref-XML11">XML11</a>]</cite>
176     <a href="@@/#dt-fatal">fatal error</a>)
177     that is not classified to any other <a href="#error-category">error
178     category</a>. <span class=ed>@@ What errors fall into this category?</span></dd>
179     <dt><dfn id=xml-validity-error><code>xml-validity-error</code></dfn></dt>
180     <dd>A violation of validity constraint in XML document.</dd>
181     <dt><dfn id=xml-well-formedness-error><code>xml-well-formedness-error</code></dfn></dt>
182     <dd><p>If an <code>xml-well-formedness-error</code> is raised,
183     it would not be possible to generate an XML serialization that
184     would match to the appropriate production rule and that would not
185     violate to any well$B!>(Bformedness constraint in XML
186     specification <cite class="bibref normative">[<a href="#ref-XML10">XML10</a>,
187     <a href="#ref-XML11">XML11</a>]</cite>.</p></dd>
188     </dl>
189    
190     <div class=ed><p>@@ TODO: #dt-atuseroption at user option
191     (MAY or MUST), #dt-compat for compatibility,
192     #dt-interop for interoperability</p></div>
193    
194     <p>The <dfn id=xml-version><abbr>XML</abbr> version</dfn> of a node is
195     the <abbr>XML</abbr> version of the document to which the node belongs.
196     For a <code>Documemt</code> node, the <abbr>XML</abbr> version
197     of the document is the value of the <code>xmlVersion</code>
198     attribute. For a <code>DocumentType</code> node whose
199     <code>ownerDocument</code> is set to <code>null</code>,
200     the <abbr>XML</abbr> version of the document is <code>1.0</code>.
201     For any other node, the <abbr>XML</abbr> version of the document
202     is that of the <code>Document</code> node contained in the
203     <code>ownerDocument</code> attribute of the node.</p>
204    
205     <p>The algorithm <dfn title="to check a node" id=algorithm-to-check-a-node>to
206     check a node (<dfn id=var-n><var>n</var></dfn>)</dfn> is defined as
207     following:</p>
208     <dl class=switch>
209     <dt>If <var>n</var> is an <code>Attr</code> node</dt>
210     <dd>
211     <ol>
212     <li><a href="#algorithm-to-validate-a-ncname">Validate the
213     <code>localName</code> attribute value as an <code>NCName</code></a>.</li>
214     <li>If the <code>prefix</code> attribute value is different from
215     <code>null</code>, then <a href="#algorithm-to-validate-a-ncname">validate
216     the <code>prefix</code> attribute value as an <code>NCName</code></a>.</li>
217     <li>If the <code>childNodes</code> list of <var>n</var> contains
218     a node which is <em>not</em> <code>Text</code> or
219     <code>EntityReference</code> node, then it is a
220     <a href="#xml-well-formedness-error" id=wfe-attr-child><code>xml-well-formedness-error</code></a>.</li>
221     <li>If the <code>childNodes</code> list of <var>n</var> contains
222     an <code>EntityReference</code> node, it is an
223     <a href="#entity-error" id=ee-er-in-attr><code>entity-error</code></a>.</li>
224 wakaba 1.4 <li><a href="#algorithm-to-check-a-node">Check each node</a>, in
225     <code>childNodes</code> list of <var>n</var>,
226     which is different from <code>EntityReference</code> recursively.</li>
227 wakaba 1.1 <li class=ed>@@ <code>specified</code>,
228     <code>manakaiAttributeType</code></li>
229     </ol>
230     </dd>
231     <dt>If <var>n</var> is an <code>AttributeDefinition</code> node</dt>
232     <dd class=ed></dd>
233     <dt>If <var>n</var> is a <code>CDATASection</code> node</dt>
234     <dd>
235     <ol>
236     <li><a href="#algorithm-to-validate-an-xml-character-data">Validate the
237     <code>data</code> attribute value as an <abbr>XML</abbr> character
238     data</a>.</li>
239     <li>If the <code>data</code> attribute value contains
240     a string <code>]]></code>, then it is a
241     <a href="#xml-well-formedness-error" id=wfe-cs-mse><code>xml-well-formedness-error</code></a>.</li>
242     <li>If the <code>childNodes</code> list of <var>n</var> contains
243     any nodes, they are in
244     <a href="#xml-well-formedness-error" id=wfe-cs-child><code>xml-well-formedness-error</code></a>s.</li>
245     </ol>
246     </dd>
247     <dt>If <var>n</var> is a <code>Comment</code> node</dt>
248     <dd>
249     <ol>
250     <li><a href="#algorithm-to-validate-an-xml-character-data">Validate the
251     <code>data</code> attribute value as an <abbr>XML</abbr> character
252     data</a>.</li>
253     <li>If the <code>data</code> attribute value contains
254     a string <code>--</code>, or if it ends with a character
255     <code>-</code>, then it is a
256     <a href="#xml-well-formedness-error" id=wfe-comment-com><code>xml-well-formedness-error</code></a>.</li>
257     <li>If the <code>childNodes</code> list of <var>n</var> contains
258     any nodes, they are in
259     <a href="#xml-well-formedness-error" id=wfe-comment-child><code>xml-well-formedness-error</code></a>s.</li>
260     </ol>
261     </dd>
262     <dt>If <var>n</var> is a <code>Document</code> node</dt>
263     <dd>
264     <ol>
265     <li>If <a href="#xml-version"><abbr>XML</abbr> version</a> of <var>n</var>
266     is different from <code>1.0</code> or <code>1.1</code>,
267     then it is an <code class=ed>unknown-error?</code>.</li>
268     <li>If the <code>xmlEncoding</code> attribute value does <em>not</em>
269     match to <code>[A-Za-z] ([A-Za-z0-9._] | '-')*</code>
270     <span class=ed>@@ formal def</span>, then it is a
271     <a href="#xml-well-formedness-error" id=wfe-encoding><code>xml-well-formedness-error</code></a>.</li>
272     <li>The <code>childNodes</code> list of <var>n</var> have to
273     consist of zero or more <code>Comment</code> and/or
274     <code>ProcessingInstruction</code> nodes, followed by
275     an optional <code>DocumentType</code> node, followed
276     by zero or more <code>Comment</code> and/or
277     <code>ProcessingInstruction</code> nodes, followed by
278     an <code>Element</code> node, followed
279     by zero or more <code>Comment</code> and/or
280     <code>ProcessingInstruction</code> nodes. Any violation to this is a
281     <a href="#xml-well-formedness-error" id=wfe-document-child><code>xml-well-formedness-error</code></a>.</li>
282 wakaba 1.4 <li><a href="#algorithm-to-check-a-node">Check each node</a>, in
283     <code>childNodes</code> list of <var>n</var>,
284     which is different from <code>EntityReference</code> recursively.</li>
285 wakaba 1.1 <li class=ed>@@ <code>allDeclarationsProcessed</code></li>
286     </ol>
287     </dd>
288     <dt>If <var>n</var> is a <code>DocumentFragment</code> node</dt>
289     <dd>
290     <ol>
291     <li>If the <code>childNodes</code> list of <var>n</var> contains
292     a node which is <em>not</em> <code>Element</code>,
293     <code>Text</code>, <code>CDATASection</code>, <code>Comment</code>,
294     <code>ProcessingInstruction</code>, or
295     <code>EntityReference</code> node, then it is a
296     <a href="#xml-well-formedness-error" id=wfe-df-child><code>xml-well-formedness-error</code></a>.</li>
297     <li>If the <code>childNodes</code> list of <var>n</var> contains
298     an <code>EntityReference</code> node, it is an
299     <a href="#entity-error" id=ee-er-in-df><code>entity-error</code></a>.</li>
300 wakaba 1.4 <li><a href="#algorithm-to-check-a-node">Check each node</a>, in
301     <code>childNodes</code> list of <var>n</var>
302     which is different from <code>EntityReference</code> recursively.</li>
303 wakaba 1.1 </ol>
304     </dd>
305     <dt>If <var>n</var> is a <code>DocumentType</code> node</dt>
306     <dd>
307     <ol>
308     <li><a href="#algorithm-to-validate-a-ncname">Validate the
309     <code>nodeName</code> attribute value as an <code>NCName</code></a>.</li>
310 wakaba 1.5 <li><a href="#algorithm-to-validate-a-public-identifier" title="validate a public identifier">Validate
311     the <code>publicId</code> attribute value as a public identifier</a>.</li>
312 wakaba 1.1 <li>If the <code>systemId</code> attribute value contains
313     both <code>"</code> and <code>'</code> characters, it is a
314     <a href="#xml-well-formedness-error" id=wfe-dt-system-id><code>xml-well-formedness-error</code></a>.</li>
315     <!-- publicId = non-null and systemId = null -->
316     <li>If the <code>childNodes</code> list of <var>n</var> contains
317     a node which is <em>not</em> <code>ProcessingInstruction</code> node,
318     then it is a
319     <a href="#xml-well-formedness-error" id=wfe-dt-child><code>xml-well-formedness-error</code></a>.
320     <span class=ed>@@ ref to manakai's extensions</span></li>
321 wakaba 1.4 <li><a href="#algorithm-to-check-a-node">Check each node</a>, in
322     <code>childNodes</code> list of <var>n</var>,
323     which is different from <code>EntityReference</code> recursively.</li>
324 wakaba 1.1 <li class=ed>@@ <code>entities</code>, <code>notations</code>,
325     <code>elementTypes</code>, externally declared?</li>
326     </ol>
327     </dd>
328     <dt>If <var>n</var> is an <code>Element</code> node</dt>
329     <dd>
330     <ol>
331     <li><a href="#algorithm-to-validate-a-ncname">Validate the
332     <code>localName</code> attribute value as an <code>NCName</code></a>.</li>
333     <li>If the <code>prefix</code> attribute value is different from
334     <code>null</code>, then <a href="#algorithm-to-validate-a-ncname">validate
335     the <code>prefix</code> attribute value as an <code>NCName</code></a>.</li>
336     <li>If the <code>childNodes</code> list of <var>n</var> contains
337     a node which is <em>not</em> <code>Element</code>,
338     <code>Text</code>, <code>CDATASection</code>, <code>Comment</code>,
339     <code>ProcessingInstruction</code>, or
340     <code>EntityReference</code> node, then it is a
341     <a href="#xml-well-formedness-error" id=wfe-element-child><code>xml-well-formedness-error</code></a>.</li>
342     <li>If the <code>childNodes</code> list of <var>n</var> contains
343     an <code>EntityReference</code> node, it is an
344     <a href="#entity-error" id=ee-er-in-element><code>entity-error</code></a>.</li>
345 wakaba 1.4 <li><a href="#algorithm-to-check-a-node">Check each node</a>, in
346     <code>childNodes</code> list of <var>n</var>,
347     which is different from <code>EntityReference</code> recursively.</li>
348 wakaba 1.1 </ol>
349     </dd>
350     <dt>If <var>n</var> is an <code>ElementTypeDefinition</code> node</dt>
351     <dd class=ed></dd>
352     <dt>If <var>n</var> is an <code>Entity</code> node</dt>
353     <dd>
354     <ol>
355     <li>An <a href="#entity-error" id=ee-entity-node><code>entity-error</code></a> <span class=ed>@@ if !notationName</span>.</li>
356     <li><a href="#algorithm-to-validate-a-ncname">Validate the
357     <code>nodeName</code> attribute value as an <code>NCName</code></a>.</li>
358 wakaba 1.5 <li><a href="#algorithm-to-validate-a-public-identifier" title="validate a public identifier">Validate
359     the <code>publicId</code> attribute value as a public identifier</a>.</li>
360 wakaba 1.1 <li>If the <code>systemId</code> attribute value contains
361     both <code>"</code> and <code>'</code> characters, it is a
362     <a href="#xml-well-formedness-error" id=wfe-dt-system-id><code>xml-well-formedness-error</code></a>.</li>
363     <!-- publicId = non-null and systemId = null -->
364     <li class=ed>@@ <code>notationName</code></li>
365     <li>If the <code>childNodes</code> list of <var>n</var> contains
366     a node which is <em>not</em> <code>Element</code>,
367     <code>Text</code>, <code>CDATASection</code>, <code>Comment</code>,
368     <code>ProcessingInstruction</code>, or
369     <code>EntityReference</code> node, then it is a
370     <a href="#xml-well-formedness-error" id=wfe-entity-child><code>xml-well-formedness-error</code></a>.</li>
371     <li>If the <code>childNodes</code> list of <var>n</var> contains
372     an <code>EntityReference</code> node, it is an
373     <a href="#entity-error" id=ee-er-in-er><code>entity-error</code></a>.</li>
374 wakaba 1.4 <li><a href="#algorithm-to-check-a-node">Check each node</a>, in
375     <code>childNodes</code> list of <var>n</var>,
376     which is different from <code>EntityReference</code> recursively.</li>
377 wakaba 1.1 </ol>
378     </dd>
379     <dt>If <var>n</var> is an <code>EntityReference</code> node</dt>
380     <dd>
381     <ol>
382     <li>An <a href="#entity-error" id=ee-er-node><code>entity-error</code></a>.</li>
383     <li><a href="#algorithm-to-validate-a-ncname">Validate the
384     <code>nodeName</code> attribute value as an <code>NCName</code></a>.</li>
385     <li>If the <code>childNodes</code> list of <var>n</var> contains
386     a node which is <em>not</em> <code>Element</code>,
387     <code>Text</code>, <code>CDATASection</code>, <code>Comment</code>,
388     <code>ProcessingInstruction</code>, or
389     <code>EntityReference</code> node, then it is a
390     <a href="#xml-well-formedness-error" id=wfe-er-child><code>xml-well-formedness-error</code></a>.</li>
391     <li>If the <code>childNodes</code> list of <var>n</var> contains
392     an <code>EntityReference</code> node, it is an
393     <a href="#entity-error" id=ee-er-in-entity><code>entity-error</code></a>.</li>
394 wakaba 1.4 <li><a href="#algorithm-to-check-a-node">Check each node</a>, in
395     <code>childNodes</code> list of <var>n</var>,
396     which is different from <code>EntityReference</code> recursively.</li>
397 wakaba 1.1 </ol>
398     </dd>
399     <dt>If <var>n</var> is a <code>Notation</code> node</dt>
400     <dd>
401     <ol>
402     <li><a href="#algorithm-to-validate-a-ncname">Validate the
403     <code>nodeName</code> attribute value as an <code>NCName</code></a>.</li>
404 wakaba 1.5 <li><a href="#algorithm-to-validate-a-public-identifier" title="validate a public identifier">Validate
405     the <code>publicId</code> attribute value as a public identifier</a>.</li>
406 wakaba 1.1 <li>If the <code>systemId</code> attribute value contains
407     both <code>"</code> and <code>'</code> characters, it is a
408     <a href="#xml-well-formedness-error" id=wfe-dt-system-id><code>xml-well-formedness-error</code></a>.</li>
409     <li>If the <code>childNodes</code> list of <var>n</var> contains
410     any nodes, they are in
411     <a href="#xml-well-formedness-error" id=wfe-notation-child><code>xml-well-formedness-error</code></a>s.</li>
412     </ol>
413     </dd>
414     <dt>If <var>n</var> is a <code>ProcessingInstruction</code> node</dt>
415     <dd>
416     <ol>
417     <li><a href="#algorithm-to-validate-a-ncname">Validate the
418     <code>target</code> attribute value as an <code>NCName</code></a>.</li>
419     <li>If the <code>target</code> attribute value matches to
420     <code>XML</code> case-insensitively, then it is a
421     <a href="#xml-well-formedness-error" id=wfe-pi-xml><code>xml-well-formedness-error</code></a>.</li>
422     <li><a href="#algorithm-to-validate-an-xml-character-data">Validate the
423     <code>data</code> attribute value as an <abbr>XML</abbr> character
424     data</a>.</li>
425     <li>If the <code>data</code> attribute value contains
426     a string <code>?></code>, or starts with either
427     <code class=char>U+0009</code>, <code class=char>U+000A</code>,
428     <code class=char>U+000D</code>, or <code class=char>U+0020</code>
429     character, then it is a
430     <a href="#round-trip-error" id=rte-pi-data><code>round-trip-error</code></a>.</li>
431     <li>If the <code>childNodes</code> list of <var>n</var> contains
432     any nodes, they are in
433     <a href="#xml-well-formedness-error" id=wfe-pi-child><code>xml-well-formedness-error</code></a>s.</li>
434     </ol>
435     </dd>
436     <dt>If <var>n</var> is a <code>Text</code> node</dt>
437     <dd>
438     <ol>
439     <li><a href="#algorithm-to-validate-an-xml-character-data">Validate the
440     <code>data</code> attribute value as an <abbr>XML</abbr> character
441     data</a>.</li>
442     <li>If the <code>childNodes</code> list of <var>n</var> contains
443     any nodes, they are in
444     <a href="#xml-well-formedness-error" id=wfe-text-child><code>xml-well-formedness-error</code></a>s.</li>
445     </ol>
446     </dd>
447     <dt>Otherwise</dt>
448     <dd><span class=ed>xml-well-formedness-error? unknown-error?</span></dd>
449     </dl>
450    
451     <p>The algorithm
452     <dfn id=algorithm-to-validate-an-xml-character-data title-"to validate an XML character data">to
453     validate an <abbr>XML</abbr> character data
454     (<dfn id=var-s><var>s</var></dfn>)</dfn> is defined as following:</p>
455     <ol>
456     <li class=ed>@@</li>
457     </ol>
458    
459     <p>The algorithm
460     <dfn id=algorithm-to-validate-a-name title="to validate a Name">to validate a
461     <code>Name</code> (<dfn id=var-name><var>name</var></dfn>)</dfn> is defined
462     as following:</p>
463     <ol>
464     <li class=ed>@@</li>
465     </ol>
466    
467     <p>The algorithm
468     <dfn id=algorithm-to-validate-a-ncname title="to validate an NCName">to
469     validate an <code>NCName</code> (<dfn id=var-name><var>name</var></dfn>)</dfn>
470     is defined as following:</p>
471     <ol>
472     <li class=ed>@@</li>
473 wakaba 1.5 </ol>
474    
475     <p>To <dfn id=algorithm-to-validate-a-public-identifier title="validate a public identifier">validate
476     a public identifier (<dfn id=var-pid><var>pid</var></dfn>)</dfn>, the
477     algorithm below <em class=rfc2119>MUST</em> be used:</p>
478     <ol>
479 wakaba 1.6 <li>If <var>pid</var> contains any character
480     that is outside of the range of <code>#x20 | #xD | #xA |
481     [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]</code><!-- @@ TODO: formal def -->,
482     then it is an
483     <a href="#xml-well-formedness-error" id=wfe-pubid-char><code>xml-well-formedness-error</code></a>.</li>
484     <li>If <var>pid</var> contains one of <code class=char>U+0009</code>
485     <code class=charname>CHARACTER TABULATION</code>,
486     <code class=char>U+000A</code> <code class=charname>CARRIAGE RETURN</code>,
487     and <code class=char>U+000D</code> <code class=charname>LINE FEED</code>
488     characters, if the first character of <var>pid</var> is
489     <code class=char>U+0020</code> <code class=charname>SPACE</code> character,
490     if the last character of <var>pid</var> is <code class=char>U+0020</code>
491     <code class=charname>SPACE</code> character, or if there is a
492     <code class=char>U+0020</code> <code class=charname>SPACE</code> character
493     immediately followed by another <code class=char>U+0020</code>
494     <code class=charname>SPACE</code> character in <var>pid</var>, then it is a
495     <a href="#round-trip-error" id=rte-pubid-space><code>round-trip-error</code></a>.</li>
496     <li class=ed>@@ Should we check formal-public-identifierness?</li>
497 wakaba 1.1 </ol>
498    
499     </div>
500    
501     <div class="section" id="examples">
502     <h2>Examples</h2>
503    
504     <p class=section-info>This section is <em>non$B!>(Bnormative</em>.</p>
505    
506     <div class="ed issue">
507    
508     <div class="example figure block">
509     <div class="caption">...</div>
510    
511     <pre><code>...</code></pre>
512     </div>
513    
514     </div>
515    
516     </div>
517    
518     <div id="references" class="section reference">
519     <h2>References</h2>
520    
521     <div id="normative-references" class="section normative reference">
522     <h3>Normative References</h3>
523    
524     <dl>
525 wakaba 1.3 <dt id=ref-DOM3CORE>DOM3CORE</dt>
526     <dd class=ed>@@ W3C DOM Level 3 Core</dd>
527     <dt id=ref-DOMDTDEF>DOMDTDEF</dt>
528     <dd class=ed>@@ manakai's extension to DOM for document type definitions</dd>
529 wakaba 1.1 <dt id="ref-KEYWORDS">KEYWORDS</dt>
530     <dd><cite><a href="urn:ietf:rfc:2119">Key words for use in
531     <abbr>RFCs</abbr> to Indicate Requirement Levels</a></cite>,
532     <abbr title="Internet Engineering Task Force">IETF</abbr>
533     <a href="urn:ietf:bcp:14"><abbr title="Best Current Practice">BCP</abbr>
534     14</a>, <abbr title="Request for Comments">RFC</abbr> 2119,
535     <time datetime=1997-03>March 1997</time>.
536     <em>This</em> version of the specification is referenced.</dd>
537     <dt id=ref-INFOSET>INFOSET</dt>
538     <dd class=ed>@@</dd>
539     <dt id=ref-XML10">XML10</dt>
540     <dd><cite><a href="http://www.w3.org/TR/2006/REC-xml-20060816">Extensible
541     Markup Language (<abbr>XML</abbr>) 1.0 (Fourth Edition)</a></cite>,
542     <abbr>W3C</abbr> Recommendation, <time datetime=2006-08-16>16 August
543     2006</time>, edited in place <time datetime=2006-09-29>29 September
544     2006</time>. Tje latest version of the specification is available at
545     <code class=uri>&lt;<a href="http://www.w3.org/TR/xml">http://www.w3.org/TR/xml</a>&gt;</code>.
546     <em>This</em> version of the specification is referenced.</dd>
547     <dt id=ref-XML11>XML11</dt>
548     <dd class=ed>@@</dd>
549     </dl>
550     </div>
551    
552     <div id="informative-references" class="section informative reference">
553     <h3>Non$B!>(Bnormative References</h3>
554    
555     <dl class=ed>
556     <dt id=ref-CSS>CSS</dt>
557     <dd><cite><a href="http://www.w3.org/TR/2007/CR-CSS21-20070719">Cascading
558     Style Sheets Level 2 Revision 1 (<abbr>CSS</abbr> 2.1)
559     Specification</a></cite>,
560     <abbr title="World Wide Web Consortium">W3C</abbr> Candidate
561     Recommendation, <time datetime=2007-07-19>19 July 2007</time>.
562     Work in progress. The latest version of the specification is
563     available at
564     <code class=URI>&lt;<a href="http://www.w3.org/TR/CSS21">http://www.w3.org/TR/CSS21</a>></code>.</dd>
565     <dt id=ref-CSSOM>CSSOM</dt>
566     <dd><cite><a href="http://dev.w3.org/cvsweb/~checkout~/csswg/cssom/Overview.html?rev=1.55&amp;content-type=text/html;%20charset=utf-8">Cascading
567     Style Sheets Object Model (<abbr>CSSOM</abbr>)</a></cite>,
568     <abbr title="World Wide Web Consortium">W3C</abbr> Editor's Draft,
569     <time datetime=2007-06-18>18 June 2007</time>. Work in progress.
570     The latest Editor's Draft of the specification is available at
571     <code class=URI>&lt;<a href="http://dev.w3.org/csswg/cssom/Overview.html">http://dev.w3.org/csswg/cssom/Overview.html</a>></code>.</dd>
572     <dt id=ref-HTML5>HTML5</dt>
573     <dd><cite><a href="http://whatwg.org/html5"><abbr>HTML</abbr> 5</a></cite>,
574     <abbr title="Web Hypertext Application Technology Working Group">WHATWG</abbr>
575     Working Draft. Work in progress.</dd>
576     <dt id=ref-SAPI>SAPI</dt>
577     <dd><cite><a href="http://dev.w3.org/cvsweb/~checkout~/2006/webapi/selectors-api/Overview.html?rev=1.28&amp;content-type=text/html;%20charset=utf-8">Selectors <abbr>API</abbr></a></cite>,
578     <abbr title="World Wide Web Consortium">W3C</abbr> Editor's Draft,
579     <time datetime=2007-08-29>29 August 2007</time>. Work in progress.
580     The latest Editor's Draft of the specification is available at
581     <code class=URI>&lt;<a href="http://dev.w3.org/2006/webapi/selectors-api/Overview.html">http://dev.w3.org/2006/webapi/selectors-api/Overview.html</a>></code>.
582     The latest published version of the specification is available at
583     <code class=URI>&lt;<a href="http://www.w3.org/TR/selectors-api/">http://www.w3.org/TR/selectors-api/</a>></code>.</dd>
584     <dt id=XBL2>XBL2</dt>
585     <dd><cite><a href="http://www.mozilla.org/projects/xbl/xbl2.html"><abbr>XBL</abbr>
586     2.0</a></cite>, Mozilla.org, <time datetime=2007-03-15>15 Mar 2007</time>.
587     Work in progress. The latest
588     <abbr title="World Wide Web Consortium">W3C</abbr>$B!>(Bpublished
589     version of the specification is available at
590     <code class=URI>&lt;<a href="http://www.w3.org/TR/xbl/">http://www.w3.org/TR/xbl/</a>></code>.</dd>
591 wakaba 1.3 <dt id=ref-XML5>XML5</dt>
592     <dd class=ed>@@</dd>
593 wakaba 1.1 </dl>
594     </div>
595    
596     </div>
597    
598     </body>
599     </html>

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24