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

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Thu, 19 Apr 2001 08:01:33 +0200


> I like.  But I think we'll want more than just a parser factory:

Certainly. This one was specifically about xml.sax.make_parser.

> properties = {"http://factory.pyxml.org/properties/encoding": "BIG5",
>               "http://uche.ogbuji.net/my-extended-properties/spam": "eggs"}
> features = ["http://factory.pyxml.org/properties/xpointer"]
> xml.factory.getXsltProcessor(properties, features)

I'm not sure the same factory mechanism would work for all
classes. E.g. to select and configure a SAX parser, you need to do
setFeature/setProperty calls. To select a DOM implementation, you need
to check hasFeature on it, which triggered the
xml.dom.getDOMImplementation API. I'd rather obtain an XSLT processor
by calling xml.xslt.getProcessor (or xml.xslt.make_processor).

Regards,
Martin