Andy, thanks for the response.

My assumption was that any error in the content model is simply ignored,
hence leaving content model parse state unchanged.

For my immediate purposes I've simply applied a local "patch" to the
test in XMLSchemaValidator#handleStartElement to test fCurrCMState[0]
for XSCMValidator#FIRST_ERROR or XSCMValidator#SUBSEQUENT_ERROR. This
doesn't actually leave the CM parse state unchanged, but it seems to do
enough for my purposes (sadly all content from that point on is
erroneous, even if it shouldn't be). I'll look into how to leave the CM
parse state unchanged when I have time!

I most likely have not understood the full impact of doing this, but
having too many errors reported is better than not enough in my
application.

Phil :n.

On Tue, 2004-01-06 at 02:41, Andy Clark wrote:
> Phil Weighill-Smith wrote:
> > I am using XERCES to validate XML documents against an XSD schema. I
> > have discovered that only the first content model error is reported.
> > However, I need to be able to identify as many errors as possible in one
> > pass. Thus I'm requesting that a new feature be added to (at least) the
> > SAX parser to permit *all* content model errors to be reported instead.
> 
> Currently, the validator components in Xerces don't have
> the ability to report more than the first error found at
> each element level due to the way that they're implemented.
> 
> Also, what is the parser supposed to do when it finds the
> first error? Should it ignore that element/content and
> continue from where it was in the model? Should it try to
> be predictive about what the user *meant* the element to
> be? Going one way or the other could produce a lot of
> meaningless errors to be reported.
> 
> In short, some approximation of this behavior could be
> implemented but I don't see it being done by anyone here
> at the present time. Now if you'd like to take a stab at
> implementing this functionality that would be great! :)
> Just don't make the validation any slower when the feature
> is turned off.
-- 
Phil Weighill-Smith <[EMAIL PROTECTED]>
Volantis Systems

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to