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

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Thu, 19 Apr 2001 23:28:55 +0200


[...]
>             def create():
>                 """Return a new XMLReader instance."""
> 
>         def create_parser(features={}, properties={}):
>             """Return a configured parser object that supports the
>             given feature and property settings.  If more than one
>             SAXImplementation supports the given settings, one will be
>             selected arbitrarily."""

I'd prefer to extend on existing API, where the SAXImplementation
currently has a create_parser, and xml.sax currently has make_parser.

Apart from that, this proposal requires quite some API from an
individual parser module, so I'd rather see this implemented for, say,
expatreader, before changing the infrastructure to use the API. Even
writing a Python PEP might be appropriate.

Also, the question will be whether we provide that infrastructure only
for SAX2 parsers (of which we two at the moment), or also for the SAX1
drivers, which don't have the notion of features and properties at all
at the moment.

Regards,
Martin