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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by wakaba, Mon Nov 12 12:22:48 2007 UTC revision 1.6 by wakaba, Mon Nov 12 13:14:13 2007 UTC
# Line 1  Line 1 
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 class=ed>DOM XML Checking</title>  <title>manakai's XML Conformance Checking</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="license" href="http://suika.fam.cx/c/gnu/fdl">  <link rel="license" href="http://suika.fam.cx/c/gnu/fdl">
7    <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  </head>  </head>
17  <body class="has-abstract">  <body class="has-abstract">
18    
19  <div class="header">  <div class="header">
20  <h1 class=ed>DOM XML Checking</h1>  <h1>manakai's XML Conformance Checking</h1>
21  <h2>Working Draft <time datetime=2007-10-27>27 October 2007</time></h2>  <h2>Working Draft <time datetime=2007-11-12>12 November 2007</time></h2>
22    
23  <dl class="versions-uri ed">  <dl class="versions-uri">
24  <dt>This Version</dt>  <dt>This Version</dt>
25    <dd><code class="URI">&lt;<a href="http://suika.fam.cx/www/markup/selectors/ssft/ssft"    <dd><code class="URI">&lt;<a href="http://suika.fam.cx/www/markup/xml/xmlcc/xmlcc-work"
26        >http://suika.fam.cx/www/markup/selectors/ssft/ssft</a>&gt;</code></dd>        >http://suika.fam.cx/www/markup/xml/xmlcc/xmlcc-work</a>&gt;</code></dd>
27  <dt>Latest Version</dt>  <dt>Latest Version</dt>
28    <dd><code class="URI">&lt;<a href="http://suika.fam.cx/www/markup/selectors/ssft/ssft"    <dd><code class="URI">&lt;<a href="http://suika.fam.cx/www/markup/xml/xmlcc/xmlcc"
29        >http://suika.fam.cx/www/markup/selectors/ssft/ssft</a>&gt;</code></dd>        >http://suika.fam.cx/www/markup/xml/xmlcc/xmlcc</a>&gt;</code></dd>
 <!--  
