[XML-SIG] SAX parser factories (Was: PyTRaX?)
Martin v. Loewis
martin@loewis.home.cs.tu-berlin.de
Thu, 19 Apr 2001 08:06:19 +0200
> > I like. But I think we'll want more than just a parser factory:
> >
> > 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)
>
> Or should that be
>
> urn:factory.pyxml.org:properties:encoding
>
> etc.?
I'm not sure whether requiring URIs as configuration keys is such a
smart idea, anyway. SAX uses that approach, DOM uses simple strings
(like 'core' or 'mutationevents'). Works equally well, IMO. Even for
SAX, most Python users probably don't write
p.setFeature("http://xml.org/sax/features/namespaces", 1)
but
from xml.sax.handler import feature_namespaces
...
p.setFeature(feature_namespaces, 1)
Regards,
Martin