[XML-SIG] SAX Namespaces

Paul Prescod paul@prescod.net
Mon, 03 Jul 2000 19:50:57 -0500


Uche Ogbuji wrote:
> 
> ...
> 
> Also, Paul seems to be arguing that "direct-to-SAX" programmers should change
> their ways and move to higher-level APIs.  I think that's unfair.  I avoid SAX
> myself, but I know from many people that they prefer that route and why should
> we strong-arm them to another approach?  Let pulldom or pyxie or DOM or
> whatever win out on its merits, not by making SAX more difficult.

I don't see the APIs as in competition.

I see it as trying to make APIs that do the best they can at a
particular job. If SAX is not efficient enough, people will go around it
and use the PyExpat API directly. Then SAX lives in a purgatory where it
is not easy enough to be popular with programmers looking for ease of
use nor efficient enough to be popular among programmers who need
absolute speed. Better performance will make SAX more, not less, popular
-- but quite possibly popular with a different crowd of people.

> ... A while back you seemed a bit dismayed when you found that
> 4XPath and 4XSLT used C modules, but here you seem to be advocating moving at
> least some XML tools to C.

If something needs C, it needs C. That's why we're putting PyExpat into
Python 1.6. I said that I wasn't convinced that XPath parsing needed C
yet. Nobody has tried to do it with SRE yet. If an SRE-based parser
demonstrates the performance problems you described when you tried a
Python approach before then C will be the right choice.

> I still think that there is no reason why Python/XML tools shoudln't be in C
> as long as the maintainers take responsibility to port or assist in porting to
> all Python platforms.

I agree. I think you'll also agree that C is harder to maintain than
Python. I don't think that we disagree here.

> IMO it's a bad idea to suddenly change it all now.

My understanding was that the details of namespace support were still an
open question. The AttributeList change is a new one intended to improve
performance. I have thought things through a lot more since we discussed
these issues before.

-- 
 Paul Prescod - Not encumbered by corporate consensus
The calculus and the rich body of mathematical analysis to which it 
gave rise made modern science possible, but it was the algorithm that 
made the modern world possible.
	- The Advent of the Algorithm (pending), by David Berlinski