[XML-SIG] Python 1.6 XML APIs

Paul Prescod paul@prescod.net
Tue, 20 Jun 2000 15:45:44 -0500

Lars Marius Garshol wrote:
> ...
> |  saxexts - most of this is not useful until you have more than one
> | parser
> Actually, this is essential, because it allows you to write code that
> is independent of a specific installation. If this is in the core
> distribution you can always use it without worrying about what the
> user may or may not have installed.

If they have Python then we know they have PyExpat. We can use that by
default. If they want to be able to move magically (as opposed to
"easily") between multiple parsers then they can install the XML
distribution and get all of the magic with choosing parsers based on
features automatically etc.

> Once I get some feedback on how slim we want the saxlib in the core to
> be it is easier to get an idea of what to do.

I don't know either. My target would be "one module and one driver". We
don't have a benevolent dictator in this area so we're on our own.

Breaking the xml distribution is to be avoided but it is a relatively
minor issue compared to adding modules to Python core "the right way".

The XML distro version should install "around" the core libraries and
build on them. Of all this stuff, the only thing I consider essential is
that PyExpat be able to expose a SAX2 API. Helper functions are gravy.

According to the version I have, drv_pyexpat has one minor dependency on
saxutils and major ones on saxlib. saxlib has no dependencies. Therefore
I propose that we include drv_pyexpat and saxlib. We can break the minor
dependency by moving a class. We should rename drv_pyexpat to
"saxparser" and I would like a brain-dead simple "import saxparser;
saxparser.parse( filename, handler, otherargs ) to do the right thing.

I could do this work tonight but I may hurt more than help in terms of
multiple versions of files floating around. It's up to you.

 Paul Prescod  - ISOGEN Consulting Engineer speaking for himself
"Music is the stuff between the notes." - Claude Debussy