[XML-SIG] handle drv_xmlproc_val SAXParseExceptions

Martin v. Löwis martin@v.loewis.de
05 Dec 2002 22:11:45 +0100


"Remy C. Cool" <dev-xml@smartology.nl> writes:

> This is SAX2 correct ?

Yes, it looks right

> I also 'fixed' the DTD and the DTD warnings are gone ... but the 
> TypeError remains. 

Perhaps you just look closely at the exception :-)

self.err_handler.warning(saxlib.SAXParseException(msg,None,self))
TypeError: object of type 'list' is not callable

and in the handler you write

   def warning(self, exception):
      	# warning ... record
      	self.warning.append(exception)
      	print exception

I *think* you have ommitted some essential part, e.g.

   def __init__(self):
        self.warning = []

What do you think self.err_handler.warning is after that
initialization?

Regards,
Martin