[XML-SIG] SAX Namespaces

tpassin@home.com tpassin@home.com
Tue, 4 Jul 2000 12:46:32 -0400


Paul Prescod summarized five possibilities for passing element names around.
I agree with Greg Stein that you should not return a different kind of beast
depending on whether a processor option is on or off (NS support, in this
case).  So a name should not be a tuple one time, and a string another time.

I also agree with him that you should group together the two key pieces so
they can be used as a single unit, which is probably how they will normally
be used.  This means (uri, localname) belong together, and
(uri,localname,qname) do not.  ((uri,localname),qname) would work.  So would
((uri,localname),prefix).  I also using the prefix over the entire rawname.

Cheers,

Tom Passin

Paul wrote:
> 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.
>
> ----
>