Title: RE: contradictory encoding warning creates later error that doesn't g et thrown

Thanks.

    -----Original Message-----
    From:   Derek Harmon [SMTP:[EMAIL PROTECTED]]
    Sent:   Tuesday, August 21, 2001 6:08 PM
    To:     [EMAIL PROTECTED]
    Subject:        Re: contradictory encoding warning creates later error that doesn't g et thrown

    "Williamson, Siehnai" wrote:
    > First, shouldn't a contradictory encoding be an "error" rather than a mere
    > "warning"? 

    XML Sect. 4.3.3 appears to agree.  I don't know if the SAX
    specification lightens up on this requirement for any reason.
    Although, an "error" (as opposed to a "fatal error") need not
    halt processing.

    > Second, if these are considered mere warnings, then how do I get
    > processing to halt after a contradictory encoding has been discovered?

    Examine the SAXParseException that you receive when the warning( )
    method of your ErrorHandler implementation is called, using the
    getMessage( ) accessor.  If the warning message is suggestive of
    a contradictory encoding scheme, then call your ErrorHandler's
    fatalError( ) method (in essence, promote the warning to a fatal
    error.)


    Derek Harmon


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

Reply via email to