[XML-SIG] [ pyxml-Bugs-421553 ] stylesheet node reader requires '' NSURI

Fred L. Drake, Jr. fdrake@acm.org
Tue, 8 May 2001 16:15:29 -0400 (EDT)

Karl Anderson writes:
 > Can anyone shine some light on which DOM implementation is right here?
 > After parsing an attribute with no namespace prefix, what namespace
 > URIs should it be possible to retrieve that attribute with?
 > For example, after parsing "<spam version="1.0"/>" in a namespace
 > aware way, which should return "1.0":
 > getAttributeNS(None, 'version')
 > getAttributeNS('', 'version')

  The former is correct according to past discussions in this mailing

 > Only the URI of '' works for Domlette.  Only the URI of None works for
 > ParsedXML.  I think that ParsedXML's restriction is morally better
 > because of this line from the DOM rec:

  Domlette is broke!

 > OTOH, I've lost arguments when it was pointed out that you don't have
 > to use DOM methods when you're parsing, and in fact can't parse
 > everything if you're restricted to them.  OTOH again, using None would
 > make parsing consistent with setting namespaceless names using DOM
 > methods.

  Using None would be the right thing because that's the Python DOM

 > ParsedXML doesn't work for the XSLT modules in the current PyXML
 > checkout because they use '' as the NSURI to use to retrieve NSless
 > attributes.

  That stinks!

 > Should ParsedXML allow names parsed without a NS to be retrieved
 > with a NSURI of '' as well as None?  Should Domlette allow None?
 > Should None be used in getAttributeNS calls like these, regardless?

  Only None needs to be supported as an indication of "no namespace";
"" is different.  (And probably broken.)


Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Digital Creations