Table of contentsAppendices |
5.1 Validating and Non-Validating ProcessorsValidating and Non-Validating ProcessorsConforming XML Processor fall into two classes: validating and non-validating. Validating and non-validating processors alike MUST report violations of this specification's well-formedness constraints in the content of the Document Entity and any other Text Entity that they read. Validating processors MUST, at user option, report violations of the constraints expressed by the declarations in the Document Type Declaration, and failures to fulfill the validity constraints given in this specification. To accomplish this, validating XML processors MUST read and process the entire DTD and all external parsed entities referenced in the document. Non-validating processors are REQUIRED to check only the Document Entity, including the entire internal DTD subset, for well-formedness. While they are not required
to check the document for validity, they are REQUIRED to process
all the declarations they read in the internal DTD subset and in any parameter
entity that they read, up to the first reference to a parameter entity that
they do not read; that is to say, they MUST use the information
in those declarations to normalize
attribute values, include the replacement
text of internal entities, and supply default
attribute values. Except when Note that when processing invalid documents with a non-validating processor the application may not be presented with consistent information. For example, several requirements for uniqueness within the document may not be met, including more than one element with the same id, duplicate declarations of elements or notations with the same name, etc. In these cases the behavior of the parser with respect to reporting such information to the application is undefined. XML 1.1 processors MUST be able to process both XML 1.0 and XML 1.1 documents. Programs which generate XML SHOULD generate XML 1.0, unless one of the specific features of XML 1.1 is required. |