Hello, As Sandy indicates, the XML Schema REC specifies that assessment outcome, validation errors, etc., are to be recorded in the post-schema-validation infoset. It is true that if a processor attempts to assess a document for which there is no schema specified, then generally speaking, it is not an error, an error code is not included in the PSVI, and the PSVI will indicate what sort of assessment, if any, has taken place. (I said generally, because there *are* some special cases).
The problem is, in Xerces-1, we had no way of telling the user that we didn't attempt assessment of a particular element information item (because we didn't provide any PSVI support), and even in Xerces-2, although there is PSVI information in the XNI pipeline, this information is not communicated back to the user application (there are no standard APIs to do so). We felt it was important to signal such a situation by reporting an error to the error handler (and based on problems reported to this mailing list, I suspect that it has been useful). Perhaps it would be good to make this a "warning" at this point, but we were worried about compatability with Xerces-1. Since the XML Schema speciification only talks about the PSVI, and does not concern itself with errorReporters, SAX and the like, I think there is some debate as to whether we are conformant with the specification or not. The PSVI we generate via XNI *is* correct (or, it should be :-)). The question is, what do we do now? What do users want? Should we downgrade the "error" we emit in such cases to a warning? Would that break people? Thx, Lisa. Please respond to Edwin Goei <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] cc: [email protected], Lisa Martin/Toronto/[EMAIL PROTECTED] Subject: Re: Schema Question - parser behavior w.r.t schemaLocation attribute [EMAIL PROTECTED] wrote: > > > then the parser should report "Validation OK" or it should be silent or > it should report error? > > There are two ways of interpreting the word "report": > > 1. The way described by the schema spec: PSVI. When a grammar is not > available for validating the document, then it's not "assessed", and the > validity is "unknown". So no error should be reported here. > > 2. The way defined by parser interface: error handler. When a parser is > "silent", it means "Validation OK". So the parser can't be silent in the > case you mentioned. For the time being, Xerces chooses to report an error > saying "not decl found for ...". This brings up an issue that I recently posted to the list but got no reponses to. As you note, the current behavior is that validating an instance doc that does not have any grammar associated with it causes an error to be reported. I was under the impression from Lisa Martin that the IBM Toronto developers thought this does not conform to the W3C XML Schema spec. So the current JAXP 1.2 draft spec also specifies this condition to not be an error. In summary, the current implementation of Xerces2 does not conform to the W3C XML Schema spec or the current JAXP 1.2 draft spec, which is a bug that needs to be fixed. Has this issue been fully resolved? -Edwin --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
