[XML-SIG] Expat strategy

Ken MacLeod ken@bitsko.slc.ut.us
31 Jan 2000 14:03:56 -0600

Paul Prescod <paul@prescod.net> writes:

> 2. API
> We had talked of embedding SAX directly in PyExpat but in retrospect I
> don't think that there is any need to do so. We can layer SAX 1 and 2 on
> top of a transliterated Expat API without any loss of performance. This
> is true because of Expat's handler architecture. Even if you layer
> xmllib on top of sax 1 on top of another implementation of xmllib on top
> of another layer of sax 2 on top of expat, you get high performance if
> the "handler" is the same method at all levels. In other words, we can
> "wrap" expat at the Python level without doing any proxying of events.

> So let's expose the raw Expat API and build SAX 1 and SAX 2 layers on
> top of it. 

I agree that there's no reason to try to "block" the raw API from
being used, but general usage documentation should focus on SAX.
Otherwise new module authors might write to the raw interface and
lose interoperability with other SAX modules.

  -- Ken