/[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.12 by wakaba, Wed Nov 14 11:40:48 2007 UTC revision 1.14 by wakaba, Wed Nov 14 12:30:06 2007 UTC
# Line 120  In addition, the order in which <a href= Line 120  In addition, the order in which <a href=
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 replacement text of an entity declaration is  
 <code>&lt;</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>  
 </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,
# Line 204  can be easily serialized into a valid XM Line 186  can be easily serialized into a valid XM
186    <a href="@@/#dt-fatal">fatal error</a>)    <a href="@@/#dt-fatal">fatal error</a>)
187    that is not classified to any other <a href="#error-category">error    that is not classified to any other <a href="#error-category">error
188    category</a>. <span class=ed>@@ What errors fall into this category?</span></dd>    category</a>. <span class=ed>@@ What errors fall into this category?</span></dd>
189    <dt><dfn id=xml-misc-recommendation><code>xml-misc-recommendation</code></dfn></dt>
190      <dd>
191        <p>An
192        <a href="#xml-misc-recommendation"><code>xml-misc-recommendation</code></a>
193        will be raised if a <em class=rfc2119>SHOULD</em>$B!>(Blevel requirement
194        in <abbr>XML</abbr> specification is not met.</p>
195      </dd>
196  <dt><dfn id=xml-validity-error><code>xml-validity-error</code></dfn></dt>  <dt><dfn id=xml-validity-error><code>xml-validity-error</code></dfn></dt>
197    <dd>A violation of validity constraint in XML document.</dd>    <dd>A violation of validity constraint in XML document.</dd>
198  <dt><dfn id=xml-well-formedness-error><code>xml-well-formedness-error</code></dfn></dt>  <dt><dfn id=xml-well-formedness-error><code>xml-well-formedness-error</code></dfn></dt>
# Line 221  can be easily serialized into a valid XM Line 210  can be easily serialized into a valid XM
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>&lt;</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    <!--
233    
234    #vc-PEinMarkupDecl Validity constraint: Proper Declaration/PE Nesting
235    #wfc-PEinInternalSubset Well-formedness constraint: PEs in Internal Subset
236    #ExtSubset Well-formedness constraint: External Subset
237    #PE-between-Decls Well-formedness constraint: PE Between Declarations
238    
239    @@ Need detailed review, but maybe should be in parsing phase
240    
241    #vc-check-rmd Validity constraint: Standalone Document Declaration
242    
243    -->
244    </ul>
245    </div>
246    
247    <div class="section" id=checking-dom>
248    <h2>Checking <abbr>DOM</abbr></h2>
249    
250    <p>The following algorithms and definitions are applied to
251    <abbr>XML</abbr> documents; especially, they are not applied
252    to <abbr>HTML</abbr> documents.<!-- TODO: ref to HTML5 --></p>
253    
254  <div class=section id=definitions>  <div class=section id=definitions>
255  <h3>Definitions</h3>  <h3>Definitions</h3>
256    
# Line 260  class <a href="#class-ControlChar10"><co Line 290  class <a href="#class-ControlChar10"><co
290  then raise an  then raise an
291  <a href="#xml-misc-warning" id=xmw-control-char><code>xml-misc-warning</code></a>.</li>  <a href="#xml-misc-warning" id=xmw-control-char><code>xml-misc-warning</code></a>.</li>
292  <li class=ed>@@ XML 1.1 support</li>  <li class=ed>@@ XML 1.1 support</li>
293  <li class=ed>@@ If U+000D, round-trip-error</li>  <li>If <var>s</var> contains a <code class=char>U+000D</code>
294    <code class=charname>CARRIAGE RETURN</code> character, then
295    raise a
296    <a href="#round-trip-error" id=rte-cr><code>round-trip-error</code></a>.
297    <span class=ed>@@ We should not raise duplicate errors for U+000D
298    in attribute values.  In addition, we should support a mode where
299    U+000D will be serialized as &#x000D; (so that no round-trip-error
300    will be raised).</span></li>
301  </ol>  </ol>
302    
303  <p>The algorithm  <p>The algorithm
# Line 342  following:</p> Line 379  following:</p>
379        <a href="#algorithm-to-check-a-node" title="check a node">check        <a href="#algorithm-to-check-a-node" title="check a node">check
380        <var>n<sub><var>c</var></sub></var></a> recusrively.</li>        <var>n<sub><var>c</var></sub></var></a> recusrively.</li>
381        </ol></li>        </ol></li>
382        <li>If <code>nodeName</code> attribute of <var>n</var> is
383        <code>xml:space</code> <span class=ed>@@ or {xml namespace}:space ?</span>
384        and <code>value</code> attribute of <var>n</var> is neither
385        <code>default</code> nor <code>preserve</code>, then it is an
386        <a href="#xml-misc-error" id=xme-attr-xml-space><code>xml-misc-error</code></a>.<!--
387        Note that <!ATTLIST e xml:space (default|preserve) "a">...
388        <e xml:space="default"/> is conforming and valid. --></li>
389        <li class=ed>@@ xml:lang value is not a language tag [RFC 3066 or its
390        successor] or an empty string, then xml-misc-warning
391        (a "fact"-level error; not an XML error).</li>
392      <li class=ed>@@ <code>specified</code>,      <li class=ed>@@ <code>specified</code>,
393      <code>manakaiAttributeType</code></li>      <code>manakaiAttributeType</code></li>
394        <!-- xml:space MUST be declared to be valid. -->
395      </ol>      </ol>
396    </dd>    </dd>
397  <dt>If <var>n</var> is an <code>AttributeDefinition</code> node</dt>  <dt>If <var>n</var> is an <code>AttributeDefinition</code> node</dt>
398    <dd>    <dd>
399      <ol>      <ol>
400      <li class=ed></li>      <li class=ed></li>
401        <li>If <code>nodeName</code> attribute of <var>n</var> is
402        <code>xml:space</code> <span class=ed>@@ or {xml namespace}:space ?</span>
403        and <span class=ed>its declared type is different from (default|preserve),
404        (default), or (preserve)</span>, then raise an
405        <a href="#xml-misc-error" id=xme-at-xml-space><code>xml-misc-error</code></a>.</li>
406      <li>For each node <dfn id=var-ad-nc><var>n<sub><var>c</var></sub></var></dfn> in the      <li>For each node <dfn id=var-ad-nc><var>n<sub><var>c</var></sub></var></dfn> in the
407      <code>childNodes</code> list of <var>n</var>,      <code>childNodes</code> list of <var>n</var>,
408        <ol>        <ol>
# Line 453  following:</p> Line 506  following:</p>
506      <ol>      <ol>
507      <li><a href="#algorithm-to-validate-a-ncname">Validate the      <li><a href="#algorithm-to-validate-a-ncname">Validate the
508      <code>nodeName</code> attribute value as an <code>NCName</code></a>.</li>      <code>nodeName</code> attribute value as an <code>NCName</code></a>.</li>
509        <li>Follow the following substeps:
510          <ol>
511          <li>If <code>ownerDocument</code> attribute of <var>n</var> is
512          <code>null</code>, then abort these substeps.</li>
513          <li>If <code>documentElement</code> attribute of the node
514          set to <code>ownerDocument</code> attribute of <var>n</var> is
515          <code>null</code>, then abort these substeps.</li>
516          <li>If <code>nodeName</code> attribute of the node set to
517          <code>documentElement</code> attribute of the node set to
518          <code>ownerDocument</code> attribute of <var>n</var> is
519          different from <code>nodeName</code> of <var>n</var>,
520          then raise an
521          <a href="#xml-validity-error" id=vc-roottype><code>xml-validity-error</code></a>.</li></li>
522          </ol>
523        </li>
524      <li><a href="#algorithm-to-validate-a-public-identifier" title="validate a public identifier">Validate      <li><a href="#algorithm-to-validate-a-public-identifier" title="validate a public identifier">Validate
525      the <code>publicId</code> attribute value as a public identifier</a>.</li>      the <code>publicId</code> attribute value as a public identifier</a>.</li>
526      <li>If the <code>systemId</code> attribute value contains      <li>If the <code>systemId</code> attribute value contains
# Line 582  following:</p> Line 650  following:</p>
650  <dt>If <var>n</var> is a <code>ProcessingInstruction</code> node</dt>  <dt>If <var>n</var> is a <code>ProcessingInstruction</code> node</dt>
651    <dd>    <dd>
652      <ol>      <ol>
653      <li><a href="#algorithm-to-validate-a-ncname">Validate the      <li>If the <code>target</code> attribute value matches to the string
654      <code>target</code> attribute value as an <code>NCName</code></a>.</li>      <code>xml</code> in any case combination, then raise a
     <li>If the <code>target</code> attribute value matches to  
     <code>XML</code> case-insensitively, then it is a  
