[XML-SIG] SAX exceptions are odd

Jeremy Hylton jeremy@beopen.com
Thu, 5 Oct 2000 12:32:34 -0400 (EDT)

I am just learning how to use SAX and am a bit puzzled by a few of the
exceptions that get raised or not raised.

If I call on parse on an empty file, I get no exception.  Is this
desirable?  I assume it means that "" is well-formed XML, but that
doesn't seem like a very helpful definition.  Is this right?

If I get almost any other exception I get an error message that says
something like: "not well-formed at None:1:7"

Why is None being printed?  It gave me the initial impression that my
error was no setting up parse call correctly.  I assumed that the None
was the cause of the exception and that under normal circumstances it
would have said something like "not well-formed at foo.xml:1:7".

What is a system identifier and why should it be reported in an
exception when it is None?

I also think the format is odd.  There are three different pieces of
information separated by colons.  I am accustomed to the notation
filename:line number, but not another colon for the cursor position.
It would have been clearer, I think, if the message were more verbose
and explained what each field was.