[XML-SIG] easySAX

Paul Prescod paul@prescod.net
Fri, 21 May 1999 17:48:37 -0500


"Fred L. Drake" wrote:
>
>   This presents a very real problem: xmllib is already standard and
> documented, and therefore "in use".  Deprecating it is a problem
> because people will need to update their code for what will probably
> be a mostly minimal difference (for existing code).  

I was thinking that deprecating it would just mean that new people would
stop using it. As regex says: "This module is obsolete as of Python
version 1.5; it is still being maintained because much existing code still
uses it."

>   That's not to say an additional API can't be added, but a second
> event-based interface is not necessarily a good idea.  Perhaps a
> compromise API can be created which extends the xmllib interface with
> the pi_*(), ppi_*(), and text_*() methods?  Extending the existing
> interface is not a problem as far as I can tell.  

I kind of think that the current interface is too large and complicated
already. easySax was going to be something like 6 or 8 callbacks. xmllib
is already something like 16 or 17.

Another option would be to merge the interfaces but deprecate all but the
6 or 8 *methods*. handle_charref, handle_entityref, handle_cdata and many
others will never be triggered by a sax parser (even sgmlop, if it is
talking to xmllib via sax).

-- 
 Paul Prescod  - ISOGEN Consulting Engineer speaking for only himself
 http://itrc.uwaterloo.ca/~papresco

Alabama's constitution is 100 years old, 300 pages long and has more than
600 amendments. Highlights include "Amendment 393: Amendment of Amendment
No.  351", "Validation of Laws Regulating Court Costs in Randolph County",
"Miscegenation laws", "Bingo Games in Russell County", "Suppression
of dueling".  - http://www.legislature.state.al.us/ALISHome.html