--- markup/xml/xmlcc/xmlcc-work.en.html 2008/03/28 15:37:01 1.24 +++ markup/xml/xmlcc/xmlcc-work.en.html 2008/03/29 02:22:57 1.25 @@ -226,13 +226,15 @@

When an XML document is parsed, the following clauses are applied:

-
-
For each document +
+
For the document
If the XML document does not begin with an XML declaration, then the parser MUST raise an xml-misc-recommendation. -
For each internal general entity declaration processed by the parser +
For the document type declaration +
@@ read external entity +
For each internal general entity declaration being processed by the parser
If the EntityValue part of the general entity declaration contains a bare U+003C @@ -241,15 +243,57 @@ xml-misc-warning. -
For each element type declaration processed by the parser -
If there is another element type declaration whose Name - is equal to the Name of the element type declaration, then - the parser MUST raise an +
For each element type declaration being processed by the parser +
If there is another processed element type declaration whose + Name is equal to the Name of the element type + declaration, then the parser MUST raise an xml-validity-error. +
For each attribute definition list declaration being processed by the +parser +
If there is another processed attribute defintion list declaration whose + Name is equal to the Name of the attribute + definition list declaration, then the parser MUST + raise an + xml-misc-warning. +
For each attribute definition in the attribute definition list + declaration, if there is another processed attribute definition whose + Name is equal to the Name of the attribute + definition (whether or not in the same attribute definition list + declaration), then the parser MUST raise an + xml-misc-warning. + + +
For each entity declaration being processed by the parser +
If the entity declaration declares a parameter entity and the + Name of the entity begins with the string xml + (in any combination of upper- and lowercase letters), then the parser + MUST raise an + xml-misc-warning. +
If the entity declaration contains the EntityValue, then + for each occurence of any references to unparsed entities in the + EntityValue, the parser MUST raise an + xml-misc-error. + + +
For each notation declaration being processed by the parser +
If there is another processed notation declaration whose + Name is equal to the Name of the notation + declaration, then the parser MUST raise an + xml-validity-error. + +
For each empty-element tag
If the Name of the tag is not declared by a processed element type declaration as EMPTY content, then the parser @@ -260,9 +304,52 @@ type declaration as EMPTY content, then the parser MUST raise an xml-misc-recommendation. + +
For each parameter entity reference +
If the declaration for the entity is not read (i.e. no declaration + for the entity is processed or the external entity referenced by the + declaration cannot be retrieved), then: +
    +
  • If the parameter entity is contained in a declaration, then the + declaration MUST be ignored except that + any error before the parameter entity MUST be + raised as usual. +
  • If the parameter entity is contained in the status portion of a + conditional section, then the conditional section + MUST be processed as if it were an + IGNOREd section. +
  • The parser MUST NOT process any entity or + attribute-list declaration after the parameter entity reference in the DTD + except when the standalone pseudo-attribute of the + XML declaration (if any) is set to yes. + + +
  • If the parameter entity reference is the first reference to an entity + that is not read, then the parser MUST raise an + entity-error. +
  • The allDeclarationsProcessed @@ ref + attribute of the Document node MUST be + set to false. +
+
For each general entity reference in an attribute value or in the content +of an element +
If the declaration for the entity is not read (i.e. no declaration for + the entity is processed or the external entity referenced by the declaration + cannot be retrieved), then: +
    +
  • If the general entity reference is the first reference to an entity + that is not read, then the parser MUST raise an + entity-error. + @@ entity declared WFC? +
  • An unexpended entity reference node MUST be inserted to the current node. +
-

In addition, the parser MUST check whether the +

@@ MUST try to read external entity + +

In addition, the parser has to check whether the following constraints are met.

Well-formedness constraints. For each violation to @@ -272,8 +359,6 @@ constraints is below:

Other creteria. For each violation to @@ -311,12 +395,6 @@ text declaration. - + +

The parser MUST raise an +xml-well-formedness-error +for any failure to match to a production rule in the XML specification. + @@ -428,9 +516,9 @@ case combination), then raise an xml-misc-warning. @@ except for attribute names xml:lang, -xml:space, xml:base, xml:id, +xml:space.