494 |
ignored. --> |
ignored. --> |
495 |
|
|
496 |
<dt>For each parameter entity reference |
<dt>For each parameter entity reference |
497 |
<dd>If the declaration for the entity is not read (i.e. no declaration |
<dd><p>Process as follows: |
498 |
for the entity is processed or the external entity referenced by the |
<ol> |
499 |
declaration cannot be retrieved), then: |
<li>If the declaration for the entity is <em>not</em> processed, |
500 |
|
then: |
501 |
|
<dl class=switch> |
502 |
|
<dt>If the document contains no external entity or if the document |
503 |
|
contains the <code>standalone</code> pseudo-attribute set to |
504 |
|
<code>yes</code><!-- or the document contains no DTD --> |
505 |
|
<dd>The parser <em class=rfc2119>MUST</em> raise an |
506 |
|
<a href="#xml-well-formedness-error" id=wf-entdeclared-pe><code>xml-well-formedness-error</code></a>. |
507 |
|
<dt>Otherwise |
508 |
|
<dd>The parser <em class=rfc2119>MUST</em> raise an |
509 |
|
<a href="#xml-validity-error" id=vc-entdeclared-pe><code>xml-validity-error</code></a>. |
510 |
|
</dl> |
511 |
|
<li>If the declaration for the entity <em>is</em> processed but the |
512 |
|
referenced entity cannot be retrieved, then the parser |
513 |
|
<em class=rfc2119>MUST</em> raise an |
514 |
|
<span class=ed>@@ ??-error</span>. |
515 |
|
</ol> |
516 |
|
|
517 |
|
<p>In any of two cases above, process as follows: |
518 |
<ul> |
<ul> |
519 |
<li>If the parameter entity is contained in a declaration, then the |
<li>If the parameter entity reference is contained in a declaration, then |
520 |
declaration <em class=rfc2119>MUST</em> be ignored <em>except</em> that |
the declaration <em class=rfc2119>MUST</em> be ignored <em>except</em> that |
521 |
any error before the parameter entity <em class=rfc2119>MUST</em> be |
any error before the parameter entity <em class=rfc2119>MUST</em> be |
522 |
raised as usual. |
raised as usual. |
523 |
<li>If the parameter entity is contained in the status portion of a |
<li>If the parameter entity reference is contained in the status portion of |
524 |
conditional section, then the conditional section |
a conditional section, then the conditional section |
525 |
<em class=rfc2119>MUST</em> be processed as if it were an |
<em class=rfc2119>MUST</em> be processed as if it were an |
526 |
<code>IGNORE</code>d section. |
<code>IGNORE</code>d section. |
527 |
<li>The parser <em class=rfc2119>MUST NOT</em> process any entity or |
<li>The parser <em class=rfc2119>MUST NOT</em> process any entity or |
541 |
</ul> |
</ul> |
542 |
<dt>For each general entity reference in an attribute value or in the content |
<dt>For each general entity reference in an attribute value or in the content |
543 |
of an element |
of an element |
544 |
<dd>If the declaration for the entity is not read (i.e. no declaration for |
<dd><p>Process as follows: |
545 |
the entity is processed or the external entity referenced by the declaration |
<ol> |
546 |
cannot be retrieved), then: |
<li>If the <code>Name</code> of the entity reference is either |
547 |
|
<code>amp</code>, <code>lt</code>, <code>gt</code>, <code>quot</code>, |
548 |
|
or <code>apos</code>, then abort these steps. |
549 |
|
<li>If the declaration for the entity is <em>not</em> processed, |
550 |
|
then: |
551 |
|
<dl class=switch> |
552 |
|
<dt>If the document contains no external entity or if the document |
553 |
|
contains the <code>standalone</code> pseudo-attribute set to |
554 |
|
<code>yes</code><!-- or the document contains no DTD --> |
555 |
|
<dd>The parser <em class=rfc2119>MUST</em> raise an |
556 |
|
<a href="#xml-well-formedness-error" id=wf-entdeclared-ge><code>xml-well-formedness-error</code></a>. |
557 |
|
<dt>Otherwise |
558 |
|
<dd>The parser <em class=rfc2119>MUST</em> raise an |
559 |
|
<a href="#xml-validity-error" id=vc-entdeclared-ge><code>xml-validity-error</code></a>. |
560 |
|
</dl> |
561 |
|
<li>If the declaration for the entity <em>is</em> processed but the |
562 |
|
referenced entity cannot be retrieved, then the parser |
563 |
|
<em class=rfc2119>MUST</em> raise an |
564 |
|
<span class=ed>@@ ??-error</span>. |
565 |
|
</ol> |
566 |
|
|
567 |
|
<p>In any of two cases above, process as follows: |
568 |
<ul> |
<ul> |
569 |
<li>If the general entity reference is the first reference to an entity |
<li>If the general entity reference is the first reference to an entity |
570 |
that is not read, then the parser <em class=rfc2119>MUST</em> raise an |
that is not read, then the parser <em class=rfc2119>MUST</em> raise an |
579 |
<!-- In XML 1.0/1.1 spec, this is optional. --> |
<!-- In XML 1.0/1.1 spec, this is optional. --> |
580 |
</dl> |
</dl> |
581 |
|
|
582 |
<p class=ed>@@ MUST try to read external entity |
<p>The parser <em class=rfc2119>MUST</em> try to read any entity referenced |
583 |
|
by general or parameter entity references, the external subset entity, if any, |
584 |
|
and any general entity declared in the document type definition. |
585 |
|
|
586 |
<p>In addition, the parser has to check whether the |
<p>In addition, the parser has to check whether the |
587 |
following constraints are met. |
following constraints are met. |
612 |
<li><a href="http://www.w3.org/TR/2006/REC-xml-20060816/#vc-PEinMarkupDecl">Validity constraint: Proper Declaration/PE Nesting</a> |
<li><a href="http://www.w3.org/TR/2006/REC-xml-20060816/#vc-PEinMarkupDecl">Validity constraint: Proper Declaration/PE Nesting</a> |
613 |
<li><a href="http://www.w3.org/TR/2006/REC-xml-20060816/#vc-PEinGroup">Validity constraint: Proper Group/PE Nesting</a> |
<li><a href="http://www.w3.org/TR/2006/REC-xml-20060816/#vc-PEinGroup">Validity constraint: Proper Group/PE Nesting</a> |
614 |
<li><a href="http://www.w3.org/TR/2006/REC-xml-20060816/#condsec-nesting">Validity constraint: Proper Conditional Section/PE Nesting</a> |
<li><a href="http://www.w3.org/TR/2006/REC-xml-20060816/#condsec-nesting">Validity constraint: Proper Conditional Section/PE Nesting</a> |
615 |
|
<li><a href="http://www.w3.org/TR/2006/REC-xml-20060816/#vc-check-rmd">Validity constraint: Standalone Document Declaration</a> |
616 |
</ul> |
</ul> |
617 |
|
|
618 |
<p><strong>Other creteria</strong>. For each violation to |
<p><strong>Other creteria</strong>. For each violation to |
630 |
text declaration.</q> |
text declaration.</q> |
631 |
</ul> |
</ul> |
632 |
|
|
|
|
|
|
<!-- |
|
|
|
|
|
@@ Need detailed review, but maybe should be in parsing phase |
|
|
|
|
|
#vc-check-rmd Validity constraint: Standalone Document Declaration |
|
|
|
|
|
@@ Need dtailed review |
|
|
|
|
|
#wf-entdeclared Well-formedness constraint: Entity Declared |
|
|
#vc-entdeclared Validity constraint: Entity Declared |
|
|
|
|
|
--> |
|
|
|
|
633 |
<p>The parser <em class=rfc2119>MUST</em> act as if it is a |
<p>The parser <em class=rfc2119>MUST</em> act as if it is a |
634 |
<a href="http://www.w3.org/TR/2006/REC-xml-20060816/#dt-validating">validating |
<a href="http://www.w3.org/TR/2006/REC-xml-20060816/#dt-validating">validating |
635 |
XML processor</a> for the informing of white space appearing in |
XML processor</a> for the informing of white space appearing in |
648 |
|
|
649 |
<p>The parser <em class=rfc2119>MUST</em> raise an |
<p>The parser <em class=rfc2119>MUST</em> raise an |
650 |
<a href="#xml-well-formedness-error" id=wfe-syntax><code>xml-well-formedness-error</code></a> |
<a href="#xml-well-formedness-error" id=wfe-syntax><code>xml-well-formedness-error</code></a> |
651 |
for any failure to match to a production rule in the XML specification. |
for any failure for matching to a production rule in the XML specification. |
652 |
<!-- |
<!-- |
653 |
<li><a href="http://www.w3.org/TR/2006/REC-xml-20060816/#ExtSubset">Well-formedness constraint: External Subset</a> |
<li><a href="http://www.w3.org/TR/2006/REC-xml-20060816/#ExtSubset">Well-formedness constraint: External Subset</a> |
654 |
<li><a href="http://www.w3.org/TR/2006/REC-xml-20060816/#PE-between-Decls">Well-formedness constraint: PE Between Declarations</a> |
<li><a href="http://www.w3.org/TR/2006/REC-xml-20060816/#PE-between-Decls">Well-formedness constraint: PE Between Declarations</a> |