You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Williamson, Siehnai" <sw...@docucorp.com> on 2001/08/22 19:30:31 UTC

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

Thanks.

	-----Original Message-----
	From:	Derek Harmon [SMTP:loresayer@msn.com]
	Sent:	Tuesday, August 21, 2001 6:08 PM
	To:	xerces-c-dev@xml.apache.org
	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: xerces-c-dev-unsubscribe@xml.apache.org
	For additional commands, e-mail: xerces-c-dev-help@xml.apache.org