[XML-SIG] Re: SAX parser factories (Was: PyTRaX?)

Lars Marius Garshol larsga@garshol.priv.no
19 Apr 2001 09:35:01 +0200


* Martin v. Loewis
| 
| My proposal would be to add two keyword arguments, properties= and
| features=. Each is a list of binary tuples, each tuple has name and
| value. Alternatively, dictionaries might be better.

I like this, and have been thinking about making something similar for
SAX as an add-on outside the core API. I would much prefer
dictionaries, BTW.
 
| make_parser will the iterate over all known parser factories, invoking
| create_parser for each, then trying to set all the properties and
| features. It will return the first parser that supports all of them,
| and return a configured instance.

Yep. This was my idea as well.
 
| There should also be a function xml.sax.register_parser, which accepts
| an object that has a create_parser function, or a string naming a
| module that has a create_parser function.

Sounds good to me.

But is this a proposal for a PyTRAX processor factory or for a SAX
parser factory? If the latter, do you think this should go into core
Python?

--Lars M.