[XML-SIG] sax Attributes interface

Martin v. Loewis martin@v.loewis.de
Wed, 21 Nov 2001 23:00:34 +0100


> The Attributes interface is defined in xml.sax.saxlib.
> 
> The AttributesImpl implementation implicitely implements this interface,
> and adds a new method, getNameByQName(self, name)
> 
>  1. shouldn't the implementation be made explicit, or is there a
> performance hit?

I can't see any advantage in doing so. Also, unless I'm mistaken,
Attributes is not part of Python proper, so adding this base class to
PyXML would mean that the SAX implementations diverge further.

Of course, that could be fixed by adding Attributes to Python proper,
then adding the inheritance to both Python and PyXML.

>  2. should the getNameByQName method be added to the Attributes interface,
> or is there a backward compatibility concern with other implementations of
> Attributes?

Looking at 1.11 of of saxlib.py, I see

    def getNameByQName(self, name):
        """Returns the namespace name of the attribute with the given
        raw (or qualified) name."""
        raise NotImplementedError("This method must be implemented!")

What is it that you want to change?

Regards,
Martin