Yeh, something like "setVCFatal" or something like that. I guess we should, contrary to what i said before, make the validity errors non-fatal by default, since that probably is more in the spirit of the spec. But calling 'setVCFatal()' would make validity constraints fatal.
 
You should be able to make this relatively straightforward by just adding a check in the internal methods that the scanner and validator call to issue errors. If you add a check into the validator's emitError() method you can limit the check to that one place as to whether it should make the error fatal or not, right? If the VCFatal flag is on, it throws, else it just returns.

--------------
Dean Roddey
Software Geek Extraordinaire
Portal, Inc
[EMAIL PROTECTED]

-----Original Message-----
From: Khaled Noaman [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 26, 2001 1:28 PM
To: [EMAIL PROTECTED]
Subject: Re: Error vs FatalError

 
Currently, there is an option that can be set: 'setExitOnFirstFatalError'.
If it is not set, the parser will not exit when a fatal error is encountered.
So, if we make validation constraints just errors, you are suggesting that we have a similar method 'setExitOnFirstError' that is set to true by default, and
it's up the user to disable it. Am I correct?

Khaled

Dean Roddey wrote:

 It should be made optional if we are going to do it. So we could make the default the most restrictive, and have the option of telling it to be more lax if that is desired. I think we should always make it strict by default.--------------
Dean Roddey
Software Geek Extraordinaire
Portal, Inc
[EMAIL PROTECTED]
-----Original Message-----
From: Khaled Noaman [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 26, 2001 11:58 AM
To: [EMAIL PROTECTED]
Subject: Re: Error vs FatalError
 
Currently, all validation errors are considered fatal errors, and the parser will exit after the first broken validation constratint. Guys, I would like to know your opinion on making validation constraint violation just errors, and modify the XMLValidator to throw only when fatal errors are encountered.

Regards
Khaled Noaman
XML Parsers - IBM Toronto Lab
[EMAIL PROTECTED]
 

Alfredo Munoz wrote:

The xerces behaviour - at least it?s worked in this way for me - is that a
broken validation
constraint IS reported and resolved by the error() Handler interface method,
BUT if you Do nothing in the error() Handler then the parser EXIT.

If you want the parser to continue AFTER a broken validation constraint is
found out, you should "setExitOnFirstFatalError" to true, prior the
beginning of the parsing call. You can then catch the error in the error()
Handler method, report it to a lOG or whatever you want and rest sure
because the parser will still parse the document. it is a rare behaviour
because I expected that a "error" which is NOT "fatal" did not finish the
parsing.

Alfredo

-----Original Message-----
From: Alexey Miroshnichenko [mailto:[EMAIL PROTECTED]]
Sent: Jueves, 19 de Abril de 2001 07:59 a.m.
To: [EMAIL PROTECTED]
Subject: Error vs FatalError

Hello All,

  Can anyone answer for follow questions.

  What is the error? And What is Eatal Error? When we about parsing.
  Why parser do fatal error when it meets validation error?

  I had never get error from parser. Only fatal one.
  So, what's the difference?

  Thanks before
--
Best regards,
 Alexey                          mailto:[EMAIL PROTECTED]

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

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

Reply via email to