/[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.5 - (hide annotations) (download) (as text)
Mon Nov 12 12:53:50 2007 UTC (17 years ago) by wakaba
Branch: MAIN
Changes since 1.4: +20 -24 lines
File MIME type: text/html
Make validate-a-public-id a standalone algorithm

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

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24