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

Mike Olson Mike.Olson@fourthought.com
Thu, 19 Apr 2001 09:12:35 -0600


"Martin v. Loewis" wrote:
> 
> > Good point. There does need to be something along the lines of the
> > make_parser function in SAX.
> 
> 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.
> 
> 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.
> 
> 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.
> 
> What do you think?


Can you still specify a parser to avoid the iteration?  What about
setting a default?

Mike
> 
> Regards,
> Martin
> 
> _______________________________________________
> XML-SIG maillist  -  XML-SIG@python.org
> http://mail.python.org/mailman/listinfo/xml-sig

-- 
Mike Olson				 Principal Consultant
mike.olson@fourthought.com               (303)583-9900 x 102
Fourthought, Inc.                         http://Fourthought.com 
Software-engineering, knowledge-management, XML, CORBA, Linux, Python