655      <a href="#xml-well-formedness-error" id=wfe-pi-xml><code>xml-well-formedness-error</code></a>.</li>      <a href="#xml-well-formedness-error" id=wfe-pi-xml><code>xml-well-formedness-error</code></a>.</li>
656      <li><a href="#algorithm-to-validate-an-xml-character-data">Validate the      <li>Otherwise, <a href="#algorithm-to-validate-a-ncname">validate the
657      <code>data</code> attribute value as an <abbr>XML</abbr> character      <code>target</code> attribute value as an <code>NCName</code></a>.</li>
658        <li>Then,
659        <a href="#algorithm-to-validate-an-xml-character-data" title="validate an XML character data">validate
660        the <code>data</code> attribute value as an <abbr>XML</abbr> character
661      data</a>.</li>      data</a>.</li>
662      <li>If the <code>data</code> attribute value contains      <li>If the <code>data</code> attribute value contains a string
663      a string <code>?></code>, or starts with either      <code>?></code>, then raise a
664      <code class=char>U+0009</code>, <code class=char>U+000A</code>,      <a href="#xml-well-formedness-error" id=wfe-pi-pic><code>xml-well-formedness-error</code></a>.</li>
665      <code class=char>U+000D</code>, or <code class=char>U+0020</code>      <li>If the <code>data</code> attribute value starts with either
666      character, then it is a      <code class=char>U+0009</code> <code class=charname>CHARACTER
667      <a href="#round-trip-error" id=rte-pi-data><code>round-trip-error</code></a>.</li>      TABULATION</code>, <code class=char>U+000A</code> <code class=charname>LINE
668        FEED</code>, <code class=char>U+000D</code> <code class=charname>CARRIAGE
669        RETURN</code>, or <code class=char>U+0020</code>
670        <code class=charname>SPACE</code> character, then raise a
671        <a href="#round-trip-error" id=rte-pi-s><code>round-trip-error</code></a>.</li>
672      <li>If the <code>childNodes</code> list of <var>n</var> contains      <li>If the <code>childNodes</code> list of <var>n</var> contains
673      any nodes, they are in      any nodes, then raise an
674      <a href="#xml-well-formedness-error" id=wfe-pi-child><code>xml-well-formedness-error</code></a>.</li>      <a href="#xml-well-formedness-error" id=wfe-pi-child><code>xml-well-formedness-error</code></a>.</li>
675      </ol>      </ol>
676    </dd>    </dd>

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.14

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24