[XML-SIG] SAX namespaces discussion status

Uche Ogbuji uogbuji@fourthought.com
Tue, 04 Jul 2000 10:20:40 -0600


> 
> * Lars Marius Garshol
> |
> | Paul listed four alternatives (the fifth seems to be identical with
> | #4). Here is my, slightly modified, version of that list. The qname or
> | prefix discussion we can leave for later, since it is really
> | orthogonal to the name representation issue.
> |
> | [...list snipped...]
> 
> * Uche Ogbuji
> | 
> | There's one axis you left out: qname versus prefix.  
> 
> Yes.  If you read my last sentence above you will see why. :-)

Whoa!  I guess you hit my blind spot.  Sorry.

> | So deciding all over again, 5 and 8 both look attractive.  As Greg
> | says, 8's modes can make genericizing SAX handlers (say for filters)
> | tricky.  But on the other hand, there would have to be a raft of
> | conditionals for processing 5 generically.
> 
> What are you thinking about when you say 'a raft of conditionals'?

Well, not that you hold me to the test, I guess it's not really a "raft".  
Basically, if someone were writing a generic app with different actions in 
namespace and non-namespace mode, they would have to have a conditional such 
as:

def startElement( self, name, qname, attrs ):
    if type(name) == type(()):
        uri, lname = name
        #namespace processing
    else:
        #non-namespace processing

Not the end of the world, of course, but we must remember that there are applications, filters, for example, that would have to deal with either mode.

-- 
Uche Ogbuji                               Principal Consultant
uche.ogbuji@fourthought.com               +01 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