[XML-SIG] SAX Namespaces

Paul Prescod paul@prescod.net
Mon, 03 Jul 2000 21:14:38 -0500


Greg:
> Can somebody enumerate each of the options here so that we can restart the
> discussion?

These are the ones I can keep track of:

#1. def startElement( self, (uri, name), qname, attrs ):
	....

Question 1: what should uri, name and qname get when namespace
processing is off?
Question 2: qname or prefix

#2. def startElement( self, (uri,localname,qname), attrs ):
	....

Same questions

#3. def startElement( self, ((uri, localname), qname), atrs ):
	....

Same questions.

#4. def startElement( self, name, attrs ):
	....

Depending on whether you have turned on namespace processing, "name" is
either "string" or (uri,localname,qname)

Question: qname or prefix

#5. def startElement( self, name, atrs ):
	....

Same description and questions as above.

----

At this point, I don't care enough to argue anymore.

I think that #4. is nicely backwards compatible, doesn't put namespaces
stuff in people's faces unless they ask for it and will be a little more
efficient in the common case where SAX is used as a means to an end like
DOM, Pyxie, qp_xml or whatever. I think that having a tuple-format is
even more useful (and efficient) when you are trying to pass attribute
lists around.

-- 
 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