[XML-SIG] problem with empty namespace uri

Uche Ogbuji uche.ogbuji@fourthought.com
Sun, 28 Jan 2001 09:16:42 -0700


> I'm testing Narval with what is currently in the CVS for 4Suite and
> PyXML. I noticed a weird behaviour in 4DOM which is probably
> parser-related, so this is why I post here.
> 
> If I build a DOM using the default non-validating parser, attributes that
> have no namespace are available by specifying an empty string as the
> namespace uri parameter to getAttributeNS().
> 
> Now, if I build a DOM using the default validating parser, using an empty
> string won't do the trick. Instead, I have to use None as the namespace
> uri.
> 
> I think this is a problem with the sax2 driver for xmlproc, or maybe
> xmlproc itself. I'll look into it and submit a patch if I can figure it
> out. 

Hmm.  I introduced this behavior while fixing another drv_pyexpat bug (default 
namespaces on unprefixes attributes were being returned as the namespace of 
the element).

I thought None was an acceptable NSUri in Python SAX2.  The docs certainly 
seem to think so.  No big deal returning "" instead.  I saw your patch.  Have 
you checked this in, or should I?


-- 
Uche Ogbuji                               Principal Consultant
uche.ogbuji@fourthought.com               +1 303 583 9900 x 101
Fourthought, Inc.                         http://Fourthought.com 
4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA
Software-engineering, knowledge-management, XML, CORBA, Linux, Python