[XML-SIG] SAX parser factories (Was: PyTRaX?)
Lars Marius Garshol
larsga@garshol.priv.no
20 Apr 2001 10:47:27 +0200
* Thomas B. Passin
|
| I don't like make_parser() and create_parser() approach because the names
| are so similar as to lead to confusion.
That's a good point, but only make_parser() is externally visible. The
only people who need to care about create_parser() is those making SAX
drivers that they want to make available to the make_parser() factory.
So far that has only been the XML-SIG, and I think we could change
that without too much pain for anyone, if we find it worthwhile.
| I do like the proposal to ask for a list of processors that support
| a feature list, which ability wuld be separate from actual parser
| creation. I say a list because if more than one had my features, I
| might want to choose one rather than another, not just take
| whichever one the system wanted to give me.
Also a good point. So perhaps this should be a different function,
then. It also seems that we should have a parser name property to make
it easier to see which parsers have been returned.
| Also, with the has_features() approach, it would be possible to keep
| a simple features catalog which would avoid the need to instantiate
| a processor so it could be asked if it had some feature.
I think it's worth the trouble to instantiate a processor, since that
is the only reliable way to check if the processor actually has all
the modules it needs to work.
--Lars M.