[XML-SIG] problem processing XML files

Paul Prescod paul@prescod.net
Mon, 30 Aug 1999 09:03:55 -0400


Berthold Hoellmann wrote:
> 
> but not the XML structure as expected. Does the parser silently ignore
> syntax errors? 

The problem code is in FileReader:

        p = saxexts.make_parser(parserName)
        dh = SaxBuilder()
        p.setDocumentHandler(dh)
        p.feed(stream.read())
        doc = dh.document
 
It doesn't set up an error handler. We haven't decided what the base SAX
module should do when there is no error handler. It's pretty clear that
it should *either* output error messages to stderr (what XML/SGML tools
have done traditionally) or it should throw an exception.

In this case, though, dom.utils should probably set up an explicit error
handler until we figure out a good default.

 Paul Prescod