[XML-SIG] Documentation and problems

Lars Marius Garshol larsga@ifi.uio.no
18 Jan 1999 15:17:37 +0100

* Simon Pepping
| Note, however, that drv_pyexpat.py does not register a locator,
| while, if one registers the parser as the locator, it does implement
| the locator methods (except for the fact that it does not report the
| document, as noted before).

Ah, that's a bug. Thanks for reporting this! I'm afraid the pyexpat
driver saw very little testing, since I did not have pyexpat
available before I released it. (I do now.)

I've fixed this now, so the next release of the driver package will
have this.
| Do I understand correctly that the availability of a locator is not
| guaranteed, so that the application should test for this?

Yes. Not all parsers provide location information.

| Or should every SAX parser provide at least dummy locator methods so
| that calls to them do not generate errors, e.g. by inheriting from
| saxlib.Locator? 

I think it's better for the driver to be frank about this and not
register a locator if it doesn't actually have any location

| [Re <URL:http://www.hobby.nl/~scaprea/XML/t141.html>]
| I mean to say that the application in principle should have such
| methods, because the parser expects them and makes calls to them.
| The following paragraphs explain that these methods can be provided
| by inheriting the dummy methods from the provided sax library.  I
| still feel that I state this correctly.

I like the way you've written it now better. The only thing I really
would like to see changed is that you don't make it clear that
registering handlers is not required. It's implied now, but not stated
directly. (Yes, I am a nit-chaser. Feel free to ignore this.)

--Lars M.