[XML-SIG] Re: saxlib 1.0beta

Paul Prescod papresco@technologist.com
Fri, 08 May 1998 11:49:25 -0400


Jack Jansen wrote:
> 
> Of course, this all changes if any of the XML parsers gets incorporated in the
> Python core, but even then I think keeping xmllib as a fallback method is a
> good idea.

As a fallback, it's fine. As the default, "standard", I don't like it. It
isn't as powerful, it isn't much simpler, and it is idiosyncratic. Methods
like setnomoretags, setliteral, translate_references, handle_doctype,
handle_entityref, (debatably) handle_comment, handle_cdata,
handle_special, unknown_starttag and unknown_endttag made sense in the
context of a tool specifically for Grail, but not much in the context of
generalized XML processing. XML has no equivalent to some of them, and the
parser should handle others "all by itself". 

So I don't think that the interface is intuitive to an XML hacker. And the
implementation needs a bunch of work also, because again it is a nice
tweak of code that was fundamentally designed for Grail.

If SAX isn't Python-esque enough, then I would prefer to touch it up and
create a delegating wrapper for handling non-Python parsers. Then we will
have the best of both worlds: XML optimized and Python optimized.

 Paul Prescod  - http://itrc.uwaterloo.ca/~papresco

Can we afford to feed that army, 
 while so many children are naked and hungry?
Can we afford to remain passive, 
 while that soldier-army is growing so massive?
  - "Gabby" Barbadian Calpysonian in "Boots"