[XML-SIG] handle drv_xmlproc_val SAXParseExceptions

Remy C. Cool dev-xml@smartology.nl
Thu, 5 Dec 2002 22:19:09 +0100


I've double checked that part, but it was a long day today so I could 
have overlooked something.

This is my __init__ :

def __init__(self):

      # containers
      self.warning = []
      self.error = []

      # flags
      self.is_inside_template_tag = 0
      self.description = ''
      self.is_inside_description_tag = 0

The self.warning and self.error lists are declared, so that's not the 
problem. I'll run some tests on that. 

Regards,
Remy


On Thursday 05 December 2002 22:11, Martin v. Löwis wrote:
> "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
>
> _______________________________________________
> XML-SIG maillist  -  XML-SIG@python.org
> http://mail.python.org/mailman/listinfo/xml-sig