[XML-SIG] problem with empty namespace uri

Uche Ogbuji uche.ogbuji@fourthought.com
Mon, 29 Jan 2001 14:11:40 -0700


> Lars Marius Garshol wrote -
> >
> > My opinion is that names that have no namespace URI should be
> > represented using None rather than "".
> >
> I completely agree with this.  If there is ***no*** namespace, the ns value
> should be None.  The empty string should indicate that there is a namespace,
> but its value happens to be empty.
> 
> Illustrations seem to be like this - someone help me out here, please.
> 
> 1) No namespace is declared or used in the whole document, but SAX2 is in use.
> (ns='')

Hmm.  According to XMLNS 1.0, we shouldn't be differentiating this case.  I'd 
say (ns=None)

> 2) SAX 1 is in use. (ns=None)

It's not really applicable to SAX1: no ns-aware interfaces.

> 3) Namespaces are used in the document, but not in some particular element.
> (ns='' for that element)

OK.  Now I'm confused.  I guess you actually propose (ns='') to mean "no 
namespace on this name).

> This leaves open the ns for an attribute in an element that declare a default
> ns - the old question that comes up over and over.  I don't know the answer.

Pretty clear.  The processor should report no namespace.  It is up to the 
application to interpret differently, if it chooses to.


> I thought this had been hashed out and resolved on the list a while ago,
> although I don't remember the details.  This would be a perfect subject for
> one of those PEP-like pages I proposed a while ago.  I'd like to resurrect
> that suggestion, and have this topic be the subject of the first one.  What do
> you say?

I think it's a great idea.  For instance, the XPath API work could have been 
proposed and worked on in PEP fashion.  The problem is getting someone to set 
it up.


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