Glenn Marcy wrote: > > There is one thing about all this that I am not clear on. What happens > when validation is false? All of the discussion seems to assume that > validation will be set to true, but that may not be the case. The > SAX2 "validation" feature controls the reporting of validity constraint > failures, it does not necessarily change the "nature" of the XML > processor, and there is nothing in the XML spec that indicates that > one should be able to do so. A validating XML processor may be the only > processor that you have. Turning off validation just tells the processor > not to report validation failures, it does not make the XML processor > a non-validating one. Also, turning off validation does not turn off > things like attribute value defaulting or normalization. A validating > processor must still do those things. > > What does JAXP expect an XML processor to do when validation is false > if the processor still needs grammar processing information to function > properly?
I would say that the setValidation() method in JAXP refers to the definition of "validating" and "non-validating" processors in the XML REC. I believe, the SAX validation feature does also. BTW, I'd like to more clearly state what I believe is a problem... The XML REC says that when a "validating processor" parses an instance doc w/o a doctypedecl, an error should be reported. SAX specifies that turning on the SAX validation feature causes the parser to be a "validating processor" (or throw an exception). Therefore the parser is required to report an error. However, currently in Xerces, XMLSchema validation is turned on by default, so if the instance doc does not contain a doctypedecl but instead contains a pointer to an XSD, then no error will be reported as required by the XML REC. Therefore, I believe this behavior is not XML REC conformant in this case. An easy fix for this would be to turn off XMLSchema validation by default. -Edwin --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