30  <dt>Latest Working Draft</dt>  <dt>Latest Working Draft</dt>
31  -->    <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  <!-- <dt>Previous Version</dt> -->  <!-- <dt>Previous Version</dt> -->
34  <dt>Version History</dt>  <dt>Version History</dt>
35    <dd><code class=URI>&lt;<a href="http://suika.fam.cx/gate/cvs/markup/selectors/ssft/ssft.en.html">http://suika.fam.cx/gate/cvs/markup/selectors/ssft/ssft.en.html</a>&gt;</code></dd>    <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  </dl>  </dl>
37  <dl class="authors" id="author">  <dl class="authors" id="author">
38  <dt>Author</dt>  <dt>Author</dt>
# Line 134  can be easily serialized into a valid XM Line 143  can be easily serialized into a valid XM
143    
144  <dl id=errors>  <dl id=errors>
145  <dt><dfn id=entity-error><code>entity-error</code></dfn></dt>  <dt><dfn id=entity-error><code>entity-error</code></dfn></dt>
146    <dd class=ed>@@</dd>    <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  <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>
158    <dd class=ed>@@</dd>    <dd class=ed>@@</dd>
159  <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>
# Line 202  following:</p> Line 221  following:</p>
221      <li>If the <code>childNodes</code> list of <var>n</var> contains      <li>If the <code>childNodes</code> list of <var>n</var> contains
222      an <code>EntityReference</code> node, it is an      an <code>EntityReference</code> node, it is an
223      <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>
224      <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
225      which is different from <code>EntityReference</code> in      <code>childNodes</code> list of <var>n</var>,
226      <code>childNodes</code> list of <var>n</var> recursively.</li>      which is different from <code>EntityReference</code> recursively.</li>
227      <li class=ed>@@ <code>specified</code>,      <li class=ed>@@ <code>specified</code>,
228      <code>manakaiAttributeType</code></li>      <code>manakaiAttributeType</code></li>
229      </ol>      </ol>
# Line 260  following:</p> Line 279  following:</p>
279      by zero or more <code>Comment</code> and/or      by zero or more <code>Comment</code> and/or
280      <code>ProcessingInstruction</code> nodes.  Any violation to this is a      <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>      <a href="#xml-well-formedness-error" id=wfe-document-child><code>xml-well-formedness-error</code></a>.</li>
282      <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
283      which is different from <code>EntityReference</code> in      <code>childNodes</code> list of <var>n</var>,
284      <code>childNodes</code> list of <var>n</var> recursively.</li>      which is different from <code>EntityReference</code> recursively.</li>
285      <li class=ed>@@ <code>allDeclarationsProcessed</code></li>      <li class=ed>@@ <code>allDeclarationsProcessed</code></li>
286      </ol>      </ol>
287    </dd>    </dd>
# Line 278  following:</p> Line 297  following:</p>
297      <li>If the <code>childNodes</code> list of <var>n</var> contains      <li>If the <code>childNodes</code> list of <var>n</var> contains
298      an <code>EntityReference</code> node, it is an      an <code>EntityReference</code> node, it is an
299      <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>
300      <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
301      which is different from <code>EntityReference</code> in      <code>childNodes</code> list of <var>n</var>
302      <code>childNodes</code> list of <var>n</var> recursively.</li>      which is different from <code>EntityReference</code> recursively.</li>
303      </ol>      </ol>
304    </dd>    </dd>
305  <dt>If <var>n</var> is a <code>DocumentType</code> node</dt>  <dt>If <var>n</var> is a <code>DocumentType</code> node</dt>
# Line 288  following:</p> Line 307  following:</p>
307      <ol>      <ol>
308      <li><a href="#algorithm-to-validate-a-ncname">Validate the      <li><a href="#algorithm-to-validate-a-ncname">Validate the
309      <code>nodeName</code> attribute value as an <code>NCName</code></a>.</li>      <code>nodeName</code> attribute value as an <code>NCName</code></a>.</li>
310      <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
311      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>  
312      <li>If the <code>systemId</code> attribute value contains      <li>If the <code>systemId</code> attribute value contains
313      both <code>"</code> and <code>'</code> characters, it is a      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>      <a href="#xml-well-formedness-error" id=wfe-dt-system-id><code>xml-well-formedness-error</code></a>.</li>
# Line 305  following:</p> Line 318  following:</p>
318      then it is a      then it is a
319      <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>.
320      <span class=ed>@@ ref to manakai's extensions</span></li>      <span class=ed>@@ ref to manakai's extensions</span></li>
321      <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
322      which is different from <code>EntityReference</code> in      <code>childNodes</code> list of <var>n</var>,
323      <code>childNodes</code> list of <var>n</var> recursively.</li>      which is different from <code>EntityReference</code> recursively.</li>
324      <li class=ed>@@ <code>entities</code>, <code>notations</code>,      <li class=ed>@@ <code>entities</code>, <code>notations</code>,
325      <code>elementTypes</code>, externally declared?</li>      <code>elementTypes</code>, externally declared?</li>
326      </ol>      </ol>
# Line 329  following:</p> Line 342  following:</p>
342      <li>If the <code>childNodes</code> list of <var>n</var> contains      <li>If the <code>childNodes</code> list of <var>n</var> contains
343      an <code>EntityReference</code> node, it is an      an <code>EntityReference</code> node, it is an
344      <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>
345      <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
346      which is different from <code>EntityReference</code> in      <code>childNodes</code> list of <var>n</var>,
347      <code>childNodes</code> list of <var>n</var> recursively.</li>      which is different from <code>EntityReference</code> recursively.</li>
348      </ol>      </ol>
349    </dd>    </dd>
350  <dt>If <var>n</var> is an <code>ElementTypeDefinition</code> node</dt>  <dt>If <var>n</var> is an <code>ElementTypeDefinition</code> node</dt>
# Line 342  following:</p> Line 355  following:</p>
355      <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>
356      <li><a href="#algorithm-to-validate-a-ncname">Validate the      <li><a href="#algorithm-to-validate-a-ncname">Validate the
357      <code>nodeName</code> attribute value as an <code>NCName</code></a>.</li>      <code>nodeName</code> attribute value as an <code>NCName</code></a>.</li>
358      <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
359      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>  
360      <li>If the <code>systemId</code> attribute value contains      <li>If the <code>systemId</code> attribute value contains
361      both <code>"</code> and <code>'</code> characters, it is a      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>      <a href="#xml-well-formedness-error" id=wfe-dt-system-id><code>xml-well-formedness-error</code></a>.</li>
# Line 364  following:</p> Line 371  following:</p>
371      <li>If the <code>childNodes</code> list of <var>n</var> contains      <li>If the <code>childNodes</code> list of <var>n</var> contains
372      an <code>EntityReference</code> node, it is an      an <code>EntityReference</code> node, it is an
373      <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>
374      <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
375      which is different from <code>EntityReference</code> in      <code>childNodes</code> list of <var>n</var>,
376      <code>childNodes</code> list of <var>n</var> recursively.</li>      which is different from <code>EntityReference</code> recursively.</li>
377      </ol>      </ol>
378    </dd>    </dd>
379  <dt>If <var>n</var> is an <code>EntityReference</code> node</dt>  <dt>If <var>n</var> is an <code>EntityReference</code> node</dt>
# Line 384  following:</p> Line 391  following:</p>
391      <li>If the <code>childNodes</code> list of <var>n</var> contains      <li>If the <code>childNodes</code> list of <var>n</var> contains
392      an <code>EntityReference</code> node, it is an      an <code>EntityReference</code> node, it is an
393      <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>
394      <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
395      which is different from <code>EntityReference</code> in      <code>childNodes</code> list of <var>n</var>,
396      <code>childNodes</code> list of <var>n</var> recursively.</li>      which is different from <code>EntityReference</code> recursively.</li>
397      </ol>      </ol>
398    </dd>    </dd>
399  <dt>If <var>n</var> is a <code>Notation</code> node</dt>  <dt>If <var>n</var> is a <code>Notation</code> node</dt>
# Line 394  following:</p> Line 401  following:</p>
401      <ol>      <ol>
402      <li><a href="#algorithm-to-validate-a-ncname">Validate the      <li><a href="#algorithm-to-validate-a-ncname">Validate the
403      <code>nodeName</code> attribute value as an <code>NCName</code></a>.</li>      <code>nodeName</code> attribute value as an <code>NCName</code></a>.</li>
404      <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
405      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>  
406      <li>If the <code>systemId</code> attribute value contains      <li>If the <code>systemId</code> attribute value contains
407      both <code>"</code> and <code>'</code> characters, it is a      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>      <a href="#xml-well-formedness-error" id=wfe-dt-system-id><code>xml-well-formedness-error</code></a>.</li>
# Line 471  is defined as following:</p> Line 472  is defined as following:</p>
472  <li class=ed>@@</li>  <li class=ed>@@</li>
473  </ol>  </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      <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    </ol>
498    
499  </div>  </div>
500    
501  <div class="section" id="examples">  <div class="section" id="examples">
# Line 497  is defined as following:</p> Line 522  is defined as following:</p>
522  <h3>Normative References</h3>  <h3>Normative References</h3>
523    
524  <dl>  <dl>
525    <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  <dt id="ref-KEYWORDS">KEYWORDS</dt>  <dt id="ref-KEYWORDS">KEYWORDS</dt>
530    <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
531    <abbr>RFCs</abbr> to Indicate Requirement Levels</a></cite>,    <abbr>RFCs</abbr> to Indicate Requirement Levels</a></cite>,
# Line 559  is defined as following:</p> Line 588  is defined as following:</p>
588    <abbr title="World Wide Web Consortium">W3C</abbr>$B!>(Bpublished    <abbr title="World Wide Web Consortium">W3C</abbr>$B!>(Bpublished
589    version of the specification is available at    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>    <code class=URI>&lt;<a href="http://www.w3.org/TR/xbl/">http://www.w3.org/TR/xbl/</a>></code>.</dd>
591    <dt id=ref-XML5>XML5</dt>
592      <dd class=ed>@@</dd>
593  </dl>  </dl>
594  </div>  </div>
595    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.6

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24