[Sax-devel] SAX spec clarification
Brought to you by:
dmegginson
From: Edwin G. <ed...@su...> - 2001-12-17 06:18:00
|
Question about the SAX "validation" feature... The SAX docs say: "controls whether the parser is reporting all validity errors; if true, all external entities will be read." and the default value is "unspecified". Sec 5.1 of the XML REC says: [Definition: Validating processors must, at user option, report violations of the constraints expressed by the declarations in the DTD, 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. If SAX "validation" feature is "true", then the parser is required to be a "validating processor" with respect to the XML REC and it is also the "user option" refered to above that controls the reporting of validity constraints. If SAX "validation" feature is "false", then the parser can either be a "non-validating processor" or a "validating processor" with respect to the XML REC. In either case, no validity constraint violations are reported to the application. Is the above correct? If so, then if one wanted to use SAX for a non-validating processor which read all external entities (both "external-general-entities" and "external-parameter-entities" "true"), how would this be different from using a validating processor with "validation" set to "false"? All I can come up with is that the validating processor must inform the app of white space in element content, but I'm probably missing something. -Edwin |